(function(e){return{checkAkismetKey:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return e(ju(t))}}}))(Up),Fp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"getVaultPressContent\",(function(){return o.a.createElement(ep,{module:{module:\"backups\"},support:{text:Us(\"Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error.\"),link:Vl(\"jetpack-support-backup\")}},Us(\"Your site is backed up.\"))})),ha()(Os()(n),\"getRewindBanner\",(function(){var e=n.getRewindMessage(),t=e.title,r=e.icon,i=e.description,a=e.url;return o.a.createElement(Hu,{title:t,icon:r,feature:\"rewind\",description:i,className:\"is-upgrade-premium jp-banner__no-border\",href:a})})),n}return Ma()(t,e),As()(t,[{key:\"getRewindMessage\",value:function(){var e=this.props,t=e.siteRawUrl,n=e.rewindStatus;switch(Object(Dt.get)(n,\"state\",!1)){case\"provisioning\":return{title:Us(\"Provisioning\"),icon:\"info\",description:Us(\"Jetpack Backup is being configured for your site.\"),url:\"\"};case\"awaiting_credentials\":return{title:Us(\"Awaiting credentials\"),icon:\"notice\",description:Us(\"You need to enter your server credentials to finish configuring Jetpack Backup.\"),url:Vl(\"calypso-settings-security\",{site:t})};case\"active\":return{title:Us(\"Active\"),icon:\"checkmark-circle\",description:Us(\"Your site is being backed up.\"),url:Vl(\"calypso-activity-log\",{site:t})};default:return{title:Us(\"Oops!\"),icon:\"info\",description:Us(\"The Jetpack Backup status could not be retrieved at this time.\"),url:\"\"}}}},{key:\"render\",value:function(){var e=this.props,t=e.rewindStatus,n=e.vaultPressData,r=Object(Dt.get)(t,\"state\",!1),i=Object(Dt.get)(n,[\"data\",\"features\",\"backups\"],!1);return!1!==r||i?o.a.createElement(Yu,Bc()({feature:\"site-backups-jetpack\"},this.props,{header:Us(\"Jetpack Backup\",{context:\"Settings header\"}),hideButton:!0}),\"unavailable\"===r?this.getVaultPressContent():this.getRewindBanner()):o.a.createElement(Yu,{header:Us(\"Jetpack Backup\",{context:\"Settings header\"}),hideButton:!0,action:\"site-backups-jetpack\"},o.a.createElement(ep,{module:{module:\"backups\"},support:{text:Us(\"Backs up your site to the global WordPress.com servers, allowing you to restore your content in the event of an emergency or error.\"),link:Vl(\"jetpack-support-backup\")}},Us(\"Checking site status…\")))}}]),t}(s.Component);ha()(Fp,\"propTypes\",{siteRawUrl:u.a.string,rewindState:u.a.string}),ha()(Fp,\"defaultProps\",{siteRawUrl:\"\",rewindState:\"\"});var zp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackOpenCard\",(function(){Uc.tracks.recordJetpackClick({target:\"foldable-settings-open\",feature:\"manage-plugins\"})})),ha()(Os()(n),\"configLink\",(function(){return o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:n.trackClickConfigure,target:\"_blank\",rel:\"noopener noreferrer\",href:Vl(\"calypso-plugins-manage\",{site:n.props.siteRawUrl})},Us(\"Choose which plugins to auto-update\"))})),n}return Ma()(t,e),As()(t,[{key:\"trackClickConfigure\",value:function(){Uc.tracks.recordJetpackClick({target:\"configure-plugins\",page:\"plugins-manage\"})}},{key:\"render\",value:function(){return o.a.createElement(Yu,Bc()({},this.props,{module:\"manage\",header:Us(\"Auto-update plugins\",{context:\"Settings header\"}),hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:this.props.getModule(\"manage\")},o.a.createElement(\"div\",null,Us(\"With Jetpack you can choose to have your plugins auto-updated with each new plugin release. You’ll get the latest security and bug fixes right away, ensuring your site stays secure.\"))),this.configLink())}}]),t}(s.Component)),Bp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackConfigureClick\",(function(){Uc.tracks.recordJetpackClick(\"configure-monitor\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.getOptionValue(\"monitor\"),t=this.props.isUnavailableInDevMode(\"monitor\");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:\"monitor\",header:Us(\"Downtime monitoring\",{context:\"Settings header\"})}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule(\"monitor\"),support:{text:Us(\"Jetpack will continuously monitor your site, and alert you the moment downtime is detected.\"),link:Vl(\"jetpack-support-monitor\")}},o.a.createElement(ku,{slug:\"monitor\",disabled:t,activated:e,toggling:this.props.isSavingAnyOption(\"monitor\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Get alerts if your site goes offline. We’ll let you know when it’s back up, too.\")))),o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:this.trackConfigureClick,target:\"_blank\",href:Vl(\"calypso-settings-security\",{site:this.props.siteRawUrl})},Us(\"Configure your notification settings\")))}}]),t}(s.Component)),Vp=(n(369),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"textarea\",Bc()({},Object(Dt.omit)(this.props,\"className\"),{className:Mc()(this.props.className,\"dops-textarea\")}),this.props.children)}}]),t}(o.a.Component));ha()(Vp,\"displayName\",\"Textarea\");var Hp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{whitelist:n.props.getOptionValue(\"jetpack_protect_global_whitelist\")?n.props.getOptionValue(\"jetpack_protect_global_whitelist\").local:\"\"}),ha()(Os()(n),\"currentIpIsWhitelisted\",(function(){return!!Object(Dt.includes)(n.state.whitelist,n.props.currentIp)})),ha()(Os()(n),\"updateText\",(function(e){n.currentIpIsWhitelisted(),n.setState({whitelist:e.target.value}),n.props.onOptionChange(e)})),ha()(Os()(n),\"addToWhitelist\",(function(){var e=n.state.whitelist+(0>=n.state.whitelist.length?\"\":\"\\n\")+n.props.currentIp;n.props.updateFormStateOptionValue(\"jetpack_protect_global_whitelist\",e),n.setState({whitelist:e}),Uc.tracks.recordJetpackClick({target:\"add-to-whitelist\",feature:\"protect\"})})),ha()(Os()(n),\"trackOpenCard\",(function(){Uc.tracks.recordJetpackClick({target:\"foldable-settings-open\",feature:\"protect\"})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.getOptionValue(\"protect\"),t=this.props.isUnavailableInDevMode(\"protect\"),n=o.a.createElement(ku,{slug:\"protect\",compact:!0,disabled:t,activated:e,toggling:this.props.isSavingAnyOption(\"protect\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},this.props.getModule(\"protect\").description));return o.a.createElement(Yu,Bc()({},this.props,{module:\"protect\",header:Us(\"Brute force attack protection\",{context:\"Settings header\"}),saveDisabled:this.props.isSavingAnyOption(\"jetpack_protect_global_whitelist\")}),o.a.createElement(Dp,{onOpen:this.trackOpenCard,header:n,className:Mc()({\"jp-foldable-settings-disable\":t})},o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule(\"protect\"),support:{text:Us(\"Protects your site from traditional and distributed brute force login attacks.\"),link:Vl(\"jetpack-support-protect\")}},o.a.createElement(Hl,null,this.props.currentIp&&o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-form-label-wide\"},Us(\"Your current IP: %(ip)s\",{args:{ip:this.props.currentIp}})),o.a.createElement(xc,{disabled:!e||t||this.currentIpIsWhitelisted()||this.props.isSavingAnyOption([\"protect\",\"jetpack_protect_global_whitelist\"]),onClick:this.addToWhitelist},Us(\"Add to whitelist\"))),o.a.createElement(ql,null,o.a.createElement(Kl,null,Us(\"Whitelisted IP addresses\")),o.a.createElement(Vp,{disabled:!e||t||this.props.isSavingAnyOption([\"protect\",\"jetpack_protect_global_whitelist\"]),name:\"jetpack_protect_global_whitelist\",placeholder:\"Example: 12.12.12.1-12.12.12.100\",onChange:this.updateText,value:this.state.whitelist})),o.a.createElement(\"span\",{className:\"jp-form-setting-explanation\"},Us(\"You may whitelist an IP address or series of addresses preventing them from ever being blocked by Jetpack. IPv4 and IPv6 are acceptable. To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100\",{components:{br:o.a.createElement(\"br\",null)}}))))))}}]),t}(s.Component)),qp=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{jetpack_sso_match_by_email:n.props.getOptionValue(\"jetpack_sso_match_by_email\",\"sso\"),jetpack_sso_require_two_step:n.props.getOptionValue(\"jetpack_sso_require_two_step\",\"sso\")}),ha()(Os()(n),\"handleTwoStepToggleChange\",(function(){n.updateOptions(\"jetpack_sso_require_two_step\")})),ha()(Os()(n),\"handleMatchByEmailToggleChange\",(function(){n.updateOptions(\"jetpack_sso_match_by_email\")})),ha()(Os()(n),\"updateOptions\",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption(\"sso\",e))})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.getOptionValue(\"sso\"),t=this.props.isUnavailableInDevMode(\"sso\");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:\"sso\",header:Us(\"WordPress.com login\",{context:\"Settings header, noun.\"})}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule(\"sso\"),support:{text:Us(\"Allows registered users to log in to your site with their WordPress.com accounts.\"),link:Vl(\"jetpack-support-sso\")}},o.a.createElement(\"p\",null,Us(\"Add an extra layer of security to your website by enabling WordPress.com login and secure authentication. If you have multiple sites with this option enabled, you will be able to log in to every one of them with the same credentials.\")),o.a.createElement(ku,{slug:\"sso\",disabled:t,activated:e,toggling:this.props.isSavingAnyOption(\"sso\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},this.props.getModule(\"sso\").description)),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.jetpack_sso_match_by_email,disabled:!e||t||this.props.isSavingAnyOption([\"sso\",\"jetpack_sso_match_by_email\"]),onChange:this.handleMatchByEmailToggleChange},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Match accounts using email addresses\"))),o.a.createElement(_u,{checked:this.state.jetpack_sso_require_two_step,disabled:!e||t||this.props.isSavingAnyOption([\"sso\",\"jetpack_sso_require_two_step\"]),onChange:this.handleTwoStepToggleChange},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Require accounts to use WordPress.com Two-Step Authentication\"))))))}}]),t}(s.Component)),Kp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"isAkismetFound\",(function(){if(!n.props.isPluginActive(\"akismet/akismet.php\"))return!1;if(n.props.searchTerm){var e=n.props.isPluginInstalled(\"akismet/akismet.php\");return[\"akismet\",\"antispam\",\"spam\",\"comments\",e.Description,e.PluginURI].join(\" \").toLowerCase().indexOf(n.props.searchTerm.toLowerCase())>-1}return!0})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,rewindStatus:this.props.rewindStatus,siteRawUrl:this.props.siteRawUrl},t=this.props.isModuleFound(\"protect\"),n=this.props.isModuleFound(\"sso\"),r=this.isAkismetFound(),i=\"active\"===Object(Dt.get)(this.props.rewindStatus,[\"state\"],!1),a=this.props.isModuleFound(\"vaultpress\")||i,s=this.props.isModuleFound(\"monitor\"),c=this.props.searchTerm;if(!c&&!this.props.active)return null;if(!(n||t||r||a||s))return null;var l=Lo(Object(Dt.get)(this.props.sitePlan,[\"product_slug\"])),u=this.props.activeSitePurchases.map((function(e){return Lo(e.product_slug)})),p=\"is-personal-plan\"===l,d=\"is-free-plan\"===l&&(u.includes(\"is-daily-backup-plan\")||u.includes(\"is-realtime-backup-plan\")),h=p||d?o.a.createElement(Fp,Bc()({},e,{vaultPressData:this.props.vaultPressData})):o.a.createElement(Tp,e);return o.a.createElement(\"div\",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:Us(c?\"Security\":\"Your site is protected by Jetpack. You’ll be notified if anything needs attention.\"),className:\"jp-settings-description\"}),a&&h,s&&o.a.createElement(Bp,e),r&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Lp,e),o.a.createElement(Uu,null)),!c&&o.a.createElement(zp,e),t&&o.a.createElement(Hp,e),n&&o.a.createElement(qp,e))}}]),t}(s.Component);ha()(Kp,\"displayName\",\"SecuritySettings\");var Jp,Wp=le((function(e){return{activeSitePurchases:$o(e),module:function(t){return qa(e,t)},settings:So(e),sitePlan:qo(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},isPluginActive:function(t){return va(e,t)},isPluginInstalled:function(t){return ba(e,t)},vaultPressData:oa(e)}}))(Kp),Gp=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"trackClickConfigure\",value:function(){Uc.tracks.recordJetpackClick({target:\"configure-publicize\",page:\"sharing\"})}},{key:\"render\",value:function(){var e=this,t=this.props.isUnavailableInDevMode(\"publicize\"),n=this.props.isLinked,r=this.props.connectUrl,i=this.props.siteRawUrl,a=this.props.getOptionValue(\"publicize\"),s=this.props.userCanManageModules;return s||a?o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Publicize connections\",{context:\"Settings header\"}),module:\"publicize\",hideButton:!0}),s&&o.a.createElement(ep,{disableInDevMode:!0,module:{module:\"publicize\"},support:{text:Us(\"Allows you to automatically share your newest content on social media sites, including Facebook and Twitter.\"),link:Vl(\"jetpack-support-publicize\")}},o.a.createElement(\"p\",null,Us(\"Connect your website to the social media networks you use and share your content across all your social accounts with a single click. When you publish a post, it will appear on all connected accounts.\")),o.a.createElement(ku,{slug:\"publicize\",disabled:t,activated:a,toggling:this.props.isSavingAnyOption(\"publicize\"),toggleModule:this.props.toggleModuleNow},Us(\"Automatically share your posts to social networks\"))),a&&function(){if(!t)return n?o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:e.trackClickConfigure,target:\"_blank\",rel:\"noopener noreferrer\",href:Vl(\"calypso-marketing-connections\",{site:i})},Us(\"Connect your social media accounts\")):o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",target:\"_blank\",rel:\"noopener noreferrer\",href:\"\".concat(r,\"&from=unlinked-user-connect-publicize\")},Us(\"Create a Jetpack account to use this feature\"))}()):null}}]),t}(s.Component)),Yp=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"trackClickConfigure\",value:function(){Uc.tracks.recordJetpackClick({target:\"configure-sharing\",page:\"sharing\"})}},{key:\"render\",value:function(){var e=this,t=this.props.isLinked,n=this.props.connectUrl,r=this.props.siteRawUrl,i=this.props.siteAdminUrl,a=this.props.isDevMode,s=this.props.getOptionValue(\"sharedaddy\");return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Sharing buttons\",{context:\"Settings header\"}),module:\"sharing\",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:\"sharing\"},support:{text:Us(\"You can customize the sharing buttons and choose which services to display.\"),link:Vl(\"jetpack-support-sharing\")}},o.a.createElement(\"p\",null,Us(\"Add sharing buttons so visitors can share your posts and pages on social media with a couple of quick clicks.\")),o.a.createElement(ku,{slug:\"sharedaddy\",activated:s,toggling:this.props.isSavingAnyOption(\"sharedaddy\"),toggleModule:this.props.toggleModuleNow},Us(\"Add sharing buttons to your posts and pages\"))),s&&(a?o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",href:i+\"options-general.php?page=sharing\"},Us(\"Configure your sharing buttons\")):t?o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:e.trackClickConfigure,target:\"_blank\",rel:\"noopener noreferrer\",href:Vl(\"calypso-marketing-sharing-buttons\",{site:r})},Us(\"Configure your sharing buttons\")):o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",target:\"_blank\",rel:\"noopener noreferrer\",href:\"\".concat(n,\"&from=unlinked-user-connect-sharing\")},Us(\"Create a Jetpack account to use this feature\"))))}}]),t}(s.Component)),$p=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.isUnavailableInDevMode(\"likes\"),t=this.props.getOptionValue(\"likes\");return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Like buttons\",{context:\"Settings header\"}),module:\"likes\",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:\"likes\"},support:{text:Us(\"Adds like buttons to your content so that visitors can show their appreciation or enjoyment.\"),link:Vl(\"jetpack-support-likes\")}},o.a.createElement(\"p\",null,Us(\"When visitors enjoy your content, let them show it with a Like.\")),o.a.createElement(ku,{slug:\"likes\",disabled:e,activated:t,toggling:this.props.isSavingAnyOption(\"likes\"),toggleModule:this.props.toggleModuleNow},Us(\"Add Like buttons to your posts and pages\"))))}}]),t}(s.Component)),Xp=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,userCanManageModules:this.props.userCanManageModules},t=this.props.isModuleFound(\"publicize\"),n=this.props.isModuleFound(\"sharedaddy\"),r=this.props.isModuleFound(\"likes\");return(this.props.searchTerm||this.props.active)&&(t||n||r)?o.a.createElement(\"div\",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us(\"Sharing\"):Us(\"Share your content to social media, reaching new audiences and increasing engagement.\"),className:\"jp-settings-description\"}),t&&o.a.createElement(Gp,e),n&&o.a.createElement(Yp,e),r&&o.a.createElement($p,e)):null}}]),t}(s.Component),Qp=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},isLinked:Xs(e),connectUrl:Js(e),siteRawUrl:vi(e),siteAdminUrl:bi(e),userCanManageModules:Ei(e)}}))(Xp),Zp=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackConfigureClick\",(function(){Uc.tracks.recordJetpackClick(\"configure-seo\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=Lo(this.props.sitePlan.product_slug);return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Search engine optimization\",{context:\"Settings header\"}),feature:\"seo-tools-jetpack\",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:\"seo-tools\"},support:{text:Us(\"Allows you to optimize your site and its content for better results in search engines.\"),link:Vl(\"jetpack-support-seo-tools\")}},o.a.createElement(\"span\",null,Us(\"Take control of the way search engines represent your site. With Jetpack’s SEO tools you can preview how your content will look on popular search engines and change items like your site name and tagline in seconds.\"))),!this.props.isUnavailableInDevMode(\"seo-tools\")&&(\"is-business-plan\"===e||\"is-premium-plan\"===e)&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us(\"Customize your SEO settings\")))}}]),t}(o.a.Component),ed=le((function(e){return{sitePlan:qo(e)}}))(Cu(Zp)),td=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"trackConfigureClick\",value:function(){Uc.tracks.recordJetpackClick(\"configure-ga\")}},{key:\"render\",value:function(){return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Google Analytics\",{context:\"Settings header\"}),feature:\"google-analytics-jetpack\",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:\"google-analytics\"},support:{text:Us(\"Integrates your WordPress site with Google Analytics, a platform that offers insights into your traffic, visitors, and conversions.\"),link:Vl(\"jetpack-support-google-analytics\")}},Us(\"Google Analytics is a free service that complements our {{a}}built-in stats{{/a}} with different insights into your traffic. WordPress.com stats and Google Analytics use different methods to identify and track activity on your site, so they will normally show slightly different totals for your visits, views, etc.\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"calypso-stats-day\",{site:this.props.siteRawUrl})})}})),!this.props.isUnavailableInDevMode(\"google-analytics\")&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us(\"Configure your Google Analytics settings\")))}}]),t}(s.Component)),nd=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"updateOptions\",(function(e){n.props.updateFormStateModuleOption(\"wordads\",e)})),ha()(Os()(n),\"trackConfigureClick\",(function(){Uc.tracks.recordJetpackClick(\"view-earnings\")})),ha()(Os()(n),\"trackConfigureWidgetClick\",(function(){Uc.tracks.recordJetpackClick(\"place_ad_widget\")})),ha()(Os()(n),\"handleChange\",(function(e){return function(){return n.updateOptions(e)}})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.getOptionValue(\"wordads\"),t=this.props.isUnavailableInDevMode(\"wordads\"),n=this.props.getOptionValue(\"enable_header_ad\",\"wordads\"),r=this.props.getOptionValue(\"wordads_second_belowpost\",\"wordads\"),i=this.props.getOptionValue(\"wordads_display_front_page\",\"wordads\"),a=this.props.getOptionValue(\"wordads_display_post\",\"wordads\"),s=this.props.getOptionValue(\"wordads_display_page\",\"wordads\"),c=this.props.getOptionValue(\"wordads_display_archive\",\"wordads\"),l=this.props.getOptionValue(\"wordads_custom_adstxt\",\"wordads\"),u=-1!==this.props.siteRawUrl.indexOf(\"::\");return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Ads\",{context:\"Ads header\"}),feature:\"wordads-jetpack\",saveDisabled:this.props.isSavingAnyOption([\"wordads_custom_adstxt\"])}),o.a.createElement(ep,{disableInDevMode:!0,hasChild:!0,module:{module:\"wordads\"},support:{text:Us(\"Displays high-quality ads on your site that allow you to earn income.\"),link:Vl(\"jetpack-support-ads\")}},o.a.createElement(\"p\",null,Us(\"Show ads on the first article on your home page or at the end of every page and post. Place additional ads at the top of your site and to any widget area to increase your earnings.\"),o.a.createElement(\"br\",null),o.a.createElement(\"small\",{className:\"jp-form-setting-explanation\"},Us(\"By activating ads, you agree to the Automattic Ads {{link}}Terms of Service{{/link}}.\",{components:{link:o.a.createElement(\"a\",{href:Vl(\"wpcom-automattic-ads-tos\"),target:\"_blank\",rel:\"noopener noreferrer\",onClick:this.trackConfigureWidgetClick})}}))),o.a.createElement(ku,{slug:\"wordads\",disabled:t,activated:e,toggling:this.props.isSavingAnyOption(\"wordads\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Enable ads and display an ad below each post\"))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us(\"Display ads below posts on\")),o.a.createElement(_u,{checked:i,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"wordads_display_front_page\"]),onChange:this.handleChange(\"wordads_display_front_page\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Front page\"))),o.a.createElement(_u,{checked:a,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"wordads_display_post\"]),onChange:this.handleChange(\"wordads_display_post\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Posts\"))),o.a.createElement(_u,{checked:s,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"wordads_display_page\"]),onChange:this.handleChange(\"wordads_display_page\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Pages\"))),o.a.createElement(_u,{checked:c,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"wordads_display_archive\"]),onChange:this.handleChange(\"wordads_display_archive\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Archives\")))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us(\"Additional ad placements\")),o.a.createElement(_u,{checked:n,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"enable_header_ad\"]),onChange:this.handleChange(\"enable_header_ad\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Top of each page\"))),o.a.createElement(_u,{checked:r,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"wordads_second_belowpost\"]),onChange:this.handleChange(\"wordads_second_belowpost\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Second ad below post\"))),o.a.createElement(\"small\",{className:\"jp-form-setting-explanation\"},e&&Us(\"You can place additional ads using the Ad widget. {{link}}Try it out!{{/link}}\",{components:{link:o.a.createElement(\"a\",{className:\"jp-module-settings__external-link\",href:\"customize.php?autofocus[panel]=widgets\"})}}))),!u&&o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us(\"Custom ads.txt entries\")),o.a.createElement(\"p\",null,e&&Us(\"Jetpack automatically generates a custom {{link1}}ads.txt{{/link1}} tailored for your site. If you need to add additional entries for other networks please add them in the space below, one per line. {{link2}}Check here for more details{{/link2}}.\",{components:{link1:o.a.createElement(\"a\",{href:\"/ads.txt\",target:\"_blank\",rel:\"noopener noreferrer\"}),link2:o.a.createElement(\"a\",{href:Vl(\"jetpack-how-jetpack-ads-members-can-increase-their-earnings-with-ads-txt\"),target:\"_blank\",rel:\"noopener noreferrer\"})}}),!e&&Us(\"When ads are enabled, Jetpack automatically generates a custom ads.txt tailored for your site.\")),o.a.createElement(Vp,{name:\"wordads_custom_adstxt\",value:l,disabled:!e||t||this.props.isSavingAnyOption([\"wordads\",\"wordads_custom_adstxt\"]),onChange:this.props.onOptionChange}))),!t&&e&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us(\"View your earnings\")))}}]),t}(o.a.Component)),rd=window.Initial_State.pluginBaseUrl+\"/images/\",id=Vl(\"jetpack-contact-support\"),ad=Vl(\"jetpack-contact-support-beta-group\"),sd=Cu(function(e){function t(e){var n;_a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),\"updateOptions\",(function(e,t){var r=n.props.getOptionValue(t,\"stats\"),i=!1;n.state[\"\".concat(t,\"_\").concat(e)]?Object(Dt.includes)(r,e)&&(r=Object(Dt.filter)(r,(function(t){return t!==e}))):Object(Dt.includes)(r,e)||(r.push(e),i=!0),n.setState(ha()({},\"\".concat(t,\"_\").concat(e),!n.state[\"\".concat(t,\"_\").concat(e)]),(function(){n.props.updateOptions(ha()({},t,r))})),Uc.tracks.recordEvent(\"jetpack_wpa_settings_toggle\",{module:\"stats\",setting:t,role:e,toggled:i?\"on\":\"off\"})})),ha()(Os()(n),\"activateStats\",(function(){n.props.updateOptions({stats:!0})})),ha()(Os()(n),\"trackOpenCard\",(function(){Uc.tracks.recordJetpackClick({target:\"foldable-settings-open\",feature:\"stats\"})})),ha()(Os()(n),\"handleRoleToggleChange\",(function(e,t){return function(){return n.updateOptions(e,t)}}));var r=e.getOptionValue(\"count_roles\",\"stats\"),i=e.getOptionValue(\"roles\",\"stats\");return n.state={count_roles:r,roles:i,count_roles_administrator:Object(Dt.includes)(r,\"administrator\",!1),count_roles_editor:Object(Dt.includes)(r,\"editor\",!1),count_roles_author:Object(Dt.includes)(r,\"author\",!1),count_roles_contributor:Object(Dt.includes)(r,\"contributor\",!1),count_roles_subscriber:Object(Dt.includes)(r,\"subscriber\",!1),roles_administrator:!0,roles_editor:Object(Dt.includes)(i,\"editor\",!1),roles_author:Object(Dt.includes)(i,\"author\",!1),roles_contributor:Object(Dt.includes)(i,\"contributor\",!1),roles_subscriber:Object(Dt.includes)(i,\"subscriber\",!1)},n}return Ma()(t,e),As()(t,[{key:\"handleStatsOptionToggle\",value:function(e){var t=this;return function(){return t.props.updateFormStateModuleOption(\"stats\",e)}}},{key:\"render\",value:function(){var e=this,t=this.props.getModule(\"stats\"),n=this.props.getOptionValue(\"stats\"),r=this.props.isUnavailableInDevMode(\"stats\"),i=this.props.getSiteRoles();return\"inactive\"===this.props.getModuleOverride(\"stats\")?o.a.createElement(Wu,{moduleName:t.name}):n?o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Site stats\",{context:\"Settings header\"}),hideButton:!0,module:\"site-stats\"}),o.a.createElement(Dp,{onOpen:this.trackOpenCard,header:Us(\"Expand to update settings for how visits are counted and manage who can view this information.\"),clickableHeader:!0,className:Mc()(\"jp-foldable-settings-standalone\",{\"jp-foldable-settings-disable\":r})},o.a.createElement(ep,{disableInDevMode:!0,module:t,support:{text:Us(\"Displays information on your site activity, including visitors and popular posts or pages.\"),link:Vl(\"jetpack-support-wordpress-com-stats\")}},o.a.createElement(Hl,null,o.a.createElement(_u,{checked:!!this.props.getOptionValue(\"admin_bar\"),disabled:!n||r,toggling:this.props.isSavingAnyOption([\"stats\",\"admin_bar\"]),onChange:this.handleStatsOptionToggle(\"admin_bar\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Include a small chart in your admin bar with a 48-hour traffic snapshot\"))),o.a.createElement(_u,{checked:!!this.props.getOptionValue(\"hide_smile\"),disabled:!n||r,toggling:this.props.isSavingAnyOption([\"stats\",\"hide_smile\"]),onChange:this.handleStatsOptionToggle(\"hide_smile\")},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Hide the stats smiley face image\")),o.a.createElement(\"span\",{className:\"jp-form-setting-explanation\"},Us(\"The image helps collect stats, but should work when hidden.\")))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us(\"Count logged in page views from\")),Object.keys(i).map((function(t){return o.a.createElement(_u,{checked:e.state[\"count_roles_\".concat(t)],disabled:!n||r||e.props.isSavingAnyOption([\"stats\",\"count_roles\"]),onChange:e.handleRoleToggleChange(t,\"count_roles\"),key:\"count_roles-\".concat(t)},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},i[t].name))}))),o.a.createElement(Hl,null,o.a.createElement(Kl,null,Us(\"Allow stats reports to be viewed by\")),o.a.createElement(_u,{checked:!0,disabled:!0},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},i.administrator.name)),Object.keys(i).map((function(t){return\"administrator\"!==t&&o.a.createElement(_u,{checked:e.state[\"roles_\".concat(t)],disabled:!n||r||e.props.isSavingAnyOption([\"stats\",\"roles\"]),onChange:e.handleRoleToggleChange(t,\"roles\"),key:\"roles-\".concat(t)},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},i[t].name))})))))):o.a.createElement(Dl,{className:\"jp-at-a-glance__stats-card \"+(this.props.isDevMode?\"is-inactive\":\"\")},o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive\"},o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive-icon\"},o.a.createElement(\"img\",{src:rd+\"stats.svg\",width:\"60\",height:\"60\",alt:Us(\"Jetpack Stats Icon\"),className:\"jp-at-a-glance__stats-icon\"})),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive-text\"},this.props.isDevMode?Us(\"Unavailable in Dev Mode\"):Us(\"{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:this.activateStats}),a1:o.a.createElement(\"a\",{href:Vl(\"jetpack-support-wordpress-com-stats\"),target:\"_blank\",rel:\"noopener noreferrer\"})}})),!this.props.isDevMode&&o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive-button\"},o.a.createElement(xc,{onClick:this.activateStats,primary:!0},Us(\"Activate Site Stats\")))))}}]),t}(o.a.Component)),od=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.isSiteConnected;return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"WP.me Shortlinks\",{context:\"Settings header\"}),module:\"shortlinks\",hideButton:!0}),o.a.createElement(ep,{module:{module:\"shortlinks\"},support:{text:this.props.shortlinksModule.description,link:Vl(\"jetpack-support-shortlinks\")},disableInDevMode:!0},o.a.createElement(ku,{slug:\"shortlinks\",disabled:!e,activated:this.props.shortlinksActive,toggling:this.props.isSavingAnyOption(\"shortlinks\"),toggleModule:this.props.toggleModuleNow},Us(\"Generate shortened URLs for simpler sharing.\"))))}}]),t}(s.Component),cd=Cu(le((function(e,t){return{shortlinksActive:t.getOptionValue(\"shortlinks\"),shortlinksModule:qa(e,\"shortlinks\")}}))(od)),ld=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{show_headline:n.props.getOptionValue(\"show_headline\",\"related-posts\"),show_thumbnails:n.props.getOptionValue(\"show_thumbnails\",\"related-posts\")}),ha()(Os()(n),\"updateOptions\",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption(\"related-posts\",e))})),ha()(Os()(n),\"handleShowHeadlineToggleChange\",(function(){n.updateOptions(\"show_headline\")})),ha()(Os()(n),\"handleShowThumbnailsToggleChange\",(function(){n.updateOptions(\"show_thumbnails\")})),ha()(Os()(n),\"trackConfigureClick\",(function(){Uc.tracks.recordJetpackClick(\"configure-related-posts\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this,t=this.props.getOptionValue(\"related-posts\"),n=this.props.isUnavailableInDevMode(\"related-posts\");return o.a.createElement(Yu,Bc()({},this.props,{hideButton:!0,module:\"related-posts\"}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:this.props.getModule(\"related-posts\"),support:{text:Us(\"The feature helps visitors find more of your content by displaying related posts at the bottom of each post.\"),link:Vl(\"jetpack-support-related-posts\")}},o.a.createElement(\"p\",null,Us(\"Keep your visitors engaged with related content at the bottom of each post. These settings won\'t apply to {{a}}related posts added using the block editor{{/a}}.\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"jetpack-support-jetpack-blocks-related-posts-block\"),target:\"_blank\",rel:\"noopener noreferrer\"})}})),o.a.createElement(ku,{slug:\"related-posts\",disabled:n,activated:t,toggling:this.props.isSavingAnyOption(\"related-posts\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Show related content after posts\"))),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.show_headline,disabled:!t||n||this.props.isSavingAnyOption([\"related-posts\",\"show_headline\"]),onChange:this.handleShowHeadlineToggleChange},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Highlight related content with a heading\"))),o.a.createElement(_u,{checked:this.state.show_thumbnails,disabled:!t||n||this.props.isSavingAnyOption([\"related-posts\",\"show_thumbnails\"]),onChange:this.handleShowThumbnailsToggleChange},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Show a thumbnail image where available\"))),t&&o.a.createElement(\"div\",null,o.a.createElement(ql,{className:\"jp-form-label-wide\"},Us(\"Preview\",{context:\"A header for a preview area in the configuration screen.\"})),o.a.createElement(Dl,{className:\"jp-related-posts-preview\"},this.state.show_headline&&o.a.createElement(\"div\",{className:\"jp-related-posts-preview__title\"},Us(\"Related\")),[{url:\"cat-blog.png\",text:Us(\"Big iPhone/iPad Update Now Available\"),context:Us(\'In \"Mobile\"\',{comment:\"It refers to the category where a post was found. Used in an example preview.\"})},{url:\"devices.jpg\",text:Us(\"The WordPress for Android App Gets a Big Facelift\"),context:Us(\'In \"Mobile\"\',{comment:\"It refers to the category where a post was found. Used in an example preview.\"})},{url:\"mobile-wedding.jpg\",text:Us(\"Upgrade Focus: VideoPress For Weddings\"),context:Us(\'In \"Upgrade\"\',{comment:\"It refers to the category where a post was found. Used in an example preview.\"})}].map((function(t,n){return o.a.createElement(\"div\",{key:\"preview_\".concat(n),className:\"jp-related-posts-preview__item\"},e.state.show_thumbnails&&o.a.createElement(\"img\",{src:\"https://jetpackme.files.wordpress.com/2019/03/\".concat(t.url),alt:t.text}),o.a.createElement(\"h4\",{className:\"jp-related-posts-preview__post-title\"},o.a.createElement(\"a\",{href:\"#/traffic\"},t.text)),o.a.createElement(\"p\",{className:\"jp-related-posts-preview__post-context\"},t.context))})))))),!this.props.isUnavailableInDevMode(\"related-posts\")&&t&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",onClick:this.trackConfigureClick,href:this.props.configureUrl},Us(\"Configure related posts in the Customizer\")))}}]),t}(o.a.Component));function ud(){var e=this;this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=function(t){t.source===e.windowInstance&&e.emit(\"message\",t.data)}}Jp=ud.prototype,Object(Dt.assign)(Jp,ps.EventEmitter.prototype),Jp.emitChange=function(){this.emit(\"change\")},Jp.off=Jp.removeListener,ud.prototype.open=function(e,t,n){return t=t||Date.now(),this.windowInstance=window.open(e,t,n),this.startMonitoring(t,this.windowInstance),window.addEventListener(\"message\",this.onMessage,!1),this},ud.prototype.getScreenCenterSpecs=function(e,t){var n=void 0!==window.screenTop?window.screenTop:window.screenY,r=void 0!==window.screenLeft?window.screenLeft:window.screenX;return[\"width=\"+e,\"height=\"+t,\"top=\"+(n+window.innerHeight/2-t/2),\"left=\"+(r+window.innerWidth/2-e/2)].join()},ud.prototype.isOpen=function(e){var t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(n){}return!t},ud.prototype.checkStatus=function(){for(var e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit(\"close\",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener(\"message\",this.onMessage))},ud.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};var pd=ud,dd=function(e,t){var n,r=new pd;r.open(e,null,\"toolbar=0,location=0,status=0,menubar=0,\"+r.getScreenCenterSpecs(780,700)),r.once(\"close\",(function(){var e=null;n&&n.keyring_id&&(e=Number(n.keyring_id)),t(e)})),r.on(\"message\",(function(e){return n=e}))},hd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{inputVisible:!1}),ha()(Os()(n),\"handleClickAutoVerify\",(function(){n.props.fetchingSiteData||n.props.fetchingGoogleSiteVerify||(Uc.tracks.recordEvent(\"jetpack_site_verification_google_auto_verify_click\"),dd(n.props.googleSiteVerificationConnectUrl,(function(e){e&&n.checkAndVerifySite(e)})))})),ha()(Os()(n),\"handleClickSetManually\",(function(e){Uc.tracks.recordEvent(\"jetpack_site_verification_google_manual_verify_click\",{is_owner:n.props.isOwner}),n.toggleVerifyMethod(e)})),ha()(Os()(n),\"handleClickEdit\",(function(e){Uc.tracks.recordEvent(\"jetpack_site_verification_google_edit_click\",{is_owner:n.props.isOwner}),n.toggleVerifyMethod(e)})),ha()(Os()(n),\"handleClickCancel\",(function(e){Uc.tracks.recordEvent(\"jetpack_site_verification_google_cancel_click\",{is_owner:n.props.isOwner}),n.props.resetFormStateOption(\"google\"),n.toggleVerifyMethod(e)})),ha()(Os()(n),\"quickSave\",(function(e){Uc.tracks.recordEvent(\"jetpack_site_verification_google_manual_verify_save\",{is_owner:n.props.isOwner,is_empty:!n.props.value}),n.props.onSubmit(e)})),ha()(Os()(n),\"toggleVerifyMethod\",(function(){n.setState({inputVisible:!n.state.inputVisible})})),ha()(Os()(n),\"handleOnTextInputKeyPress\",(function(e){\"Enter\"===e.key&&n.quickSave()})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){var e=this;this.props.isCurrentUserLinked&&this.props.checkVerifyStatusGoogle().then((function(t){if(e.props.googleSiteVerificationError&&\"unverify-site-error\"===e.props.googleSiteVerificationError.code&&e.props.updateOptions({google:\"\"}).then((function(){return e.props.checkVerifyStatusGoogle()})),t)return!e.props.getOptionValue(\"google\")&&t.token?e.props.updateOptions({google:t.token}):void(!e.props.getOptionValue(\"google\")||t.token||t.verified||e.setState({inputVisible:!0}))}))}},{key:\"checkAndVerifySite\",value:function(e){var t=this;this.props.createNotice(\"is-info\",Us(\"Verifying…\"),{id:\"verifying-site-google\"}),this.props.checkVerifyStatusGoogle(e).then((function(e){if(e)return e.token!==t.props.value?t.props.updateOptions({google:e.token}):void 0})).then((function(){t.props.removeNotice(\"verifying-site-google\"),t.props.isSiteVerifiedWithGoogle||t.props.verifySiteGoogle(e).then((function(){if(t.props.googleSiteVerificationError){var e=t.props.googleSiteVerificationError.message;Uc.tracks.recordEvent(\"jetpack_site_verification_google_verify_error\",{error_message:e}),t.props.createNotice(\"is-error\",Us(\"Site failed to verify: %(error)s\",{args:{error:e}}),{id:\"verify-site-google-error\",duration:5e3})}else t.props.isSiteVerifiedWithGoogle&&Uc.tracks.recordEvent(\"jetpack_site_verification_google_verify_success\")}))}))}},{key:\"render\",value:function(){var e=this.props.googleSiteVerificationError&&\"forbidden\"===this.props.googleSiteVerificationError.code;if(this.state.inputVisible||e||!this.props.isCurrentUserLinked)return o.a.createElement(\"div\",null,o.a.createElement(ql,{className:\"jp-form-input-with-prefix\",key:\"verification_service_google\"},o.a.createElement(\"span\",null,Us(\"Google\")),o.a.createElement(Bl,{name:\"google\",value:this.props.value,placeholder:this.props.placeholder,className:\"code\",disabled:this.props.disabled,onChange:this.props.onOptionChange,onKeyPress:this.handleOnTextInputKeyPress}),this.state.inputVisible&&o.a.createElement(\"div\",{className:\"jp-form-site-verification-buttons\"},o.a.createElement(xc,{primary:!0,type:\"button\",className:\"jp-form-site-verification-edit-button\",disabled:this.props.disabled,onClick:this.quickSave},Us(\"Save\")),o.a.createElement(xc,{type:\"button\",className:\"jp-form-site-verification-edit-button\",disabled:this.props.disabled,onClick:this.handleClickCancel},Us(\"Cancel\")))));if(this.props.isSiteVerifiedWithGoogle)return o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-form-input-with-prefix\",key:\"verification_service_google\"},o.a.createElement(\"span\",null,Us(\"Google\")),o.a.createElement(\"div\",{className:\"jp-form-site-verification-verified\"},o.a.createElement(ml,{icon:\"checkmark-circle\",size:20}),\" \",o.a.createElement(\"span\",null,Us(\"Your site is verified with Google\"))),o.a.createElement(xc,{type:\"button\",className:\"jp-form-site-verification-edit-button\",onClick:this.handleClickEdit},Us(\"Edit\"))),this.props.isOwner&&o.a.createElement(\"div\",{className:\"jp-form-input-with-prefix-bottom-message\"},o.a.createElement(\"div\",{className:\"jp-form-setting-explanation\"},o.a.createElement(\"p\",null,Us(\"Monitor your site\'s traffic and performance from the {{a}}Google Search Console{{/a}}.\",{components:{a:o.a.createElement(Xu,{icon:!0,iconSize:16,target:\"_blank\",rel:\"noopener noreferrer\",href:this.props.googleSearchConsoleUrl})}}),\" \",Us(\"Google will email about certain events that occur with your site, including indications that your website has been {{a1}}hacked{{/a1}}, or problems {{a2}}crawling or indexing{{/a2}} your site.\",{components:{a1:o.a.createElement(Xu,{icon:!0,iconSize:16,target:\"_blank\",rel:\"noopener noreferrer\",href:\"https://developers.google.com/web/fundamentals/security/hacked/\"}),a2:o.a.createElement(Xu,{icon:!0,iconSize:16,target:\"_blank\",rel:\"noopener noreferrer\",href:\"https://www.google.com/insidesearch/howsearchworks/crawling-indexing.html\"})}})))));var t=this.props.fetchingSiteData||this.props.fetchingGoogleSiteVerify||this.props.isVerifyingGoogleSite||this.props.disabled;return o.a.createElement(\"div\",{className:\"jp-form-input-with-prefix jp-form-google-label-unverified\",key:\"verification_service_google\"},o.a.createElement(\"span\",null,Us(\"Google\")),o.a.createElement(\"div\",{className:\"jp-form-google-label-unverified-actions\"},o.a.createElement(xc,{primary:!0,type:\"button\",disabled:t,onClick:this.handleClickAutoVerify},Us(\"Verify with Google\")),o.a.createElement(\"span\",{className:\"jp-form-google-separator\"},Us(\"or\")),o.a.createElement(xc,{type:\"button\",disabled:t,onClick:this.handleClickSetManually},Us(\"Manually Verify \"))))}}]),t}(o.a.Component);ha()(hd,\"propTypes\",{disabled:u.a.bool}),ha()(hd,\"defaultProps\",{disabled:!1});var fd=le((function(e){return{fetchingSiteData:Bo(e),googleSiteVerificationConnectUrl:mo(e,\"google_site_verification\"),googleSearchConsoleUrl:uc(e),fetchingGoogleSiteVerify:ac(e),isConnectedToGoogle:oc(e),isSiteVerifiedWithGoogle:cc(e),isVerifyingGoogleSite:sc(e),userCanManageOptions:Ci(e),googleSiteVerificationError:lc(e),isOwner:pc(e)}}),{checkVerifyStatusGoogle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:Xr}),Da.fetchVerifySiteGoogleStatus(e).then((function(e){if(e.errors&&e.errors.length>0){var n=Object.keys(e.errors)[0],r=e.errors[n];return t({type:Qr,error:{code:n,message:r}}),e}return t({type:Zr,verified:e.verified,token:e.token,isOwner:e.is_owner,searchConsoleUrl:e.google_search_console_url,verificationConsoleUrl:e.google_verification_console_url}),e})).catch((function(e){t({type:Qr,error:e.response})}))}},createNotice:Qa,removeNotice:Xa,verifySiteGoogle:function(e){return function(t){return t({type:ri}),Da.verifySiteGoogle(e).then((function(e){if(e.errors&&e.errors.length>0){var n=Object.keys(e.errors)[0],r=e.errors[n];return t({type:ai,error:{code:n,message:r}}),e}return t({verified:e.verified,isOwner:e.is_owner,searchConsoleUrl:e.google_search_console_url,verificationConsoleUrl:e.google_verification_console_url,type:ii}),e.verified&&t(Qa(\"is-success\",Us(\"Site is verified\"),{id:\"verify-site-google-verified\",duration:2e3})),e})).catch((function(e){t({type:ai,error:e.response})}))}}})(hd),md=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getMetaTag\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";return n?/^[a-z0-9_-]+$/i.test(n)?Object(Dt.includes)(n,\"<meta\")?n:\'<meta name=\"\'.concat(Object(Dt.get)(t.serviceIds,e,\"\"),\'\" content=\"\').concat(n,\'\" />\'):n:\"\"}},{key:\"getSiteVerificationValue\",value:function(e){var t=this.props.getOptionValue(e);return t===this.props.getSettingCurrentValue(e)?this.getMetaTag(e,t):t}},{key:\"render\",value:function(){var e=this.props.getModule(\"verification-tools\");if(\"inactive\"===this.props.getModuleOverride(\"verification-tools\"))return o.a.createElement(Ku,{title:e.name,icon:\"cog\",description:Us(\"%(moduleName)s has been disabled by a site administrator.\",{args:{moduleName:e.name}})});var t=!!this.props.getOptionValue(e.module);return o.a.createElement(Yu,Bc()({},this.props,{module:e.module,saveDisabled:this.props.isSavingAnyOption([\"google\",\"bing\",\"pinterest\",\"yandex\"])}),o.a.createElement(ep,{module:e,support:{text:Us(\"Provides the necessary hidden tags needed to verify your WordPress site with various services.\"),link:Vl(\"jetpack-support-site-verification-tools\")}},o.a.createElement(ku,{slug:e.module,activated:t,toggling:this.props.isSavingAnyOption([e.module]),disabled:this.props.isSavingAnyOption([e.module]),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Verify site ownership with third party services\"))),o.a.createElement(\"p\",null,Us(\"Note that {{b}}verifying your site with these services is not necessary{{/b}} in order for your site to be indexed by search engines. To use these advanced search engine tools and verify your site with a service, paste the HTML Tag code below. Read the {{support}}full instructions{{/support}} if you are having trouble. Supported verification services: {{google}}Google Search Console{{/google}}, {{bing}}Bing Webmaster Center{{/bing}}, {{pinterest}}Pinterest Site Verification{{/pinterest}}, and {{yandex}}Yandex.Webmaster{{/yandex}}.\",{components:{b:o.a.createElement(\"strong\",null),support:o.a.createElement(\"a\",{href:Vl(\"jetpack-support-site-verification-tools\")}),google:o.a.createElement(Xu,{icon:!0,target:\"_blank\",rel:\"noopener noreferrer\",href:\"https://www.google.com/webmasters/tools/\"}),bing:o.a.createElement(Xu,{icon:!0,target:\"_blank\",rel:\"noopener noreferrer\",href:\"https://www.bing.com/webmaster/\"}),pinterest:o.a.createElement(Xu,{icon:!0,target:\"_blank\",rel:\"noopener noreferrer\",href:\"https://pinterest.com/website/verify/\"}),yandex:o.a.createElement(Xu,{icon:!0,target:\"_blank\",rel:\"noopener noreferrer\",href:\"https://webmaster.yandex.com/sites/\"})}})),o.a.createElement(Hl,null,o.a.createElement(fd,Bc()({value:this.getSiteVerificationValue(\"google\"),placeholder:this.getMetaTag(\"google\",\"1234\")},this.props,{disabled:this.props.isUpdating(\"google\")||!t})),o.a.createElement(ql,{className:\"jp-form-input-with-prefix\",key:\"verification_service_bing\"},o.a.createElement(\"span\",null,Us(\"Bing\")),o.a.createElement(Bl,{name:\"bing\",value:this.getSiteVerificationValue(\"bing\"),placeholder:this.getMetaTag(\"bing\",\"1234\"),className:\"code\",disabled:this.props.isUpdating(\"bing\")||!t,onChange:this.props.onOptionChange})),o.a.createElement(ql,{className:\"jp-form-input-with-prefix\",key:\"verification_service_pinterest\"},o.a.createElement(\"span\",null,Us(\"Pinterest\")),o.a.createElement(Bl,{name:\"pinterest\",value:this.getSiteVerificationValue(\"pinterest\"),placeholder:this.getMetaTag(\"pinterest\",\"1234\"),className:\"code\",disabled:this.props.isUpdating(\"pinterest\")||!t,onChange:this.props.onOptionChange})),o.a.createElement(ql,{className:\"jp-form-input-with-prefix\",key:\"verification_service_yandex\"},o.a.createElement(\"span\",null,Us(\"Yandex\")),o.a.createElement(Bl,{name:\"yandex\",value:this.getSiteVerificationValue(\"yandex\"),placeholder:this.getMetaTag(\"yandex\",\"1234\"),className:\"code\",disabled:this.props.isUpdating(\"yandex\")||!t,onChange:this.props.onOptionChange})))))}}]),t}(o.a.Component);ha()(md,\"serviceIds\",{google:\"google-site-verification\",bing:\"msvalidate.01\",pinterest:\"p:domain_verify\",yandex:\"yandex-verification\"});var gd=Cu(md),vd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackSitemapUrl\",(function(){Uc.tracks.recordJetpackClick(\"sitemap-url-link\")})),ha()(Os()(n),\"trackSitemapNewsUrl\",(function(){Uc.tracks.recordJetpackClick(\"sitemap-news-url-link\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.getModule(\"sitemaps\"),t=Object(Dt.get)(e,[\"extra\",\"sitemap_url\"],\"\"),n=Object(Dt.get)(e,[\"extra\",\"news_sitemap_url\"],\"\"),r=Mc()({\"jp-form-setting-explanation\":!0,\"is-warning\":!this.props.isSiteVisibleToSearchEngines&&this.props.getOptionValue(\"sitemaps\")});return o.a.createElement(Yu,Bc()({},this.props,{module:\"sitemaps\",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,module:{module:\"sitemaps\"},support:{link:Vl(\"jetpack-support-sitemaps\")}},o.a.createElement(\"p\",null,Us(\"Sitemaps are files that search engines like Google or Bing use to index your website. They can help improve your ranking in search results. When you enable this feature, Jetpack will create sitemaps for you and update them automatically when the content on your site changes.\")),o.a.createElement(ku,{slug:\"sitemaps\",compact:!0,activated:this.props.getOptionValue(\"sitemaps\"),toggling:this.props.isSavingAnyOption(\"sitemaps\"),toggleModule:this.props.toggleModuleNow},Us(\"Generate XML sitemaps\")),this.props.isSiteVisibleToSearchEngines?this.props.getOptionValue(\"sitemaps\")&&o.a.createElement(Hl,null,o.a.createElement(\"p\",{className:\"jp-form-setting-explanation\"},Us(\"Good news: Jetpack is sending your sitemap automatically to all major search engines for indexing.\"),o.a.createElement(\"br\",null),o.a.createElement(Xu,{onClick:this.trackSitemapUrl,icon:!0,target:\"_blank\",rel:\"noopener noreferrer\",href:t},t),o.a.createElement(\"br\",null),o.a.createElement(Xu,{onClick:this.trackSitemapNewsUrl,icon:!0,target:\"_blank\",rel:\"noopener noreferrer\",href:n},n))):o.a.createElement(Hl,null,o.a.createElement(\"p\",{className:r},Us(\"Search engines can\'t access your site at the moment. If you\'d like to make your site accessible, check your {{a}}Reading settings{{/a}} and switch \\\"Search Engine Visibility\\\" on.\",{components:{a:o.a.createElement(\"a\",{href:this.props.siteAdminUrl+\"options-reading.php\"})}})))))}}]),t}(o.a.Component),bd=le((function(e){return{isSiteVisibleToSearchEngines:Di(e),siteAdminUrl:bi(e)}}))(Cu(vd)),yd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={settings:this.props.settings,siteRawUrl:this.props.siteRawUrl,getModule:this.props.module,isSiteConnected:this.props.isSiteConnected,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,getModuleOverride:this.props.getModuleOverride},t=this.props.isModuleFound(\"seo-tools\"),n=this.props.isModuleFound(\"wordads\"),r=this.props.isModuleFound(\"stats\"),i=this.props.isModuleFound(\"shortlinks\"),a=this.props.isModuleFound(\"related-posts\"),s=this.props.isModuleFound(\"verification-tools\"),c=this.props.isModuleFound(\"sitemaps\"),l=this.props.isModuleFound(\"google-analytics\");return(this.props.searchTerm||this.props.active)&&(t||n||r||i||a||s||c||l)?o.a.createElement(\"div\",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us(\"Traffic\"):Us(\"Maximize your site’s visibility in search engines and view traffic stats in real time.\"),className:\"jp-settings-description\"}),n&&o.a.createElement(nd,Bc()({},e,{configureUrl:Vl(\"calypso-stats-ads-day\",{site:this.props.siteRawUrl})})),a&&o.a.createElement(ld,Bc()({},e,{configureUrl:this.props.siteAdminUrl+\"customize.php?autofocus[section]=jetpack_relatedposts&return=\"+encodeURIComponent(this.props.siteAdminUrl+\"admin.php?page=jetpack#/traffic\")+\"&url=\"+encodeURIComponent(this.props.lastPostUrl)})),t&&o.a.createElement(ed,Bc()({},e,{configureUrl:Vl(\"calypso-marketing-traffic\",{site:this.props.siteRawUrl,anchor:\"seo\"})})),l&&o.a.createElement(td,Bc()({},e,{configureUrl:Vl(\"calypso-marketing-traffic\",{site:this.props.siteRawUrl,anchor:\"analytics\"})})),r&&o.a.createElement(sd,e),i&&o.a.createElement(cd,e),c&&o.a.createElement(bd,e),s&&o.a.createElement(gd,e)):null}}]),t}(o.a.Component);ha()(yd,\"displayName\",\"TrafficSettings\");var _d=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},isModuleFound:function(t){return ko(e,t)},isSiteConnected:qs(e),lastPostUrl:zi(e),getModuleOverride:function(t){return $a(e,t)}}}))(yd),wd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"updateFormStateByMarkdown\",(function(e){return n.props.getSettingCurrentValue(\"wpcom_publish_comments_with_markdown\",e)?n.props.updateFormStateModuleOption(e,\"wpcom_publish_posts_with_markdown\"):n.props.updateFormStateModuleOption(e,\"wpcom_publish_posts_with_markdown\",!0)})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.isModuleFound(\"copy-post\"),t=this.props.isModuleFound(\"latex\"),n=this.props.isModuleFound(\"markdown\"),r=this.props.isModuleFound(\"shortcodes\");if(!(e||t||n||r))return null;var i=this.props.module(\"markdown\"),a=this.props.module(\"latex\"),s=this.props.module(\"copy-post\"),c=this.props.module(\"shortcodes\"),l=o.a.createElement(ep,{module:s,support:{text:Us(\"Duplicate existing posts, pages, Testimonials, and Portfolios. All the content will be copied including text, featured images, sharing settings, and more.\"),link:Vl(\"jetpack-support-copy-post-2\")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:\"copy-post\",activated:!!this.props.getOptionValue(\"copy-post\"),toggling:this.props.isSavingAnyOption(\"copy-post\"),disabled:this.props.isSavingAnyOption(\"copy-post\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},s.description)))),u=o.a.createElement(ep,{module:i,support:{text:Us(\"Use Markdown syntax to compose content with links, lists, and other styles. This setting enables Markdown in the Classic Editor as well as within a Classic Editor block.\"),link:Vl(\"jetpack-support-markdown\")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:\"markdown\",activated:!!this.props.getOptionValue(\"wpcom_publish_posts_with_markdown\",\"markdown\"),toggling:this.props.isSavingAnyOption([\"markdown\",\"wpcom_publish_posts_with_markdown\"]),disabled:this.props.isSavingAnyOption([\"markdown\",\"wpcom_publish_posts_with_markdown\"]),toggleModule:this.updateFormStateByMarkdown},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},i.description)))),p=o.a.createElement(ep,{module:a,support:{text:Us(\"LaTeX is a powerful markup language for writing complex mathematical equations and formulas.\"),link:Vl(\"jetpack-support-beautiful-math-with-latex\")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:\"latex\",activated:!!this.props.getOptionValue(\"latex\"),toggling:this.props.isSavingAnyOption([\"latex\"]),disabled:this.props.isSavingAnyOption([\"latex\"]),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},a.description)))),d=o.a.createElement(ep,{module:c,support:{text:c.description,link:Vl(\"jetpack-support-shortcode-embeds\")}},o.a.createElement(Hl,null,o.a.createElement(ku,{slug:\"shortcodes\",activated:!!this.props.getOptionValue(\"shortcodes\"),toggling:this.props.isSavingAnyOption([\"shortcodes\"]),disabled:this.props.isSavingAnyOption([\"shortcodes\"]),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Compose using shortcodes to embed media from popular sites\")))));return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Composing\",{context:\"Settings header\"}),module:\"composing\",saveDisabled:this.props.isSavingAnyOption(\"ignored_phrases\")}),e&&l,n&&u,t&&p,r&&d)}}]),t}(o.a.Component),kd=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)}}}))(Cu(wd)),Ed=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{testimonial:n.props.getOptionValue(\"jetpack_testimonial\",\"custom-content-types\"),portfolio:n.props.getOptionValue(\"jetpack_portfolio\",\"custom-content-types\")}),ha()(Os()(n),\"updateCPTs\",(function(e){var t=\"testimonial\"===e?!(!n.state.testimonial||n.state.portfolio):!(!n.state.portfolio||n.state.testimonial);n.props.updateFormStateModuleOption(\"custom-content-types\",\"jetpack_\"+e,t),n.setState(ha()({},e,!n.state[e]))})),ha()(Os()(n),\"linkIfActiveCPT\",(function(e){return n.props.getSettingCurrentValue(\"jetpack_\".concat(e),\"custom-content-types\")?o.a.createElement(\"a\",{href:\"\".concat(n.props.siteAdminUrl,\"edit.php?post_type=jetpack-\").concat(e)}):o.a.createElement(\"span\",null)})),ha()(Os()(n),\"handleTestimonialToggleChange\",(function(){n.updateCPTs(\"testimonial\")})),ha()(Os()(n),\"handlePortfolioToggleChange\",(function(){n.updateCPTs(\"portfolio\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(!this.props.isModuleFound(\"custom-content-types\"))return null;var e=this.props.module(\"custom-content-types\"),t=\"inactive\"===this.props.getModuleOverride(\"custom-content-types\"),n=t&&Us(\"This feature has been disabled by a site administrator.\");return o.a.createElement(Yu,Bc()({},this.props,{module:\"custom-content-types\",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,module:e,support:{link:Vl(\"jetpack-support-custom-content-types\")}},o.a.createElement(\"p\",null,Us(\"Add {{testimonialLink}}testimonials{{/testimonialLink}} to your website to attract new customers. If your theme doesn’t support Jetpack Testimonials, you can still use a simple shortcode to display them on your site.\",{components:{testimonialLink:this.linkIfActiveCPT(\"testimonial\")}})),o.a.createElement(_u,{checked:this.state.testimonial,disabled:this.props.isSavingAnyOption(\"jetpack_testimonial\")||t,onChange:this.handleTestimonialToggleChange,disabledReason:n},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Testimonials\"))),o.a.createElement(Hl,null,o.a.createElement(\"p\",{className:\"jp-form-setting-explanation\"},Us(\"Testimonials shortcode: [testimonials]\")))),this.props.testimonialActive&&o.a.createElement(Pp,{className:\"jp-settings-card__configure-link\",href:\"\".concat(this.props.siteAdminUrl,\"post-new.php?post_type=jetpack-testimonial\")},Us(\"Add a testimonial\")),o.a.createElement(ep,{hasChild:!0,module:e,support:{link:Vl(\"jetpack-support-custom-content-types\")}},o.a.createElement(\"p\",null,Us(\"Use {{portfolioLink}}portfolios{{/portfolioLink}} on your site to showcase your best work. If your theme doesn’t support Jetpack Portfolios, you can still use a simple shortcode to display them on your site.\",{components:{portfolioLink:this.linkIfActiveCPT(\"portfolio\")}})),o.a.createElement(_u,{checked:this.state.portfolio,disabled:this.props.isSavingAnyOption(\"jetpack_portfolio\")||t,onChange:this.handlePortfolioToggleChange,disabledReason:n},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Portfolios\"))),o.a.createElement(Hl,null,o.a.createElement(\"p\",{className:\"jp-form-setting-explanation\"},Us(\"Portfolios shortcode: [portfolio]\")))),this.props.portfolioActive&&o.a.createElement(Pp,{className:\"jp-settings-card__configure-link\",href:\"\".concat(this.props.siteAdminUrl,\"post-new.php?post_type=jetpack-portfolio\")},Us(\"Add a portfolio item\")))}}]),t}(o.a.Component),Cd=Cu(le((function(e,t){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)},getModuleOverride:function(t){return $a(e,t)},portfolioActive:t.getSettingCurrentValue(\"jetpack_portfolio\",\"custom-content-types\"),testimonialActive:t.getSettingCurrentValue(\"jetpack_testimonial\",\"custom-content-types\")}}))(Ed)),Sd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"getInfiniteMode\",(function(){return n.props.getOptionValue(\"infinite-scroll\")?n.props.getOptionValue(\"infinite_scroll\",\"infinite-scroll\")?\"infinite_scroll\":\"infinite_button\":\"infinite_default\"})),ha()(Os()(n),\"updateInfiniteMode\",(function(e){n.setState({infinite_mode:e},n.prepareOptionsToUpdate)})),ha()(Os()(n),\"prepareOptionsToUpdate\",(function(){\"infinite_default\"===n.state.infinite_mode?n.props.updateFormStateOptionValue(\"infinite-scroll\",!1):\"infinite_scroll\"!==n.state.infinite_mode&&\"infinite_button\"!==n.state.infinite_mode||n.props.updateFormStateOptionValue({\"infinite-scroll\":!0,infinite_scroll:\"infinite_scroll\"===n.state.infinite_mode})})),ha()(Os()(n),\"updateOptions\",(function(e,t){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption(t,e))})),ha()(Os()(n),\"trackLearnMoreIS\",(function(){Uc.tracks.recordJetpackClick({target:\"learn-more\",feature:\"infinite-scroll\",extra:\"not-supported-link\"})})),ha()(Os()(n),\"state\",{infinite_mode:n.getInfiniteMode()}),ha()(Os()(n),\"handleInfiniteScrollModeChange\",(function(e){return function(){return n.updateInfiniteMode(e)}})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this,t=this.props.isModuleFound(\"infinite-scroll\"),n=this.props.isModuleFound(\"custom-css\");if(!t&&!n)return null;var r=this.props.getModule(\"infinite-scroll\"),i=this.props.getModule(\"custom-css\"),a=\"inactive\"===this.props.getModuleOverride(\"infinite-scroll\");return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Theme enhancements\"),hideButton:!t||!this.props.isInfiniteScrollSupported,module:\"theme-enhancements\"}),a&&o.a.createElement(Wu,{moduleName:r.name,compact:!0}),t&&!a&&o.a.createElement(ep,{hasChild:!0,module:{module:r.module},key:\"theme_enhancement_\".concat(r.module),support:{text:Us(\"Loads the next posts automatically when the reader approaches the bottom of the page.\"),link:Vl(\"jetpack-support-infinite-scroll\")}},o.a.createElement(Kl,{className:\"jp-form-label-wide\"},r.name),o.a.createElement(\"p\",null,Us(\"Create a smooth, uninterrupted reading experience by loading more content as visitors scroll to the bottom of your archive pages.\")),this.props.isInfiniteScrollSupported?[{key:\"infinite_default\",label:Us(\"Load more posts using the default theme behavior\")},{key:\"infinite_button\",label:Us(\"Load more posts in page with a button\")},{key:\"infinite_scroll\",label:Us(\"Load more posts as the reader scrolls down\")}].map((function(t){return o.a.createElement(ql,{key:\"\".concat(r.module,\"_\").concat(t.key)},o.a.createElement(\"input\",{type:\"radio\",name:\"infinite_mode\",value:t.key,checked:t.key===e.state.infinite_mode,disabled:e.props.isSavingAnyOption([r.module,t.key]),onChange:e.handleInfiniteScrollModeChange(t.key)}),o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},t.label))})):o.a.createElement(\"span\",null,Us(\"Theme support required.\")+\" \",o.a.createElement(\"a\",{onClick:this.trackLearnMoreIS,href:r.learn_more_button+\"#theme\",title:Us(\"Learn more about adding support for Infinite Scroll to your theme.\")},Us(\"Learn more\")))),n&&o.a.createElement(ep,{module:{module:i.module},support:{text:i.description,link:Vl(\"jetpack-support-custom-css\")}},o.a.createElement(ku,{slug:\"custom-css\",activated:!!this.props.getOptionValue(\"custom-css\"),toggling:this.props.isSavingAnyOption([\"custom-css\"]),disabled:this.props.isSavingAnyOption([\"custom-css\"]),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Enhance CSS customization panel\")))))}}]),t}(o.a.Component),Md=le((function(e){return{module:function(t){return qa(e,t)},isInfiniteScrollSupported:Hi(e,\"infinite-scroll\"),isModuleFound:function(t){return ko(e,t)}}}))(Cu(Sd)),xd=n(182),Ad=n.n(xd),jd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"displayPrompt\",(function(){window.prompt(n.props.prompt,n.props.text)})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){var e=this,t=a.a.findDOMNode(this.refs.button);this.clipboard=new Ad.a(t,{text:function(){return e.props.text}}),this.clipboard.on(\"success\",this.props.onCopy),this.clipboard.on(\"error\",this.displayPrompt)}},{key:\"componentWillUnmount\",value:function(){this.clipboard.destroy(),delete this.clipboard}},{key:\"render\",value:function(){var e=Mc()(\"dops-clipboard-button\",this.props.className);return o.a.createElement(xc,Bc()({ref:\"button\"},Object(Dt.omit)(this.props,Object.keys(this.constructor.propTypes)),{className:e}))}}]),t}(o.a.Component);ha()(jd,\"displayName\",\"ClipboardButton\"),ha()(jd,\"propTypes\",{className:u.a.string,text:u.a.string,prompt:u.a.string,onCopy:u.a.func}),ha()(jd,\"defaultProps\",{onCopy:Dt.noop});n(370);var Od=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{isCopied:!1,disabled:!1}),ha()(Os()(n),\"showConfirmation\",(function(){n.setState({isCopied:!0}),n.confirmationTimeout=setTimeout((function(){n.setState({isCopied:!1})}),4e3)})),n}return Ma()(t,e),As()(t,[{key:\"componentWillUnmount\",value:function(){clearTimeout(this.confirmationTimeout),delete this.confirmationTimeout}},{key:\"render\",value:function(){var e=Object(Dt.omit)(this.props,\"className\",\"copied\",\"copy\",\"isError\",\"isValid\",\"prompt\",\"selectOnFocus\");return o.a.createElement(\"span\",{className:Mc()(\"dops-clipboard-button-input\",this.props.className)},o.a.createElement(Bl,Bc()({},e,{type:\"text\",selectOnFocus:!0,readOnly:!0})),o.a.createElement(jd,{text:this.props.value,onCopy:this.showConfirmation,disabled:this.props.disabled,prompt:this.props.prompt,compact:!0},this.state.isCopied?this.props.copied:this.props.copy))}}]),t}(o.a.Component);ha()(Od,\"displayName\",\"ClipboardButtonInput\"),ha()(Od,\"propTypes\",{value:u.a.string,disabled:u.a.bool,className:u.a.string,copied:u.a.string,copy:u.a.string,prompt:u.a.string}),ha()(Od,\"defaultProps\",{value:\"\"});var Nd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"regeneratePostByEmailAddress\",(function(e){Uc.tracks.recordJetpackClick(\"pbe-regenerage-email\"),e.preventDefault(),n.props.regeneratePostByEmailAddress()})),ha()(Os()(n),\"address\",(function(){var e=n.props.getOptionValue(\"post_by_email_address\");return!1===e||\"1\"===e||null===e?\"\":e})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(!this.props.isModuleFound(\"post-by-email\"))return null;var e=this.props.getModule(\"post-by-email\"),t=this.props.getOptionValue(\"post-by-email\"),n=this.props.isUnavailableInDevMode(\"post-by-email\")||!this.props.isLinked,r=this.address();return o.a.createElement(Yu,Bc()({},this.props,{module:\"post-by-email\",hideButton:!0}),o.a.createElement(ep,{hasChild:!0,disableInDevMode:!0,module:e,support:{text:Us(\"Allows you to publish new posts by sending an email to a special address.\"),link:Vl(\"jetpack-support-post-by-email\")}},o.a.createElement(\"p\",null,Us(\"Post by email is a quick way to publish new posts without visiting your site. We’ll generate a unique email address for you to send your content to, which will then appear on your site just like any other post.\")),this.props.userCanManageModules?o.a.createElement(ku,{slug:\"post-by-email\",compact:!0,disabled:n,activated:t,toggling:this.props.isSavingAnyOption(\"post-by-email\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},this.props.module(\"post-by-email\").description)):o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},this.props.module(\"post-by-email\").description),o.a.createElement(Hl,null,o.a.createElement(ql,null,o.a.createElement(Kl,null,Us(\"Send your new posts to this email address:\")),o.a.createElement(Od,{value:r,disabled:!t||n,copy:Us(\"Copy\",{context:\"verb\"}),copied:Us(\"Copied!\"),prompt:Us(\"Highlight and copy the following text to your clipboard:\")})),o.a.createElement(xc,{disabled:!t||n,onClick:this.regeneratePostByEmailAddress},Us(r?\"Regenerate address\":\"Create address\")))),!this.props.isUnavailableInDevMode(\"post-by-email\")&&!this.props.isLinked&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",href:\"\".concat(this.props.connectUrl,\"&from=unlinked-user-pbe\")},Us(\"Create a Jetpack account to use this feature\")))}}]),t}(o.a.Component),Td=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)}}}))(Cu(Nd)),Pd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.isModuleFound(\"widgets\"),t=this.props.isModuleFound(\"widget-visibility\");return e||t?o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"Widgets\",{context:\"Settings header\"}),module:\"widgets\",hideButton:!0}),e&&o.a.createElement(ep,{module:{module:\"widgets\"},support:{text:this.props.widgetsModule.description,link:Vl(\"jetpack-support-extra-sidebar-widgets\")}},o.a.createElement(ku,{slug:\"widgets\",activated:this.props.widgetsActive,toggling:this.props.isSavingAnyOption(\"widgets\"),toggleModule:this.props.toggleModuleNow},Us(\"Make extra widgets available for use on your site including subscription forms and Twitter streams\"))),t&&o.a.createElement(ep,{module:{module:\"widget-visibility\"},support:{text:Us(\"Widget visibility lets you decide which widgets appear on which pages, so you can finely tailor widget content.\"),link:Vl(\"jetpack-support-widget-visibility\")}},o.a.createElement(ku,{slug:\"widget-visibility\",activated:this.props.widgetVisibilityActive,toggling:this.props.isSavingAnyOption(\"widget-visibility\"),toggleModule:this.props.toggleModuleNow},Us(\"Enable widget visibility controls to display widgets only on particular posts or pages\")))):null}}]),t}(s.Component),Id=Cu(le((function(e,t){return{widgetVisibilityActive:t.getOptionValue(\"widget-visibility\"),widgetsActive:t.getOptionValue(\"widgets\"),widgetsModule:qa(e,\"widgets\"),isModuleFound:function(t){return ko(e,t)}}}))(Pd)),Dd=Cu(function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.getOptionValue(\"masterbar\"),t=this.props.isUnavailableInDevMode(\"masterbar\"),n=this.props.isLinked;return o.a.createElement(Yu,Bc()({},this.props,{header:Us(\"WordPress.com toolbar\",{context:\"Settings header\"}),module:\"masterbar\",hideButton:!0}),o.a.createElement(ep,{disableInDevMode:!0,module:{module:\"masterbar\"},support:{text:Us(\"Adds a toolbar with links to all your sites, notifications, your WordPress.com profile, and the Reader.\"),link:Vl(\"jetpack-support-masterbar\")}},o.a.createElement(\"p\",null,Us(\"The WordPress.com toolbar replaces the default WordPress admin toolbar. It offers one-click access to notifications, your WordPress.com profile and your other Jetpack and WordPress.com websites. You can also catch up on the sites you follow in the Reader.\")),o.a.createElement(ku,{slug:\"masterbar\",disabled:t||!n,activated:e,toggling:this.props.isSavingAnyOption(\"masterbar\"),toggleModule:this.props.toggleModuleNow},Us(\"Enable the WordPress.com toolbar\"))),!this.props.isUnavailableInDevMode(\"masterbar\")&&!this.props.isLinked&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",href:\"\".concat(this.props.connectUrl,\"&from=unlinked-user-masterbar\")},Us(\"Create a Jetpack account to use this feature\")))}}]),t}(s.Component)),Rd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{carousel_display_exif:n.props.getOptionValue(\"carousel_display_exif\",\"carousel\")}),ha()(Os()(n),\"updateOptions\",(function(e){n.setState(ha()({},e,!n.state[e]),n.props.updateFormStateModuleOption(\"carousel\",e))})),ha()(Os()(n),\"handleCarouselDisplayExifChange\",(function(){n.updateOptions(\"carousel_display_exif\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.isModuleFound(\"carousel\");if(!e)return null;var t=this.props.getOptionValue(\"carousel\");return o.a.createElement(Yu,Bc()({},this.props,{module:\"media\",header:Us(\"Media\"),hideButton:!e,saveDisabled:this.props.isSavingAnyOption(\"carousel_background_color\")}),o.a.createElement(ep,{hasChild:!0,module:{module:\"carousel\"},support:{link:Vl(\"jetpack-support-carousel\")}},o.a.createElement(\"p\",null,Us(\"Create full-screen carousel slideshows for the images in your posts and pages. Carousel galleries are mobile-friendly and encourage site visitors to interact with your photos.\")),o.a.createElement(ku,{slug:\"carousel\",activated:t,toggling:this.props.isSavingAnyOption(\"carousel\"),toggleModule:this.props.toggleModuleNow},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Display images in a full-screen carousel gallery\"))),o.a.createElement(Hl,null,o.a.createElement(_u,{checked:this.state.carousel_display_exif,disabled:!t||this.props.isSavingAnyOption([\"carousel\",\"carousel_display_exif\"]),onChange:this.handleCarouselDisplayExifChange},o.a.createElement(\"span\",{className:\"jp-form-toggle-explanation\"},Us(\"Show photo Exif metadata in carousel (when available)\"))),o.a.createElement(Hl,null,o.a.createElement(\"p\",{className:\"jp-form-setting-explanation\"},Us(\"Exif data shows viewers additional technical details of a photo, like its focal length, aperture, and ISO.\"))),o.a.createElement(ql,null,o.a.createElement(Kl,{className:\"jp-form-label-wide\"},Us(\"Carousel color scheme\")),o.a.createElement(Xl,Bc()({name:\"carousel_background_color\",value:this.props.getOptionValue(\"carousel_background_color\"),disabled:!t||this.props.isSavingAnyOption([\"carousel\",\"carousel_background_color\"])},this.props,{validValues:this.props.validValues(\"carousel_background_color\",\"carousel\")}))))))}}]),t}(s.Component),Ud=le((function(e){return{module:function(t){return qa(e,t)},isModuleFound:function(t){return ko(e,t)}}}))(Cu(Rd)),Ld=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={settings:this.props.settings,getModule:this.props.module,isDevMode:this.props.isDevMode,isUnavailableInDevMode:this.props.isUnavailableInDevMode,isLinked:this.props.isLinked,getModuleOverride:this.props.getModuleOverride},t=[\"carousel\",\"copy-post\",\"custom-css\",\"latex\",\"masterbar\",\"markdown\",\"shortcodes\",\"custom-content-types\",\"post-by-email\",\"infinite-scroll\",\"widgets\",\"widget-visibility\"].some(this.props.isModuleFound);if(!this.props.searchTerm&&!this.props.active)return null;if(!t)return null;var n=this.props.userCanManageModules||this.props.userCanEditPosts,r=this.props.userCanManageModules||this.props.userCanEditPosts&&this.props.isModuleActivated(\"post-by-email\");return o.a.createElement(\"div\",null,o.a.createElement(zl,null),o.a.createElement(Dl,{title:this.props.searchTerm?Us(\"Writing\"):Us(\"Compose content the way you want to and streamline your publishing experience.\"),className:\"jp-settings-description\"}),this.props.isModuleFound(\"carousel\")&&o.a.createElement(Ud,e),n&&o.a.createElement(kd,Bc()({},e,{userCanManageModules:this.props.userCanManageModules})),this.props.isModuleFound(\"custom-content-types\")&&o.a.createElement(Cd,e),o.a.createElement(Md,e),o.a.createElement(Id,e),this.props.isModuleFound(\"post-by-email\")&&r&&o.a.createElement(Td,Bc()({},e,{connectUrl:this.props.connectUrl,isLinked:this.props.isLinked,userCanManageModules:this.props.userCanManageModules})),this.props.isModuleFound(\"masterbar\")&&!this.props.masterbarIsAlwaysActive&&o.a.createElement(Dd,Bc()({connectUrl:this.props.connectUrl},e)),!n&&!r&&o.a.createElement(Dl,null,Us(\"Writing tools available to you will be shown here when an administrator enables them.\")))}}]),t}(o.a.Component);ha()(Ld,\"displayName\",\"WritingSettings\");var Fd=le((function(e){return{module:function(t){return qa(e,t)},settings:So(e),masterbarIsAlwaysActive:Vi(e),isDevMode:Qs(e),isUnavailableInDevMode:function(t){return no(e,t)},userCanEditPosts:Si(e),isModuleActivated:function(t){return Ga(e,t)},isLinked:Xs(e),userCanManageModules:Ei(e),isModuleFound:function(t){return ko(e,t)},connectUrl:Js(e),getModuleOverride:function(t){return $a(e,t)}}}))(Ld),zd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={route:this.props.route,searchTerm:this.props.searchTerm,rewindStatus:this.props.rewindStatus,userCanManageModules:this.props.userCanManageModules};return o.a.createElement(\"div\",{className:\"jp-settings-container\"},o.a.createElement(\"div\",{className:\"jp-no-results\"},e.searchTerm?Us(\"No search results found for %(term)s\",{args:{term:e.searchTerm}}):Us(\"Enter a search term to find settings or close search.\")),o.a.createElement(Wp,Bc()({siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl,active:\"/security\"===this.props.route.path||\"/settings\"===this.props.route.path&&e.userCanManageModules},e)),o.a.createElement(ip,Bc()({siteRawUrl:this.props.siteRawUrl,active:\"/discussion\"===this.props.route.path},e)),o.a.createElement(_p,Bc()({active:\"/performance\"===this.props.route.path},e)),o.a.createElement(_d,Bc()({siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,active:\"/traffic\"===this.props.route.path},e)),o.a.createElement(Fd,Bc()({siteAdminUrl:this.props.siteAdminUrl,active:\"/writing\"===this.props.route.path||\"/settings\"===this.props.route.path&&!e.userCanManageModules},e)),o.a.createElement(Qp,Bc()({siteAdminUrl:this.props.siteAdminUrl,active:\"/sharing\"===this.props.route.path},e)),o.a.createElement(Sp,Bc()({active:\"/privacy\"===this.props.route.path},e)),o.a.createElement(Ap,{searchTerm:this.props.searchTerm}))}}]),t}(o.a.Component);ha()(zd,\"displayName\",\"SearchableSettings\");n(371);var Bd=function(e){return o.a.createElement(\"div\",{className:\"jp-setup-wizard-intro\"},o.a.createElement(\"img\",{width:\"200px\",height:\"200px\",src:rd+\"/jetpack-powering-up.svg\",alt:Us(\"A jetpack site powering up\")}),o.a.createElement(\"h1\",{className:\"jp-setup-wizard-header\"},Us(\"Set up Jetpack for better site security, performance, and more\")),o.a.createElement(\"p\",{className:\"jp-setup-wizard-paragraph\"},Us(\"Jetpack is a cloud-powered tool built by Automattic.\")),o.a.createElement(\"p\",{className:\"jp-setup-wizard-paragraph\"},Us(\"Answer a few questions and we’ll help you secure, speed up, customize, and grow your WordPress website.\")),o.a.createElement(\"div\",{className:\"jp-setup-wizard-intro-question\"},o.a.createElement(\"h2\",null,Us(\"What will %(siteTitle)s be used for?\",{args:{siteTitle:e.siteTitle}})),o.a.createElement(\"div\",{className:\"jp-setup-wizard-answer-buttons\"},o.a.createElement(xc,{primary:!0,className:\"jp-setup-wizard-button\"},Us(\"Personal Use\")),o.a.createElement(xc,{className:\"jp-setup-wizard-button\",primary:!0},Us(\"Business Use\"))),o.a.createElement(\"a\",{className:\"jp-setup-wizard-skip-link\",href:\"\"},Us(\"Skip to recommended features\"))))};Bd.propTypes={siteTitle:u.a.string.isRequired};var Vd=le((function(e){return{siteTitle:yi(e)}}))((function(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(zl,null),o.a.createElement(Bd,{siteTitle:e.siteTitle}))})),Hd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackCogClick\",(function(){Uc.tracks.recordJetpackClick({target:\"settings-cog\",group:\"security\",page:\"aag\"})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e,t,n=Mc()(this.props.className,\"jp-dash-section-header\");return this.props.externalLink&&(e=o.a.createElement(\"a\",{className:\"jp-dash-section-header__external-link\",href:this.props.externalLinkPath,onClick:this.props.externalLinkClick},this.props.externalLink)),this.props.children&&(t=o.a.createElement(\"div\",{className:\"jp-dash-section-header__children\"},this.props.children)),o.a.createElement(\"div\",{className:n},o.a.createElement(\"div\",{className:\"jp-dash-section-header__label\"},o.a.createElement(\"h2\",{className:\"jp-dash-section-header__name\"},this.props.label)),e,t)}}]),t}(o.a.Component);ha()(Hd,\"displayName\",\"DashSectionHeader\"),ha()(Hd,\"propTypes\",{label:u.a.string.isRequired,settingsPath:u.a.string,externalLinkPath:u.a.string,externalLink:u.a.string,externalLinkClick:u.a.func}),ha()(Hd,\"defaultProps\",{label:\"\",settingsPath:\"\",externalLinkPath:\"\",externalLink:\"\"});var qd=Hd,Kd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"toggleModule\",(function(){var e=n.props,t=e.updateOptions,r=e.module,i=e.getOptionValue;t(ha()({},r,!i(r)))})),ha()(Os()(n),\"trackPaidBtnClick\",(function(){Uc.tracks.recordJetpackClick({target:\"paid-button\",feature:n.props.module,page:\"aag\"})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e,t,n=\"\",r=Mc()(this.props.className,\"jp-dash-item\",this.props.disabled?\"jp-dash-item__disabled\":\"\");return\"\"!==this.props.module&&(t=Object(Dt.includes)([\"monitor\",\"protect\",\"photon\",\"vaultpress\",\"scan\",\"backups\",\"akismet\",\"search\"],this.props.module)&&this.props.isDevMode||\"manage\"===this.props.module?\"\":o.a.createElement(ku,{slug:this.props.module,activated:this.props.getOptionValue(this.props.module),toggling:this.props.isUpdating(this.props.module),toggleModule:this.toggleModule,compact:!0}),\"manage\"===this.props.module&&(\"is-warning\"===this.props.status&&(t=o.a.createElement(\"a\",{href:this.props.isDevMode?this.props.siteAdminUrl+\"update-core.php\":Vl(\"calypso-plugins-manage\",{site:this.props.siteRawUrl})},o.a.createElement(Pu,{showDismiss:!1,status:this.props.status,isCompact:!0},Us(\"Updates needed\",{context:\"Short warning message\"})))),\"is-working\"===this.props.status&&(t=o.a.createElement(\"span\",{className:\"jp-dash-item__active-label\"},Us(\"Active\")))),\"rewind\"===this.props.module&&(t=null)),this.props.pro&&!this.props.isDevMode&&(n=o.a.createElement(xc,{onClick:this.trackPaidBtnClick,compact:!0,href:\"#/plans\"},Us(\"Paid\",{context:\"Short label appearing near a paid feature configuration block.\"})),this.props.isModule&&(t=o.a.createElement(zu,{proFeature:this.props.module,siteAdminUrl:this.props.siteAdminUrl}))),this.props.module&&this.props.getModule&&(e=this.props.getModule(this.props.module)),o.a.createElement(\"div\",{className:r},o.a.createElement(Nu,{label:this.props.label,cardBadge:n},this.props.userCanToggle?t:\"\"),this.props.overrideContent?this.props.overrideContent:o.a.createElement(Dl,{className:\"jp-dash-item__card\",href:this.props.href},o.a.createElement(\"div\",{className:\"jp-dash-item__content\"},this.props.support.link&&o.a.createElement(Qu,Bc()({module:e},this.props.support)),this.props.children)))}}]),t}(s.Component);ha()(Kd,\"propTypes\",{label:u.a.string,status:u.a.string,statusText:u.a.string,disabled:u.a.bool,module:u.a.string,pro:u.a.bool,isModule:u.a.bool,support:u.a.object,overrideContent:u.a.element}),ha()(Kd,\"defaultProps\",{label:\"\",module:\"\",pro:!1,isModule:!0,support:{text:\"\",link:\"\"}});var Jd=le((function(e){return{getModule:function(t){return qa(e,t)},isDevMode:Qs(e),userCanToggle:Ei(e),siteRawUrl:vi(e),siteAdminUrl:bi(e)}}))(Cu(Kd)),Wd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.inDevMode,t=Us(\"Jetpack keeps a complete record of everything that happens on your site, taking the guesswork out of site management, debugging, and repair.\");return o.a.createElement(\"div\",{className:\"jp-dash-item__interior\"},o.a.createElement(Jd,{label:Us(\"Activity\"),isModule:!1,className:Mc()({\"jp-dash-item__is-inactive\":e}),pro:!1},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},e?Us(\"Unavailable in Dev Mode.\"):t)),o.a.createElement(Dl,{key:\"view-activity\",className:\"jp-dash-item__manage-in-wpcom\",compact:!0,href:Vl(\"calypso-activity-log\",{site:this.props.siteRawUrl})},Us(\"View site activity\")))}}]),t}(s.Component);ha()(Wd,\"propTypes\",{inDevMode:u.a.bool.isRequired,siteRawUrl:u.a.string.isRequired,sitePlan:u.a.object.isRequired}),ha()(Wd,\"defaultProps\",{inDevMode:!1,siteRawUrl:\"\",sitePlan:\"\"});var Gd=le((function(e){return{sitePlan:qo(e),inDevMode:Qs(e)}}))(Wd),Yd=(n(372),function(){}),$d=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(!this.props.showOnMobile&&Xc())return null;var e=Mc()(\"dops-popover\",\"dops-tooltip\",\"is-\".concat(this.props.position),this.props.className);return o.a.createElement(bu,{autoPosition:this.props.autoPosition,className:e,rootClassName:this.props.rootClassName,context:this.props.context,id:this.props.id,isVisible:this.props.isVisible,onClose:Yd,position:this.props.position,showDelay:this.props.showDelay},this.props.children)}}]),t}(s.Component);ha()($d,\"propTypes\",{autoPosition:u.a.bool,className:u.a.string,id:u.a.string,isVisible:u.a.bool,position:u.a.string,rootClassName:u.a.string,status:u.a.string,showDelay:u.a.number,showOnMobile:u.a.bool}),ha()($d,\"defaultProps\",{showDelay:100,position:\"top\",showOnMobile:!1});var Xd=$d,Qd=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{showPopover:!1}),ha()(Os()(n),\"buildSections\",(function(){var e,t,r=n.props.data.value,i=n.props.max,a=100-(i?Math.ceil(r/i*1e4)/100:0),s=Math.max(1,Math.floor(a)),c=[],l=n.props.data.nestedValue,u={\"dops-chart__bar-section\":!0,\"is-spacer\":!0,\"is-ghost\":100===a&&!n.props.active},p={height:s+\"%\"};c.push(o.a.createElement(\"div\",{key:\"spacer\",className:Mc()(u),style:p}));var d={top:s+\"%\"};return l&&(t={height:(r?Math.ceil(l/r*1e4)/100:0)+\"%\"},e=o.a.createElement(\"div\",{key:\"nestedValue\",className:\"dops-chart__bar-section-inner\",style:t})),c.push(o.a.createElement(\"div\",{ref:\"valueBar\",key:\"value\",className:\"dops-chart__bar-section is-bar\",style:d},e)),c.push(o.a.createElement(\"div\",{key:\"label\",className:\"dops-chart__bar-label\"},n.props.label)),c})),ha()(Os()(n),\"clickHandler\",(function(){\"function\"==typeof n.props.clickHandler&&n.props.clickHandler(n.props.data)})),ha()(Os()(n),\"mouseEnter\",(function(){n.setState({showPopover:!0})})),ha()(Os()(n),\"mouseLeave\",(function(){n.setState({showPopover:!1})})),ha()(Os()(n),\"renderTooltip\",(function(){if(!n.props.data.tooltipData||!n.props.data.tooltipData.length||n.props.isTouch)return null;var e=n.props.data.tooltipData.map((function(e,t){var n,r=[\"module-content-list-item\"];return e.icon&&(n=o.a.createElement(ml,{icon:e.icon,size:18})),r.push(e.className),o.a.createElement(\"li\",{key:t,className:r.join(\" \")},o.a.createElement(\"span\",{className:\"dops-wrapper\"},o.a.createElement(\"span\",{className:\"value\"},e.value),o.a.createElement(\"span\",{className:\"label\"},n,e.label)))}));return o.a.createElement(Xd,{className:\"dops-chart__tooltip\",id:\"popover__chart-bar\",showDelay:200,context:n.refs&&n.refs.valueBar,isVisible:n.state.showPopover,position:n.props.tooltipPosition},o.a.createElement(\"ul\",null,e))})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props.count||1,t={\"dops-chart__bar\":!0};this.props.className&&(t[this.props.className]=!0);var n={width:1/e*100+\"%\"};return o.a.createElement(\"div\",{role:\"button\",tabIndex:0,onClick:this.clickHandler,onMouseEnter:this.mouseEnter,onMouseLeave:this.mouseLeave,className:Mc()(t),style:n},this.buildSections(),o.a.createElement(\"div\",{className:\"dops-chart__bar-marker is-hundred\"}),o.a.createElement(\"div\",{className:\"dops-chart__bar-marker is-fifty\"}),o.a.createElement(\"div\",{className:\"dops-chart__bar-marker is-zero\"}),this.renderTooltip())}}]),t}(o.a.Component);ha()(Qd,\"displayName\",\"ModuleChartBar\"),ha()(Qd,\"propTypes\",{isTouch:u.a.bool,tooltipPosition:u.a.string,className:u.a.string,clickHandler:u.a.func,data:u.a.object.isRequired,max:u.a.number,count:u.a.number});var Zd=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={width:this.props.width+\"px\"};return e.left=this.props.x+\"px\",o.a.createElement(\"div\",{className:\"dops-chart__x-axis-label\",style:e},this.props.label)}}]),t}(o.a.Component);ha()(Zd,\"displayName\",\"ModuleChartLabel\"),ha()(Zd,\"propTypes\",{width:u.a.number.isRequired,x:u.a.number.isRequired,label:u.a.string.isRequired});var eh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{divisor:1,spacing:n.props.labelWidth}),ha()(Os()(n),\"resize\",(function(e){var t=n.props,r=n.refs.axis;!e||e instanceof Event||(t=e),r.style.overflow=\"hidden\";var i=r.clientWidth;r.style.overflow=\"visible\";var a=i/(t.data.length||1),s=t.labelWidth,o=Math.ceil(s/a);n.setState({divisor:o,spacing:a})})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){this.resizeThrottled=Object(Dt.throttle)(this.resize,400),window.addEventListener(\"resize\",this.resizeThrottled),this.resize()}},{key:\"componentWillUnmount\",value:function(){this.resizeThrottled.cancel&&this.resizeThrottled.cancel(),window.removeEventListener(\"resize\",this.resizeThrottled)}},{key:\"UNSAFE_componentWillReceiveProps\",value:function(e){this.resize(e)}},{key:\"render\",value:function(){var e=this.props.data,t=e.map((function(t,n){var r,i=n*this.state.spacing+(this.state.spacing-this.props.labelWidth)/2;return(e.length-n-1)%this.state.divisor==0&&(r=o.a.createElement(Zd,{key:n,label:t.label,width:this.props.labelWidth,x:i})),r}),this);return o.a.createElement(\"div\",{ref:\"axis\",className:\"dops-chart__x-axis\"},t)}}]),t}(o.a.Component);ha()(eh,\"displayName\",\"ModuleChartXAxis\"),ha()(eh,\"propTypes\",{labelWidth:u.a.number.isRequired,data:u.a.array.isRequired});var th=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"buildBars\",(function(e){var t=n.props.data.length,r=n.props.chartWidth,i=r/t,a=\"bottom right\";return n.props.data.map((function(n,s){var c=i*(s+1);return c+230>r&&c+i-230>0&&(a=\"bottom left\"),o.a.createElement(Qd,{index:s,key:s,isTouch:this.props.isTouch,tooltipPosition:a,className:n.className,clickHandler:this.props.barClick,data:n,max:e,count:t})}),Os()(n))})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"dops-chart__bars\"},this.buildBars(this.props.yAxisMax)),o.a.createElement(eh,{data:this.props.data,labelWidth:42}))}}]),t}(o.a.Component);\n\";i:60;s:4:\"/**\n\";i:69;s:4:\" */\n\";i:70;s:194332:\"function nh(){return\"ontouchstart\"in window||window.DocumentTouch&&document instanceof DocumentTouch}ha()(th,\"displayName\",\"ModuleChartBarContainer\"),ha()(th,\"propTypes\",{isTouch:u.a.bool,data:u.a.array,yAxisMax:u.a.number,width:u.a.number,barClick:u.a.func});n(373);var rh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{maxBars:100,width:650}),ha()(Os()(n),\"resize\",(function(){var e,t=n.refs.chart.clientWidth-82;nh()?(t=t<=0?350:t,e=Math.floor(t/n.props.minTouchBarWidth)):e=Math.floor(t/n.props.minBarWidth),n.setState({maxBars:e,width:t})})),ha()(Os()(n),\"getYAxisMax\",(function(e){var t=Math.max.apply(null,e),n=Math.pow(10,t.toString().length-1),r=Math.ceil((t+1)/n)*n;return r<10&&(r=10),r})),ha()(Os()(n),\"getData\",(function(){var e=n.props.data;return e=e.slice(0-n.state.maxBars)})),ha()(Os()(n),\"getValues\",(function(){var e=n.getData();return e=e.map((function(e){return e.value}),Os()(n))})),ha()(Os()(n),\"isEmptyChart\",(function(e){return 0===(e=e.filter((function(e){return e>0}),Os()(n))).length})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){this.resize=Object(Dt.throttle)(this.resize,400),window.addEventListener(\"resize\",this.resize),this.resize()}},{key:\"componentWillUnmount\",value:function(){window.removeEventListener(\"resize\",this.resize)}},{key:\"UNSAFE_componentWillReceiveProps\",value:function(e){this.props.loading&&!e.loading&&this.resize()}},{key:\"render\",value:function(){var e,t=this.getValues(),n=this.getYAxisMax(t),r=this.getData();return t.length&&this.isEmptyChart(t)&&(e=o.a.createElement(\"div\",{className:\"dops-chart__empty\"},o.a.createElement(\"span\",{className:\"dops-chart__empty_notice\"},Us(\"No activity this period\",{context:\"Notice in the empty statistics chart\"})))),o.a.createElement(\"div\",{ref:\"chart\",className:\"dops-chart\"},o.a.createElement(\"div\",{className:\"dops-chart__y-axis-markers\"},o.a.createElement(\"div\",{className:\"dops-chart__y-axis-marker is-hundred\"}),o.a.createElement(\"div\",{className:\"dops-chart__y-axis-marker is-fifty\"}),o.a.createElement(\"div\",{className:\"dops-chart__y-axis-marker is-zero\"})),o.a.createElement(\"div\",{className:\"dops-chart__y-axis\"},o.a.createElement(\"div\",{className:\"dops-chart__y-axis-width-fix\"},new Number(1e5).toLocaleString()),o.a.createElement(\"div\",{className:\"dops-chart__y-axis-label is-hundred\"},n.toLocaleString()),o.a.createElement(\"div\",{className:\"dops-chart__y-axis-label is-fifty\"},(n/2).toLocaleString()),o.a.createElement(\"div\",{className:\"dops-chart__y-axis-label is-zero\"},0)),o.a.createElement(th,{barClick:this.props.barClick,data:r,yAxisMax:n,chartWidth:this.state.width,isTouch:nh()}),e)}}]),t}(o.a.Component);ha()(rh,\"displayName\",\"ModuleChart\"),ha()(rh,\"propTypes\",{loading:u.a.bool,data:u.a.array,minTouchBarWidth:u.a.number,minBarWidth:u.a.number,barClick:u.a.func}),ha()(rh,\"defaultProps\",{minTouchBarWidth:42,minBarWidth:15,barClick:Dt.noop});var ih=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){this.props.fetchingStatsData||this.props.fetchStatsData(this.props.range)}},{key:\"render\",value:function(){return null}}]),t}(s.Component);ih.defaultProps={fetchStatsData:function(){}};var ah=le((function(e){return{fetchStatsData:function(t){return Su(e)},fetchingStatsData:Qi(e)}}),(function(e){return{fetchStatsData:function(t){return e(Su(t))}}}))(ih),sh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackViewDetailedStats\",(function(){return Uc.tracks.recordJetpackClick(\"view_detailed_stats\")})),ha()(Os()(n),\"trackViewWpcomStats\",(function(){return Uc.tracks.recordJetpackClick(\"view_wpcom_stats\")})),n}return Ma()(t,e),As()(t,[{key:\"statsBottom\",value:function(){var e;return[{viewsToday:(e=\"object\"==typeof this.props.statsData.general?this.props.statsData.general.stats:{views:\"-\",comments:\"-\",views_today:\"-\",views_best_day:\"-\",views_best_day_total:\"-\"}).views_today,bestDay:{day:e.views_best_day,count:e.views_best_day_total},allTime:{views:e.views,comments:e.comments}}]}},{key:\"render\",value:function(){var e=this.statsBottom()[0];return o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-summary\"},o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-summary-today\"},o.a.createElement(\"p\",{className:\"jp-at-a-glance__stat-details\"},Us(\"Views today\",{comment:\"Referring to a number of page views\"})),o.a.createElement(\"h3\",{className:\"jp-at-a-glance__stat-number\"},e.viewsToday)),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-summary-bestday\"},o.a.createElement(\"p\",{className:\"jp-at-a-glance__stat-details\"},Us(\"Best overall day\",{comment:\"Referring to a number of page views\"})),o.a.createElement(\"h3\",{className:\"jp-at-a-glance__stat-number\"},\"-\"===e.bestDay.count?\"-\":Us(\"%(number)s View\",\"%(number)s Views\",{count:e.bestDay.count,args:{number:Rs(e.bestDay.count)}})),o.a.createElement(\"p\",{className:\"jp-at-a-glance__stat-details\"},\"-\"===e.bestDay.day?\"-\":Ds(e.bestDay.day).format(\"MMMM Do, YYYY\"))),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-summary-alltime\"},o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-alltime-views\"},o.a.createElement(\"p\",{className:\"jp-at-a-glance__stat-details\"},Us(\"All-time views\",{comment:\"Referring to a number of page views\"})),o.a.createElement(\"h3\",{className:\"jp-at-a-glance__stat-number\"},\"-\"===e.allTime.views?\"-\":Rs(e.allTime.views))),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-alltime-comments\"},o.a.createElement(\"p\",{className:\"jp-at-a-glance__stat-details\"},Us(\"All-time comments\",{comment:\"Referring to a number of comments\"})),o.a.createElement(\"h3\",{className:\"jp-at-a-glance__stat-number\"},\"-\"===e.allTime.comments?\"-\":Rs(e.allTime.comments))))),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-cta\"},o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-cta-description\"}),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-cta-buttons\"},Us(\"{{button}}View detailed stats{{/button}}\",{components:{button:o.a.createElement(xc,{onClick:this.trackViewDetailedStats,href:this.props.siteAdminUrl+\"admin.php?page=stats\"})}}),this.props.isLinked&&Us(\"{{button}}View more stats on WordPress.com {{/button}}\",{components:{button:o.a.createElement(xc,{onClick:this.trackViewWpcomStats,className:\"is-primary\",href:Vl(\"calypso-stats-insights\",{site:this.props.siteRawUrl})})}}))),!this.props.isLinked&&o.a.createElement(Dl,{compact:!0,className:\"jp-settings-card__configure-link\",href:\"\".concat(this.props.connectUrl,\"&from=unlinked-user-connect\")},Us(\"Connect your account to WordPress.com to view more stats\")))}}]),t}(s.Component);sh.propTypes={siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,statsData:u.a.object.isRequired,isLinked:u.a.bool.isRequired},sh.defaultProps={siteRawUrl:\"\",siteAdminUrl:\"\",statsData:{},isLinked:!1};var oh=sh,ch=function(e){function t(e){var n;return _a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),\"dismissCard\",(function(){n.setState({emptyStatsDismissed:!0}),n.props.updateOptions({dismiss_empty_stats_card:!0})})),ha()(Os()(n),\"activateStats\",(function(){return n.props.updateOptions({stats:!0})})),ha()(Os()(n),\"switchToDay\",(function(){return n.switchTo(\"day\")})),ha()(Os()(n),\"switchToWeek\",(function(){return n.switchTo(\"week\")})),ha()(Os()(n),\"switchToMonth\",(function(){return n.switchTo(\"month\")})),n.state={emptyStatsDismissed:e.isEmptyStatsCardDismissed},n}return Ma()(t,e),As()(t,[{key:\"barClick\",value:function(e){e.data.link&&(Uc.tracks.recordJetpackClick(\"stats_bar\"),window.open(e.data.link,\"_blank\"))}},{key:\"statsChart\",value:function(e){var t=this.props,n=[],r=0;return\"object\"!=typeof t.statsData[e]?{chartData:n,totalViews:!1}:(Object(Dt.forEach)(t.statsData[e].data,(function(i){var a=i[1],s=i[0],o=\"\",c=\"\";r+=a,\"day\"===e?(o=Ds(s).format(\"MMM D\"),c=Ds(s).format(\"MMMM Do\")):\"week\"===e?(s=s.replace(/W/g,\"-\"),o=Ds(s).format(\"MMM D\"),c=Us(\"Week of %(date)s\",{args:{date:Ds(s).format(\"MMMM Do\")}})):\"month\"===e&&(o=Ds(s).format(\"MMM\"),c=Ds(s).format(\"MMMM, YYYY\")),n.push({label:o,value:a,nestedValue:null,className:\"statsChartbar\",data:{link:Vl(\"calypso-stats-\".concat(e),{site:t.siteRawUrl,query:\"startDate=\".concat(s)})},tooltipData:[{label:c,value:Us(\"Views: %(numberOfViews)s\",{args:{numberOfViews:Rs(a)}}),className:\"tooltip class\"},{label:Us(\"Click to view detailed stats.\")}]})})),{chartData:n,totalViews:r})}},{key:\"statsErrors\",value:function(){return Object(Dt.get)(this.props.statsData,[\"general\",\"errors\"],!1)}},{key:\"renderStatsChart\",value:function(e){return o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-chart\"},o.a.createElement(rh,{data:e,barClick:this.barClick}),0===e.length&&o.a.createElement(fl,null)),o.a.createElement(\"div\",{id:\"stats-bottom\",className:\"jp-at-a-glance__stats-bottom\"},o.a.createElement(oh,{statsData:this.props.statsData,siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,isLinked:this.props.isLinked,connectUrl:this.props.connectUrl})))}},{key:\"renderEmptyStatsCard\",value:function(){return o.a.createElement(Dl,{className:\"jp-at-a-glance__stats-empty\"},o.a.createElement(\"img\",{src:rd+\"stats-people.svg\",width:\"272\",height:\"144\",alt:Us(\"Jetpack Stats People\"),className:\"jp-at-a-glance__stats-icon\"}),o.a.createElement(\"p\",null,Us(\"Hello there! Your stats have been activated.\"),o.a.createElement(\"br\",null),Us(\"Just give us a little time to collect data so we can display it for you here.\")),o.a.createElement(xc,{onClick:this.dismissCard,primary:!0},Us(\"Okay, got it!\")))}},{key:\"renderStatsArea\",value:function(){if(this.props.getOptionValue(\"stats\")){if(this.statsErrors())return o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive\"},o.a.createElement(\"span\",null,Us(\"Something happened while loading stats. Please try again later or {{a}}view your stats now on WordPress.com{{/a}}\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"calypso-stats-insights\",{site:this.props.siteRawUrl})})}})));var e=this.statsChart(this.props.activeTab),t=e.chartData,n=e.totalViews,r=t.length&&n<=0&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed;return o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-container\"},r?this.renderEmptyStatsCard():this.renderStatsChart(t))}return o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive\"},o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive-icon\"},o.a.createElement(\"img\",{src:rd+\"stats.svg\",width:\"60\",height:\"60\",alt:Us(\"Jetpack Stats Icon\"),className:\"jp-at-a-glance__stats-icon\"})),o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive-text\"},this.props.isDevMode?Us(\"Unavailable in Dev Mode\"):Us(\"{{a}}Activate Site Stats{{/a}} to see detailed stats, likes, followers, subscribers, and more! {{a1}}Learn More{{/a1}}\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:this.activateStats}),a1:o.a.createElement(\"a\",{href:Vl(\"jetpack-support-wordpress-com-stats\"),target:\"_blank\",rel:\"noopener noreferrer\"})}})),!this.props.isDevMode&&o.a.createElement(\"div\",{className:\"jp-at-a-glance__stats-inactive-button\"},o.a.createElement(xc,{onClick:this.activateStats,primary:!0},Us(\"Activate Site Stats\"))))}},{key:\"switchTo\",value:function(e){Uc.tracks.recordJetpackClick({target:\"stats_switch_view\",view:e}),this.props.switchView(e),this.props.fetchStatsData(e)}},{key:\"maybeShowStatsTabs\",value:function(){return!(!1===this.statsChart(this.props.activeTab).totalViews&&!this.props.isEmptyStatsCardDismissed&&!this.state.emptyStatsDismissed)&&(this.props.getOptionValue(\"stats\")&&!this.statsErrors()?o.a.createElement(\"ul\",{className:\"jp-at-a-glance__stats-views\"},o.a.createElement(\"li\",{className:\"jp-at-a-glance__stats-view\"},o.a.createElement(\"a\",{tabIndex:\"0\",href:\"javascript:void(0)\",onClick:this.switchToDay,className:this.getClass(\"day\")},Us(\"Days\"))),o.a.createElement(\"li\",{className:\"jp-at-a-glance__stats-view\"},o.a.createElement(\"a\",{tabIndex:\"0\",href:\"javascript:void(0)\",onClick:this.switchToWeek,className:this.getClass(\"week\")},Us(\"Weeks\"))),o.a.createElement(\"li\",{className:\"jp-at-a-glance__stats-view\"},o.a.createElement(\"a\",{tabIndex:\"0\",href:\"javascript:void(0)\",onClick:this.switchToMonth,className:this.getClass(\"month\")},Us(\"Months\")))):void 0)}},{key:\"getClass\",value:function(e){return this.props.activeTab===e?\"jp-at-a-glance__stats-view-link is-current\":\"jp-at-a-glance__stats-view-link\"}},{key:\"render\",value:function(){return\"inactive\"===this.props.getModuleOverride(\"stats\")?o.a.createElement(\"div\",null,o.a.createElement(Wu,{moduleName:Us(\"Site Stats\")})):this.props.isModuleAvailable&&o.a.createElement(\"div\",null,o.a.createElement(ah,{range:this.props.activeTab}),o.a.createElement(qd,{label:Us(\"Site Stats\")},this.maybeShowStatsTabs()),o.a.createElement(Dl,{className:\"jp-at-a-glance__stats-card \"+(this.props.isDevMode?\"is-inactive\":\"\")},this.renderStatsArea()))}}]),t}(s.Component);ha()(ch,\"propTypes\",{isDevMode:u.a.bool.isRequired,siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,statsData:u.a.any.isRequired,isModuleAvailable:u.a.bool.isRequired});var lh=le((function(e){return{isModuleAvailable:Ya(e,\"stats\"),activeTab:Xi(e),isDevMode:Qs(e),isLinked:Xs(e),connectUrl:Js(e),statsData:Object(Dt.isEmpty)(Zi(e))?mi(e):Zi(e),isEmptyStatsCardDismissed:To(e),getModuleOverride:function(t){return $a(e,t)}}}),(function(e){return{switchView:function(t){return e(function(e){return function(t){t({type:Jn,activeStatsTab:e})}}(t))},fetchStatsData:function(t){return e(Su(t))}}}))(ch),uh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){!this.props.fetchingProtectData&&this.props.isModuleActivated(\"protect\")&&this.props.fetchProtectCount()}},{key:\"render\",value:function(){return null}}]),t}(s.Component);uh.defaultProps={fetchProtectCount:function(){}};var ph=le((function(e){return{fetchProtectCount:Mu(),fetchingProtectData:ia(e),isModuleActivated:function(t){return Ga(e,t)}}}),(function(e){return P({fetchProtectCount:Mu},e)}))(uh),dh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"activateProtect\",(function(){return n.props.updateOptions({protect:!0})})),n}return Ma()(t,e),As()(t,[{key:\"getContent\",value:function(){var e=Us(\"Protect\"),t={text:Us(\"Protects your site from traditional and distributed brute force login attacks.\"),link:Vl(\"jetpack-support-protect\")};if(this.props.getOptionValue(\"protect\")){var n=this.props.protectCount;return!1===n||\"0\"===n||\"N/A\"===n?o.a.createElement(Jd,{label:e,module:\"protect\",support:t,status:\"is-working\",className:\"jp-dash-item__recently-activated\"},o.a.createElement(\"div\",{className:\"jp-dash-item__recently-activated-lower\"},o.a.createElement(ph,null),o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Jetpack is actively blocking malicious login attempts. Data will display here soon!\")))):o.a.createElement(Jd,{label:e,module:\"protect\",support:t,status:\"is-working\"},o.a.createElement(\"h2\",{className:\"jp-dash-item__count\"},Rs(n)),o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Total malicious attacks blocked on your site.\")))}return o.a.createElement(Jd,{label:e,module:\"protect\",support:t,className:\"jp-dash-item__is-inactive\"},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},this.props.isDevMode?Us(\"Unavailable in Dev Mode\"):Us(\"{{a}}Activate Protect{{/a}} to keep your site protected from malicious sign in attempts.\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:this.activateProtect})}})))}},{key:\"render\",value:function(){return this.props.isModuleAvailable&&o.a.createElement(\"div\",{className:\"jp-dash-item__interior\"},o.a.createElement(ph,null),this.getContent())}}]),t}(s.Component);ha()(dh,\"propTypes\",{isDevMode:u.a.bool.isRequired,protectCount:u.a.any.isRequired,isModuleAvailable:u.a.bool.isRequired});var hh=le((function(e){return{protectCount:aa(e),isDevMode:Qs(e),isModuleAvailable:Ya(e,\"protect\")}}))(dh),fh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"activateAndTrack\",(function(){Uc.tracks.recordEvent(\"jetpack_wpa_module_toggle\",{module:\"monitor\",toggled:\"on\"}),n.props.updateOptions({monitor:!0})})),n}return Ma()(t,e),As()(t,[{key:\"getContent\",value:function(){var e=Us(\"Downtime monitor\"),t={text:Us(\"Jetpack’s downtime monitor will continuously monitor your site, and alert you the moment that downtime is detected.\"),link:Vl(\"jetpack-support-monitor\")};return this.props.getOptionValue(\"monitor\")?o.a.createElement(Jd,{label:e,module:\"monitor\",support:t,status:\"is-working\"},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Jetpack is monitoring your site. If we think your site is down, you will receive an email.\"))):o.a.createElement(Jd,{label:e,module:\"monitor\",support:t,className:\"jp-dash-item__is-inactive\"},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},this.props.isDevMode?Us(\"Unavailable in Dev Mode.\"):Us(\"{{a}}Activate Monitor{{/a}} to receive email notifications if your site goes down.\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:this.activateAndTrack})}})))}},{key:\"render\",value:function(){return this.props.isModuleAvailable&&this.getContent()}}]),t}(s.Component);ha()(fh,\"propTypes\",{isDevMode:u.a.bool.isRequired,isModuleAvailable:u.a.bool.isRequired});var mh=le((function(e){return{isDevMode:Qs(e),isModuleAvailable:Ya(e,\"monitor\")}}))(fh),gh=function(e){return o.a.createElement(Jd,{label:Us(\"Scan\"),module:e.feature||\"scan\",support:{text:Us(\"Your site’s files are regularly scanned for unauthorized or suspicious modifications that could compromise your security and data.\"),link:Vl(\"jetpack-support-security\")},className:e.className||\"\",status:e.status||\"\",pro:!0,overrideContent:e.overrideContent},Object(Dt.isArray)(e.content)?e.content:o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},e.content))},vh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getVPContent\",value:function(){var e=this.props,t=e.sitePlan,n=e.planClass,r=e.fetchingSiteData,i=!1!==t,a=this.props.vaultPressData,s=Object(Dt.get)(a,[\"data\",\"features\",\"security\"],!1);if(this.props.getOptionValue(\"vaultpress\")){if(\"N/A\"===a)return gh({status:\"\",content:Us(\"Loading…\")});if(s){var c=this.props.scanThreats;if(0!==c)return gh({content:[o.a.createElement(\"h3\",{className:\"jp-dash-item__title jp-dash-item__title_fullwidth jp-dash-item__title_top\"},Us(\"Uh oh, %(number)s threat found.\",\"Uh oh, %(number)s threats found.\",{count:c,args:{number:Rs(c)}})),o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"{{a}}View details at VaultPress.com{{/a}}\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"vaultpress-dashboard\")})}}),o.a.createElement(\"br\",null),Us(\"{{a}}Contact Support{{/a}}\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"jetpack-support\")})}}))]});if(\"success\"===a.code)return gh({status:\"is-working\",content:Us(\"No threats found, you\'re good to go!\")})}}if(r)return gh({status:\"\",content:Us(\"Loading…\")});var l=this.props.isVaultPressInstalled?\"pro-inactive\":\"pro-uninstalled\",u=\"is-premium-plan\"===n||\"is-business-plan\"===n||s?o.a.createElement(\"p\",{className:\"jp-dash-item__description\",key:\"inactive-scanning\"},Us(\"For automated, comprehensive scanning of security threats, please {{a}}install and activate{{/a}} VaultPress.\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"calypso-plugins-vaultpress\"),target:\"_blank\",rel:\"noopener noreferrer\"})}})):null,p=null===u?this.getUpgradeBanner():null;return gh({className:\"jp-dash-item__is-inactive\",status:i?l:\"no-pro-uninstalled-or-inactive\",content:[u],overrideContent:p})}},{key:\"getUpgradeBanner\",value:function(){return o.a.createElement(Ku,{callToAction:Us(\"Upgrade\"),title:Us(\"Find threats early so we can help fix them fast.\"),disableHref:\"false\",href:this.props.upgradeUrl,eventFeature:\"scan\",path:\"dashboard\",plan:\"jetpack_premium\",icon:\"lock\"})}},{key:\"getRewindContent\",value:function(){var e=this.props,t=e.rewindStatus,n=e.siteRawUrl,r=function(e,t){return o.a.createElement(Dl,{compact:!0,key:\"manage-backups\",className:\"jp-dash-item__manage-in-wpcom\",href:e},t)},i=function(e){return gh({className:\"jp-dash-item__is-active\",status:\"is-working\",feature:\"rewind\",content:e})};switch(t){case\"provisioning\":return o.a.createElement(o.a.Fragment,null,i(Us(\"We are configuring your site protection.\")));case\"awaiting_credentials\":return o.a.createElement(o.a.Fragment,null,i(Us(\"You need to enter your server\'s credentials to finish the setup.\")),r(Vl(\"calypso-settings-security\",{site:n}),Us(\"Enter credentials\")));case\"active\":return o.a.createElement(o.a.Fragment,null,i(Us(\"We are making sure your site stays free of security threats. You will be notified if we find one.\")),r(Vl(\"calypso-activity-log\",{site:n}),Us(\"View security scan details\")))}return!1}},{key:\"getUpgradeContent\",value:function(){return gh({className:\"jp-dash-item__is-inactive\",overrideContent:this.getUpgradeBanner()})}},{key:\"render\",value:function(){return this.props.showBackups?this.props.isDevMode?gh({className:\"jp-dash-item__is-inactive\",content:Us(\"Unavailable in Dev Mode.\")}):(e=[\"is-free-plan\",\"is-personal-plan\",\"is-daily-backup-plan\",\"is-realtime-backup-plan\"].includes(this.props.planClass)?this.getUpgradeContent():\"unavailable\"===this.props.rewindStatus?this.getVPContent(this.props.planClass):o.a.createElement(\"div\",{className:\"jp-dash-item\"},this.getRewindContent()),o.a.createElement(\"div\",null,o.a.createElement(Du,null),e)):null;var e}}]),t}(s.Component);ha()(vh,\"propTypes\",{siteRawUrl:u.a.string.isRequired,rewindStatus:u.a.string.isRequired,vaultPressData:u.a.any.isRequired,scanThreats:u.a.any.isRequired,sitePlan:u.a.object.isRequired,isDevMode:u.a.bool.isRequired,isPluginInstalled:u.a.bool.isRequired,fetchingSiteData:u.a.bool.isRequired,upgradeUrl:u.a.string.isRequired}),ha()(vh,\"defaultProps\",{siteRawUrl:\"\",vaultPressData:\"\",scanThreats:0,sitePlan:\"\",isDevMode:!1,isPluginInstalled:!1,fetchingSiteData:!1,rewindStatus:\"\"});var bh=le((function(e){var t=qo(e);return{vaultPressData:oa(e),scanThreats:ca(e),sitePlan:t,planClass:Lo(Object(Dt.get)(t,\"product_slug\",\"\")),isDevMode:Qs(e),isVaultPressInstalled:ba(e,\"vaultpress/vaultpress.php\"),fetchingSiteData:Bo(e),showBackups:qi(e),upgradeUrl:Yi(e,\"aag-scan\")}}))(vh),yh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){this.props.fetchingAkismetData||this.props.fetchAkismetData()}},{key:\"render\",value:function(){return null}}]),t}(s.Component);yh.defaultProps={fetchAkismetData:function(){}};var _h=le((function(e){return{fetchAkismetData:Au(),fetchingAkismetData:ea(e)}}),(function(e){return P({fetchAkismetData:Au},e)}))(yh),wh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"onActivateClick\",(function(){return n.trackActivateClick(),Da.activateAkismet().then((function(){window.location.href=n.props.siteAdminUrl+\"admin.php?page=akismet-key-config\"})),!1})),n}return Ma()(t,e),As()(t,[{key:\"trackActivateClick\",value:function(){Uc.tracks.recordJetpackClick({type:\"activate-link\",target:\"at-a-glance\",feature:\"anti-spam\"})}},{key:\"getContent\",value:function(){var e=this,t=this.props.akismetData,n=Us(\"Anti-spam\"),r=\"jetpack_free\"===Object(Dt.get)(this.props.sitePlan,\"product_slug\",\"jetpack_free\"),i={text:Us(\"Jetpack Anti-spam powered by Akismet. Comments and contact form submissions are checked against our global database of spam.\"),link:\"https://akismet.com/\",privacyLink:\"https://automattic.com/privacy/\"},a=function(){var t=Us(\"Already have a key? {{a}}Activate Akismet{{/a}}\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:e.onActivateClick})}});return o.a.createElement(Ku,{callToAction:Us(\"Upgrade\"),title:Us(\"Automatically clear spam from your comments and forms so you can get back to your business.\"),description:t,disableHref:\"false\",href:e.props.upgradeUrl,eventFeature:\"akismet\",path:\"dashboard\",plan:\"jetpack_premium\",icon:\"flag\"})};if(\"N/A\"===t)return o.a.createElement(Jd,{label:n,module:\"akismet\",support:i,pro:!0},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Loading…\")));var s=!1!==this.props.sitePlan;if(r){if(\"not_installed\"===t)return o.a.createElement(Jd,{label:n,module:\"akismet\",support:i,className:\"jp-dash-item__is-inactive\",status:s?\"pro-uninstalled\":\"no-pro-uninstalled-or-inactive\",pro:!0,overrideContent:a()});if(\"not_active\"===t)return o.a.createElement(Jd,{label:n,module:\"akismet\",support:i,status:s?\"pro-inactive\":\"no-pro-uninstalled-or-inactive\",className:\"jp-dash-item__is-inactive\",pro:!0,overrideContent:a()});if(\"invalid_key\"===t)return o.a.createElement(Jd,{label:n,module:\"akismet\",support:i,className:\"jp-dash-item__is-inactive\",pro:!0,overrideContent:a()})}return[\"not_installed\",\"not_active\",\"invalid_key\"].includes(t)?o.a.createElement(Jd,{label:n,module:\"akismet\",support:i,className:\"jp-dash-item__is-inactive\",pro:!0},Us(\"Your Jetpack plan provides anti-spam protection through Akismet. Click \'set up\' to enable it on your site.\")):[o.a.createElement(Jd,{key:\"comment-moderation\",label:n,module:\"akismet\",support:i,status:\"is-working\",pro:!0},o.a.createElement(\"h2\",{className:\"jp-dash-item__count\"},Rs(t.all.spam)),o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Spam comments blocked.\",{context:\'Example: \"412 Spam comments blocked\"\'}))),!this.props.isDevMode&&o.a.createElement(Dl,{key:\"moderate-comments\",className:\"jp-dash-item__manage-in-wpcom\",compact:!0,href:Vl(\"calypso-comments-all\",{site:this.props.siteRawUrl})},Us(\"Moderate comments\"))]}},{key:\"render\",value:function(){return o.a.createElement(\"div\",{className:\"jp-dash-item__interior\"},o.a.createElement(_h,null),this.getContent())}}]),t}(s.Component);ha()(wh,\"propTypes\",{siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,akismetData:u.a.oneOfType([u.a.string,u.a.object]).isRequired,isDevMode:u.a.bool.isRequired,upgradeUrl:u.a.string.isRequired}),ha()(wh,\"defaultProps\",{siteRawUrl:\"\",siteAdminUrl:\"\",akismetData:\"N/A\",isDevMode:\"\"});var kh=le((function(e){return{akismetData:ta(e),sitePlan:qo(e),isDevMode:Qs(e),upgradeUrl:Yi(e,\"aag-akismet\"),nonce:Ri(e)}}))(wh),Eh=function(e){return o.a.createElement(Jd,{label:Us(\"Backup\"),module:e.feature||\"backups\",support:{text:Us(\"Jetpack Backups allow you to easily restore or download a backup from a specific moment.\"),link:Vl(\"jetpack-support-backup\")},className:e.className,status:e.status,pro:!0,overrideContent:e.overrideContent},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},e.content))},Ch=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getVPContent\",value:function(){var e=this.props,t=e.sitePlan,n=e.isVaultPressInstalled,r=e.getOptionValue,i=e.siteRawUrl,a=e.vaultPressData;return r(\"vaultpress\")&&\"success\"===Object(Dt.get)(a,\"code\",\"\")?Eh({className:\"jp-dash-item__is-active\",status:\"is-working\",content:o.a.createElement(\"span\",null,Object(Dt.get)(a,\"message\",\"\"),\" \",Us(\"{{a}}View backup details{{/a}}.\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"vaultpress-dashboard\"),target:\"_blank\",rel:\"noopener noreferrer\"})}}))}):Object(Dt.isEmpty)(t)?Eh({className:\"\",status:\"\",content:Us(\"Loading…\")}):\"jetpack_free\"!==Object(Dt.get)(t,\"product_slug\",\"jetpack_free\")?Eh({className:\"jp-dash-item__is-inactive\",status:n?\"pro-inactive\":\"pro-uninstalled\",content:Us(\"To automatically back up your entire site, please {{a}}install and activate{{/a}} VaultPress.\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"calypso-plugins-setup\",{site:i,query:\"only=backups\"}),target:\"_blank\",rel:\"noopener noreferrer\"})}})}):Eh({className:\"jp-dash-item__is-inactive\",status:\"no-pro-uninstalled-or-inactive\",overrideContent:o.a.createElement(Ku,{callToAction:Us(\"Upgrade\"),title:Us(\"Never worry about losing your site – automatic backups keep your content safe.\"),disableHref:\"false\",href:this.props.upgradeUrl,eventFeature:\"backups\",path:\"dashboard\",plan:\"jetpack_premium\",icon:\"history\"})})}},{key:\"getRewindContent\",value:function(){var e=this.props,t=e.planClass,n=e.rewindStatus,r=e.siteRawUrl,i=function(e,t){return o.a.createElement(Dl,{compact:!0,key:\"manage-backups\",className:\"jp-dash-item__manage-in-wpcom\",href:e},t)},a=function(e){return Eh({className:\"jp-dash-item__is-active\",status:\"is-working\",feature:\"rewind\",content:e})};switch(n){case\"provisioning\":return o.a.createElement(o.a.Fragment,null,a(Us(\"We are configuring your site\'s backups.\")));case\"awaiting_credentials\":return o.a.createElement(o.a.Fragment,null,a(Us(\"You need to enter your server\'s credentials to finish the setup.\")),i(Vl(\"calypso-settings-security\",{site:r}),Us(\"Enter credentials\")));case\"active\":var s=[\"is-business-plan\",\"is-realtime-backup-plan\"].includes(t)?Us(\"We are backing up your site in real-time.\"):Us(\"We are backing up your site daily.\");return o.a.createElement(o.a.Fragment,null,a(s),i(Vl(\"calypso-activity-log\",{site:r,query:\"group=rewind\"}),Us(\"View your site\'s backups\")))}return!1}},{key:\"render\",value:function(){return this.props.showBackups?this.props.isDevMode?o.a.createElement(\"div\",{className:\"jp-dash-item__interior\"},Eh({className:\"jp-dash-item__is-inactive\",status:\"no-pro-uninstalled-or-inactive\",content:Us(\"Unavailable in Dev Mode.\")})):o.a.createElement(\"div\",null,o.a.createElement(Du,null),\"unavailable\"===this.props.rewindStatus?this.getVPContent():o.a.createElement(\"div\",{className:\"jp-dash-item\"},this.getRewindContent())):null}}]),t}(s.Component);ha()(Ch,\"propTypes\",{siteRawUrl:u.a.string.isRequired,getOptionValue:u.a.func.isRequired,rewindStatus:u.a.string.isRequired,vaultPressData:u.a.any.isRequired,sitePlan:u.a.object.isRequired,isDevMode:u.a.bool.isRequired,isVaultPressInstalled:u.a.bool.isRequired,upgradeUrl:u.a.string.isRequired}),ha()(Ch,\"defaultProps\",{siteRawUrl:\"\",getOptionValue:Dt.noop,vaultPressData:\"\",sitePlan:\"\",isDevMode:!1,isVaultPressInstalled:!1,rewindStatus:\"\"});var Sh=le((function(e){var t=qo(e);return{vaultPressData:oa(e),sitePlan:t,planClass:Lo(t),isDevMode:Qs(e),isVaultPressInstalled:ba(e,\"vaultpress/vaultpress.php\"),showBackups:qi(e),upgradeUrl:Yi(e,\"aag-backups\")}}))(Ch),Mh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){this.props.fetchingPluginUpdates||this.props.fetchPluginUpdates()}},{key:\"render\",value:function(){return null}}]),t}(s.Component);Mh.defaultProps={fetchPluginUpdates:function(){}};var xh=le((function(e){return{fetchPluginUpdates:Ou(),fetchingPluginUpdates:la(e)}}),(function(e){return P({fetchPluginUpdates:Ou},e)}))(Mh),Ah=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"trackManagePlugins\",value:function(){Uc.tracks.recordJetpackClick({type:\"link\",target:\"at-a-glance\",feature:\"manage-plugins\"})}},{key:\"getContent\",value:function(){var e=Us(\"Plugin Updates\"),t=this.props.pluginUpdates,n={text:Us(\"Jetpack’s Plugin Updates allows you to choose which plugins update automatically.\"),link:Vl(\"jetpack-support-site-management\")};if(\"N/A\"===t)return o.a.createElement(Jd,{label:e,module:\"manage\",support:n,status:\"is-working\"},o.a.createElement(xh,null),o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Loading…\")));var r=\"updates-available\"===t.code,i=Vl(\"calypso-plugins-manage\",{site:this.props.siteRawUrl}),a=this.props.getOptionValue(\"manage\")?\"is-working\":\"is-inactive\";return[o.a.createElement(Jd,{key:\"plugin-updates\",label:e,module:\"manage\",support:n,status:r?\"is-warning\":a},r&&o.a.createElement(\"h2\",{className:\"jp-dash-item__count\"},Us(\"%(number)s\",\"%(number)s\",{count:t.count,args:{number:t.count}})),o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},r?[Us(\"Plugin needs updating.\",\"Plugins need updating.\",{count:t.count})+\" \",!this.props.isDevMode&&Us(\"{{a}}Turn on plugin autoupdates.{{/a}}\",{components:{a:o.a.createElement(\"a\",{href:i})}})]:Us(\"All plugins are up-to-date. Awesome work!\"))),!this.props.isDevMode&&o.a.createElement(Dl,{key:\"manage-plugins\",className:\"jp-dash-item__manage-in-wpcom\",compact:!0,href:i,onClick:this.trackManagePlugins,target:\"_blank\"},Us(\"Manage your plugins\"))]}},{key:\"render\",value:function(){return o.a.createElement(\"div\",null,o.a.createElement(xh,null),this.getContent())}}]),t}(s.Component);ha()(Ah,\"propTypes\",{isDevMode:u.a.bool.isRequired,siteRawUrl:u.a.string.isRequired,siteAdminUrl:u.a.string.isRequired,pluginUpdates:u.a.any.isRequired});var jh=le((function(e){return{pluginUpdates:ua(e),isDevMode:Qs(e)}}))(Ah),Oh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"activatePhoton\",(function(){return n.props.updateOptions({photon:!0})})),n}return Ma()(t,e),As()(t,[{key:\"getContent\",value:function(){var e=Us(\"Image Accelerator\"),t={text:Us(\"Jetpack will optimize your images and serve them from the server location nearest to your visitors. Using our global content delivery network will boost the loading speed of your site.\"),link:Vl(\"jetpack-support-photon\")};return this.props.getOptionValue(\"photon\")?o.a.createElement(Jd,{label:e,module:\"photon\",support:t,status:\"is-working\"},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Jetpack is optimizing your image sizes and download speed using our fast global network of servers. This improves your site\'s performance on desktop and mobile devices.\"))):o.a.createElement(Jd,{label:e,module:\"photon\",support:t,className:\"jp-dash-item__is-inactive\"},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},this.props.isDevMode?Us(\"Unavailable in Dev Mode\"):Us(\"{{a}}Activate{{/a}} to optimize image sizes and load images from Jetpack\'s fast global network of servers. This improves your site\'s performance on desktop and mobile devices.\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:this.activatePhoton})}})))}},{key:\"render\",value:function(){return this.props.isModuleAvailable&&this.getContent()}}]),t}(s.Component);ha()(Oh,\"propTypes\",{isDevMode:u.a.bool.isRequired,isModuleAvailable:u.a.bool.isRequired});var Nh=le((function(e){return{isDevMode:Qs(e),isModuleAvailable:Ya(e,\"photon\")}}))(Oh),Th=function(e){return o.a.createElement(Jd,{label:Us(\"Search\"),module:\"search\",support:{text:mp,link:Vl(\"jetpack-support-search\")},className:e.className,status:e.status,isModule:e.pro_inactive,pro:!0,overrideContent:e.overrideContent},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},e.content))},Ph=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"activateSearch\",(function(){n.props.updateOptions(Ms()({search:!0},n.props.hasSearchProduct?{instant_search_enabled:!0}:{}))})),n}return Ma()(t,e),As()(t,[{key:\"trackSearchLink\",value:function(){Uc.tracks.recordJetpackClick({type:\"upgrade-link\",target:\"at-a-glance\",feature:\"search\"})}},{key:\"render\",value:function(){return this.props.isAtomicSite?null:this.props.isFetching?Th({status:\"\",content:Us(\"Loading…\")}):this.props.isDevMode?Th({className:\"jp-dash-item__is-inactive\",status:\"no-pro-uninstalled-or-inactive\",pro_inactive:!0,content:Us(\"Unavailable in Dev Mode\")}):this.props.isBusinessPlan||this.props.hasSearchProduct?this.props.getOptionValue(\"search\")?o.a.createElement(\"div\",{className:\"jp-dash-item\"},o.a.createElement(Jd,{label:Us(\"Search\"),module:\"search\",support:{text:mp,link:Vl(\"jetpack-support-search\")},className:\"jp-dash-item__is-active\",isModule:!1,pro:!0},o.a.createElement(\"p\",{className:\"jp-dash-item__description\"},Us(\"Jetpack Search is powering search on your site.\"))),this.props.hasSearchProduct?o.a.createElement(Dl,{compact:!0,className:\"jp-search-config-aag\",href:\"customize.php?autofocus[section]=jetpack_search\"},fp):o.a.createElement(Dl,{compact:!0,className:\"jp-search-config-aag\",href:\"customize.php?autofocus[panel]=widgets\"},Us(\"Add Search (Jetpack) Widget\"))):Th({className:\"jp-dash-item__is-inactive\",pro_inactive:!1,content:Us(\"{{a}}Activate{{/a}} to help visitors quickly find answers with highly relevant instant search results and powerful filtering.\",{components:{a:o.a.createElement(\"a\",{href:\"javascript:void(0)\",onClick:this.activateSearch})}})}):Th({className:\"jp-dash-item__is-inactive\",status:\"no-pro-uninstalled-or-inactive\",pro_inactive:!0,overrideContent:o.a.createElement(Ku,{callToAction:Us(\"Upgrade\"),title:hp,disableHref:\"false\",href:this.props.upgradeUrl,eventFeature:\"search\",path:\"dashboard\",plan:\"jetpack_search\",icon:\"search\"})})}}]),t}(s.Component);ha()(Ph,\"propTypes\",{getOptionValue:u.a.func.isRequired,isDevMode:u.a.bool.isRequired}),ha()(Ph,\"defaultProps\",{getOptionValue:Dt.noop,isDevMode:!1});var Ih=le((function(e){return{isAtomicSite:Vi(e),isBusinessPlan:\"is-business-plan\"===Lo(qo(e).product_slug),isDevMode:Qs(e),isFetching:Ho(e),hasSearchProduct:Zo(e),upgradeUrl:Yi(e,\"aag-search\")}}))(Ph),Dh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){this.props.isFetchingUserData||this.props.isDevMode||this.props.fetchUserConnectionData()}},{key:\"render\",value:function(){return null}}]),t}(o.a.Component),Rh=le((function(e){return{isFetchingUserData:$s(e),isDevMode:Qs(e)}}),(function(e){return{fetchUserConnectionData:function(){return e((function(e){return e({type:tn}),Da.fetchUserConnectionData().then((function(t){e({type:rn,userConnectionData:t})})).catch((function(t){e({type:nn,error:t})}))}))}}}))(Dh),Uh=function(e){var t=e.amount,n=e.description,r=e.gridIcon,i=e.title;return o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__feature\"},o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__feature-header\"},o.a.createElement(\"h3\",null,i),o.a.createElement(ml,{icon:r})),o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__feature-body\"},o.a.createElement(\"p\",{className:\"jetpack-termination-dialog__feature-body-amount\"},Rs(t)),o.a.createElement(\"p\",{className:\"jetpack-termination-dialog__feature-body-description\"},n)))},Lh=(n(374),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"renderCDNReason\",value:function(){return o.a.createElement(\"li\",{key:\"reason-cdn\"},Us(\"Speed up your site and provide mobile-ready images with {{a}}our CDN{{/a}}\",{components:{a:o.a.createElement(\"a\",{className:\"jetpack-termination-dialog__link\",href:Vl(\"jetpack-features-design-content-delivery-network\"),rel:\"noopener noreferrer\",target:\"_blank\"})}}))}},{key:\"renderProtectReason\",value:function(){return o.a.createElement(\"li\",{key:\"reason-brute-force\"},Us(\"Block {{a}}brute force attacks{{/a}} and get immediate notifications if your site is down\",{components:{a:o.a.createElement(\"a\",{className:\"jetpack-termination-dialog__link\",href:Vl(\"jetpack-features-security\"),rel:\"noopener noreferrer\",target:\"_blank\"})}}))}},{key:\"renderSocialReason\",value:function(){return o.a.createElement(\"li\",{key:\"reason-social\"},Us(\"Grow your traffic with automated social {{a}}publishing and sharing{{/a}}\",{components:{a:o.a.createElement(\"a\",{className:\"jetpack-termination-dialog__link\",href:Vl(\"jetpack-support-social\"),rel:\"noopener noreferrer\",target:\"_blank\"})}}))}},{key:\"render\",value:function(){var e=this.props,t=e.isDevVersion,n=e.purpose,r=e.siteBenefits,i=r.length,a=t?ad:id;return o.a.createElement(Dl,{className:\"jetpack-termination-dialog__features\"},o.a.createElement(\"p\",{className:\"jetpack-termination-dialog__info\"},Us(\"disconnect\"===n?\"Jetpack is currently powering features on your site. Once you disconnect Jetpack, these features will no longer be available and your site may no longer function the same way.\":\"Jetpack is currently powering features on your site. Once you disable Jetpack, these features will no longer be available and your site may no longer function the same way.\"),i>0&&Us(\" We’ve highlighted some of the features you rely on below.\")),o.a.createElement(\"div\",{className:1===i?\"jetpack-termination-dialog__features-list-single-column\":\"jetpack-termination-dialog__features-list\"},r.map((function(e){var t=e.amount,n=e.description,r=e.name,i=e.gridIcon,a=e.title;return o.a.createElement(Uh,{key:r,amount:t,description:n,gridIcon:i,title:a})}))),i<=2&&o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__generic-info\"},o.a.createElement(\"h2\",null,Us(\"Jetpack has many powerful tools that can help you achieve your goals\")),o.a.createElement(\"ul\",null,this.renderCDNReason(),this.renderProtectReason(),this.renderSocialReason())),o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__get-help\"},o.a.createElement(\"p\",null,Us(\"Have a question? We’d love to help! {{a}}Send a question to the Jetpack support team.{{/a}}\",{components:{a:o.a.createElement(\"a\",{className:\"jetpack-termination-dialog__link\",href:a,rel:\"noopener noreferrer\",target:\"_blank\"})}}))))}}]),t}(s.Component));ha()(Lh,\"propTypes\",{isDevVersion:u.a.bool,purpose:u.a.oneOf([\"disconnect\",\"disable\"]).isRequired,siteBenefits:u.a.array.isRequired});var Fh=Lh,zh=function(e){function t(e){var n;return _a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),\"handleRadioChange\",(function(){var e=n.props;(0,e.onAnswerChange)(e.answer.id,n.state.textResponse)})),ha()(Os()(n),\"handleTextChange\",(function(e){var t=n.props,r=t.onAnswerChange,i=t.answer.id,a=e.target.value;r(i,a),n.setState({textResponse:a})})),n.state={textResponse:e.selectedAnswerText},n}return Ma()(t,e),As()(t,[{key:\"renderTextInput\",value:function(){var e=this.props,t=e.disabled,n=e.answer.textInputPrompt,r=this.state.value;return o.a.createElement(Wl,{className:\"multiple-choice-question__answer-item-text-input\",value:r,onChange:this.handleTextChange,placeholder:n||\"\",disabled:t})}},{key:\"render\",value:function(){var e=this.props,t=e.disabled,n=e.answer,r=n.id,i=n.answerText,a=n.textInput,s=n.children,c=e.isSelected;return o.a.createElement(ql,null,o.a.createElement(Yl,{value:r,onChange:this.handleRadioChange,checked:c,disabled:t}),o.a.createElement(\"span\",null,i),o.a.createElement(\"div\",{className:\"multiple-choice-question__answer-item-content\"},a&&this.renderTextInput(),s))}}]),t}(s.Component);ha()(zh,\"propTypes\",{disabled:u.a.bool,isSelected:u.a.bool,onAnswerChange:u.a.func,answer:u.a.shape({id:u.a.string.isRequired,answerText:u.a.string.isRequired,textInput:u.a.bool,textInputPrompt:u.a.string,children:u.a.object}).isRequired,selectedAnswerText:u.a.string}),ha()(zh,\"defaultProps\",{disabled:!1,selectedAnswerText:\"\"});var Bh=zh,Vh=(n(375),Object(Dt.memoize)((function(e){var t=Object(Dt.shuffle)(e.filter((function(e){return!e.doNotShuffle})));return e.map((function(e){return e.doNotShuffle?e:t.pop()}))}),(function(e){return e.map((function(e){return Object(Dt.values)(Object(Dt.pick)(e,\"id\",\"doNotShuffle\")).join(\"_\")})).join(\"-\")}))),Hh=function(e){function t(e){var n;return _a()(this,t),n=ka()(this,Ca()(t).call(this,e)),ha()(Os()(n),\"handleAnswerChange\",(function(e,t){(0,n.props.onAnswerChange)(e,t),n.setState({selectedAnswerId:e})})),n.state={selectedAnswerId:e.selectedAnswerId},n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this,t=this.props,n=t.disabled,r=t.answers,i=t.question,a=t.selectedAnswerText,s=t.subHeader,c=this.state.selectedAnswerId,l=Vh(r);return o.a.createElement(Hl,{className:\"multiple-choice-question\"},o.a.createElement(\"h2\",{className:\"multiple-choice-question__question\"},i),s&&o.a.createElement(\"h3\",{className:\"multiple-choice-question__subheader\"},s),l.map((function(t){return o.a.createElement(Bh,{key:t.id,answer:t,disabled:n,isSelected:c===t.id,onAnswerChange:e.handleAnswerChange,selectedAnswerText:c===t.id?a:\"\"})})))}}]),t}(s.Component);ha()(Hh,\"propTypes\",{answers:u.a.arrayOf(u.a.shape({id:u.a.string.isRequired,answerText:u.a.string.isRequired,doNotShuffle:u.a.bool,textInput:u.a.bool,textInputPrompt:u.a.string,children:u.a.object})).isRequired,disabled:u.a.bool,onAnswerChange:u.a.func.isRequired,question:u.a.string.isRequired,selectedAnswerId:u.a.string,selectedAnswerText:u.a.string,subHeader:u.a.string}),ha()(Hh,\"defaultProps\",{disabled:!1,selectedAnswerId:null,selectedAnswerText:\"\"});var qh=Hh,Kh=[{id:\"cannot-work\",answerText:Us(\"I can\'t get it to work.\")},{id:\"slow\",answerText:Us(\"It slowed down my site.\")},{id:\"buggy\",answerText:Us(\"It\'s buggy.\")},{id:\"no-clarity\",answerText:Us(\"I don\'t know what it does.\")},{id:\"delete\",answerText:Us(\"I\'m deleting/migrating my site.\")},{id:\"troubleshooting\",answerText:Us(\"Troubleshooting - I\'ll be reconnecting afterwards.\")},{id:\"other\",answerText:Us(\"Other:\"),textInput:!0,textInputPrompt:Us(\"share your experience\"),doNotShuffle:!0}],Jh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getQuestion\",value:function(){var e=this.props.purpose;return Us(\"disconnect\"===e?\"Please let us know why you\'re disconnecting Jetpack\":\"Please let us know why you\'re disabling Jetpack\")}},{key:\"render\",value:function(){var e=this.props,t=e.onSurveyAnswerChange,n=e.surveyAnswerId,r=e.surveyAnswerText;return o.a.createElement(Dl,{className:\"jetpack-disconnect-dialog__survey\"},o.a.createElement(qh,{answers:Kh,question:this.getQuestion(),subHeader:Us(\"Your feedback will help us improve the product.\"),onAnswerChange:t,selectedAnswerId:n,selectedAnswerText:r}))}}]),t}(s.Component);ha()(Jh,\"propTypes\",{onSurveyAnswerChange:u.a.func.isRequired,purpose:u.a.oneOf([\"disconnect\",\"disable\"]).isRequired,surveyAnswerId:u.a.string,surveyAnswerText:u.a.string});var Wh=Jh,Gh=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){this.props.isFetchingSiteBenefits||this.props.fetchSiteBenefits()}},{key:\"render\",value:function(){return null}}]),t}(s.Component);ha()(Gh,\"defaultProps\",{isFetchingSiteBenefitsData:!1});var Yh=le((function(e){return{isFetchingSiteBenefits:Vo(e)}}),(function(e){return{fetchSiteBenefits:function(){return e((function(e){return e({type:gr}),Da.fetchSiteBenefits().then((function(t){e({type:vr,siteBenefits:t})})).catch((function(t){e({type:br,error:t})}))}))}}}))(Gh);function $h(e){switch(e){case\"contact-form\":return\"align-image-center\";case\"contact-form-feedback\":return\"mail\";case\"image-hosting\":return\"image\";case\"jetpack-backup\":return\"cloud-download\";case\"jetpack-stats\":return\"stats-alt\";case\"protect\":return\"lock\";case\"publicize\":case\"sharing\":return\"share\";case\"subscribers\":return\"user\";case\"video-hosting\":return\"video-camera\";default:return\"checkmark\"}}function Xh(e){return{name:e.name,title:e.title,description:e.description,amount:e.value,gridIcon:$h(e.name)}}var Qh=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{step:t.FEATURE_STEP,surveyAnswerId:null,surveyAnswerText:\"\"}),ha()(Os()(n),\"handleContinueClick\",(function(){var e=n.props,r=e.location,i=e.purpose;Uc.tracks.recordEvent(\"jetpack_termination_dialog_continue_click\",{location:r,purpose:i}),n.setState({step:t.SURVEY_STEP})})),ha()(Os()(n),\"handleTerminationClick\",(function(){var e=n.props,t=e.location,r=e.purpose,i=e.siteId,a=e.sitePlan,s=e.submitSurvey,o=e.terminateJetpack,c=n.state,l=c.surveyAnswerId,u=c.surveyAnswerText;Uc.tracks.recordEvent(\"jetpack_termination_dialog_termination_click\",{location:t,purpose:r}),s(i,a,l,u,t),o()})),ha()(Os()(n),\"handleDialogCloseClick\",(function(){var e=n.props,t=e.closeDialog,r=e.location,i=e.purpose;Uc.tracks.recordEvent(\"jetpack_termination_dialog_close_click\",{location:r,purpose:i}),t()})),ha()(Os()(n),\"handleSurveyAnswerChange\",(function(e,t){n.setState({surveyAnswerId:e,surveyAnswerText:t})})),n}return Ma()(t,e),As()(t,[{key:\"renderFeatures\",value:function(){var e=this.props,t=e.isDevSite,n=e.purpose,r=e.siteBenefits;return r?o.a.createElement(Fh,{isDevSite:t,purpose:n,siteBenefits:r.map(Xh)}):o.a.createElement(Dl,{className:\"jetpack-termination-dialog__spinner\"},o.a.createElement(fl,null))}},{key:\"renderSurvey\",value:function(){var e=this.props.purpose,t=this.state,n=t.surveyAnswerId,r=t.surveyAnswerText;return o.a.createElement(Wh,{onSurveyAnswerChange:this.handleSurveyAnswerChange,purpose:e,surveyAnswerId:n,surveyAnswerText:r})}},{key:\"renderPrimaryButton\",value:function(){var e=this.props,n=e.purpose,r=e.showSurvey,i=this.state.step;return r&&i===t.FEATURE_STEP?o.a.createElement(xc,{primary:!0,onClick:this.handleContinueClick},Us(\"Continue\")):o.a.createElement(xc,{scary:!0,primary:!0,onClick:this.handleTerminationClick},Us(\"disconnect\"===n?\"Disconnect\":\"Disable\"))}},{key:\"render\",value:function(){var e=this.props,n=e.location,r=e.purpose,i=e.showSurvey,a=this.state.step;return o.a.createElement(\"div\",{className:\"jetpack-termination-dialog\"},o.a.createElement(zl,null),o.a.createElement(Yh,null),o.a.createElement(Dl,null,o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__header\"},o.a.createElement(\"h2\",null,Us(\"disconnect\"===r?\"Disconnect Jetpack\":\"Disable Jetpack\")),\"dashboard\"===n&&o.a.createElement(ml,{icon:\"cross\",className:\"jetpack-termination-dialog__close-icon\",onClick:this.handleDialogCloseClick}))),i&&a!==t.FEATURE_STEP?this.renderSurvey():this.renderFeatures(),o.a.createElement(Dl,null,o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__button-row\"},o.a.createElement(\"p\",null,Us(\"disconnect\"===r?\"Are you sure you want to disconnect?\":\"Are you sure you want to disconnect and deactivate?\")),o.a.createElement(\"div\",{className:\"jetpack-termination-dialog__button-row-buttons\"},o.a.createElement(xc,{onClick:this.handleDialogCloseClick},Us(\"Cancel\")),this.renderPrimaryButton()))))}}]),t}(s.Component);ha()(Qh,\"FEATURE_STEP\",\"FEATURE_STEP\"),ha()(Qh,\"SURVEY_STEP\",\"SURVEY_STEP\"),ha()(Qh,\"propTypes\",{closeDialog:u.a.func.isRequired,isDevVersion:u.a.bool,location:u.a.oneOf([\"plugins\",\"dashboard\"]).isRequired,purpose:u.a.oneOf([\"disconnect\",\"disable\"]).isRequired,showSurvey:u.a.bool.isRequired,siteBenefits:u.a.array,submitSurvey:u.a.func,terminateJetpack:u.a.func.isRequired});var Zh=le((function(e){return{isDevVersion:hi(e),siteBenefits:Ko(e),siteId:ec(e),sitePlan:qo(e)}}),{submitSurvey:function(e,t,n,r,i){var a={survey_id:\"calypso-disconnect-jetpack-july2019\",site_id:e,survey_responses:{purchase:t.product_slug,\"why-cancel\":{response:n},source:{from:\"plugins\"===i?\"Jetpack-Plugins\":\"Jetpack-Dashboard\"}}};return r&&\"\"!==r&&(a.survey_responses[\"why-cancel\"].text=r),function(e){return function(t){return t({type:zr}),Da.submitSurvey(e).then((function(e){return t({type:Br}),e})).catch((function(e){t({type:Vr,error:e.response})}))}}(a)}})(Qh),ef=n(110),tf=n.n(ef),nf=(n(378),!1);var rf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{overlayMouseDown:!1}),ha()(Os()(n),\"handleEscapeKey\",(function(e){27===e.keyCode&&n.maybeClose()})),ha()(Os()(n),\"maybeClose\",(function(){n.props.onRequestClose&&!nf&&n.props.onRequestClose()})),ha()(Os()(n),\"handleMouseDownOverlay\",(function(e){e.preventDefault(),e.stopPropagation(),n.setState({overlayMouseDown:!0})})),ha()(Os()(n),\"handleClickOverlay\",(function(e){e.preventDefault(),e.stopPropagation(),n.state.overlayMouseDown&&n.props.onRequestClose&&!nf&&(n.setState({overlayMouseDown:!1}),n.props.onRequestClose())})),ha()(Os()(n),\"handleMouseEventModal\",(function(e){e.stopPropagation()})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){jQuery(\"body\").addClass(\"dops-modal-showing\").on(\"touchmove.dopsmodal\",!1),jQuery(document).keyup(this.handleEscapeKey);try{tf.a.activate(a.a.findDOMNode(this),{initialFocus:this.props.initialFocus})}catch(e){}}},{key:\"componentWillUnmount\",value:function(){jQuery(\"body\").removeClass(\"dops-modal-showing\").off(\"touchmove.dopsmodal\",!1),jQuery(document).unbind(\"keyup\",this.handleEscapeKey);try{tf.a.deactivate()}catch(e){}}},{key:\"render\",value:function(){var e,t=this.props,n=t.style,r=t.className,i=t.width,a=t.title,s=Cc()(t,[\"style\",\"className\",\"width\",\"title\"]),c=Object(Dt.omit)(s,\"onRequestClose\").forwardedProps;switch(i){case\"wide\":e={maxWidth:\"inherit\",width:\"inherit\"};break;case\"medium\":e={maxWidth:1050,width:\"inherit\"};break;default:e={}}var l=Object(Dt.assign)({},n,e);return o.a.createElement(\"div\",{className:\"dops-modal-wrapper\",onClick:this.handleClickOverlay,onMouseDown:this.handleMouseDownOverlay},o.a.createElement(\"div\",Bc()({className:Mc()(\"dops-modal\",r),style:l,onClick:this.handleMouseEventModal,onMouseDown:this.handleMouseEventModal,onMouseUp:this.handleMouseEventModal,role:\"dialog\",\"aria-label\":a},c),this.props.children))}}]),t}(o.a.Component);ha()(rf,\"propTypes\",{style:u.a.object,width:u.a.oneOf([\"wide\",\"medium\",\"narrow\"]),className:u.a.string,title:u.a.string,initialFocus:u.a.string,onRequestClose:u.a.func}),ha()(rf,\"defaultProps\",{style:{}}),rf.preventClose=function(){nf=!0},rf.allowClose=function(){nf=!1};var af=rf,sf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"disconnectJetpack\",(function(){n.props.disconnectSite(!0)})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props,t=e.show,n=e.showSurvey,r=e.toggleModal;return t&&o.a.createElement(af,{className:\"jp-connection-settings__modal\",onRequestClose:r},o.a.createElement(Zh,{closeDialog:r,location:\"dashboard\",purpose:\"disconnect\",showSurvey:n,terminateJetpack:this.disconnectJetpack}))}}]),t}(s.Component);ha()(sf,\"propTypes\",{show:u.a.bool,showSurvey:u.a.bool,toggleModal:u.a.func}),ha()(sf,\"defaultProps\",{show:!1,showSurvey:!1,toggleModal:Dt.noop});var of=le(null,(function(e){return{disconnectSite:function(){return e(Fc(!0))}}}))(sf),cf=(n(379),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{showModal:!1}),ha()(Os()(n),\"handleOpenModal\",(function(e){Uc.tracks.recordJetpackClick(\"manage_site_connection\"),e.preventDefault(),n.toggleVisibility()})),ha()(Os()(n),\"disconnectSite\",(function(){n.toggleVisibility(),n.props.disconnectSite()})),ha()(Os()(n),\"toggleVisibility\",(function(){n.setState({showModal:!n.state.showModal})})),ha()(Os()(n),\"renderUserButton\",(function(){if(n.props.isLinked)return o.a.createElement(\"div\",null,o.a.createElement(\"a\",{role:\"button\",tabIndex:\"0\",className:\"jp-jetpack-unlink__button\",onKeyDown:Tu(n.props.unlinkUser),onClick:n.props.unlinkUser,disabled:n.props.isUnlinking},Us(\"Unlink me from WordPress.com\")));var e=n.props.connectUrl;n.props.from&&(e+=\"&from=\".concat(n.props.from),e+=\"&additional-user\");var t={className:\"is-primary jp-jetpack-connect__button\",href:e,disabled:n.props.fetchingConnectUrl},r=Us(\"Link to WordPress.com\");return n.props.asLink?o.a.createElement(\"a\",t,r):o.a.createElement(xc,t,r)})),ha()(Os()(n),\"renderContent\",(function(){if(n.props.connectUser)return n.renderUserButton();if(n.props.isSiteConnected)return o.a.createElement(\"a\",{role:\"button\",tabIndex:\"0\",onKeyDown:Tu(n.handleOpenModal),onClick:n.handleOpenModal,disabled:n.props.isDisconnecting},Us(\"Manage site connection\"));var e=n.props.connectUrl;n.props.from&&(e+=\"&from=\".concat(n.props.from));var t={className:\"jp-jetpack-connect__button\",href:e,disabled:n.props.fetchingConnectUrl},r=Us(\"Set up Jetpack\");return n.props.asLink?o.a.createElement(\"a\",t,r):o.a.createElement(xc,t,r)})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"div\",null,!this.props.isSiteConnected&&o.a.createElement(\"p\",{className:\"jp-banner__tos-blurb\"},Us(\"By clicking the button below, you agree to our {{tosLink}}Terms of Service{{/tosLink}} and to {{shareDetailsLink}}share details{{/shareDetailsLink}} with WordPress.com.\",{components:{tosLink:o.a.createElement(\"a\",{href:Vl(\"wpcom-tos\"),rel:\"noopener noreferrer\",target:\"_blank\"}),shareDetailsLink:o.a.createElement(\"a\",{href:Vl(\"jetpack-support-what-data-does-jetpack-sync\"),rel:\"noopener noreferrer\",target:\"_blank\"})}})),this.renderContent(),this.props.children,o.a.createElement(of,{show:this.state.showModal,showSurvey:!1,toggleModal:this.toggleVisibility}))}}]),t}(o.a.Component));ha()(cf,\"displayName\",\"ConnectButton\"),ha()(cf,\"propTypes\",{connectUser:u.a.bool,from:u.a.string,asLink:u.a.bool}),ha()(cf,\"defaultProps\",{connectUser:!1,from:\"\",asLink:!1});var lf=le((function(e){return{siteRawUrl:vi(e),isSiteConnected:Hs(e),isDisconnecting:Ws(e),fetchingConnectUrl:Gs(e),connectUrl:Js(e),isLinked:Xs(e),isUnlinking:Ys(e)}}),(function(e){return{disconnectSite:function(){return e(Fc())},unlinkUser:function(){return e((function(e){return e({type:Qt}),e(Qa(\"is-info\",Us(\"Unlinking from WordPress.com\"),{id:\"unlink-user\"})),Da.unlinkUser().then((function(t){e({type:en,userUnlinked:t}),e(Xa(\"unlink-user\")),e(Qa(\"is-success\",Us(\"Unlinked from WordPress.com.\"),{id:\"unlink-user\",duration:2e3}))})).catch((function(t){e({type:Zt,error:t}),e(Xa(\"unlink-user\")),e(Qa(\"is-error\",Us(\"Error unlinking from WordPress.com. %(error)s\",{args:{error:t}}),{id:\"unlink-user\"}))}))}))}}}))(cf),uf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{showModal:!1}),ha()(Os()(n),\"handleOpenModal\",(function(e){e.preventDefault(),Uc.tracks.recordJetpackClick(\"login_to_mobile_app_modal\"),n.toggleModalVisibility()})),ha()(Os()(n),\"toggleModalVisibility\",(function(){n.setState({showModal:!n.state.showModal})})),ha()(Os()(n),\"clickSendLoginEmail\",(function(e){e.preventDefault(),Uc.tracks.recordJetpackClick(\"login_to_mobile_send_link\"),n.toggleModalVisibility(),n.props.sendMobileLoginEmail()})),n}return Ma()(t,e),As()(t,[{key:\"renderModal\",value:function(){return o.a.createElement(af,{className:\"mobile-magic-link__modal\",onRequestClose:this.toggleModalVisibility},o.a.createElement(Dl,{className:\"mobile-magic-link__modal__body\"},o.a.createElement(\"h2\",null,Us(\"Email me a link to log in to the app\")),o.a.createElement(\"h4\",null,Us(\"Easily log in to the WordPress app by clicking the link we\'ll send to the email address on your account.\")),o.a.createElement(\"div\",{className:\"mobile-magic-link__modal-actions\"},o.a.createElement(xc,{className:\"mobile-magic-link__modal-cancel\",onClick:this.toggleModalVisibility},Us(\"Cancel\",{context:\"A caption for a button to cancel an action.\"})),o.a.createElement(xc,{onClick:this.clickSendLoginEmail,primary:!0},Us(\"Send link\",{context:\"A caption for a button to log in to the WordPress mobile app.\"})))))}},{key:\"render\",value:function(){var e=this.state.showModal;return o.a.createElement(\"div\",{className:\"mobile-magic-link\"},o.a.createElement(\"a\",{className:\"mobile-magic-link__button\",onClick:this.handleOpenModal,onKeyDown:Tu(this.handleOpenModal),role:\"button\",tabIndex:\"0\"},Us(\"Log in to the WordPress mobile app\")),e&&this.renderModal())}}]),t}(o.a.Component);ha()(uf,\"displayName\",\"MobileMagicLink\");var pf=le((function(e){return{isSiteConnected:Hs(e),isLinked:Xs(e)}}),{sendMobileLoginEmail:function(){return function(e){return e({type:ci}),e(Xa(\"mobile-login-email-send\")),e(Xa(\"mobile-login-email-sent\")),e(Xa(\"mobile-login-email-error\")),e(Qa(\"is-info\",Us(\"Sending login email…\"),{id:\"mobile-login-email-send\"})),Da.sendMobileLoginEmail().then((function(t){return e(Xa(\"mobile-login-email-send\")),e({type:li}),e(Qa(\"is-success\",Us(\"Login email sent\"),{id:\"mobile-login-email-sent\",duration:2e3})),t})).catch((function(t){e({type:ui,error:t.response}),e(Xa(\"mobile-login-email-send\")),e(Qa(\"is-error\",Us(\"Failed to send login email\"),{id:\"mobile-login-email-error\"}))}))}}})(uf),df=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"siteConnection\",value:function(){var e=\"\";return this.props.isDevMode?e=o.a.createElement(\"div\",{className:\"jp-connection-settings__info\"},this.props.siteIcon?o.a.createElement(\"img\",{width:\"64\",height:\"64\",className:\"jp-connection-settings__site-icon\",src:this.props.siteIcon,alt:\"\"}):o.a.createElement(ml,{icon:\"globe\",size:64}),o.a.createElement(\"div\",{className:\"jp-connection-settings__text\"},Us(\"Your site is in Development Mode, so it can not be connected to WordPress.com.\"))):!0===this.props.siteConnectionStatus&&(e=o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-connection-settings__info\"},this.props.siteIcon?o.a.createElement(\"img\",{width:\"64\",height:\"64\",className:\"jp-connection-settings__site-icon\",src:this.props.siteIcon,alt:\"\"}):o.a.createElement(ml,{icon:\"globe\",size:64}),o.a.createElement(\"div\",{className:\"jp-connection-settings__text\"},Us(\"Your site is connected to WordPress.com.\"),this.props.userIsMaster&&o.a.createElement(\"span\",{className:\"jp-connection-settings__is-owner\"},o.a.createElement(\"br\",null),o.a.createElement(\"em\",null,Us(\"You are the Jetpack owner.\"))))),this.props.userCanDisconnectSite&&o.a.createElement(\"div\",{className:\"jp-connection-settings__actions\"},o.a.createElement(lf,{asLink:!0})))),e}},{key:\"userConnection\",value:function(){var e=this.props.userIsMaster?null:o.a.createElement(lf,{asLink:!0,connectUser:!0,from:\"connection-settings\"});return this.props.isDevMode?o.a.createElement(\"div\",{className:\"jp-connection-settings__info\"},o.a.createElement(\"img\",{alt:\"gravatar\",width:\"64\",height:\"64\",className:\"jp-connection-settings__gravatar\",src:this.props.userWpComAvatar}),o.a.createElement(\"div\",{className:\"jp-connection-settings__text\"},Us(\"The site is in Development Mode, so you can not connect to WordPress.com.\"))):this.props.isLinked?o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-connection-settings__info\"},o.a.createElement(\"img\",{alt:\"gravatar\",width:\"64\",height:\"64\",className:\"jp-connection-settings__gravatar\",src:this.props.userWpComAvatar}),o.a.createElement(\"div\",{className:\"jp-connection-settings__text\"},Us(\"Connected as {{span}}%(username)s{{/span}}\",{args:{username:this.props.userWpComLogin},components:{span:o.a.createElement(\"span\",{className:\"jp-connection-settings__username\"})},comment:\"%(username) is the WordPress user login name.\"}),o.a.createElement(\"div\",{className:\"jp-connection-settings__email\"},this.props.userWpComEmail))),o.a.createElement(\"div\",{className:\"jp-connection-settings__actions\"},e),o.a.createElement(pf,null)):o.a.createElement(\"div\",null,o.a.createElement(\"div\",{className:\"jp-connection-settings__info\"},Us(\"Link your account to WordPress.com to get the most out of Jetpack.\")),o.a.createElement(\"div\",{className:\"jp-connection-settings__actions\"},e))}},{key:\"render\",value:function(){return o.a.createElement(\"div\",null,o.a.createElement(Rh,null),o.a.createElement(\"div\",{className:\"jp-at-a-glance__item-grid\"},o.a.createElement(\"div\",{className:\"jp-at-a-glance__left\"},o.a.createElement(\"div\",{className:\"jp-dash-item__interior\"},o.a.createElement(Jd,{className:\"jp-connection-type\",label:Us(\"Site connection\",{context:\"Dashboard widget header\"})},this.siteConnection()))),o.a.createElement(\"div\",{className:\"jp-at-a-glance__right\"},o.a.createElement(\"div\",{className:\"jp-dash-item__interior\"},o.a.createElement(Jd,{className:\"jp-connection-type\",label:Us(\"Account connection\",{context:\"Dashboard widget header\"})},this.userConnection())))))}}]),t}(s.Component);df.propTypes={siteConnectionStatus:u.a.any.isRequired,isDevMode:u.a.bool.isRequired,userCanDisconnectSite:u.a.bool.isRequired,userIsMaster:u.a.bool.isRequired,isLinked:u.a.bool.isRequired,userWpComLogin:u.a.any.isRequired,userWpComEmail:u.a.any.isRequired,userWpComAvatar:u.a.any.isRequired,username:u.a.any.isRequired};var hf=le((function(e){return{siteConnectionStatus:Hs(e),isDevMode:Qs(e),userCanDisconnectSite:Mi(e),userIsMaster:Ai(e),userWpComLogin:ji(e),userWpComEmail:Oi(e),userWpComAvatar:Ni(e),username:Ti(e),isLinked:Xs(e),siteIcon:Ii(e)}}))(df),ff=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackSecurityClick\",(function(){return Uc.tracks.recordJetpackClick(\"aag_manage_security_wpcom\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={updateOptions:this.props.updateOptions,getOptionValue:this.props.getOptionValue,isUpdating:this.props.isUpdating,multisite:this.props.multisite},t={siteAdminUrl:this.props.siteAdminUrl,siteRawUrl:this.props.siteRawUrl},n=o.a.createElement(qd,{key:\"securityHeader\",label:Us(\"Security\"),settingsPath:this.props.userCanManageModules?\"#security\":void 0,externalLink:this.props.isDevMode||!this.props.userCanManageModules?\"\":Us(\"Manage security settings\"),externalLinkPath:this.props.isDevMode?\"\":\"#/security\",externalLinkClick:this.trackSecurityClick}),r=o.a.createElement(\"div\",null,o.a.createElement(qd,{label:Us(\"Connections\"),className:\"jp-dash-section-header__connections\"}),o.a.createElement(hf,null)),i=Object(Dt.get)(this.props.rewindStatus,[\"state\"],\"\"),a=[];if(a.push(o.a.createElement(bh,Bc()({},e,{siteRawUrl:this.props.siteRawUrl,rewindStatus:i}))),this.props.multisite||a.push(o.a.createElement(Sh,Bc()({},e,{siteRawUrl:this.props.siteRawUrl,rewindStatus:i}))),a.push(o.a.createElement(kh,t)),a.push(o.a.createElement(jh,Bc()({},e,t))),\"inactive\"!==this.props.getModuleOverride(\"protect\")&&a.push(o.a.createElement(hh,e)),\"inactive\"!==this.props.getModuleOverride(\"monitor\")&&a.push(o.a.createElement(mh,e)),\"active\"===i&&a.unshift(o.a.createElement(Gd,Bc()({},e,{siteRawUrl:this.props.siteRawUrl}))),this.props.userCanManageModules){var s=[{header:n,cards:a}],c=[];return\"inactive\"!==this.props.getModuleOverride(\"photon\")&&c.push(o.a.createElement(Nh,e)),\"inactive\"!==this.props.getModuleOverride(\"search\")&&c.push(o.a.createElement(Ih,e)),c.length&&s.push({header:o.a.createElement(qd,{key:\"performanceHeader\",label:Us(\"Performance\")}),cards:c}),o.a.createElement(\"div\",{className:\"jp-at-a-glance\"},o.a.createElement(jl,null),o.a.createElement(zl,null),o.a.createElement(lh,Bc()({},e,t)),s.map((function(e,t){return[e.header,Object(Dt.chunk)(e.cards,2).map((function(e,n){var r=Ts()(e,2),i=r[0],a=r[1];return o.a.createElement(\"div\",{className:\"jp-at-a-glance__item-grid\",key:\"card-\".concat(t,\"-\").concat(n)},o.a.createElement(\"div\",{className:\"jp-at-a-glance__left\"},i),o.a.createElement(\"div\",{className:\"jp-at-a-glance__right\"},a))}))]})),r)}var l=\"\";this.props.userCanViewStats&&(l=o.a.createElement(lh,Bc()({},e,t)));var u=\"\";return this.props.getOptionValue(\"protect\")&&(u=o.a.createElement(hh,e)),this.props.userIsSubscriber?o.a.createElement(\"div\",null,l,r):o.a.createElement(\"div\",null,l,this.props.getOptionValue(\"protect\")&&n,u,r)}}]),t}(s.Component),mf=le((function(e){return{userCanManageModules:Ei(e),userCanViewStats:Pi(e),userIsSubscriber:wi(e),isDevMode:Qs(e),getModuleOverride:function(t){return $a(e,t)},multisite:Ji(e)}}))(Cu(ff)),gf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props,t=e.expiryDate,n=e.purchaseDate,r=e.isRefundable,i=e.dateFormat;if(!t&&!n)return null;if(!t||r){var a=Ds(n);return a.isValid()?Us(\"Purchased on %s.\",{args:a.format(i)}):null}var s=Ds(t);return s.isValid()?s.diff(new Date)<0?Us(\"Expired on %s.\",{args:s.format(i)}):Us(\"Renews on %s.\",{args:s.format(i)}):null}}]),t}(o.a.PureComponent);ha()(gf,\"propTypes\",{expiryDate:u.a.string,purchaseDate:u.a.string,isRefundable:u.a.bool,dateFormat:u.a.string}),ha()(gf,\"defaultProps\",{expiryDate:\"\",purchaseDate:\"\",isRefundable:!1,dateFormat:\"LL\"});var vf=gf,bf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackClick\",(function(){var e=n.props,t=e.target,r=e.feature;if(t){var i=r?{feature:r}:{};Uc.tracks.recordJetpackClick(Ms()({type:\"upgrade-link\",target:t},i))}})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"a\",{href:this.props.upgradeUrl,target:\"_blank\",rel:\"noopener noreferrer\",onClick:this.trackClick},this.props.children)}}]),t}(s.PureComponent);ha()(bf,\"propTypes\",{source:u.a.string.isRequired,target:u.a.string.isRequired,feature:u.a.string,upgradeUrl:u.a.string.isRequired});var yf=le((function(e,t){var n=t.source;return{upgradeUrl:Yi(e,n)}}))(bf);function _f(e){var t=e.onClick,n=e.siteSlug;return o.a.createElement(\"div\",{className:\"jp-landing__plan-features-header-checklist-cta-container\"},o.a.createElement(xc,{href:Vl(\"calypso-plans-my-plan\",{site:n,query:\"checklist\"}),onClick:t,primary:!0},Us(\"View your setup checklist\")))}function wf(e){var t=e.children;return o.a.createElement(\"span\",{className:\"screen-reader-text\"},t)}var kf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=Mc()(this.props.className,\"checklist-header-progress-bar\"),t=Math.min(Math.ceil(this.props.value/this.props.total*100),100),n=this.props.title?o.a.createElement(wf,null,this.props.title):null;return o.a.createElement(\"div\",{className:e},o.a.createElement(\"div\",{className:\"checklist-header-progress-bar__progress\",style:{width:t+\"%\"}},n))}}]),t}(s.PureComponent);function Ef(e){return e.jetpack.checklist.isLoading}ha()(kf,\"defaultProps\",{total:100}),ha()(kf,\"propTypes\",{value:u.a.number.isRequired,total:u.a.number,title:u.a.string,className:u.a.string});var Cf=Object(Dt.memoize)((function(e){var t=Object.keys(e);return{completed:t.filter((function(t){return e[t].completed})).length,total:t.length}}));function Sf(e){var t=function(e){return Object(Dt.get)(e,[\"jetpack\",\"checklist\",\"checklist\",\"tasks\"])}(e);return t?Cf(t):null}var Mf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){this.props.isLoading||this.props.requestSiteChecklist()}},{key:\"render\",value:function(){return null}}]),t}(s.Component);ha()(Mf,\"propTypes\",{requestSiteChecklist:u.a.func,isLoading:u.a.bool});var xf=le((function(e){return{isLoading:Ef(e)}}),{requestSiteChecklist:function(){return function(e){e({type:oi})}}})(Mf),Af=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackCtaClick\",(function(){Uc.tracks.recordEvent(\"jetpack_myplan_progresschecklistcta_click\",n.props.plan?{plan:n.props.plan}:void 0)})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props,t=e.completed,n=e.total,r=e.siteSlug;return o.a.createElement(o.a.Fragment,null,o.a.createElement(xf,null),t&&n&&o.a.createElement(Dl,{compact:!0,className:\"checklist__header\"},o.a.createElement(\"div\",{className:\"checklist__header-main\"},o.a.createElement(\"div\",{className:\"checklist__header-progress\"},o.a.createElement(\"span\",{className:\"checklist__header-progress-text\"},Us(\"Your Jetpack setup progress\",{comment:\"Onboarding task list progress\"})),o.a.createElement(\"span\",{className:\"checklist__header-progress-number\"},\"\".concat(t,\"/\").concat(n))),o.a.createElement(kf,{total:n,value:t})),o.a.createElement(\"div\",{className:\"checklist__header-secondary\"},o.a.createElement(xc,{compact:!0,href:Vl(\"calypso-plans-my-plan\",{site:r}),onClick:this.trackCtaClick,primary:!0},Us(\"Complete Jetpack Setup\",{comment:\"Text on link to list of onboarding tasks\"})))))}}]),t}(s.Component),jf=le((function(e){return Ms()({siteSlug:vi(e)},Sf(e))}))(Af),Of=(n(380),function(e){var t=e.action,n=e.isError,r=e.isPlaceholder,i=e.details,a=e.icon,s=e.tagLine,c=e.title,l=Mc()(\"my-plan-card\",{\"is-placeholder\":r,\"has-action-only\":t&&!i&&!r}),u=Mc()(\"my-plan-card__details\",{\"is-error\":n});return o.a.createElement(\"div\",{className:l},o.a.createElement(\"div\",{className:\"my-plan-card__primary\"},o.a.createElement(\"div\",{className:\"my-plan-card__icon\"},a&&o.a.createElement(\"img\",{src:a,alt:c})),o.a.createElement(\"div\",{className:\"my-plan-card__header\"},c&&o.a.createElement(\"h2\",{className:\"my-plan-card__title\"},c),s&&o.a.createElement(\"p\",{className:\"my-plan-card__tag-line\"},s))),(i||t||r)&&o.a.createElement(\"div\",{className:\"my-plan-card__secondary\"},o.a.createElement(\"div\",{className:u},r?null:i),o.a.createElement(\"div\",{className:\"my-plan-card__action\"},r?null:t)))});Of.propTypes={action:u.a.oneOfType([u.a.node,u.a.element]),isError:u.a.bool,isPlaceholder:u.a.bool,details:u.a.oneOfType([u.a.string,u.a.node,u.a.element]),icon:u.a.string,tagLine:u.a.oneOfType([u.a.string,u.a.node,u.a.element]),title:u.a.oneOfType([u.a.string,u.a.node,u.a.element])};var Nf=Of,Tf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getProductProps\",value:function(e){var t=this.props,n=t.displayBackups,r=t.purchases;if(!e)return{isPlaceholder:!0};var i,a=Object(Dt.find)(r,(function(t){return t.product_slug===e}));switch(a&&(i=o.a.createElement(vf,{expiryDate:a.expiry_date,purchaseDate:a.subscribed_date,isRefundable:a.is_refundable})),Lo(e)){case\"is-free-plan\":return{icon:rd+\"/plans/plan-free.svg\",tagLine:Us(\"Worried about security? Get backups, automated security fixes and more: {{a}}Upgrade now{{/a}}\",{components:{a:o.a.createElement(yf,{source:\"my-plan-header-free-plan-text-link\",target:\"upgrade-now\",feature:\"my-plan-header-free-upgrade\"})}}),title:Us(\"Jetpack Free\")};case\"is-personal-plan\":return{details:i,icon:rd+\"/plans/plan-personal.svg\",tagLine:Us(n?\"Daily backups, spam filtering, and priority support.\":\"Spam filtering and priority support.\"),title:Us(\"Jetpack Personal\")};case\"is-premium-plan\":return{details:i,icon:rd+\"/plans/plan-premium.svg\",tagLine:Us(\"Full security suite, marketing and revenue automation tools, unlimited video hosting, and priority support.\"),title:Us(\"Jetpack Premium\")};case\"is-business-plan\":return{details:i,icon:rd+\"/plans/plan-business.svg\",tagLine:Us(\"Full security suite, marketing and revenue automation tools, unlimited video hosting, unlimited themes, and priority support.\"),title:Us(\"Jetpack Professional\")};case\"is-daily-backup-plan\":return{details:i,icon:rd+\"/products/product-jetpack-backup.svg\",tagLine:Us(\"Your data is being securely backed up every day with a 30-day archive.\"),title:Us(\"Jetpack Backup {{em}}Daily{{/em}}\",{components:{em:o.a.createElement(\"em\",null)}})};case\"is-realtime-backup-plan\":return{details:i,icon:rd+\"/products/product-jetpack-backup.svg\",tagLine:Us(\"Your data is being securely backed up as you edit.\"),title:Us(\"Jetpack Backup {{em}}Real-Time{{/em}}\",{components:{em:o.a.createElement(\"em\",null)}})};case\"is-search-plan\":return{details:i,icon:rd+\"/products/product-jetpack-search.svg\",tagLine:Us(\"Fast, highly relevant search results and powerful filtering.\"),title:Us(\"Jetpack Search\",{components:{em:o.a.createElement(\"em\",null)}})};case\"is-scan-plan\":return{details:i,icon:\"\".concat(rd,\"/products/product-jetpack-scan.svg\"),tagLine:Us(\"Automatic scanning and one-click fixes keep your site one step ahead of security threats.\"),title:Us(\"Jetpack Scan\")};default:return{isPlaceholder:!0}}}},{key:\"renderPlan\",value:function(){return o.a.createElement(Dl,{compact:!0},this.renderHeader(Us(\"My Plan\")),o.a.createElement(Nf,this.getProductProps(this.props.plan)))}},{key:\"renderProducts\",value:function(){var e=this;return Object(Dt.isEmpty)(this.props.activeProducts)?null:o.a.createElement(Dl,{compact:!0},this.renderHeader(Us(\"My Products\")),this.props.activeProducts.map((function(t){var n=t.ID,r=t.product_slug;return o.a.createElement(Nf,Bc()({key:\"product-card-\"+n},e.getProductProps(r)))})))}},{key:\"renderHeader\",value:function(e){return o.a.createElement(\"h3\",{className:\"jp-landing__card-header\"},e)}},{key:\"render\",value:function(){var e=this.props,t=e.plan,n=e.siteSlug;return o.a.createElement(\"div\",{className:\"jp-landing__plans\"},this.renderPlan(),this.renderProducts(),o.a.createElement(Dl,{compact:!0},o.a.createElement(_f,{onClick:this.trackChecklistCtaClick,siteSlug:n})),o.a.createElement(jf,{plan:t}))}}]),t}(o.a.Component);Tf.propTypes={plan:u.a.string,siteRawUrl:u.a.string,siteSlug:u.a.string,displayBackups:u.a.bool,plansMainTopUpgradeUrl:u.a.string,purchases:u.a.array};var Pf=le((function(e){return{siteSlug:vi(e),displayBackups:qi(e),plansMainTopUpgradeUrl:Yi(e,\"plans-main-top\")}}))(Tf),If=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackPlansClick\",(function(e){Uc.tracks.recordJetpackClick({page:\"my-plan\",target:e,plan:n.props.plan})})),ha()(Os()(n),\"handleButtonClickForTracking\",(function(e){return function(){return n.trackPlansClick(e)}})),ha()(Os()(n),\"activateAds\",(function(){n.props.activateModule(\"wordads\"),n.trackPlansClick(\"activate_wordads\")})),ha()(Os()(n),\"activatePublicize\",(function(){n.props.activateModule(\"publicize\"),n.trackPlansClick(\"activate_publicize\")})),ha()(Os()(n),\"activateVideoPress\",(function(){n.props.activateFeature(\"videopress\"),n.trackPlansClick(\"activate_videopress\")})),ha()(Os()(n),\"activateSeo\",(function(){n.props.activateModule(\"seo-tools\"),n.trackPlansClick(\"activate_seo\")})),ha()(Os()(n),\"activateGoogleAnalytics\",(function(){n.props.activateModule(\"google-analytics\"),n.trackPlansClick(\"activate_ga\")})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e,t=this,n=\"\",r=\"dev\"!==this.props.plan?Lo(this.props.plan):\"dev\",i=Object(Dt.includes)(this.props.activeFeatures,\"premium-themes\"),a=\"active\"===Object(Dt.get)(this.props.rewindStatus,[\"state\"],!1),s=!this.props.showBackups||!a&&\"unavailable\"!==Object(Dt.get)(this.props.rewindStatus,[\"state\"],!1),c=function(e){var n=e.title,r=e.description;return o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-backup.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A Jetpack Site securely backed up with Jetpack Backup\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},n),o.a.createElement(\"p\",null,r),o.a.createElement(xc,{onClick:t.handleButtonClickForTracking(\"view_backup_dash\"),href:Vl(\"calypso-activity-log\",{site:t.props.siteRawUrl})},Us(\"View Your Backups\"))))},l=function(){if(!s){if(a)return o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-security.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A secure site, locked and protected by Jetpack\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Site Backups\")),o.a.createElement(\"p\",null,Us(\"Real-time backup of all your site data with unlimited space, one-click restores, and automated security scanning.\")),o.a.createElement(xc,{onClick:t.handleButtonClickForTracking(\"view_security_dash_rewind\"),href:Vl(\"calypso-activity-log\",{site:t.props.siteRawUrl})},Us(\"View your security activity\"))));var e=\"\";switch(r){case\"is-personal-plan\":e=Us(\"Daily backup of all your site data with unlimited space and one-click restores\");break;case\"is-premium-plan\":e=Us(\"Daily backup of all your site data with unlimited space, one-click restores, automated security scanning, and priority support\");break;case\"is-business-plan\":e=Us(\"Real-time backup of all your site data with unlimited space, one-click restores, automated security scanning, and priority support\");break;default:e=\"\"}return o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-security.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A secure site, locked and protected by Jetpack\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Site Security\")),o.a.createElement(\"p\",null,e+Us(\" (powered by VaultPress).\")),t.props.isPluginInstalled(\"vaultpress/vaultpress.php\")&&t.props.isPluginActive(\"vaultpress/vaultpress.php\")?o.a.createElement(xc,{onClick:t.handleButtonClickForTracking(\"view_security_dash\"),href:Vl(\"vaultpress-dashboard\")},Us(\"View your security dashboard\")):o.a.createElement(xc,{onClick:t.handleButtonClickForTracking(\"configure_vault\"),href:Vl(\"calypso-plugins-setup\",{site:t.props.siteRawUrl,query:\"only=vaultpress\"})},Us(\"View settings\"))))}};\"is-daily-backup-plan\"===r&&(e=c({title:Us(\"Automated Daily Backups\"),description:Us(\"We back up your website every day, so you never have to worry about your data again.\")})),\"is-realtime-backup-plan\"===r&&(e=c({title:Us(\"Automated Real-time Backups\"),description:Us(\"We back up your website with every change you make, making it easy to fix your mistakes.\")}));var u=function(){return o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-search-icon.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A Jetpack Site with the power of Jetpack Search\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Instant Search and Filtering\")),o.a.createElement(\"p\",null,Us(\"Relevant search results and filtering tightly integrated with your theme.\")),o.a.createElement(xc,{onClick:t.handleButtonClickForTracking(\"view_search_customizer\"),href:t.props.siteAdminUrl+\"customize.php?autofocus[section]=jetpack_search\"},Us(\"Customize Search\"))))};switch(r){case\"is-personal-plan\":case\"is-premium-plan\":case\"is-business-plan\":n=o.a.createElement(\"div\",{className:\"jp-landing__plan-features\"},\"is-personal-plan\"===r&&l(),\"is-premium-plan\"===r&&l(),\"is-business-plan\"===r&&l(),this.props.hasActiveSearchPurchase&&u(),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-speed-icon.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A fast and performant website\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Optimized performance\")),o.a.createElement(\"p\",null,Us(\"Load pages faster by serving your images from our global network of servers.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"paid_performance\"),href:this.props.siteAdminUrl+\"admin.php?page=jetpack#/performance\"},Us(\"Make your site faster\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-spam.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A folder holding real comments\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Anti-spam\")),o.a.createElement(\"p\",null,Us(\"Spam is automatically blocked from your comments.\")),this.props.isPluginInstalled(\"akismet/akismet.php\")&&this.props.isPluginActive(\"akismet/akismet.php\")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"view_spam_stats\"),href:this.props.siteAdminUrl+\"admin.php?page=akismet-key-config\"},Us(\"View your spam stats\")):o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"configure_akismet\"),href:Vl(\"calypso-plugins-setup\",{site:this.props.siteRawUrl,query:\"only=akismet\"})},Us(\"View settings\")))),(\"is-business-plan\"===r||\"is-premium-plan\"===r)&&\"inactive\"!==this.props.getModuleOverride(\"videopress\")&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-video-hosting.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A cloud with multiple types of content floating around it\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Video Hosting\")),o.a.createElement(\"p\",null,Us(\"High-speed, high-definition video hosting with no third-party ads.\")),this.props.getFeatureState(\"videopress\")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"upload_videos\"),href:this.props.siteAdminUrl+\"upload.php\"},Us(\"Upload videos\")):o.a.createElement(xc,{onClick:this.activateVideoPress,disabled:this.props.isActivatingFeature(\"videopress\")},Us(\"Activate video hosting\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-site-activity.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"Interface showing a chronological list of changes and updates in a site\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Activity\")),o.a.createElement(\"p\",null,Us(\"View a chronological list of all the changes and updates to your site in an organized, readable way.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"view_site_activity\"),href:Vl(\"calypso-activity-log\",{site:this.props.siteRawUrl})},Us(\"View your site activity\")))),(\"is-business-plan\"===r||\"is-premium-plan\"===r)&&\"inactive\"!==this.props.getModuleOverride(\"wordads\")&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-wordads.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A chart showing an healthy increase in earnings\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Monetize your site with ads\")),o.a.createElement(\"p\",null,Us(\"WordAds lets you earn money by displaying promotional content. Start earning today.\")),this.props.isModuleActivated(\"wordads\")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"view_earnings\"),href:Vl(\"wpcom-ads-earnings\",{site:this.props.siteRawUrl})},Us(\"View your earnings\")):o.a.createElement(xc,{onClick:this.activateAds,disabled:this.props.isActivatingModule(\"wordads\")},Us(\"Start earning\")))),(\"is-business-plan\"===r||\"is-premium-plan\"===r)&&\"inactive\"!==this.props.getModuleOverride(\"seo-tools\")&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-performance-icon.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"Site stats showing an evolution in traffic and engagement\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"SEO Tools\")),o.a.createElement(\"p\",null,Us(\"Advanced SEO tools to help your site get found when people search for relevant content.\")),this.props.isModuleActivated(\"seo-tools\")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"configure_seo\"),href:Vl(\"calypso-marketing-traffic\",{site:this.props.siteRawUrl})},Us(\"Configure site SEO\")):o.a.createElement(xc,{onClick:this.activateSeo,disabled:this.props.isActivatingModule(\"seo-tools\")},Us(\"Activate SEO tools\")))),(\"is-business-plan\"===r||\"is-premium-plan\"===r)&&\"inactive\"!==this.props.getModuleOverride(\"google-analytics\")&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-google-analytics.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"Site stats showing an evolution in traffic and engagement\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Google Analytics\")),o.a.createElement(\"p\",null,Us(\"Complement WordPress.com’s stats with Google’s in-depth look at your visitors and traffic patterns.\")),this.props.isModuleActivated(\"google-analytics\")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"configure_ga\"),href:Vl(\"calypso-marketing-traffic\",{site:this.props.siteRawUrl})},Us(\"Configure Google Analytics\")):o.a.createElement(xc,{onClick:this.activateGoogleAnalytics,disabled:this.props.isActivatingModule(\"google-analytics\")},Us(\"Activate Google Analytics\")))),i&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-themes.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A secure site, locked and protected by Jetpack\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Try a premium theme\")),o.a.createElement(\"p\",null,Us(\"Access beautifully designed premium themes at no extra cost.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"premium_themes\"),href:Vl(\"calypso-themes-premium\",{site:this.props.siteRawUrl})},Us(\"Browse premium themes\")))),(\"is-business-plan\"===r||\"is-premium-plan\"===r)&&\"inactive\"!==this.props.getModuleOverride(\"publicize\")&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-marketing.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A secure site, locked and protected by Jetpack\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Marketing Automation\")),o.a.createElement(\"p\",null,Us(\"Schedule unlimited tweets, Facebook posts, and other social posts in advance.\")),this.props.isModuleActivated(\"publicize\")?o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"schedule_posts\"),href:Vl(\"calypso-edit-posts\",{site:this.props.siteRawUrl})},Us(\"Schedule posts\")):o.a.createElement(xc,{onClick:this.activatePublicize,disabled:this.props.isActivatingModule(\"publicize\")},Us(\"Activate Publicize\")))));break;case\"is-free-plan\":case\"is-daily-backup-plan\":case\"is-realtime-backup-plan\":case\"is-search-plan\":case\"dev\":n=o.a.createElement(\"div\",{className:\"jp-landing__plan-features\"},e,this.props.hasActiveSearchPurchase&&u(),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-security.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A secure site, locked and protected by Jetpack\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Always-on security\")),o.a.createElement(\"p\",null,Us(\"Prevent login attacks, and get instant notifications when there’s an issue with your site.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"free_security\"),href:Vl(\"calypso-settings-security\",{site:this.props.siteRawUrl})},Us(\"Set up your site security\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-speed-icon.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A fast and performant website\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Optimized performance\")),o.a.createElement(\"p\",null,Us(\"Load pages faster by serving your images from our global network of servers.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"free_performance\"),href:this.props.siteAdminUrl+\"admin.php?page=jetpack#/performance\"},Us(\"Make your site faster\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-themes.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"A wide variety of themes and tools to customize a site\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Design the perfect website\")),o.a.createElement(\"p\",null,Us(\"Get unlimited access to hundreds of professional themes, and customize your site exactly how you like it.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"free_themes\"),href:Vl(\"calypso-themes\",{site:this.props.siteRawUrl})},Us(\"Explore free themes\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-performance-icon.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"Site stats showing an evolution in traffic and engagement\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Increase traffic to your site\")),o.a.createElement(\"p\",null,Us(\"Reach a wider audience by automatically sharing your posts on social media.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"free_sharing\"),href:Vl(\"calypso-marketing-connections\",{site:this.props.siteRawUrl})},Us(\"Start sharing\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-site-activity.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"Interface showing a chronological list of changes and updates in a site\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Site activity\")),o.a.createElement(\"p\",null,Us(\"View a chronological list of all the changes and updates to your site in an organized, readable way.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"view_site_activity\"),href:Vl(\"calypso-activity-log\",{site:this.props.siteRawUrl})},Us(\"View your site activity\")))),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-img\"},o.a.createElement(\"img\",{src:rd+\"/jetpack-support.svg\",className:\"jp-landing__plan-features-icon\",alt:Us(\"Chat bubbles representing getting in touch with support\")})),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Support documentation\")),o.a.createElement(\"p\",null,Us(\"Need help? Learn about getting started, customizing your site, using advanced code snippets, and more.\")),o.a.createElement(xc,{onClick:this.handleButtonClickForTracking(\"free_support_documentation\"),href:Vl(\"jetpack-support\")},Us(\"Search support docs\")))),\"is-free-plan\"===r&&o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-text\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title\"},Us(\"Take your site to the next level!\")),o.a.createElement(\"ul\",{className:\"jp-landing__plan-features-list\"},o.a.createElement(\"li\",null,Us(\"Expand your audience with pro SEO tools.\")),o.a.createElement(\"li\",null,Us(\"Customize your social posting schedule.\")),o.a.createElement(\"li\",null,Us(\"Monetize your site by running high quality ads.\"))),o.a.createElement(xc,{className:\"is-primary\",onClick:this.handleButtonClickForTracking(\"free_explore_jetpack_plans\"),href:\"#/plans\"},Us(\"Upgrade Jetpack now\")))));break;default:n=o.a.createElement(\"div\",{className:\"jp-landing__plan-features is-loading\"},o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title is-placeholder\"},\" \"),o.a.createElement(\"p\",{className:\"jp-landing__plan-features-text is-placeholder\"},\" \")),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title is-placeholder\"},\" \"),o.a.createElement(\"p\",{className:\"jp-landing__plan-features-text is-placeholder\"},\" \")),o.a.createElement(\"div\",{className:\"jp-landing__plan-features-card\"},o.a.createElement(\"h3\",{className:\"jp-landing__plan-features-title is-placeholder\"},\" \"),o.a.createElement(\"p\",{className:\"jp-landing__plan-features-text is-placeholder\"},\" \")))}return o.a.createElement(\"div\",null,o.a.createElement(jl,null),n)}}]),t}(o.a.Component);ha()(If,\"propTypes\",{plan:u.a.string}),ha()(If,\"defaultProps\",{plan:\"\"});var Df=le((function(e){return{isFetchingPluginsData:ga(e),isPluginActive:function(t){return va(e,t)},isPluginInstalled:function(t){return ba(e,t)},isModuleActivated:function(t){return Ga(e,t)},isActivatingModule:function(t){return function(e,t){return!!e.jetpack.modules.requests.activating[t]}(e,t)},getModuleOverride:function(t){return $a(e,t)},showBackups:qi(e),getFeatureState:function(t){return Mo(e,t)},isActivatingFeature:function(t){return xo(e,t)}}}),(function(e){return{fetchPluginsData:function(){return e(Fa())},activateModule:function(t){return e(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n,r){return n({type:vn,module:e}),n(Xa(\"module-toggle\")),n(Qa(\"is-info\",Us(\"Activating %(slug)s…\",{args:{slug:qa(r(),e).name}}),{id:\"module-toggle\"})),Da.activateModule(e).then((function(){n({type:bn,module:e,success:!0}),n(Xa(\"module-toggle\")),n(Qa(\"is-success\",Us(\"%(slug)s has been activated.\",{args:{slug:qa(r(),e).name}}),{id:\"module-toggle\",duration:2e3})),t&&window.location.reload()})).catch((function(t){n({type:yn,module:e,success:!1,error:t}),n(Xa(\"module-toggle\")),n(Qa(\"is-error\",Us(\"%(slug)s failed to activate. %(error)s\",{args:{slug:qa(r(),e).name,error:t}}),{id:\"module-toggle\"}))}))}}(t))},activateFeature:function(t){return e(Ul(ha()({},t,!0)))}}}))(If);var Rf=le((function(e){return{activeFeatures:Wo(e),activeProducts:Xo(e),availableFeatures:Jo(e),getSiteConnectionStatus:function(){return Hs(e)},hasActiveSearchPurchase:Zo(e),purchases:Yo(e),sitePlan:qo(e)}}))((function(e){var t=e.sitePlan.product_slug||\"\",n=e.availableFeatures,r=e.activeFeatures;return\"dev\"===e.getSiteConnectionStatus(e)&&(t=\"dev\",n={},r={}),o.a.createElement(o.a.Fragment,null,o.a.createElement(zl,null),o.a.createElement(Pf,{activeProducts:e.activeProducts,plan:t,purchases:e.purchases,siteRawUrl:e.siteRawUrl}),o.a.createElement(Df,{activeFeatures:r,availableFeatures:n,hasActiveSearchPurchase:e.hasActiveSearchPurchase,plan:t,rewindStatus:e.rewindStatus,siteAdminUrl:e.siteAdminUrl,siteRawUrl:e.siteRawUrl}))})),Uf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"clickHandler\",(function(){var e=n.props,t=e.planType,r=e.productSlug;Uc.tracks.recordJetpackClick({target:\"upgrade-\".concat(t),type:\"upgrade\",plan:r,page:\"Plans\"})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this.props,t=e.buttonText,n=e.planType,r=e.isActivePlan,i=e.isPrimary,a=e.shouldRenderButton,s=e.siteRawUrl,c=e.plansUpgradeUrl,l=r?Vl(\"calypso-plans-my-plan\",{site:s}):c,u=Mc()(\"plan-features__table-item\",\"has-border-bottom\",\"is-top-buttons\");return a?o.a.createElement(\"td\",{key:\"button-\"+n,className:u},o.a.createElement(xc,{href:l,primary:i,onClick:this.clickHandler},t)):o.a.createElement(\"td\",{key:\"button-\"+n,className:u})}}]),t}(o.a.Component),Lf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"featureLinkClickHandler\",(function(){var e=n.props,t=e.feature,r=e.productSlug;Uc.tracks.recordJetpackClick({target:t.id,type:\"feature-discovery\",plan:r,page:\"Plans\"})})),n}return Ma()(t,e),As()(t,[{key:\"renderFeatureLink\",value:function(e){var t=this.props,n=t.siteRawUrl,r=t.userId;return o.a.createElement(\"a\",{onClick:this.featureLinkClickHandler,href:\"https://jetpack.com/features/\".concat(e.info,\"?site=\").concat(n,\"&u=\").concat(r)},e.name)}},{key:\"render\",value:function(){var e=this.props,t=e.itemKey,n=e.feature,r=e.hideBackupFeature;return void 0===n||r?o.a.createElement(\"td\",{key:t,className:\"plan-features__table-item\"}):o.a.createElement(\"td\",{key:t,className:\"plan-features__table-item has-partial-border\"},o.a.createElement(\"div\",{className:\"plan-features__item\"},n.info?this.renderFeatureLink(n):n.name))}}]),t}(s.Component),Ff=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"handlePeriodChange\",value:function(e){var t=this;return e===this.props.planDuration?null:function(){Uc.tracks.recordJetpackClick({target:\"change-period-\"+e,feature:\"plans-grid\",extra:t.props.type}),t.props.setPlanDuration(e)}}},{key:\"render\",value:function(){var e=this,t=this.props.planDuration,n={monthly:Us(\"Monthly\"),yearly:Us(\"Yearly\")};return o.a.createElement(\"div\",{className:\"plan-grid-period\"},o.a.createElement(Ac,null,Object(Dt.map)(n,(function(n,r){return o.a.createElement(xc,{key:\"plan-period-button-\"+r,primary:r===t,onClick:e.handlePeriodChange(r),compact:!0},n)}))))}}]),t}(o.a.Component),zf=le((function(e){return{planDuration:di(e)}}),{setPlanDuration:function(e){return function(t){t({type:Fr,duration:e})}}})(Ff),Bf=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"featuredPlans\",!1),n}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillUpdate\",value:function(){this.featuredPlans=!1}},{key:\"handleSeeFeaturesClick\",value:function(e){return function(){Uc.tracks.recordJetpackClick({target:\"see-all-features-link\",feature:\"plans-grid\",extra:e})}}},{key:\"render\",value:function(){if(!this.props.plans||this.props.isFetchingData)return o.a.createElement(\"div\",{className:\"plan-features\"},this.renderMobileCard(),this.renderSkeletonGrid());var e=Object.values(this.getPlans()).length,t=Mc()(\"plan-features__table\",\"has-\".concat(e,\"-cols\"));return o.a.createElement(\"div\",{className:\"plan-features\"},this.renderMobileCard(),o.a.createElement(zf,{type:\"plans\"}),o.a.createElement(\"div\",{className:\"plan-features__content\"},o.a.createElement(\"table\",{className:t},o.a.createElement(\"tbody\",null,o.a.createElement(\"tr\",null,this.renderPlanHeaders()),o.a.createElement(\"tr\",null,this.renderPrices()),o.a.createElement(\"tr\",null,this.renderTopButtons()),this.renderPlanFeatureRows(),o.a.createElement(\"tr\",null,this.renderBottomButtons())))))}},{key:\"renderMobileCard\",value:function(){var e=Us(\"You’re currently on Jetpack %(plan)s.\",{args:{plan:this.props.sitePlan.product_name_short}}),t=Vl(\"calypso-plans-my-plan\",{site:this.props.siteRawUrl}),n=Vl(\"calypso-plans\",{site:this.props.siteRawUrl});return o.a.createElement(\"div\",{className:\"plans-mobile-notice dops-card\"},o.a.createElement(\"h2\",null,Us(\"Your Plan\")),o.a.createElement(\"p\",null,e),o.a.createElement(xc,{href:t},Us(\"Manage your plan\")),o.a.createElement(xc,{href:n,primary:!0},Us(\"View all Jetpack plans\")))}},{key:\"renderSkeletonGrid\",value:function(){return o.a.createElement(\"div\",{className:\"plan-grid-skeletons\"},o.a.createElement(\"div\",{className:\"plan-grid-skeletons__plan is-placeholder\"}),o.a.createElement(\"div\",{className:\"plan-grid-skeletons__plan is-placeholder\"}),o.a.createElement(\"div\",{className:\"plan-grid-skeletons__plan is-placeholder\"}))}},{key:\"getCurrentPlanType\",value:function(){return Lo(this.props.sitePlan.product_slug).replace(/^is-/,\"\").replace(/-plan$/,\"\")}},{key:\"isUpgraded\",value:function(){return!Object(Dt.includes)([\"\",\"free\"],this.getCurrentPlanType())}},{key:\"isCurrentPlanType\",value:function(e){return this.getCurrentPlanType()===e}},{key:\"getPlans\",value:function(){if(this.featuredPlans)return this.featuredPlans;var e=Object(Dt.reduce)(this.props.plans,(function(e,t,n){if(\"free\"===n)return e;var r=t.highlight;return t.features=Object(Dt.reduce)(t.features,(function(e,t){return Object(Dt.includes)(r,t.id)&&e.push(t),e}),[]),e[n]=t,e}),{});return this.featuredPlans=e,e}},{key:\"renderPlanHeaders\",value:function(){return Object(Dt.map)(this.getPlans(),(function(e,t){var n=Mc()(\"plan-features__table-item\",\"is-header\",\"has-border-top\",\"is-\".concat(t,\"-plan\"));return o.a.createElement(\"td\",{key:\"plan-header-\"+t,className:n},o.a.createElement(\"header\",{className:\"plan-features__header\"},o.a.createElement(\"h3\",{className:\"plan-features__header-title\"},e.short_name),o.a.createElement(\"div\",{className:\"plan-features__description\"},e.tagline)))}))}},{key:\"renderPrices\",value:function(){var e=this,t=this.props.planDuration;return Object(Dt.map)(this.getPlans(),(function(n,r){var i=Mc()(\"plan-features__table-item\",\"plan-price\");return e.isCurrentPlanType(r)?o.a.createElement(\"td\",{key:\"price-\"+r,className:i},n.strings.current):e.shouldRenderButton(r)?o.a.createElement(\"td\",{key:\"price-\"+r,className:i},o.a.createElement(\"span\",{className:\"plan-price__yearly\",dangerouslySetInnerHTML:{__html:n.price[t].per}})):o.a.createElement(\"td\",{key:\"price-\"+r,className:i})}))}},{key:\"shouldRenderButton\",value:function(e){var t=Object.keys(this.props.plans),n=t.indexOf(this.getCurrentPlanType());return t.indexOf(e)>=n}},{key:\"renderTopButtons\",value:function(){var e=this,t=this.props.planDuration;return Object(Dt.map)(this.getPlans(),(function(n,r){var i=e.props,a=i.siteRawUrl,s=i.plansUpgradeUrl,c=i.sitePlan,l=e.isCurrentPlanType(r),u=l?n.strings.manage:n.strings.upgrade,p=r;return\"monthly\"===t&&(p+=\"-monthly\"),o.a.createElement(Uf,{key:r,buttonText:u,planType:r,isActivePlan:l,isPrimary:e.isPrimary(r,n),shouldRenderButton:e.shouldRenderButton(r),siteRawUrl:a,plansUpgradeUrl:s(p),productSlug:c.product_slug})}))}},{key:\"isPrimary\",value:function(e,t){if(this.isUpgraded()){var n=this.getCurrentPlanType(),r=Object.keys(this.getPlans()),i=r.indexOf(n);return r.indexOf(e)===r.indexOf(r[i+1])}return t.is_featured}},{key:\"renderBottomButtons\",value:function(){var e=this;return Object(Dt.map)(this.getPlans(),(function(t,n){return o.a.createElement(\"td\",{key:\"bottom-\"+n,className:\"plan-features__table-item is-bottom-buttons has-border-bottom\"},o.a.createElement(\"a\",{href:e.props.plansLearnMoreUpgradeUrl,onClick:e.handleSeeFeaturesClick(n)},t.strings.see_all))}))}},{key:\"getLongestFeaturesList\",value:function(){return Object(Dt.reduce)(this.getPlans(),(function(e,t){var n=Object.keys(t.features);return n.length>e.length?n:e}),[])}},{key:\"renderPlanFeatureRows\",value:function(){var e=this;return Object(Dt.map)(this.getLongestFeaturesList(),(function(t,n){return o.a.createElement(\"tr\",{key:\"row-\"+n,className:\"plan-features-row\"},e.renderPlanFeatureColumns(n))}))}},{key:\"renderPlanFeatureColumns\",value:function(e){var t=this;return Object(Dt.map)(this.getPlans(),(function(n,r){var i=r+\"-row-\"+e,a=n.features[e],s=!t.props.showBackups&&a&&Object(Dt.includes)([\"backups\",\"malware-scan\",\"real-time-backups\"],a.id);return o.a.createElement(Lf,{key:r,itemKey:i,feature:a,hideBackupFeature:s,siteRawUrl:t.props.siteRawUrl,userId:t.props.userId,productSlug:t.props.sitePlan.product_slug})}))}}]),t}(o.a.Component),Vf=le((function(e){var t=function(e){return Object(Dt.get)(e.jetpack.initialState.userData.currentUser,\"id\")}(e);return{plans:Go(e),siteRawUrl:vi(e),sitePlan:qo(e),userId:t,showBackups:qi(e),planDuration:di(e),plansUpgradeUrl:function(n){return Yi(e,\"plans-\".concat(n),t)},plansLearnMoreUpgradeUrl:Yi(e,\"plans-learn-more\",t),isFetchingData:Bo(e)}}),null)(Bf);var Hf=le((function(e){return{isFetchingSiteProducts:nc(e)}}),(function(e){return{fetchSiteProducts:function(){return e((function(e){return e({type:Zn}),Da.fetchSiteProducts().then((function(t){e({type:tr,siteProducts:t.data})})).catch((function(t){e({type:er,error:t})}))}))}}}))((function(e){return Object(s.useEffect)((function(){!e.isFetchingSiteProducts&&e.fetchSiteProducts()}),[]),null})),qf=function(e){var t=e.intro,n=e.label,r=e.onClick,i=e.primary,a=e.href;return o.a.createElement(\"div\",{className:\"product-card__action\"},t&&o.a.createElement(\"h4\",{className:\"product-card__action-intro\"},t),o.a.createElement(xc,{className:\"product-card__action-button\",href:a,onClick:r,primary:i,target:\"_blank\",rel:\"noopener noreferrer\"},n))};qf.propTypes={intro:u.a.oneOfType([u.a.string,u.a.node,u.a.element]),label:u.a.string.isRequired,onClick:u.a.func,href:u.a.string,primary:u.a.bool},qf.defaultProps={href:null,onClick:Dt.noop,primary:!0};var Kf=qf,Jf=n(111),Wf=n.n(Jf),Gf={AED:{symbol:\"د.إ.‏\",grouping:\",\",decimal:\".\",precision:2},AFN:{symbol:\"؋\",grouping:\",\",decimal:\".\",precision:2},ALL:{symbol:\"Lek\",grouping:\".\",decimal:\",\",precision:2},AMD:{symbol:\"֏\",grouping:\",\",decimal:\".\",precision:2},ANG:{symbol:\"ƒ\",grouping:\",\",decimal:\".\",precision:2},AOA:{symbol:\"Kz\",grouping:\",\",decimal:\".\",precision:2},ARS:{symbol:\"$\",grouping:\".\",decimal:\",\",precision:2},AUD:{symbol:\"A$\",grouping:\",\",decimal:\".\",precision:2},AWG:{symbol:\"ƒ\",grouping:\",\",decimal:\".\",precision:2},AZN:{symbol:\"₼\",grouping:\" \",decimal:\",\",precision:2},BAM:{symbol:\"КМ\",grouping:\".\",decimal:\",\",precision:2},BBD:{symbol:\"Bds$\",grouping:\",\",decimal:\".\",precision:2},BDT:{symbol:\"৳\",grouping:\",\",decimal:\".\",precision:0},BGN:{symbol:\"лв.\",grouping:\" \",decimal:\",\",precision:2},BHD:{symbol:\"د.ب.‏\",grouping:\",\",decimal:\".\",precision:3},BIF:{symbol:\"FBu\",grouping:\",\",decimal:\".\",precision:0},BMD:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},BND:{symbol:\"$\",grouping:\".\",decimal:\",\",precision:0},BOB:{symbol:\"Bs\",grouping:\".\",decimal:\",\",precision:2},BRL:{symbol:\"R$\",grouping:\".\",decimal:\",\",precision:2},BSD:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},BTC:{symbol:\"Ƀ\",grouping:\",\",decimal:\".\",precision:2},BTN:{symbol:\"Nu.\",grouping:\",\",decimal:\".\",precision:1},BWP:{symbol:\"P\",grouping:\",\",decimal:\".\",precision:2},BYR:{symbol:\"р.\",grouping:\" \",decimal:\",\",precision:2},BZD:{symbol:\"BZ$\",grouping:\",\",decimal:\".\",precision:2},CAD:{symbol:\"C$\",grouping:\",\",decimal:\".\",precision:2},CDF:{symbol:\"FC\",grouping:\",\",decimal:\".\",precision:2},CHF:{symbol:\"CHF\",grouping:\"\'\",decimal:\".\",precision:2},CLP:{symbol:\"$\",grouping:\".\",decimal:\",\",precision:2},CNY:{symbol:\"¥\",grouping:\",\",decimal:\".\",precision:2},COP:{symbol:\"$\",grouping:\".\",decimal:\",\",precision:2},CRC:{symbol:\"₡\",grouping:\".\",decimal:\",\",precision:2},CUC:{symbol:\"CUC\",grouping:\",\",decimal:\".\",precision:2},CUP:{symbol:\"$MN\",grouping:\",\",decimal:\".\",precision:2},CVE:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},CZK:{symbol:\"Kč\",grouping:\" \",decimal:\",\",precision:2},DJF:{symbol:\"Fdj\",grouping:\",\",decimal:\".\",precision:0},DKK:{symbol:\"kr.\",grouping:\"\",decimal:\",\",precision:2},DOP:{symbol:\"RD$\",grouping:\",\",decimal:\".\",precision:2},DZD:{symbol:\"د.ج.‏\",grouping:\",\",decimal:\".\",precision:2},EGP:{symbol:\"ج.م.‏\",grouping:\",\",decimal:\".\",precision:2},ERN:{symbol:\"Nfk\",grouping:\",\",decimal:\".\",precision:2},ETB:{symbol:\"ETB\",grouping:\",\",decimal:\".\",precision:2},EUR:{symbol:\"€\",grouping:\".\",decimal:\",\",precision:2},FJD:{symbol:\"FJ$\",grouping:\",\",decimal:\".\",precision:2},FKP:{symbol:\"£\",grouping:\",\",decimal:\".\",precision:2},GBP:{symbol:\"£\",grouping:\",\",decimal:\".\",precision:2},GEL:{symbol:\"Lari\",grouping:\" \",decimal:\",\",precision:2},GHS:{symbol:\"₵\",grouping:\",\",decimal:\".\",precision:2},GIP:{symbol:\"£\",grouping:\",\",decimal:\".\",precision:2},GMD:{symbol:\"D\",grouping:\",\",decimal:\".\",precision:2},GNF:{symbol:\"FG\",grouping:\",\",decimal:\".\",precision:0},GTQ:{symbol:\"Q\",grouping:\",\",decimal:\".\",precision:2},GYD:{symbol:\"G$\",grouping:\",\",decimal:\".\",precision:2},HKD:{symbol:\"HK$\",grouping:\",\",decimal:\".\",precision:2},HNL:{symbol:\"L.\",grouping:\",\",decimal:\".\",precision:2},HRK:{symbol:\"kn\",grouping:\".\",decimal:\",\",precision:2},HTG:{symbol:\"G\",grouping:\",\",decimal:\".\",precision:2},HUF:{symbol:\"Ft\",grouping:\".\",decimal:\",\",precision:0},IDR:{symbol:\"Rp\",grouping:\".\",decimal:\",\",precision:0},ILS:{symbol:\"₪\",grouping:\",\",decimal:\".\",precision:2},INR:{symbol:\"₹\",grouping:\",\",decimal:\".\",precision:2},IQD:{symbol:\"د.ع.‏\",grouping:\",\",decimal:\".\",precision:2},IRR:{symbol:\"﷼\",grouping:\",\",decimal:\"/\",precision:2},ISK:{symbol:\"kr.\",grouping:\".\",decimal:\",\",precision:0},JMD:{symbol:\"J$\",grouping:\",\",decimal:\".\",precision:2},JOD:{symbol:\"د.ا.‏\",grouping:\",\",decimal:\".\",precision:3},JPY:{symbol:\"¥\",grouping:\",\",decimal:\".\",precision:0},KES:{symbol:\"S\",grouping:\",\",decimal:\".\",precision:2},KGS:{symbol:\"сом\",grouping:\" \",decimal:\"-\",precision:2},KHR:{symbol:\"៛\",grouping:\",\",decimal:\".\",precision:0},KMF:{symbol:\"CF\",grouping:\",\",decimal:\".\",precision:2},KPW:{symbol:\"₩\",grouping:\",\",decimal:\".\",precision:0},KRW:{symbol:\"₩\",grouping:\",\",decimal:\".\",precision:0},KWD:{symbol:\"د.ك.‏\",grouping:\",\",decimal:\".\",precision:3},KYD:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},KZT:{symbol:\"₸\",grouping:\" \",decimal:\"-\",precision:2},LAK:{symbol:\"₭\",grouping:\",\",decimal:\".\",precision:0},LBP:{symbol:\"ل.ل.‏\",grouping:\",\",decimal:\".\",precision:2},LKR:{symbol:\"₨\",grouping:\",\",decimal:\".\",precision:0},LRD:{symbol:\"L$\",grouping:\",\",decimal:\".\",precision:2},LSL:{symbol:\"M\",grouping:\",\",decimal:\".\",precision:2},LYD:{symbol:\"د.ل.‏\",grouping:\",\",decimal:\".\",precision:3},MAD:{symbol:\"د.م.‏\",grouping:\",\",decimal:\".\",precision:2},MDL:{symbol:\"lei\",grouping:\",\",decimal:\".\",precision:2},MGA:{symbol:\"Ar\",grouping:\",\",decimal:\".\",precision:0},MKD:{symbol:\"ден.\",grouping:\".\",decimal:\",\",precision:2},MMK:{symbol:\"K\",grouping:\",\",decimal:\".\",precision:2},MNT:{symbol:\"₮\",grouping:\" \",decimal:\",\",precision:2},MOP:{symbol:\"MOP$\",grouping:\",\",decimal:\".\",precision:2},MRO:{symbol:\"UM\",grouping:\",\",decimal:\".\",precision:2},MTL:{symbol:\"₤\",grouping:\",\",decimal:\".\",precision:2},MUR:{symbol:\"₨\",grouping:\",\",decimal:\".\",precision:2},MVR:{symbol:\"MVR\",grouping:\",\",decimal:\".\",precision:1},MWK:{symbol:\"MK\",grouping:\",\",decimal:\".\",precision:2},MXN:{symbol:\"MX$\",grouping:\",\",decimal:\".\",precision:2},MYR:{symbol:\"RM\",grouping:\",\",decimal:\".\",precision:2},MZN:{symbol:\"MT\",grouping:\",\",decimal:\".\",precision:0},NAD:{symbol:\"N$\",grouping:\",\",decimal:\".\",precision:2},NGN:{symbol:\"₦\",grouping:\",\",decimal:\".\",precision:2},NIO:{symbol:\"C$\",grouping:\",\",decimal:\".\",precision:2},NOK:{symbol:\"kr\",grouping:\" \",decimal:\",\",precision:2},NPR:{symbol:\"₨\",grouping:\",\",decimal:\".\",precision:2},NZD:{symbol:\"NZ$\",grouping:\",\",decimal:\".\",precision:2},OMR:{symbol:\"﷼\",grouping:\",\",decimal:\".\",precision:3},PAB:{symbol:\"B/.\",grouping:\",\",decimal:\".\",precision:2},PEN:{symbol:\"S/.\",grouping:\",\",decimal:\".\",precision:2},PGK:{symbol:\"K\",grouping:\",\",decimal:\".\",precision:2},PHP:{symbol:\"₱\",grouping:\",\",decimal:\".\",precision:2},PKR:{symbol:\"₨\",grouping:\",\",decimal:\".\",precision:2},PLN:{symbol:\"zł\",grouping:\" \",decimal:\",\",precision:2},PYG:{symbol:\"₲\",grouping:\".\",decimal:\",\",precision:2},QAR:{symbol:\"﷼\",grouping:\",\",decimal:\".\",precision:2},RON:{symbol:\"lei\",grouping:\".\",decimal:\",\",precision:2},RSD:{symbol:\"Дин.\",grouping:\".\",decimal:\",\",precision:2},RUB:{symbol:\"₽\",grouping:\" \",decimal:\",\",precision:2},RWF:{symbol:\"RWF\",grouping:\" \",decimal:\",\",precision:2},SAR:{symbol:\"﷼\",grouping:\",\",decimal:\".\",precision:2},SBD:{symbol:\"S$\",grouping:\",\",decimal:\".\",precision:2},SCR:{symbol:\"₨\",grouping:\",\",decimal:\".\",precision:2},SDD:{symbol:\"LSd\",grouping:\",\",decimal:\".\",precision:2},SDG:{symbol:\"£‏\",grouping:\",\",decimal:\".\",precision:2},SEK:{symbol:\"kr\",grouping:\",\",decimal:\".\",precision:2},SGD:{symbol:\"S$\",grouping:\",\",decimal:\".\",precision:2},SHP:{symbol:\"£\",grouping:\",\",decimal:\".\",precision:2},SLL:{symbol:\"Le\",grouping:\",\",decimal:\".\",precision:2},SOS:{symbol:\"S\",grouping:\",\",decimal:\".\",precision:2},SRD:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},STD:{symbol:\"Db\",grouping:\",\",decimal:\".\",precision:2},SVC:{symbol:\"₡\",grouping:\",\",decimal:\".\",precision:2},SYP:{symbol:\"£\",grouping:\",\",decimal:\".\",precision:2},SZL:{symbol:\"E\",grouping:\",\",decimal:\".\",precision:2},THB:{symbol:\"฿\",grouping:\",\",decimal:\".\",precision:2},TJS:{symbol:\"TJS\",grouping:\" \",decimal:\";\",precision:2},TMT:{symbol:\"m\",grouping:\" \",decimal:\",\",precision:0},TND:{symbol:\"د.ت.‏\",grouping:\",\",decimal:\".\",precision:3},TOP:{symbol:\"T$\",grouping:\",\",decimal:\".\",precision:2},TRY:{symbol:\"TL\",grouping:\".\",decimal:\",\",precision:2},TTD:{symbol:\"TT$\",grouping:\",\",decimal:\".\",precision:2},TVD:{symbol:\"$T\",grouping:\",\",decimal:\".\",precision:2},TWD:{symbol:\"NT$\",grouping:\",\",decimal:\".\",precision:2},TZS:{symbol:\"TSh\",grouping:\",\",decimal:\".\",precision:2},UAH:{symbol:\"₴\",grouping:\" \",decimal:\",\",precision:2},UGX:{symbol:\"USh\",grouping:\",\",decimal:\".\",precision:2},USD:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},UYU:{symbol:\"$U\",grouping:\".\",decimal:\",\",precision:2},UZS:{symbol:\"сўм\",grouping:\" \",decimal:\",\",precision:2},VEB:{symbol:\"Bs.\",grouping:\",\",decimal:\".\",precision:2},VEF:{symbol:\"Bs. F.\",grouping:\".\",decimal:\",\",precision:2},VND:{symbol:\"₫\",grouping:\".\",decimal:\",\",precision:1},VUV:{symbol:\"VT\",grouping:\",\",decimal:\".\",precision:0},WST:{symbol:\"WS$\",grouping:\",\",decimal:\".\",precision:2},XAF:{symbol:\"F\",grouping:\",\",decimal:\".\",precision:2},XCD:{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2},XOF:{symbol:\"F\",grouping:\" \",decimal:\",\",precision:2},XPF:{symbol:\"F\",grouping:\",\",decimal:\".\",precision:2},YER:{symbol:\"﷼\",grouping:\",\",decimal:\".\",precision:2},ZAR:{symbol:\"R\",grouping:\" \",decimal:\",\",precision:2},ZMW:{symbol:\"ZK\",grouping:\",\",decimal:\".\",precision:2},WON:{symbol:\"₩\",grouping:\",\",decimal:\".\",precision:2}};function Yf(e){return Gf[e]||{symbol:\"$\",grouping:\",\",decimal:\".\",precision:2}}function $f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Yf(t);if(!r||isNaN(e))return null;var i=Wf()({},r,n),a=i.decimal,s=i.grouping,o=i.precision,c=i.symbol,l=e<0?\"-\":\"\",u=Math.abs(e),p=Math.floor(u),d=Rs(p,{decimals:0,thousandsSep:s,decPoint:a}),h=o>0?Rs(u-p,{decimals:o,thousandsSep:s,decPoint:a}).slice(1):\"\";return{sign:l,symbol:c,integer:d,fraction:h}}n(381);var Xf=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getPriceRange\",value:function(){var e,t=this.props,n=t.currencyCode,r=t.rawPrice;if(Array.isArray(r)){var i=r.filter((function(e){return e>=0}));e=[Math.min.apply(Math,Ht()(i)),Math.max.apply(Math,Ht()(i))]}else e=[r];return e.map((function(e){return{price:$f(e,n),raw:e}}))}},{key:\"renderPrice\",value:function(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(\"span\",{className:\"plan-price__integer\"},e.price.integer),o.a.createElement(\"sup\",{className:\"plan-price__fraction\"},e.raw-e.price.integer>0&&e.price.fraction))}},{key:\"renderContent\",value:function(){var e=this.getPriceRange(),t=this.renderPrice(e[0]),n=e[1]&&this.renderPrice(e[1]);return o.a.createElement(o.a.Fragment,null,o.a.createElement(\"sup\",{className:\"plan-price__currency-symbol\"},e[0].price.symbol),n?Us(\"{{smallerPrice/}}-{{higherPrice/}}\",{components:{smallerPrice:t,higherPrice:n},comment:\"The price range for a particular product\"}):t)}},{key:\"render\",value:function(){var e=this.props,t=e.className,n=e.discounted,r=e.inline,i=e.original;if(void 0===e.rawPrice)return null;var a=r?\"span\":\"div\",s=Mc()(\"plan-price\",t,{\"is-discounted\":n,\"is-inline\":r,\"is-original\":i});return o.a.createElement(a,{className:s},this.renderContent())}}]),t}(s.Component),Qf=Xf;Xf.propTypes={className:u.a.string,currencyCode:u.a.string,discounted:u.a.bool,inline:u.a.bool,original:u.a.bool,rawPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)])},Xf.defaultProps={className:\"\",currencyCode:\"USD\",discounted:!1,original:!1};var Zf=function(e){var t=e.billingTimeFrame,n=e.currencyCode,r=e.discountedPrice,i=e.fullPrice,a=!!r,s=Mc()(\"product-card__price-group\",{\"is-discounted\":a});return o.a.createElement(\"div\",{className:s},o.a.createElement(Qf,{currencyCode:n,rawPrice:i,original:a}),a&&o.a.createElement(Qf,{currencyCode:n,rawPrice:r,discounted:!0}),o.a.createElement(\"div\",{className:\"product-card__billing-timeframe\"},t))};Zf.propTypes={billingTimeFrame:u.a.string,currencyCode:u.a.string,discountedPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),fullPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)])};var em=Zf,tm=(n(382),function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"getManagePurchaseLink\",value:function(e,t){return Vl(\"calypso-me-purchases\",{site:e,path:t})}},{key:\"handleManagePurchase\",value:function(e){return function(){Uc.tracks.recordJetpackClick({target:\"product-card-manage-purchase\",feature:e})}}},{key:\"render\",value:function(){var e=this.props,t=e.billingTimeFrame,n=e.children,r=e.currencyCode,i=e.description,a=e.discountedPrice,s=e.fullPrice,c=e.isCurrent,l=e.isPlaceholder,u=e.purchase,p=e.subtitle,d=e.title,h=e.translate,f=Mc()(\"single-product__accented-card\",{\"is-placeholder\":l,\"is-purchased\":!!u});return o.a.createElement(Dl,{className:f},o.a.createElement(\"div\",{className:\"single-product__accented-card-header\"},d&&o.a.createElement(\"div\",{className:\"single-product__accented-card-header-primary\"},u&&o.a.createElement(ml,{icon:\"checkmark\",size:18}),o.a.createElement(\"h3\",{className:\"single-product-backup__header-title\"},d))),o.a.createElement(\"div\",{className:\"single-product__accented-card-body\"},i&&o.a.createElement(\"p\",null,i),u&&c&&o.a.createElement(Kf,{onClick:this.handleManagePurchase(u.product_slug),href:this.getManagePurchaseLink(u.domain,u.ID),label:h(\"Manage Subscription\"),primary:!1}),p&&o.a.createElement(\"div\",{className:\"product-card__subtitle\"},p),!u&&o.a.createElement(em,{billingTimeFrame:t,currencyCode:r,discountedPrice:a,fullPrice:s})),n)}}]),t}(s.Component));ha()(tm,\"propTypes\",{billingTimeFrame:u.a.string,currencyCode:u.a.string,description:u.a.oneOfType([u.a.string,u.a.element,u.a.node]),discountedPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),fullPrice:u.a.oneOfType([u.a.number,u.a.arrayOf(u.a.number)]),isCurrent:u.a.bool,isPlaceholder:u.a.bool,purchase:u.a.object,subtitle:u.a.oneOfType([u.a.string,u.a.element,u.a.node]),title:u.a.oneOfType([u.a.string,u.a.element,u.a.node])});var nm=Ls(tm);function rm(e){var t=e.purchase,n=e.siteRawlUrl;if(!t||!n)return null;var r=Lo(t.product_slug),i=o.a.createElement(vf,{expiryDate:t.expiry_date,purchaseDate:t.subscribed_date,isRefundable:t.is_refundable}),a=o.a.createElement(\"a\",{href:Vl(\"calypso-plans-my-plan\",{site:n}),target:\"_blank\",rel:\"noopener noreferrer\"}),s={purchase:t,isCurrent:!0};switch(r){case\"is-search-plan\":s=Ms()({title:dp,subtitle:i,description:hp},s);case\"is-daily-backup-plan\":s=Ms()({title:up,subtitle:i,description:cp},s);case\"is-realtime-backup-plan\":s=Ms()({title:pp,subtitle:i,description:lp},s);case\"is-personal-plan\":s=Ms()({title:up,subtitle:Us(\"Included in your {{planLink}}Personal Plan{{/planLink}}\",{components:{planLink:a}}),description:cp},s);case\"is-premium-plan\":s=Ms()({title:up,subtitle:Us(\"Included in your {{planLink}}Premium Plan{{/planLink}}\",{components:{planLink:a}}),description:cp},s);case\"is-business-plan\":s=Ms()({title:pp,subtitle:Us(\"Included in your {{planLink}}Professional Plan{{/planLink}}\",{components:{planLink:a}}),description:lp},s)}return o.a.createElement(nm,s)}function im(e){var t=e.billingTimeFrame,n=e.currencyCode,r=e.discountedPrice,i=e.fullPrice;return o.a.createElement(\"div\",{className:\"single-product-backup__price-group\"},r?o.a.createElement(o.a.Fragment,null,o.a.createElement(Qf,{currencyCode:n,rawPrice:i,original:!0}),o.a.createElement(Qf,{currencyCode:n,rawPrice:r,discounted:!0})):o.a.createElement(Qf,{currencyCode:n,rawPrice:i}),o.a.createElement(\"div\",{className:\"single-product-backup__price-group-billing-timeframe\"},function(e){return\"yearly\"===e?Us(\"per year\",{comment:\"Duration of product subscription timeframe.\"}):\"monthly\"===e?Us(\"per month\",{comment:\"Duration of product subscription timeframe.\"}):\"\"}(t)))}n(383);function am(e){return o.a.createElement(\"label\",{className:\"plan-radio-button\"},o.a.createElement(\"input\",{type:\"radio\",className:\"plan-radio-button__input\",value:e.radioValue,checked:e.checked,onChange:e.onChange?e.onChange:null}),o.a.createElement(\"div\",{className:\"plan-radio-button__label\"},o.a.createElement(\"span\",{className:\"plan-radio-button__title\"},e.planName),o.a.createElement(im,{billingTimeFrame:e.billingTimeFrame,currencyCode:e.currencyCode,discountedPrice:e.discountedPrice,fullPrice:e.fullPrice})))}n(384);function sm(e){var t=e.billingTimeframe,n=void 0===t?\"yearly\":t,r=e.potentialSavings,i=e.currencyCode;if(!r)return null;var a=o.a.createElement(Qf,{className:\"single-product__annual-savings\",rawPrice:r,currencyCode:i,inline:!0});return o.a.createElement(\"p\",{className:\"single-product__savings\"},Us(\"monthly\"===n?\"You would save {{savings /}} by paying yearly\":\"You are saving {{savings /}} by paying yearly\",{components:{savings:a}}))}function om(e){var t=e.selectedUpgrade,n=e.onClickHandler;if(!t)return null;var r=t.link,i=t.name,a=t.type;return o.a.createElement(\"div\",{className:\"single-product-backup__upgrade-button-container\"},o.a.createElement(xc,{href:r,onClick:n(a),primary:!0},Us(\"Upgrade to %(name)s\",{args:{name:i},comment:\"Button to purchase product upgrade. %(name)s is the product name.\"})))}n(385);function cm(){return o.a.createElement(\"div\",{className:\"single-product-backup__promo\"},o.a.createElement(\"div\",{className:\"single-product-backup__promo-star\"},Us(\"Up to %(percent)d%% off!\",{args:{percent:70}})),o.a.createElement(\"h4\",{className:\"single-product-backup__promo-header\"},Us(\"Hurry, these are {{s}}Limited time introductory prices!{{/s}}\",{components:{s:o.a.createElement(\"strong\",null)}})))}var lm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"handleSelectedBackupTypeChange\",(function(e){n.props.setSelectedBackupType(e.target.value)})),ha()(Os()(n),\"handleUpgradeButtonClick\",(function(e){return function(){Uc.tracks.recordJetpackClick({target:\"upgrade-\".concat(e),type:\"upgrade\",product:e,page:n.props.routes[0]&&n.props.routes[0].name})}})),ha()(Os()(n),\"handleLandingPageLinkClick\",(function(){var e=n.props,t=e.selectedBackupType;\"monthly\"===e.billingTimeFrame&&(t+=\"-monthly\"),Uc.tracks.recordJetpackClick({target:\"landing-page-link\",feature:\"single-product-backup\",extra:t})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this,t=this.props,n=t.backupInfoUrl,r=t.backupOptions,i=t.billingTimeFrame,a=t.currencyCode,s=t.selectedBackupType,c=r.find((function(e){return e.type===s}));return o.a.createElement(o.a.Fragment,null,o.a.createElement(\"div\",{className:\"single-product__description\"},cp),o.a.createElement(\"div\",{className:\"single-product__landing-page\"},o.a.createElement(Xu,{className:\"single-product__landing-page\",target:\"_blank\",href:n,icon:!0,iconSize:12,onClick:this.handleLandingPageLinkClick},Us(\"Which backup option is best for me?\"))),o.a.createElement(cm,null),o.a.createElement(\"h4\",{className:\"single-product-backup__options-header\"},Us(\"Select a backup option:\")),o.a.createElement(\"div\",{className:\"single-product-backup__radio-buttons-container\"},r.map((function(t){return o.a.createElement(am,{key:t.type,billingTimeFrame:i,checked:t.type===s,currencyCode:a,fullPrice:t.fullPrice,discountedPrice:t.discountedPrice,onChange:e.handleSelectedBackupTypeChange,radioValue:t.type,planName:t.name})}))),o.a.createElement(sm,{billingTimeFrame:i,currencyCode:a,potentialSavings:c.potentialSavings}),o.a.createElement(om,{selectedUpgrade:c,onClickHandler:this.handleUpgradeButtonClick}))}}]),t}(o.a.Component);ha()(lm,\"propTypes\",{backupOptions:u.a.array,billingTimeFrame:u.a.string,currencyCode:u.a.string,setSelectedBackupType:u.a.func,selectedBackupType:u.a.string});var um=bt(lm);var pm=le((function(e){return{planDuration:di(e),backupInfoUrl:Yi(e,\"aag-backups\"),upgradeLinkDaily:Yi(e,\"jetpack-backup-daily\",\"\",!0),upgradeLinkRealtime:Yi(e,\"jetpack-backup-realtime\",\"\",!0)}}))((function(e){var t=e.products,n=e.backupInfoUrl,r=e.upgradeLinkDaily,i=e.upgradeLinkRealtime,a=e.selectedBackupType,c=e.setSelectedBackupType,l=e.planDuration,u=Object(Dt.get)(t,[\"jetpack_backup_daily\",\"currency_code\"],\"\"),p=Object(s.useMemo)((function(){return function(e){var t=e.products,n=e.upgradeLinkDaily,r=e.upgradeLinkRealtime,i=e.planDuration,a=Object(Dt.get)(t,[\"jetpack_backup_daily_monthly\",\"cost\"],\"\"),s=Object(Dt.get)(t,[\"jetpack_backup_realtime_monthly\",\"cost\"],\"\"),o=Object(Dt.get)(t,[\"jetpack_backup_daily\",\"cost\"],\"\"),c=\"\"===a?\"\":12*a,l=Object(Dt.get)(t,[\"jetpack_backup_realtime\",\"cost\"],\"\"),u=\"\"===s?\"\":12*s;return\"yearly\"===i?[{type:\"daily\",name:Us(\"Daily Backups\"),link:n,discountedPrice:o,fullPrice:c,potentialSavings:c&&o?c-o:null},{type:\"real-time\",name:Us(\"Real-Time Backups\"),link:r,discountedPrice:l,fullPrice:u,potentialSavings:u&&l?u-l:null}]:[{type:\"daily\",name:Us(\"Daily Backups\"),link:n,fullPrice:a},{type:\"real-time\",name:Us(\"Real-Time Backups\"),link:r,fullPrice:s}]}({products:t,upgradeLinkDaily:r,upgradeLinkRealtime:i,planDuration:l})}),[t,r,i,l]);return e.isFetching?o.a.createElement(\"div\",{className:\"plans-section__single-product-skeleton is-placeholder\"}):o.a.createElement(\"div\",{className:\"single-product__accented-card dops-card\"},o.a.createElement(\"div\",{className:\"single-product__accented-card-header\"},o.a.createElement(\"h3\",{className:\"single-product-backup__header-title\"},op)),o.a.createElement(\"div\",{className:\"single-product__accented-card-body\"},o.a.createElement(um,{billingTimeFrame:l,currencyCode:u,backupOptions:p,backupInfoUrl:n,selectedBackupType:a,setSelectedBackupType:c})))}));function dm(e,t){switch(e){case\"up_to_100_records\":return Us(\"Up to 100 records\");case\"up_to_1k_records\":return Us(\"Up to 1,000 records\");case\"up_to_10k_records\":return Us(\"Up to 10,000 records\");case\"up_to_100k_records\":return Us(\"Up to 100,000 records\");case\"up_to_1m_records\":return Us(\"Up to 1,000,000 records\");case\"more_than_1m_records\":var n=1e6*Math.ceil(t/1e6);return Us(\"Up to %(tierMaximumRecords)s records\",{args:{tierMaximumRecords:Rs(n)}});default:return null}}var hm=le((function(e){return{planDuration:di(e),searchInfoUrl:Yi(e,\"aag-search\"),searchUpgradeMonthlyUrl:Yi(e,\"jetpack-search-monthly\"),searchUpgradeUrl:Yi(e,\"jetpack-search\")}}))((function(e){var t=e.planDuration,n=e.siteProducts,r=Object(Dt.get)(n,\"jetpack_search.currency_code\",\"\"),i=Object(Dt.get)(n,\"jetpack_search_monthly.cost\",\"\"),a=Object(Dt.get)(n,\"jetpack_search.cost\",\"\"),s=Object(Dt.get)(n,\"jetpack_search.price_tier_usage_quantity\",\"0\"),c=function(e){return function(){Uc.tracks.recordJetpackClick({target:\"landing-page-link\",feature:\"single-product-search\",extra:e})}}(s);return e.isFetching?o.a.createElement(\"div\",{className:\"plans-section__single-product-skeleton is-placeholder\"}):o.a.createElement(\"div\",{className:\"single-product__accented-card dops-card\"},o.a.createElement(\"div\",{className:\"single-product__accented-card-header\"},o.a.createElement(\"h3\",{className:\"single-product-backup__header-title\"},dp)),o.a.createElement(\"div\",{className:\"single-product__accented-card-body\"},o.a.createElement(\"div\",{className:\"single-product__description\"},hp),o.a.createElement(\"div\",{className:\"single-product__landing-page\"},o.a.createElement(Xu,{target:\"_blank\",href:e.searchInfoUrl,icon:!0,iconSize:12,onClick:c},Us(\"Learn more\"))),o.a.createElement(\"h4\",{className:\"single-product-backup__options-header\"},Us(\"Your current site record size: %s record\",\"Your current site record size: %s records\",{args:Rs(s),count:s}),o.a.createElement($u,{position:\"right\"},Us(\"Records are all posts, pages, custom post types, and other types of content indexed by Jetpack Search.\"))),o.a.createElement(\"div\",{className:\"single-product-search__radio-buttons-container\"},o.a.createElement(am,{billingTimeFrame:t,checked:!0,currencyCode:r,fullPrice:\"yearly\"===t?a:i,planName:dm(Object(Dt.get)(e.siteProducts,\"jetpack_search.price_tier_slug\"),s),radioValue:t})),o.a.createElement(sm,{billingTimeframe:t,currencyCode:r,potentialSavings:12*i-a}),o.a.createElement(\"div\",{className:\"single-product-search__upgrade-button-container\"},o.a.createElement(xc,{href:\"yearly\"===t?e.searchUpgradeUrl:e.searchUpgradeMonthlyUrl,primary:!0},Us(\"Upgrade to Jetpack Search\")))))})),fm=(n(386),function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{selectedBackupType:\"real-time\"}),ha()(Os()(n),\"setSelectedBackupType\",(function(e){n.setState({selectedBackupType:e})})),n}return Ma()(t,e),As()(t,[{key:\"findPrioritizedPurchaseForBackup\",value:function(){for(var e=this,t=function(){var t=r[n],i=e.props.activeSitePurchases.find((function(e){return Lo(e.product_slug)===t}));if(void 0!==i)return{v:i}},n=0,r=[\"is-business-plan\",\"is-realtime-backup-plan\",\"is-premium-plan\",\"is-personal-plan\",\"is-daily-backup-plan\"];n<r.length;n++){var i=t();if(\"object\"==typeof i)return i.v}return!1}},{key:\"renderTitleSection\",value:function(){return o.a.createElement(s.Fragment,null,o.a.createElement(\"h1\",{className:\"plans-section__header\"},Us(\"Solutions\")),o.a.createElement(\"h2\",{className:\"plans-section__subheader\"},Us(\"Looking for specific features? We\'ve got you covered.\")))}},{key:\"renderBackupProduct\",value:function(){if(this.props.multisite)return null;var e=this.findPrioritizedPurchaseForBackup();if(e)return o.a.createElement(rm,{purchase:e,siteRawlUrl:this.props.siteRawlUrl});var t=Object(Dt.get)(this.props.sitePlan,\"product_slug\");return this.props.isFetchingData||\"jetpack_free\"===t?o.a.createElement(pm,{isFetching:this.props.isFetchingData,products:this.props.siteProducts,selectedBackupType:this.state.selectedBackupType,setSelectedBackupType:this.setSelectedBackupType}):null}},{key:\"renderSearchProduct\",value:function(){return this.props.searchPurchase?o.a.createElement(rm,{purchase:this.props.searchPurchase,siteRawlUrl:this.props.siteRawlUrl}):o.a.createElement(hm,{isFetching:this.props.isFetchingData,searchPurchase:this.props.searchPurchase,siteProducts:this.props.siteProducts})}},{key:\"render\",value:function(){return o.a.createElement(\"div\",{className:\"product-selector\"},o.a.createElement(Hf,null),this.renderTitleSection(),o.a.createElement(zf,{type:\"solutions\"}),o.a.createElement(\"div\",{className:\"plans-section__single-product plans-section__single-product--with-search\"},this.renderBackupProduct(),this.renderSearchProduct()))}}]),t}(s.Component)),mm=le((function(e){return{activeSitePurchases:$o(e),isFetchingData:Bo(e)||!Go(e)||nc(e),planDuration:di(e),multisite:Ji(e),searchPurchase:Qo(e),sitePlan:qo(e),siteProducts:rc(e),siteRawlUrl:vi(e)}}))(fm);function gm(){return o.a.createElement(s.Fragment,null,o.a.createElement(zl,null),o.a.createElement(Vf,null),o.a.createElement(mm,null))}var vm=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"trackStartWithFreeClick\",value:function(){Uc.tracks.recordJetpackClick({target:\"free-plan\",feature:\"plans-prompt\"})}},{key:\"renderBanner\",value:function(){return o.a.createElement(\"div\",{className:\"plans-prompt__banner\"},o.a.createElement(Hc,{className:\"plans-prompt__logo\"}),o.a.createElement(\"h2\",{className:\"plans-prompt__heading\"},Us(\"Explore our Jetpack plans\")),o.a.createElement(\"p\",{className:\"plans-prompt__intro\"},Us(\"Now that you\'re set up, pick a plan that fits your needs.\")))}},{key:\"renderFooter\",value:function(){return this.props.plans?o.a.createElement(\"div\",{className:\"plans-prompt__footer\"},o.a.createElement(xc,{href:this.props.siteAdminUrl+\"admin.php?page=jetpack\",onClick:this.trackStartWithFreeClick},Us(\"Start with free\"),o.a.createElement(ml,{icon:\"arrow-right\",size:18}))):null}},{key:\"render\",value:function(){return o.a.createElement(\"div\",{className:\"plans-prompt\"},this.renderBanner(),o.a.createElement(gm,null),this.renderFooter())}}]),t}(o.a.Component),bm=le((function(e){return{plans:Go(e)}}))(vm),ym={currentUser:{isMaster:!0,permissions:{admin_page:!0,connect:!0,disconnect:!0,edit_posts:!0,manage_modules:!0,manage_options:!0,manage_plugins:!0}}},_m={currentUser:{isMaster:!1,permissions:{admin_page:!0,connect:!0,disconnect:!0,edit_posts:!0,manage_modules:!0,manage_options:!0,manage_plugins:!0}}},wm={currentUser:{isMaster:!1,permissions:{admin_page:!0,connect:!1,disconnect:!1,edit_posts:!0,manage_modules:!1,manage_options:!1,manage_plugins:!1}}},km={currentUser:{isMaster:!1,permissions:{admin_page:!0,connect:!1,disconnect:!1,edit_posts:!1,manage_modules:!1,manage_options:!1,manage_plugins:!1}}},Em={currentUser:{permissions:{view_stats:!0}}},Cm={currentUser:{permissions:{view_stats:!1}}},Sm={currentUser:{isConnected:!0}},Mm={currentUser:{isConnected:!1}},xm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"onPlanChange\",(function(e){n.props.switchPlanPreview(e.target.value)})),ha()(Os()(n),\"onPermissionsChange\",(function(e){n.props.switchUserPermissions(e.target.value)})),ha()(Os()(n),\"onThreatsChange\",(function(e){n.props.switchThreats(e.target.value)})),ha()(Os()(n),\"onRewindStatusChange\",(function(e){n.props.switchRewindState(e.target.value)})),ha()(Os()(n),\"maybeShowStatsToggle\",(function(){if(!n.props.isAdmin)return o.a.createElement(\"div\",null,o.a.createElement(\"hr\",null),o.a.createElement(\"ul\",null,o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"view_stats\"},o.a.createElement(\"input\",{type:\"radio\",id:\"view_stats\",value:\"view_stats\",name:\"view_stats\",checked:n.props.canViewStats,onChange:n.onPermissionsChange}),\"Can view stats\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"hide_stats\"},o.a.createElement(\"input\",{type:\"radio\",id:\"hide_stats\",value:\"hide_stats\",name:\"hide_stats\",checked:!n.props.canViewStats,onChange:n.onPermissionsChange}),\"Can not view stats\"))))})),ha()(Os()(n),\"maybeShowIsLinkedToggle\",(function(){if(!n.props.isMaster)return o.a.createElement(\"div\",null,o.a.createElement(\"hr\",null),o.a.createElement(\"ul\",null,o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"is_linked\"},o.a.createElement(\"input\",{type:\"radio\",id:\"is_linked\",value:\"is_linked\",name:\"is_linked\",checked:n.props.isUserLinked,onChange:n.onPermissionsChange}),\"Linked\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"is_unlinked\"},o.a.createElement(\"input\",{type:\"radio\",id:\"is_unlinked\",value:\"is_unlinked\",name:\"is_unlinked\",checked:!n.props.isUserLinked,onChange:n.onPermissionsChange}),\"Unlinked\"))))})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(!this.props.canDisplayDevCard)return null;var e=Mc()(this.props.className,\"jp-dev-card\"),t=Lo(this.props.sitePlan.product_slug),n=Object(Dt.get)(this.props.rewindStatus,[\"state\"],!1);return o.a.createElement(Dl,{compact:!0,className:e},o.a.createElement(\"a\",{className:\"jp-dev-card__close\",role:\"button\",tabIndex:\"0\",onKeyDown:Tu(this.props.disableDevCard),onClick:this.props.disableDevCard},\"x\"),o.a.createElement(\"div\",{className:\"jp-dev-card__heading\"},\"Dev Tools\"),o.a.createElement(\"ul\",null,o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"jetpack_free\"},o.a.createElement(\"input\",{type:\"radio\",id:\"jetpack_free\",value:\"jetpack_free\",name:\"jetpack_free\",checked:\"is-free-plan\"===t,onChange:this.onPlanChange}),\"Free\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"jetpack_personal\"},o.a.createElement(\"input\",{type:\"radio\",id:\"jetpack_personal\",value:\"jetpack_personal\",name:\"jetpack_personal\",checked:\"is-personal-plan\"===t,onChange:this.onPlanChange}),\"Personal\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"jetpack_premium\"},o.a.createElement(\"input\",{type:\"radio\",id:\"jetpack_premium\",value:\"jetpack_premium\",name:\"jetpack_premium\",checked:\"is-premium-plan\"===t,onChange:this.onPlanChange}),\"Premium\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"jetpack_business\"},o.a.createElement(\"input\",{type:\"radio\",id:\"jetpack_business\",value:\"jetpack_business\",name:\"jetpack_business\",checked:\"is-business-plan\"===t,onChange:this.onPlanChange}),\"Pro\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"jetpack_backup_daily\"},o.a.createElement(\"input\",{type:\"radio\",id:\"jetpack_backup_daily\",value:\"jetpack_backup_daily\",name:\"jetpack_backup_daily\",checked:\"is-daily-backup-plan\"===t,onChange:this.onPlanChange}),\"Jetpack Backup Daily\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"jetpack_backup_realtime\"},o.a.createElement(\"input\",{type:\"radio\",id:\"jetpack_backup_realtime\",value:\"jetpack_backup_realtime\",name:\"jetpack_backup_realtime\",checked:\"is-realtime-backup-plan\"===t,onChange:this.onPlanChange}),\"Jetpack Backup Reatime\"))),o.a.createElement(\"hr\",null),o.a.createElement(\"ul\",null,o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"admin_master\"},o.a.createElement(\"input\",{type:\"radio\",id:\"admin_master\",value:\"admin_master\",name:\"admin_master\",checked:this.props.isMaster,onChange:this.onPermissionsChange}),\"Admin (master)\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"admin_secondary\"},o.a.createElement(\"input\",{type:\"radio\",id:\"admin_secondary\",value:\"admin_secondary\",name:\"admin_secondary\",checked:this.props.isAdmin&&!this.props.isMaster,onChange:this.onPermissionsChange}),\"Admin (secondary)\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"editor\"},o.a.createElement(\"input\",{type:\"radio\",id:\"editor\",value:\"editor\",name:\"editor\",checked:this.props.canEditPosts&&!this.props.isAdmin,onChange:this.onPermissionsChange}),\"Editor\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"subscriber\"},o.a.createElement(\"input\",{type:\"radio\",id:\"subscriber\",value:\"subscriber\",name:\"subscriber\",checked:!this.props.canEditPosts&&!this.props.isAdmin,onChange:this.onPermissionsChange}),\"Subscriber\"))),o.a.createElement(\"hr\",null),o.a.createElement(\"ul\",null,o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"nothreats\"},o.a.createElement(\"input\",{type:\"radio\",id:\"nothreats\",value:0,name:\"nothreats\",checked:0===this.props.getVaultPressScanThreatCount(),onChange:this.onThreatsChange}),\"No threats\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"threats\"},o.a.createElement(\"input\",{type:\"radio\",id:\"threats\",value:17,name:\"threats\",checked:0!==this.props.getVaultPressScanThreatCount(),onChange:this.onThreatsChange}),\"Threats\"))),o.a.createElement(\"hr\",null),o.a.createElement(\"ul\",null,o.a.createElement(\"strong\",null,\"Backup & Scan\"),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"rewindUnavailable\"},o.a.createElement(\"input\",{type:\"radio\",id:\"rewindUnavailable\",value:\"unavailable\",name:\"unavailable\",checked:\"unavailable\"===n,onChange:this.onRewindStatusChange}),\"Unavailable\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"rewindProvisioning\"},o.a.createElement(\"input\",{type:\"radio\",id:\"rewindProvisioning\",value:\"provisioning\",name:\"provisioning\",checked:\"provisioning\"===n,onChange:this.onRewindStatusChange}),\"Provisioning\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"rewindAwatingCreds\"},o.a.createElement(\"input\",{type:\"radio\",id:\"rewindAwatingCreds\",value:\"awaiting_credentials\",name:\"awaiting_credentials\",checked:\"awaiting_credentials\"===n,onChange:this.onRewindStatusChange}),\"Awaiting credentials\")),o.a.createElement(\"li\",null,o.a.createElement(\"label\",{htmlFor:\"rewindActive\"},o.a.createElement(\"input\",{type:\"radio\",id:\"rewindActive\",value:\"active\",name:\"active\",checked:\"active\"===n,onChange:this.onRewindStatusChange}),\"Active\"))),this.maybeShowStatsToggle(),this.maybeShowIsLinkedToggle())}}]),t}(o.a.Component);ha()(xm,\"displayName\",\"DevCard\");var Am=le((function(e){return{isDevVersion:hi(e),sitePlan:qo(e),canDisplayDevCard:ao(e),isUserLinked:Xs(e),canViewStats:Pi(e),isMaster:Ai(e),isAdmin:Mi(e),canEditPosts:Si(e),getVaultPressScanThreatCount:function(){return ca(e)},rewindStatus:yo(e)}}),(function(e){return{switchPlanPreview:function(t){return e(function(e){return function(t){t({type:fr,siteData:{plan:{product_slug:e}}})}}(t))},switchUserPermissions:function(t){return e(function(e){var t={};return function(n){switch(e){case\"admin_master\":t=ym;break;case\"admin_secondary\":t=_m;break;case\"editor\":case\"contributor\":case\"author\":t=wm;break;case\"subscriber\":t=km;break;case\"view_stats\":t=Em;break;case\"hide_stats\":t=Cm;break;case\"is_linked\":t=Sm;break;case\"is_unlinked\":t=Mm}n({type:Kr,initialState:t})}}(t))},switchThreats:function(t){return e(function(e){return function(t){t({type:Jr,mockCount:e})}}(parseInt(t)))},disableDevCard:function(){return e((function(e){e({type:qr})}))},switchRewindState:function(t){return e((n=t,function(e){e({type:$r,rewindState:{state:n}})}));var n}}}))(xm),jm=function e(){var t=document.getElementById(\"jp-navigation\").offsetTop;window.scrollTo(0,window.scrollY-t/1.5),window.scrollY>t&&window.requestAnimationFrame(e)},Om=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"resetOnClick\",(function(){window.confirm(Us(\"This will reset all Jetpack options, are you sure?\"))&&n.props.resetOptions()})),ha()(Os()(n),\"trackVersionClick\",(function(){Uc.tracks.recordJetpackClick({target:\"footer_link\",link:\"version\"})})),ha()(Os()(n),\"trackTermsClick\",(function(){Uc.tracks.recordJetpackClick({target:\"footer_link\",link:\"terms\"})})),ha()(Os()(n),\"trackAboutClick\",(function(){Uc.tracks.recordJetpackClick({target:\"footer_link\",link:\"about\"})})),ha()(Os()(n),\"trackPrivacyClick\",(function(){window.requestAnimationFrame(jm),Uc.tracks.recordJetpackClick({target:\"footer_link\",link:\"privacy\"})})),ha()(Os()(n),\"trackModulesClick\",(function(){Uc.tracks.recordJetpackClick({target:\"footer_link\",link:\"modules\"})})),ha()(Os()(n),\"trackDebugClick\",(function(){Uc.tracks.recordJetpackClick({target:\"footer_link\",link:\"debug\"})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e=this,t=Mc()(this.props.className,\"jp-footer\"),n=this.props.currentVersion,r=this.props.siteConnectionStatus?this.props.siteAdminUrl+\"admin.php?page=jetpack_about\":Vl(\"jetpack\"),i=this.props.siteConnectionStatus?this.props.siteAdminUrl+\"admin.php?page=jetpack#/privacy\":Vl(\"a8c-privacy\");return o.a.createElement(\"div\",{className:t},o.a.createElement(\"div\",{className:\"jp-footer__a8c-attr-container\"},o.a.createElement(\"a\",{href:r},o.a.createElement(\"svg\",{role:\"img\",className:\"jp-footer__a8c-attr\",x:\"0\",y:\"0\",viewBox:\"0 0 935 38.2\",enableBackground:\"new 0 0 935 38.2\",\"aria-labelledby\":\"a8c-svg-title\"},o.a.createElement(\"title\",{id:\"a8c-svg-title\"},Us(\"An Automattic Airline\")),o.a.createElement(\"path\",{d:\"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z\"}),o.a.createElement(\"path\",{d:\"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z\"}),o.a.createElement(\"path\",{d:\"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z\"})))),o.a.createElement(\"ul\",{className:\"jp-footer__links\"},o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{onClick:this.trackVersionClick,href:Vl(\"jetpack\"),target:\"_blank\",rel:\"noopener noreferrer\",className:\"jp-footer__link\",title:Us(\"Jetpack version\")},n?Us(\"Jetpack version %(version)s\",{args:{version:n}}):\"Jetpack\")),o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{onClick:this.trackAboutClick,href:r,className:\"jp-footer__link\",title:Us(\"About Jetpack\")},Us(\"About\",{context:\"Link to learn more about Jetpack.\"}))),o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{onClick:this.trackTermsClick,href:Vl(\"wpcom-tos\"),target:\"_blank\",rel:\"noopener noreferrer\",title:Us(\"WordPress.com Terms of Service\"),className:\"jp-footer__link\"},Us(\"Terms\",{context:\"Shorthand for Terms of Service.\"}))),o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{onClick:this.trackPrivacyClick,href:i,rel:\"noopener noreferrer\",title:Us(\"Automattic\'s Privacy Policy\"),className:\"jp-footer__link\"},Us(\"Privacy\",{context:\"Shorthand for Privacy Policy.\"}))),function(){if(e.props.siteConnectionStatus&&e.props.userCanManageOptions)return o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{onClick:e.trackModulesClick,href:e.props.siteAdminUrl+\"admin.php?page=jetpack_modules\",title:Us(\"Access the full list of Jetpack modules available on your site.\"),className:\"jp-footer__link\"},Us(\"Modules\",{context:\"Navigation item. Noun. Links to a list of modules for Jetpack.\"})))}(),function(){if(e.props.userCanManageOptions)return o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{onClick:e.trackDebugClick,href:e.props.siteAdminUrl+\"admin.php?page=jetpack-debugger\",title:Us(\"Test your site’s compatibility with Jetpack.\"),className:\"jp-footer__link\"},Us(\"Debug\",{context:\"Navigation item. Noun. Links to a debugger tool for Jetpack.\"})))}(),e.props.isDevVersion&&e.props.userCanManageOptions?o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{role:\"button\",tabIndex:\"0\",onKeyDown:Tu(e.resetOnClick),onClick:e.resetOnClick,className:\"jp-footer__link\"},Us(\"Reset Options (dev only)\",{context:\"Navigation item.\"}))):\"\",e.props.isDevVersion?o.a.createElement(\"li\",{className:\"jp-footer__link-item\"},o.a.createElement(\"a\",{role:\"button\",tabIndex:\"0\",onKeyDown:Tu(e.props.enableDevCard),onClick:e.props.enableDevCard,className:\"jp-footer__link\"},Us(\"Dev Tools\",{context:\"Navigation item.\"}))):\"\",function(){if(e.props.isDevVersion&&e.props.displayDevCard)return o.a.createElement(Am,null)}()))}}]),t}(o.a.Component);ha()(Om,\"displayName\",\"Footer\");var Nm=le((function(e){return{currentVersion:fi(e),displayDevCard:ao(e),isDevVersion:hi(e),isInIdentityCrisis:eo(e),siteAdminUrl:bi(e),siteConnectionStatus:Hs(e),userCanManageOptions:Ci(e)}}),(function(e){return{resetOptions:function(){return e((t=\"options\",function(e){return e({type:Nn}),e(Qa(\"is-info\",Us(\"Resetting Jetpack options…\"),{id:\"reset-options\"})),Da.resetOptions(t).then((function(){e({type:Pn}),e(Xa(\"reset-options\")),e(Qa(\"is-success\",Us(\"Options reset.\"),{id:\"reset-options\",duration:2e3}))})).catch((function(t){e({type:Tn,error:t}),e(Xa(\"reset-options\")),e(Qa(\"is-error\",Us(\"Options failed to reset.\"),{id:\"reset-options\"}))}))}));var t},enableDevCard:function(){return e((function(e){e({type:Hr})}))}}}))(Om),Tm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackBannerClick\",(function(){Uc.tracks.recordJetpackClick({target:\"banner-click\",feature:\"support\",page:n.props.path})})),ha()(Os()(n),\"trackAskQuestionClick\",(function(){Uc.tracks.recordJetpackClick({target:\"support-card\",button:\"support-ask\",page:n.props.path})})),ha()(Os()(n),\"trackSearchClick\",(function(){Uc.tracks.recordJetpackClick({target:\"support-card\",button:\"support-search\",page:n.props.path})})),n}return Ma()(t,e),As()(t,[{key:\"shouldComponentUpdate\",value:function(e){return e.sitePlan.product_slug!==this.props.sitePlan.product_slug}},{key:\"render\",value:function(){if(void 0===this.props.sitePlan.product_slug&&this.props.isFetchingSiteData)return o.a.createElement(\"div\",null);var e=Mc()(this.props.className,\"jp-support-card\"),t=void 0===this.props.sitePlan.product_slug||\"jetpack_free\"===this.props.sitePlan.product_slug,n=this.props.isDevVersion?ad:id;return o.a.createElement(\"div\",{className:e},o.a.createElement(Dl,{className:\"jp-support-card__happiness\"},o.a.createElement(\"div\",{className:\"jp-support-card__happiness-contact\"},o.a.createElement(\"h3\",{className:\"jp-support-card__header\"},Us(\"We\'re here to help\")),o.a.createElement(\"p\",{className:\"jp-support-card__description\"},Us(t?\"Jetpack comes with free, basic support for all users.\":\"Your paid plan gives you access to prioritized Jetpack support.\")),o.a.createElement(\"p\",{className:\"jp-support-card__description\"},o.a.createElement(xc,{onClick:this.trackAskQuestionClick,href:this.props.isAtomicSite?Vl(\"calypso-help-contact\"):n},Us(\"Ask a question\")),o.a.createElement(xc,{onClick:this.trackSearchClick,href:this.props.isAtomicSite?Vl(\"calypso-help\"):Vl(\"jetpack-support\")},Us(\"Search our support site\"))))),this.props.siteConnectionStatus&&t&&o.a.createElement(Ku,{title:Us(\"Get a faster resolution to your support questions.\"),plan:\"jetpack_personal\",callToAction:Us(\"Upgrade\"),onClick:this.trackBannerClick,href:this.props.supportUpgradeUrl}))}}]),t}(o.a.Component);ha()(Tm,\"displayName\",\"SupportCard\"),ha()(Tm,\"defaultProps\",{className:\"\",siteConnectionStatus:!1}),Tm.propTypes={siteConnectionStatus:u.a.any.isRequired,className:u.a.string};var Pm=le((function(e){return{sitePlan:qo(e),siteConnectionStatus:Hs(e),isFetchingSiteData:Bo(e),isAtomicSite:Vi(e),isDevVersion:hi(e),supportUpgradeUrl:Yi(e,\"support\")}}))(Tm),Im=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackDownloadClick\",(function(){Uc.tracks.recordJetpackClick({target:\"apps-card\",button:\"apps-download\",page:n.props.path})})),ha()(Os()(n),\"dismissCard\",(function(){n.props.dismissAppCard(),Uc.tracks.recordJetpackClick({target:\"apps-card\",button:\"dismiss\",page:n.props.path})})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(!this.props.arePromotionsActive||this.props.isAppsCardDismissed)return null;var e=Mc()(this.props.className,\"jp-apps-card\");return o.a.createElement(\"div\",{className:e},o.a.createElement(Dl,{className:\"jp-apps-card__content\"},this.props.userCanManageOptions&&o.a.createElement(xc,{borderless:!0,compact:!0,className:\"jp-apps-card__dismiss\",href:\"javascript:void(0)\",onClick:this.dismissCard},o.a.createElement(\"span\",{className:\"dashicons dashicons-no\"})),o.a.createElement(\"div\",{className:\"jp-apps-card__top\"},o.a.createElement(\"img\",{src:rd+\"get-apps.svg\",alt:\"\"})),o.a.createElement(\"div\",{className:\"jp-apps-card__description\"},o.a.createElement(\"h3\",{className:\"jp-apps-card__header\"},Us(\"Get WordPress Apps for every device\")),o.a.createElement(\"p\",{className:\"jp-apps-card__paragraph\"},Us(\"Manage all your sites from a single dashboard: publish content, track stats, moderate comments, and so much more from anywhere in the world.\")),o.a.createElement(xc,{className:\"is-primary\",onClick:this.trackDownloadClick,href:\"https://apps.wordpress.com/get?utm_source=jpdash&utm_medium=cta&utm_campaign=getappscard\"},Us(\"Download the free apps\")))))}}]),t}(o.a.Component);ha()(Im,\"displayName\",\"AppsCard\"),Im.propTypes={className:u.a.string};var Dm=le((function(e){return{isAppsCardDismissed:No(e),arePromotionsActive:Bi(e),userCanManageOptions:Ci(e)}}),(function(e){return{dismissAppCard:function(){return e(Ul({dismiss_dash_app_card:!0}))}}}))(Im),Rm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"renderMainContent\",(function(e){var t,r=o.a.createElement(wl,n.props);switch(e){case\"/dashboard\":default:t=o.a.createElement(mf,n.props);break;case\"/settings\":case\"/writing\":case\"/sharing\":case\"/performance\":n.props.isSubscriber||(r=o.a.createElement(Nl,n.props),t=o.a.createElement(zd,{route:n.props.route,siteAdminUrl:n.props.siteAdminUrl,siteRawUrl:n.props.siteRawUrl,searchTerm:n.props.searchTerm,userCanManageModules:n.props.userCanManageModules}))}return window.wpNavMenuClassChange(),o.a.createElement(\"div\",null,r,t)})),n}return Ma()(t,e),As()(t,[{key:\"shouldComponentUpdate\",value:function(e){return e.siteConnectionStatus!==this.props.siteConnectionStatus||e.route.path!==this.props.route.path}},{key:\"render\",value:function(){return this.renderMainContent(this.props.route.path)}}]),t}(o.a.Component);Rm.propTypes={userCanViewStats:u.a.bool.isRequired,isSubscriber:u.a.bool.isRequired,siteConnectionStatus:u.a.any.isRequired};var Um=le((function(e){return{userCanViewStats:Pi(e),siteConnectionStatus:Hs(e),isSubscriber:wi(e),isModuleActivated:function(t){return Ga(e,t)},userCanManageModules:Ei(e)}}))(Rm),Lm=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){var e={className:\"dops-notice__action\",href:this.props.href,onClick:this.props.onClick};return this.props.external&&(e.target=\"_blank\"),o.a.createElement(\"a\",e,o.a.createElement(\"span\",null,this.props.children),this.props.icon&&o.a.createElement(ml,{icon:this.props.icon,size:24}),this.props.external&&o.a.createElement(ml,{icon:\"external\",size:24}))}}]),t}(o.a.Component);ha()(Lm,\"displayName\",\"NoticeAction\"),ha()(Lm,\"propTypes\",{href:u.a.string,onClick:u.a.func,external:u.a.bool,icon:u.a.string}),ha()(Lm,\"defaultProps\",{external:!1});n(387);var Fm=Oc()(\"calypso:notices\");Fm(\"initializing notices\");var zm={containerNames:{}};!function(e){Object(Dt.assign)(e,ps.EventEmitter.prototype),e.emitChange=function(){this.emit(\"change\")},e.off=e.removeListener}(zm);var Bm=[],Vm={new:function(e,t,n){var r=t.overlay?\"overlay-notices\":\"notices\";zm.containerNames[r]=r,Fm(\"creating notice\",e,t,n),zm[r]=[];var i={type:t.type||\"message\",status:n,text:e,duration:t.duration,container:r,button:t.button,href:t.href,onClick:function(e){if(\"function\"==typeof t.onClick){var n=Vm.removeNotice.bind(Vm,i);return t.onClick(e,n)}},onRemoveCallback:t.onRemoveCallback||function(){},arrow:t.arrow,isCompact:t.isCompact,showDismiss:t.showDismiss,persistent:t.persistent};return t.displayOnNextPage?Bm.push(i):zm[r].push(i),zm.emit(\"change\"),i},success:function(e,t){return t=t||{},this.new(e,t,\"is-success\")},error:function(e,t){return t=t||{},this.new(e,t,\"is-error\")},info:function(e,t){return t=t||{},this.new(e,t,\"is-info\")},warning:function(e,t){return t=t||{},this.new(e,t,\"is-warning\")},list:zm,removeNotice:function(e){if(e.container){var t=zm[e.container],n=t.indexOf(e);-1!==n&&(t.splice(n,1),zm.emit(\"change\"))}},clearNoticesOnNavigation:function(e,t){Fm(\"clearNoticesOnNavigation\");var n,r,i=!1,a=function(e){return e.persistent};for(r in zm.containerNames)n=zm[r].length,zm[r]=zm[r].filter(a),n!==zm[r].length&&(i=!0);Bm.length&&(Bm.forEach((function(e){zm[e.container]=[],zm[e.container].push(e)})),Bm=[]),i&&zm.emit(\"change\"),t()},clearNotices:function(e){zm[e]=[],zm.emit(\"change\")},getStatusHelper:function(e){return e.error?\"is-error\":e.warning?\"is-warning\":e.info?\"is-info\":e.success?\"is-success\":void 0}},Hm=Vm,qm=(n(388),Oc()(\"calypso:notices\")),Km=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"removeNotice\",(function(e){e&&Hm.removeNotice(e)})),ha()(Os()(n),\"handleLocalNoticeDismissClick\",(function(e){return function(){return n.removeNotice(e)}})),ha()(Os()(n),\"handleReduxNoticeDismissClick\",(function(e){return function(){return n.props.removeNotice(e)}})),n}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){qm(\"Mounting Global Notices React component.\")}},{key:\"render\",value:function(){var e=(this.props.notices[this.props.id]||[]).map((function(e,t){return o.a.createElement(Pu,{key:\"notice-old-\"+t,status:e.status,duration:e.duration||null,text:e.text,isCompact:e.isCompact,onDismissClick:this.handleLocalNoticeDismissClick(e),showDismiss:e.showDismiss},e.button&&o.a.createElement(Lm,{href:e.href,onClick:e.onClick},e.button))}),this);return(e=e.concat(this.props.storeNotices.map((function(e,t){return o.a.createElement(Pu,{key:\"notice-\"+t,status:e.status,duration:e.duration||null,showDismiss:e.showDismiss,onDismissClick:this.handleReduxNoticeDismissClick(e.noticeId),text:e.text})}),this))).length?o.a.createElement(\"div\",{id:this.props.id,className:\"global-notices\"},e):null}}]),t}(o.a.Component);ha()(Km,\"displayName\",\"NoticesList\"),ha()(Km,\"propTypes\",{id:u.a.string,notices:u.a.oneOfType([u.a.object,u.a.array])}),ha()(Km,\"defaultProps\",{id:\"overlay-notices\",notices:Object.freeze([])});var Jm=le((function(e){return{storeNotices:e.globalNotices}}),(function(e){return P({removeNotice:Xa},e)}))(Km),Wm=function(e){return function(t){t({type:Ar,notice:e})}},Gm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"maybeDismiss\",(function(e){!n.props.showDismiss||e.keyCode&&27!==e.keyCode||n.props.dismiss(e)})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){document.addEventListener(\"keydown\",this.maybeDismiss.bind(this),!1)}},{key:\"componentWillUnmount\",value:function(){document.removeEventListener(\"keydown\",this.maybeDismiss.bind(this),!1)}},{key:\"clickForeground\",value:function(e){e.stopPropagation()}},{key:\"render\",value:function(){var e=Mc()(this.props.className,\"jp-dialogue-modern\",{\"has-featured-image\":!!this.props.svg});return o.a.createElement(\"div\",{className:\"jp-dialogue-modern-full__container\",role:\"presentation\",onClick:this.maybeDismiss,onKeyDown:Tu(this.maybeDismiss)},o.a.createElement(\"div\",{className:e,role:\"presentation\",onClick:this.clickForeground,onKeyDown:Tu(this.clickForeground)},this.props.showDismiss&&o.a.createElement(ml,{icon:\"cross-small\",className:\"jp-dialogue-modern-full__dismiss\",tabIndex:\"0\",onKeyDown:Tu(this.props.dismiss),onClick:this.props.dismiss}),this.props.svg,o.a.createElement(\"div\",{className:\"jp-dialogue-modern__content\"},o.a.createElement(\"h1\",{className:\"jp-dialogue-modern__title\"},this.props.title),this.props.content),o.a.createElement(\"div\",null,this.props.belowContent)))}}]),t}(s.Component);Gm.propTypes={content:u.a.oneOfType([u.a.string,u.a.object]).isRequired,belowContent:u.a.oneOfType([u.a.string,u.a.object]).isRequired,svg:u.a.oneOfType([u.a.bool,u.a.object]),dismissOnClick:u.a.func,showDismiss:u.a.bool,title:u.a.string,adminUrl:u.a.string,dismiss:u.a.func},Gm.defaultProps={svg:!1,showDismiss:!0,dismiss:Dt.noop,content:\"\",belowContent:\"\",title:\"\"};var Ym=Gm,$m=Cu(function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"trackLearnMoreClick\",(function(){Uc.tracks.recordJetpackClick({target:\"warm_welcome_view_editor\",version:n.props.version})})),ha()(Os()(n),\"dismissNotice\",(function(){Uc.tracks.recordJetpackClick({target:\"warm_welcome_dismiss\",version:n.props.version}),n.props.dismiss()})),n}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){jQuery(\"body\").addClass(\"jp-dialogue-modern-showing\"),Uc.tracks.recordEvent(\"jetpack_warm_welcome_view\",{version:this.props.version})}},{key:\"componentWillUnmount\",value:function(){jQuery(\"body\").removeClass(\"jp-dialogue-modern-showing\")}},{key:\"renderInnerContent\",value:function(){for(var e=(new DOMParser).parseFromString(this.props.releasePostContent,\"text/html\"),t=e.getElementsByTagName(\"a\"),n=0;n<t.length;n++)t[n].setAttribute(\"target\",\"_blank\"),t[n].setAttribute(\"rel\",\"noopener noreferrer\");var r=e.body.innerHTML;return o.a.createElement(\"div\",{className:\"jp-upgrade-notice__content\"},o.a.createElement(\"div\",{dangerouslySetInnerHTML:{__html:r}}))}},{key:\"render\",value:function(){var e=this.props.featuredImage,t=null,n=this.props.title;return e&&e.length>0&&(t=o.a.createElement(\"img\",{src:e,alt:\"\"})),n&&0!==n.length||(n=Us(\"New in Jetpack %(version)s\",{args:{version:this.props.version},comment:\"%(version) is a version number.\"})),o.a.createElement(Ym,{svg:t,title:n,content:this.renderInnerContent(),dismiss:this.dismissNotice})}}]),t}(s.Component)),Xm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"state\",{showNotice:!0}),ha()(Os()(n),\"dismissJetpackStateNotice\",(function(){n.setState({showNotice:!1})})),ha()(Os()(n),\"getErrorFromKey\",(function(e){var t=n.props.jetpackStateNoticesErrorDescription||!1,r=\"\";switch(e){case\"cheatin\":r=Us(\"Cheatin\' uh?\");break;case\"access_denied\":r=Us(\"{{p}}Would you mind telling us why you did not complete the Jetpack connection in this {{a}}2 question survey{{/a}}?{{/p}}{{p}}A Jetpack connection is required for our free security and traffic features to work.{{/p}}\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"jetpack-cancelled-connection\"),target:\"_blank\",rel:\"noopener noreferrer\"}),p:o.a.createElement(\"p\",null)}});break;case\"wrong_state\":r=Us(\"You need to stay logged in to your WordPress blog while you authorize Jetpack.\");break;case\"invalid_client\":r=Us(\"We had an issue connecting Jetpack; deactivate then reactivate the Jetpack plugin, then connect again.\");break;case\"invalid_grant\":r=Us(\'There was an issue connecting your Jetpack. Please click \"Connect to WordPress.com\" again.\');break;case\"site_inaccessible\":case\"site_requires_authorization\":r=Us(\"Your website needs to be publicly accessible to use Jetpack: %(error_key)s\",{args:{error_key:e}});break;case\"site_blacklisted\":r=Us(\"This site can\'t be connected to WordPress.com because it violates our {{a}}Terms of Service{{/a}}.\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"wpcom-tos\"),rel:\"noopener noreferrer\",target:\"_blank\"})}});break;case\"not_public\":r=Us(\"{{s}}Your Jetpack has a glitch.{{/s}} Connecting this site with WordPress.com is not possible. This usually means your site is not publicly accessible (localhost).\",{components:{s:o.a.createElement(\"strong\",null)}});break;case\"wpcom_408\":case\"wpcom_5??\":case\"wpcom_bad_response\":case\"wpcom_outage\":r=Us(\"WordPress.com is currently having problems and is unable to fuel up your Jetpack.  Please try again later.\");break;case\"register_http_request_failed\":case\"token_http_request_failed\":r=Us(\"Jetpack could not contact WordPress.com: %(error_key)s.  This usually means something is incorrectly configured on your web host.\",{args:{error_key:e}});break;case\"no_role\":case\"no_cap\":case\"no_code\":case\"no_state\":case\"invalid_state\":case\"invalid_request\":case\"invalid_scope\":case\"unsupported_response_type\":case\"invalid_token\":case\"no_token\":case\"missing_secrets\":case\"home_missing\":case\"siteurl_missing\":case\"gmt_offset_missing\":case\"site_name_missing\":case\"secret_1_missing\":case\"secret_2_missing\":case\"site_lang_missing\":case\"home_malformed\":case\"siteurl_malformed\":case\"gmt_offset_malformed\":case\"timezone_string_malformed\":case\"site_name_malformed\":case\"secret_1_malformed\":case\"secret_2_malformed\":case\"site_lang_malformed\":case\"secrets_mismatch\":case\"verify_secret_1_missing\":case\"verify_secret_1_malformed\":case\"verify_secrets_missing\":case\"verify_secrets_mismatch\":r=Us(\"{{s}}Your Jetpack has a glitch.{{/s}}  We\'re sorry for the inconvenience. Please try again later, if the issue continues please contact support with this message: %(error_key)s\",{components:{s:o.a.createElement(\"strong\",null)},args:{error_key:e}});break;default:r=e}return t?o.a.createElement(\"div\",null,r,o.a.createElement(\"br\",null),t):o.a.createElement(\"div\",null,r)})),ha()(Os()(n),\"getMessageFromKey\",(function(e){var t,r=\"\",i=\"is-info\";switch(e){case\"modules_activated\":r=Us(\"Welcome to {{s}}Jetpack %(jetpack_version)s{{/s}}!\",{args:{jetpack_version:n.props.currentVersion},components:{s:o.a.createElement(\"strong\",null)}});break;case\"already_authorized\":r=Us(\"Your Jetpack is already connected.\"),i=\"is-success\";break;case\"authorized\":r=Us(\"You\'re fueled up and ready to go, Jetpack is now active.\"),i=\"is-success\";break;case\"linked\":r=Us(\"You\'re fueled up and ready to go.\"),i=\"is-success\";break;case\"protect_misconfigured_ip\":r=Us(\"Your server is misconfigured, which means that Jetpack Protect is unable to effectively protect your site.\"),i=\"is-info\",t=o.a.createElement(Lm,{href:Vl(\"jetpack-support-security-troubleshooting-protect\")},Us(\"Learn More\"));break;default:r=e}return[r,i,t]})),ha()(Os()(n),\"renderContent\",(function(){var e,t=\"is-info\",r=\"\",i=n.props.jetpackStateNoticesErrorCode,a=n.props.jetpackStateNoticesMessageCode,s=n.props.jetpackStateNoticesMessageContent;if(i||a||s){if(i&&(r=n.getErrorFromKey(i),\"access_denied\"!==i&&(t=\"is-error\")),s&&s.release_post_content)return o.a.createElement($m,{dismiss:n.dismissJetpackStateNotice,version:n.props.currentVersion,releasePostContent:s.release_post_content,featuredImage:s.release_post_featured_image,title:s.release_post_title});if(a){var c=n.getMessageFromKey(a);r=c[0],t=c[1],e=c[2]}return o.a.createElement(Pu,{status:t,onDismissClick:n.dismissJetpackStateNotice,text:r},e)}})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"div\",null,this.state.showNotice?this.renderContent():null)}}]),t}(o.a.Component);ha()(Xm,\"displayName\",\"JetpackStateNotices\");var Qm=le((function(e){return{currentVersion:fi(e),jetpackStateNoticesErrorCode:co(e),jetpackStateNoticesMessageCode:lo(e),jetpackStateNoticesErrorDescription:po(e),jetpackStateNoticesMessageContent:uo(e)}}))(Xm),Zm=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"dismissJetpackActionNotice\",(function(){n.props.dismissJetpackActionNotice(n.props.jetpackNotices)})),ha()(Os()(n),\"renderNotices\",(function(){n.props.jetpackNotices;return!1})),n}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"div\",null,this.renderNotices())}}]),t}(o.a.Component);ha()(Zm,\"displayName\",\"DismissableNotices\");var eg=le((function(e){return{jetpackNotices:oo(e),isDismissed:function(t){return function(e,t){return Object(Dt.get)(e.jetpack.jetpackNotices.dismissed,[t],!1)}(e,t)}}}),(function(e){return P({dismissJetpackActionNotice:Wm},e)}))(Zm);var tg=bt((function(e){var t=e.activeSitePurchases;if(\"/plans\"!==e.router.location.pathname)return null;if(t.length<=1)return null;var n=t.map((function(e){var t=e.product_slug,n=Cc()(e,[\"product_slug\"]);return Ms()({},n,{product_slug:t.replace(\"_monthly\",\"\")})})),r=n.find((function(e){return e.product_slug.includes(\"backup\")}));if(!r)return null;var i=n.find((function(e){var t=e.product_slug;return\"jetpack_personal\"===t||\"jetpack_premium\"===t||\"jetpack_business\"===t}));if(!i)return null;if(\"jetpack_backup_realtime\"===r.product_slug&&\"jetpack_business\"!==i.product_slug)return null;var a=Us(\"daily backups\");return\"jetpack_business\"===i.product_slug&&(a=Us(\"real-time backups\")),o.a.createElement(Pu,{status:\"is-warning\",showDismiss:!1,text:Us(\"Your %(planName)s Plan includes %(featureName)s. Looks like you also purchased the %(productName)s product. Consider removing %(productName)s.\",{args:{featureName:a,planName:i.product_name,productName:r.product_name}})})})),ng=le((function(e){return{activeSitePurchases:$o(e)}}))(tg),rg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return!(!this.props.isDevVersion||this.props.userIsSubscriber)&&o.a.createElement(Pu,{showDismiss:!1,text:Us(\"You are currently running a development version of Jetpack.\")},o.a.createElement(Lm,{href:ad},Us(\"Submit Beta feedback\")))}}]),t}(o.a.Component);ha()(rg,\"displayName\",\"DevVersionNotice\"),rg.propTypes={isDevVersion:u.a.bool.isRequired,userIsSubscriber:u.a.bool.isRequired};var ig=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(this.props.isStaging&&!this.props.isInIdentityCrisis){var e=Vl(\"jetpack-support-staging-sites\"),t={text:Us(\"You are running Jetpack on a staging server.\"),status:\"is-basic\",showDismiss:!1};return o.a.createElement(Pu,t,o.a.createElement(Lm,{href:e},Us(\"More Info\")))}return!1}}]),t}(o.a.Component);ha()(ig,\"displayName\",\"StagingSiteNotice\"),ig.propTypes={isStaging:u.a.bool.isRequired,isInIdentityCrisis:u.a.bool.isRequired};var ag=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){if(\"dev\"===this.props.siteConnectionStatus){var e=this.props.siteDevMode,t=[];e.filter&&t.push(Us(\"{{li}}The jetpack_development_mode filter is active{{/li}}\",{components:{li:o.a.createElement(\"li\",null)}})),e.constant&&t.push(Us(\"{{li}}The JETPACK_DEV_DEBUG constant is defined{{/li}}\",{components:{li:o.a.createElement(\"li\",null)}})),e.url&&t.push(Us(\"{{li}}Your site URL lacks a dot (e.g. http://localhost){{/li}}\",{components:{li:o.a.createElement(\"li\",null)}}));var n=Us(\"Currently in {{a}}Development Mode{{/a}} (some features are disabled) because: {{reasons/}}\",{components:{a:o.a.createElement(\"a\",{href:Vl(\"jetpack-support-development-mode\"),target:\"_blank\",rel:\"noopener noreferrer\"}),reasons:o.a.createElement(\"ul\",null,t)}});return o.a.createElement(Pu,{showDismiss:!1,status:\"is-info\",text:n},o.a.createElement(Lm,{href:Vl(\"jetpack-support-development-mode\")},Us(\"Learn More\")))}return!1}}]),t}(o.a.Component);ha()(ag,\"displayName\",\"DevModeNotice\"),ag.propTypes={siteConnectionStatus:u.a.oneOfType([u.a.string,u.a.bool]).isRequired,siteDevMode:u.a.oneOfType([u.a.bool,u.a.object]).isRequired};var sg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return!(this.props.isLinked||!this.props.connectUrl||!this.props.siteConnected)&&o.a.createElement(\"div\",{className:\"jp-unlinked-notice\"},o.a.createElement(Ku,{title:Us(\"Jetpack is powering your site, but to access all of its features you’ll need to create an account.\"),callToAction:Us(\"Create account\"),href:\"\".concat(this.props.connectUrl,\"&from=unlinked-user-connect\"),icon:\"my-sites\",className:\"is-jetpack-info\"}))}}]),t}(o.a.Component);ha()(sg,\"displayName\",\"UserUnlinked\"),sg.propTypes={connectUrl:u.a.string.isRequired,siteConnected:u.a.bool.isRequired};var og=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"render\",value:function(){return o.a.createElement(\"div\",{\"aria-live\":\"polite\"},o.a.createElement(Jm,null),o.a.createElement(Qm,null),o.a.createElement(rg,{isDevVersion:this.props.isDevVersion,userIsSubscriber:this.props.userIsSubscriber}),o.a.createElement(ag,{siteConnectionStatus:this.props.siteConnectionStatus,siteDevMode:this.props.siteDevMode}),o.a.createElement(ig,{isStaging:this.props.isStaging,isInIdentityCrisis:this.props.isInIdentityCrisis}),o.a.createElement(ng,null),o.a.createElement(eg,null),o.a.createElement(sg,{connectUrl:this.props.connectUrl,siteConnected:!0===this.props.siteConnectionStatus,isLinked:this.props.isLinked}),!this.props.siteConnectionStatus&&!this.props.userCanConnectSite&&o.a.createElement(Pu,{showDismiss:!1,status:\"is-warning\",text:Us(\"This site is not connected to WordPress.com. Please ask the site administrator to connect.\")}))}}]),t}(o.a.Component);ha()(og,\"displayName\",\"JetpackNotices\");var cg=le((function(e){return{connectUrl:Js(e),siteConnectionStatus:Hs(e),userCanConnectSite:xi(e),userIsSubscriber:wi(e),isLinked:Xs(e),isDevVersion:hi(e),siteDevMode:Ks(e),isStaging:Zs(e),isInIdentityCrisis:eo(e)}}))(og),lg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"componentDidMount\",value:function(){var e=jQuery(this.refs.adminNotices),t=jQuery(\".vp-deactivated\");t.length>0&&t.each((function(){var t=jQuery(this).addClass(\"dops-notice is-success is-dismissable\").removeClass(\"wrap vp-notice notice notice-success\");t.wrapInner(\'<span class=\"dops-notice__content\">\'),t.find(\".dops-notice__content\").before(\'<span class=\"dops-notice__icon-wrapper\"><svg class=\"gridicon gridicons-notice dops-notice__icon\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414\"/></svg></span>\').css(\"display\",\"block\"),t.find(\".dops-notice__content\").after(\'<span role=\"button\" tabindex=\"0\" class=\"dops-notice__dismiss\"><svg class=\"gridicon gridicons-cross\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\"/></svg><span class=\"screen-reader-text\"/></span>\'),t.find(\"h2\").replaceWith((function(){return jQuery(\"<strong />\",{html:this.innerHTML})})),t.find(\"p\").replaceWith((function(){return jQuery(\"<div/>\",{html:this.innerHTML})})),t.prependTo(e).css(\"display\",\"flex\")}));var n=jQuery(\".vp-notice\");n.length>0&&n.each((function(){var t=jQuery(this);if(0===t.find(\".dops-notice__icon\").length){var n=t.hasClass(\"vp-registered\"),r=n?\"is-success\":\"is-error\";t.addClass(\"dops-notice vp-notice-jp \"+r),t.wrapInner(\'<span class=\"dops-notice__content\">\');var i=n?\'<span class=\"dops-notice__icon-wrapper\"><svg class=\"gridicon gridicons-notice dops-notice__icon\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414\"/></svg></span>\':\'<span class=\"dops-notice__icon-wrapper\"><svg class=\"gridicon gridicons-notice dops-notice__icon\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z\"/></svg></span>\';t.find(\".dops-notice__content\").before(i),t.find(\".vp-message\").removeClass(\"vp-message\").addClass(\"dops-notice__text\"),t.find(\"h3\").replaceWith((function(){return jQuery(\"<strong />\",{html:this.innerHTML})})),t.find(\"p\").replaceWith((function(){return jQuery(\"<div/>\",{html:this.innerHTML})})),t.css(\"display\",\"flex\")}t.find(\'a[href*=\"admin.php?page=vaultpress\"]\').remove(),t.prependTo(e).removeClass(\"wrap vp-notice\")}));var r=jQuery(\".woocommerce-message\");r.length>0&&r.each((function(){var t=jQuery(this).addClass(\"dops-notice\").removeClass(\"updated wc-connect\");t.find(\".button-primary\").addClass(\"dops-notice__action\").removeClass(\"button-primary\").detach().appendTo(t),t.find(\"p\").not(\".submit\").wrapAll(\'<span class=\"dops-notice__text\"/>\');var n=t.find(\".dops-notice__text\");n.find(\"p\").replaceWith((function(){return jQuery(\"<div/>\",{html:this.innerHTML,class:\"dops-notice__moved_text\"})})),n.find(\"br\").remove(),t.find(\".button-secondary\").removeClass(\"button-secondary\").detach().appendTo(n),t.find(\".submit\").remove(),t.find(\".woocommerce-message-close\").removeClass(\"woocommerce-message-close notice-dismiss\").addClass(\"dops-notice__action\"),t.wrapInner(\'<span class=\"dops-notice__content\">\').prependTo(e).css(\"display\",\"flex\"),t.find(\".dops-notice__action\").not(\":first\").removeClass(\"dops-notice__action\").detach().appendTo(t.find(\".dops-notice__text\")),t.find(\".dops-notice__action:first\").detach().appendTo(t)}));var i=jQuery(\".notice\");i.length>0&&i.each((function(){jQuery(this).hide()})),e.length>0&&jQuery(\".dops-notice__dismiss\").click((function(){jQuery(this).parent().closest(\"div\").hide()}))}},{key:\"render\",value:function(){return o.a.createElement(\"div\",{id:\"jp-admin-notices\",ref:\"adminNotices\",\"aria-live\":\"polite\"})}}]),t}(o.a.Component),ug=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillReceiveProps\",value:function(e){var t=this.props.analytics.tracks.recordEvent;e.searchTerm!==this.props.searchTerm&&e.searchTerm.length>=3&&t(\"jetpack_wpa_search_term\",{term:e.searchTerm})}},{key:\"render\",value:function(){return null}}]),t}(s.Component);ug.propTypes={analytics:u.a.object,searchTerm:u.a.string};var pg=le((function(e){return{searchTerm:wo(e)}}))(ug),dg=function(e){function t(){return _a()(this,t),ka()(this,Ca()(t).apply(this,arguments))}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){this.props.isFetchingRewindStatus||this.props.isDevMode||this.props.fetchRewind()}},{key:\"render\",value:function(){return null}}]),t}(s.Component);ha()(dg,\"propTypes\",{isFetchingRewindStatus:u.a.bool,isDevMode:u.a.bool,sitePlan:u.a.object}),ha()(dg,\"defaultProps\",{isFetchingRewindStatus:!1,isDevMode:!1,sitePlan:{}});var hg=le((function(e){return{isFetchingRewindStatus:bo(e),isDevMode:Qs(e),sitePlan:qo(e)}}),(function(e){return{fetchRewind:function(){return e((function(e){return e({type:Wr}),Da.fetchRewindStatus().then((function(t){return e({type:Gr,status:t}),t})).catch((function(t){e({type:Yr,error:t})}))}))}}}))(dg),fg=\"/setup\",mg=[\"/\",\"/dashboard\",\"/my-plan\",\"/plans\"],gg=[\"/settings\",\"/security\",\"/performance\",\"/writing\",\"/sharing\",\"/discussion\",\"/traffic\",\"/privacy\"],vg=function(e){function t(){var e,n;_a()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ka()(this,(e=Ca()(t)).call.apply(e,[this].concat(i))),ha()(Os()(n),\"onBeforeUnload\",(function(){if(n.props.areThereUnsavedSettings){if(!confirm(Us(\"There are unsaved settings in this tab that will be lost if you leave it. Proceed?\")))return!1;n.props.clearUnsavedSettingsFlag()}})),ha()(Os()(n),\"routerWillLeave\",(function(){if(n.props.areThereUnsavedSettings){if(!confirm(Us(\"There are unsaved settings in this tab that will be lost if you leave it. Proceed?\")))return!1;window.setTimeout(n.props.clearUnsavedSettingsFlag,10)}})),ha()(Os()(n),\"initializeAnalytics\",(function(){var e=n.props.tracksUserData;e&&Uc.initialize(e.userid,e.username,{blog_id:e.blogid})})),ha()(Os()(n),\"renderMainContent\",(function(e){if(!n.props.userCanManageModules)return!!n.props.siteConnectionStatus&&o.a.createElement(\"div\",{\"aria-live\":\"assertive\"},o.a.createElement(Um,n.props));if(!1===n.props.siteConnectionStatus&&n.props.userCanConnectSite)return o.a.createElement(\"div\",{className:\"jp-jetpack-connect__container\",\"aria-live\":\"assertive\"});var t,r=o.a.createElement(Nl,{route:n.props.route,siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl}),i=o.a.createElement(wl,{route:n.props.route});switch(e){case\"/dashboard\":t=o.a.createElement(mf,{siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl,rewindStatus:n.props.rewindStatus});break;case\"/my-plan\":t=o.a.createElement(Rf,{siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl,rewindStatus:n.props.rewindStatus});break;case\"/plans\":t=o.a.createElement(gm,{siteRawUrl:n.props.siteRawUrl,siteAdminUrl:n.props.siteAdminUrl,rewindStatus:n.props.rewindStatus});break;case\"/plans-prompt\":i=null,t=o.a.createElement(bm,{siteAdminUrl:n.props.siteAdminUrl});break;case\"/settings\":case\"/security\":case\"/performance\":case\"/writing\":case\"/sharing\":case\"/discussion\":case\"/traffic\":case\"/privacy\":i=r,t=o.a.createElement(zd,{route:n.props.route,siteAdminUrl:n.props.siteAdminUrl,siteRawUrl:n.props.siteRawUrl,searchTerm:n.props.searchTerm,rewindStatus:n.props.rewindStatus,userCanManageModules:n.props.userCanManageModules});break;case\"/setup\":n.props.showSetupWizard?(i=null,t=o.a.createElement(Vd,null)):(n.setHistory(\"?page=jetpack#/dashboard\"),t=n.getAtAGlance());break;default:n.props.showSetupWizard?(n.setHistory(\"?page=jetpack#/setup\"),i=null,t=o.a.createElement(Vd,null)):(n.setHistory(\"?page=jetpack#/dashboard\"),t=n.getAtAGlance())}var a=n.props.showSetupWizard?{setup:1,dashboard:2,settings:3}:{setup:-1,dashboard:1,settings:2};return window.wpNavMenuClassChange(a),o.a.createElement(\"div\",{\"aria-live\":\"assertive\"},i,t)})),n}return Ma()(t,e),As()(t,[{key:\"UNSAFE_componentWillMount\",value:function(){this.props.setInitialState(),Da.setApiRoot(this.props.apiRoot),Da.setApiNonce(this.props.apiNonce),this.initializeAnalytics(),window.addEventListener(\"beforeunload\",this.onBeforeUnload),this.props.router.listenBefore(this.routerWillLeave),this.props.isSiteConnected&&Uc.tracks.recordEvent(\"jetpack_wpa_page_view\",{path:this.props.route.path,current_version:this.props.currentVersion})}},{key:\"componentDidMount\",value:function(){var e=jQuery(\".jp-jetpack-connect__container\"),t=jQuery(\".jp-connect-full__container\");e&&t.length>0&&t.prependTo(e)}},{key:\"shouldComponentUpdate\",value:function(e){return![\"/wpbody-content\",\"/wp-toolbar\"].includes(e.route.path)&&(e.siteConnectionStatus!==this.props.siteConnectionStatus||e.isLinked!==this.props.isLinked||e.route.path!==this.props.route.path||e.searchTerm!==this.props.searchTerm||e.rewindStatus!==this.props.rewindStatus)}},{key:\"componentDidUpdate\",value:function(e){if(e.route.path!==this.props.route.path&&this.props.isSiteConnected&&Uc.tracks.recordEvent(\"jetpack_wpa_page_view\",{path:this.props.route.path,current_version:this.props.currentVersion}),e.siteConnectionStatus!==this.props.siteConnectionStatus){var t=jQuery(\"#toplevel_page_jetpack\").find(\"ul.wp-submenu li\");t.find(\'a[href$=\"#/settings\"]\').hide(),t.find(\'a[href$=\"admin.php?page=stats\"]\').hide()}}},{key:\"getAtAGlance\",value:function(){return o.a.createElement(mf,{siteRawUrl:this.props.siteRawUrl,siteAdminUrl:this.props.siteAdminUrl,rewindStatus:this.props.rewindStatus})}},{key:\"setHistory\",value:function(e){Object(It.createHistory)().replace(window.location.pathname+e)}},{key:\"shouldShowAppsCard\",value:function(){return this.props.isSiteConnected&&mg.includes(this.props.route.path)}},{key:\"shouldShowSupportCard\",value:function(){return this.props.isSiteConnected&&mg.includes(this.props.route.path)}},{key:\"shouldShowRewindStatus\",value:function(){return this.props.isSiteConnected&&mg.includes(this.props.route.path)}},{key:\"shouldShowMasthead\",value:function(){return[fg].concat(mg,gg).includes(this.props.route.path)}},{key:\"shouldShowFooter\",value:function(){return[].concat(mg,gg).includes(this.props.route.path)}},{key:\"render\",value:function(){return o.a.createElement(\"div\",null,this.shouldShowMasthead()&&o.a.createElement(Kc,{route:this.props.route}),o.a.createElement(\"div\",{className:\"jp-lower\"},this.shouldShowRewindStatus()&&o.a.createElement(hg,null),o.a.createElement(lg,null),o.a.createElement(cg,null),this.renderMainContent(this.props.route.path),this.shouldShowSupportCard()&&o.a.createElement(Pm,{path:this.props.route.path}),this.shouldShowAppsCard()&&o.a.createElement(Dm,null)),this.shouldShowFooter()&&o.a.createElement(Nm,{siteAdminUrl:this.props.siteAdminUrl}),o.a.createElement(pg,{analytics:Uc}))}}]),t}(o.a.Component),bg=le((function(e){return{siteConnectionStatus:Hs(e),isLinked:Xs(e),siteRawUrl:vi(e),siteAdminUrl:bi(e),searchTerm:wo(e),apiRoot:Ui(e),apiNonce:Ri(e),tracksUserData:Li(e),areThereUnsavedSettings:Oo(e),userCanManageModules:Ei(e),userCanConnectSite:xi(e),isSiteConnected:qs(e),rewindStatus:yo(e),currentVersion:fi(e),showSetupWizard:Ki(e)}}),(function(e){return{setInitialState:function(){return e((function(e){e({type:Kt,initialState:window.Initial_State})}))},clearUnsavedSettingsFlag:function(){return e(Rl())}}}))(bt(vg));window.wpNavMenuClassChange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{setup:-1,dashboard:1,settings:2},t=window.location.hash;jQuery(\".current\").each((function(e,t){jQuery(t).removeClass(\"current\")}));var n=function(e){return jQuery(\"#toplevel_page_jetpack\").find(\"li\").filter((function(t){return t===e}))[0]};(t=t.split(\"?\")[0].replace(/#/,\"\"))===fg?n(e.setup).classList.add(\"current\"):mg.includes(t)?n(e.dashboard).classList.add(\"current\"):gg.includes(t)&&n(e.settings).classList.add(\"current\");var r=jQuery(\"body\");r.on(\"click\",\'a[href$=\"#/dashboard\"], a[href$=\"#/settings\"], .jp-dash-section-header__settings[href=\"#/security\"], .dops-button[href=\"#/my-plan\"], .dops-button[href=\"#/plans\"], .jp-dash-section-header__external-link[href=\"#/security\"]\',(function(){window.scrollTo(0,0)})),r.on(\"click\",\".jetpack-js-stop-propagation\",(function(e){e.stopPropagation()}))},Lt();var yg=window.Initial_State;yg.locale=JSON.parse(yg.locale),yg.locale=Object(Dt.get)(yg.locale,[\"locale_data\",\"jetpack\"],{}),void 0!==yg.locale[\"\"]?(yg.locale[\"\"].localeSlug=yg.localeSlug,Number.prototype.realToLocaleString=Number.prototype.toLocaleString,Number.prototype.toLocaleString=function(e,t){return e=e||yg.localeSlug,t=t||{},this.realToLocaleString(e,t)}):yg.locale={\"\":{localeSlug:yg.localeSlug}},Is.setLocale(yg.locale);var _g=Mt(It.createHashHistory)(),wg=Object(Pt.syncHistoryWithStore)(_g,kc);(function(){var e=document.getElementById(\"jp-plugin-container\");if(null===e)return;a.a.render(o.a.createElement(\"div\",null,o.a.createElement(h,{store:kc},o.a.createElement(lt,{history:wg},o.a.createElement(wt,{path:\"/\",name:Is.translate(\"At A Glance\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/setup\",name:Is.translate(\"Set up\"),component:bg}),o.a.createElement(wt,{path:\"/dashboard\",name:Is.translate(\"At A Glance\"),component:bg}),o.a.createElement(wt,{path:\"/my-plan\",name:Is.translate(\"My Plan\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/plans\",name:Is.translate(\"Plans\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/plans-prompt\",name:Is.translate(\"Plans\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/settings\",name:Is.translate(\"Settings\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/discussion\",name:Is.translate(\"Discussion\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/security\",name:Is.translate(\"Security\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/performance\",name:Is.translate(\"Performance\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/traffic\",name:Is.translate(\"Traffic\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/writing\",name:Is.translate(\"Writing\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/sharing\",name:Is.translate(\"Sharing\",{context:\"Navigation item.\"}),component:bg}),o.a.createElement(wt,{path:\"/wpbody-content\",component:bg}),o.a.createElement(wt,{path:\"/wp-toolbar\",component:bg}),o.a.createElement(wt,{path:\"/privacy\",component:bg}),o.a.createElement(wt,{path:\"*\",component:bg})))),e)})()}]));\";}}}}}}}}\";','no');
INSERT INTO `wpwx_options` VALUES (41502,'_vp_ai_ping_41501','s:894772:\"a:9:{s:7:\"version\";i:1;s:5:\"count\";i:1;s:12:\"editedtables\";a:0:{}s:7:\"plugins\";a:0:{}s:6:\"themes\";a:0:{}s:7:\"uploads\";a:0:{}s:2:\"db\";a:0:{}s:5:\"debug\";a:0:{}s:8:\"security\";a:1:{i:0;a:1:{s:13:\"suspicious_v2\";a:2:{s:69:\"/home/bonell8/public_html/wp-includes/js/codemirror/codemirror.min.js\";a:2:{s:4:\"hash\";s:32:\"f2d20913fc0766828268883b66af71ec\";s:7:\"verdict\";a:1:{i:161;a:2:{s:7:\"matches\";a:10:{i:24;s:36627:\"startOfLine:!0,prevToken:null}},token:function(a,b){var g=b.context;if(a.sol()&&(null==g.align&&(g.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return m(a,b),null;n=o=null;var h=(b.tokenize||j)(a,b);if(\"comment\"==h||\"meta\"==h)return h;if(null==g.align&&(g.align=!0),\";\"==n||\":\"==n||\",\"==n&&a.match(/^\\s*(?:\\/\\/.*)?$/,!1))for(;\"statement\"==b.context.type;)d(b);else if(\"{\"==n)c(b,a.column(),\"}\");else if(\"[\"==n)c(b,a.column(),\"]\");else if(\"(\"==n)c(b,a.column(),\")\");else if(\"}\"==n){for(;\"statement\"==g.type;)g=d(b);for(\"}\"==g.type&&(g=d(b));\"statement\"==g.type;)g=d(b)}else n==g.type?d(b):A&&((\"}\"==g.type||\"top\"==g.type)&&\";\"!=n||\"statement\"==g.type&&\"newstatement\"==n)&&c(b,a.column(),\"statement\",a.current());if(\"variable\"==h&&(\"def\"==b.prevToken||i.typeFirstDefinitions&&e(a,b,a.start)&&f(b.context)&&a.match(/^\\s*\\(/,!1))&&(h=\"def\"),y.token){var k=y.token(a,b,h);void 0!==k&&(h=k)}return\"def\"==h&&i.styleDefs===!1&&(h=\"variable\"),b.startOfLine=!1,b.prevToken=o?\"def\":h||n,m(a,b),h},indent:function(b,c){if(b.tokenize!=j&&null!=b.tokenize||b.typeAtEndOfLine)return a.Pass;var d=b.context,e=c&&c.charAt(0);if(\"statement\"==d.type&&\"}\"==e&&(d=d.prev),i.dontIndentStatements)for(;\"statement\"==d.type&&i.dontIndentStatements.test(d.info);)d=d.prev;if(y.indent){var f=y.indent(b,d,c);if(\"number\"==typeof f)return f}var g=e==d.type,h=d.prev&&\"switch\"==d.prev.info;if(i.allmanIndentation&&/[{(]/.test(e)){for(;\"top\"!=d.type&&\"}\"!=d.type;)d=d.prev;return d.indented}return\"statement\"==d.type?d.indented+(\"{\"==e?0:q):!d.align||r&&\")\"==d.type?\")\"!=d.type||g?d.indented+(g?0:p)+(g||!h||/^(?:case|default)\\b/.test(c)?0:p):d.indented+q:d.column+(g?0:1)},electricInput:B?/^\\s*(?:case .*?:|default:|\\{\\}?|\\})$/:/^\\s*[{}]$/,blockCommentStart:\"/*\",blockCommentEnd:\"*/\",lineComment:\"//\",fold:\"brace\"}});var t=\"auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile\",u=\"int long char short double float unsigned signed void size_t ptrdiff_t\";p([\"text/x-csrc\",\"text/x-c\",\"text/x-chdr\"],{name:\"clike\",keywords:g(t),types:g(u+\" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t\"),blockKeywords:g(\"case do else for if switch while struct\"),defKeywords:g(\"struct\"),typeFirstDefinitions:!0,atoms:g(\"null true false\"),hooks:{\"#\":i,\"*\":j},modeProps:{fold:[\"brace\",\"include\"]}}),p([\"text/x-c++src\",\"text/x-c++hdr\"],{name:\"clike\",keywords:g(t+\" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override\"),types:g(u+\" bool wchar_t\"),blockKeywords:g(\"catch class do else finally for if struct switch try while\"),defKeywords:g(\"class namespace struct enum union\"),typeFirstDefinitions:!0,atoms:g(\"true false null\"),dontIndentStatements:/^template$/,isIdentifierChar:/[\\w\\$_~\\xa1-\\uffff]/,hooks:{\"#\":i,\"*\":j,u:l,U:l,L:l,R:l,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(a,b,c){if(\"variable\"==c&&\"(\"==a.peek()&&(\";\"==b.prevToken||null==b.prevToken||\"}\"==b.prevToken)&&m(a.current()))return\"def\"}},namespaceSeparator:\"::\",modeProps:{fold:[\"brace\",\"include\"]}}),p(\"text/x-java\",{name:\"clike\",keywords:g(\"abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface\"),types:g(\"byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void\"),blockKeywords:g(\"catch class do else finally for if switch try while\"),defKeywords:g(\"class interface package enum @interface\"),typeFirstDefinitions:!0,atoms:g(\"true false null\"),number:/^(?:0x[a-f\\d_]+|0b[01_]+|(?:[\\d_]+\\.?\\d*|\\.\\d+)(?:e[-+]?[\\d_]+)?)(u|ll?|l|f)?/i,hooks:{\"@\":function(a){return!a.match(\"interface\",!1)&&(a.eatWhile(/[\\w\\$_]/),\"meta\")}},modeProps:{fold:[\"brace\",\"import\"]}}),p(\"text/x-csharp\",{name:\"clike\",keywords:g(\"abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield\"),types:g(\"Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong\"),blockKeywords:g(\"catch class do else finally for foreach if struct switch try while\"),defKeywords:g(\"class interface namespace struct var\"),typeFirstDefinitions:!0,atoms:g(\"true false null\"),hooks:{\"@\":function(a,b){return a.eat(\'\"\')?(b.tokenize=n,n(a,b)):(a.eatWhile(/[\\w\\$_]/),\"meta\")}}}),p(\"text/x-scala\",{name:\"clike\",keywords:g(\"abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble\"),types:g(\"AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void\"),multiLineStrings:!0,blockKeywords:g(\"catch class enum do else finally for forSome if match switch try while\"),defKeywords:g(\"class enum def object package trait type val var\"),atoms:g(\"true false null\"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\\-*&%=<>!?|\\/#:@]/,hooks:{\"@\":function(a){return a.eatWhile(/[\\w\\$_]/),\"meta\"},\'\"\':function(a,b){return!!a.match(\'\"\"\')&&(b.tokenize=q,b.tokenize(a,b))},\"\'\":function(a){return a.eatWhile(/[\\w\\$_\\xa1-\\uffff]/),\"atom\"},\"=\":function(a,c){var d=c.context;return!(\"}\"!=d.type||!d.align||!a.eat(\">\"))&&(c.context=new b(d.indented,d.column,d.type,d.info,null,d.prev),\"operator\")}},modeProps:{closeBrackets:{triples:\'\"\'}}}),p(\"text/x-kotlin\",{name:\"clike\",keywords:g(\"package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend\"),types:g(\"Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void\"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\\d_]+|0b[01_]+|(?:[\\d_]+\\.?\\d*|\\.\\d+)(?:e[-+]?[\\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:g(\"catch class do else finally for if where try while enum\"),defKeywords:g(\"class val var object package interface fun\"),atoms:g(\"true false null this\"),hooks:{\'\"\':function(a,b){return b.tokenize=r(a.match(\'\"\"\')),b.tokenize(a,b)}},modeProps:{closeBrackets:{triples:\'\"\'}}}),p([\"x-shader/x-vertex\",\"x-shader/x-fragment\"],{name:\"clike\",keywords:g(\"sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout\"),types:g(\"float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4\"),blockKeywords:g(\"for while do if else struct\"),builtin:g(\"radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4\"),atoms:g(\"true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers\"),indentSwitch:!1,hooks:{\"#\":i},modeProps:{fold:[\"brace\",\"include\"]}}),p(\"text/x-nesc\",{name:\"clike\",keywords:g(t+\"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends\"),types:g(u),blockKeywords:g(\"case do else for if switch while struct\"),atoms:g(\"null true false\"),hooks:{\"#\":i},modeProps:{fold:[\"brace\",\"include\"]}}),p(\"text/x-objectivec\",{name:\"clike\",keywords:g(t+\"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly\"),types:g(u),atoms:g(\"YES NO NULL NILL ON OFF true false\"),hooks:{\"@\":function(a){return a.eatWhile(/[\\w\\$]/),\"keyword\"},\"#\":i,indent:function(a,b,c){if(\"statement\"==b.type&&/^@\\w/.test(c))return b.indented}},modeProps:{fold:\"brace\"}}),p(\"text/x-squirrel\",{name:\"clike\",keywords:g(\"base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static\"),types:g(u),blockKeywords:g(\"case catch class else for foreach if switch try while\"),defKeywords:g(\"function local class\"),typeFirstDefinitions:!0,atoms:g(\"true false null\"),hooks:{\"#\":i},modeProps:{fold:[\"brace\",\"include\"]}});var v=null;p(\"text/x-ceylon\",{name:\"clike\",keywords:g(\"abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while\"),types:function(a){var b=a.charAt(0);return b===b.toUpperCase()&&b!==b.toLowerCase()},blockKeywords:g(\"case catch class dynamic else finally for function if interface module new object switch try while\"),defKeywords:g(\"class dynamic function interface module object package value\"),builtin:g(\"abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable\"),isPunctuationChar:/[\\[\\]{}\\(\\),;\\:\\.`]/,isOperatorChar:/[+\\-*&%=<>!?|^~:\\/]/,numberStart:/[\\d#$]/,number:/^(?:#[\\da-fA-F_]+|\\$[01_]+|[\\d_]+[kMGTPmunpf]?|[\\d_]+\\.[\\d_]+(?:[eE][-+]?\\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:g(\"true false null larger smaller equal empty finished\"),indentSwitch:!1,styleDefs:!1,hooks:{\"@\":function(a){return a.eatWhile(/[\\w\\$_]/),\"meta\"},\'\"\':function(a,b){return b.tokenize=s(a.match(\'\"\"\')?\"triple\":\"single\"),b.tokenize(a,b)},\"`\":function(a,b){return!(!v||!a.match(\"`\"))&&(b.tokenize=v,v=null,b.tokenize(a,b))},\"\'\":function(a){return a.eatWhile(/[\\w\\$_\\xa1-\\uffff]/),\"atom\"},token:function(a,b,c){if((\"variable\"==c||\"type\"==c)&&\".\"==b.prevToken)return\"variable-2\"}},modeProps:{fold:[\"brace\",\"import\"],closeBrackets:{triples:\'\"\'}}})})},{\"../../lib/codemirror\":59}],61:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c].toLowerCase()]=!0;return b}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&\"/\"==c){b.tokenize=null;break}d=\"*\"==c}return[\"comment\",\"comment\"]}a.defineMode(\"css\",function(b,c){function d(a,b){return o=b,a}function e(a,b){var c=a.next();if(r[c]){var e=r[c](a,b);if(e!==!1)return e}return\"@\"==c?(a.eatWhile(/[\\w\\\\\\-]/),d(\"def\",a.current())):\"=\"==c||(\"~\"==c||\"|\"==c)&&a.eat(\"=\")?d(null,\"compare\"):\'\"\'==c||\"\'\"==c?(b.tokenize=f(c),b.tokenize(a,b)):\"#\"==c?(a.eatWhile(/[\\w\\\\\\-]/),d(\"atom\",\"hash\")):\"!\"==c?(a.match(/^\\s*\\w*/),d(\"keyword\",\"important\")):/\\d/.test(c)||\".\"==c&&a.eat(/\\d/)?(a.eatWhile(/[\\w.%]/),d(\"number\",\"unit\")):\"-\"!==c?/[,+>*\\/]/.test(c)?d(null,\"select-op\"):\".\"==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?d(\"qualifier\",\"qualifier\"):/[:;{}\\[\\]\\(\\)]/.test(c)?d(null,c):\"u\"==c&&a.match(/rl(-prefix)?\\(/)||\"d\"==c&&a.match(\"omain(\")||\"r\"==c&&a.match(\"egexp(\")?(a.backUp(1),b.tokenize=g,d(\"property\",\"word\")):/[\\w\\\\\\-]/.test(c)?(a.eatWhile(/[\\w\\\\\\-]/),d(\"property\",\"word\")):d(null,null):/[\\d.]/.test(a.peek())?(a.eatWhile(/[\\w.%]/),d(\"number\",\"unit\")):a.match(/^-[\\w\\\\\\-]+/)?(a.eatWhile(/[\\w\\\\\\-]/),a.match(/^\\s*:/,!1)?d(\"variable-2\",\"variable-definition\"):d(\"variable-2\",\"variable\")):a.match(/^\\w+-/)?d(\"meta\",\"meta\"):void 0}function f(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){\")\"==a&&b.backUp(1);break}f=!f&&\"\\\\\"==e}return(e==a||!f&&\")\"!=a)&&(c.tokenize=null),d(\"string\",\"string\")}}function g(a,b){return a.next(),a.match(/\\s*[\\\"\\\')]/,!1)?b.tokenize=null:b.tokenize=f(\")\"),d(null,\"(\")}function h(a,b,c){this.type=a,this.indent=b,this.prev=c}function i(a,b,c,d){return a.context=new h(c,b.indentation()+(d===!1?0:q),a.context),c}function j(a){return a.context.prev&&(a.context=a.context.prev),a.context.type}function k(a,b,c){return F[c.context.type](a,b,c)}function l(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return k(a,b,c)}function m(a){var b=a.current().toLowerCase();p=B.hasOwnProperty(b)?\"atom\":A.hasOwnProperty(b)?\"keyword\":\"variable\"}var n=c.inline;c.propertyKeywords||(c=a.resolveMode(\"text/css\"));var o,p,q=b.indentUnit,r=c.tokenHooks,s=c.documentTypes||{},t=c.mediaTypes||{},u=c.mediaFeatures||{},v=c.mediaValueKeywords||{},w=c.propertyKeywords||{},x=c.nonStandardPropertyKeywords||{},y=c.fontProperties||{},z=c.counterDescriptors||{},A=c.colorKeywords||{},B=c.valueKeywords||{},C=c.allowNested,D=c.lineComment,E=c.supportsAtComponent===!0,F={};return F.top=function(a,b,c){if(\"{\"==a)return i(c,b,\"block\");if(\"}\"==a&&c.context.prev)return j(c);if(E&&/@component/.test(a))return i(c,b,\"atComponentBlock\");if(/^@(-moz-)?document$/.test(a))return i(c,b,\"documentTypes\");if(/^@(media|supports|(-moz-)?document|import)$/.test(a))return i(c,b,\"atBlock\");if(/^@(font-face|counter-style)/.test(a))return c.stateArg=a,\"restricted_atBlock_before\";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return\"keyframes\";if(a&&\"@\"==a.charAt(0))return i(c,b,\"at\");if(\"hash\"==a)p=\"builtin\";else if(\"word\"==a)p=\"tag\";else{if(\"variable-definition\"==a)return\"maybeprop\";if(\"interpolation\"==a)return i(c,b,\"interpolation\");if(\":\"==a)return\"pseudo\";if(C&&\"(\"==a)return i(c,b,\"parens\")}return c.context.type},F.block=function(a,b,c){if(\"word\"==a){var d=b.current().toLowerCase();return w.hasOwnProperty(d)?(p=\"property\",\"maybeprop\"):x.hasOwnProperty(d)?(p=\"string-2\",\"maybeprop\"):C?(p=b.match(/^\\s*:(?:\\s|$)/,!1)?\"property\":\"tag\",\"block\"):(p+=\" error\",\"maybeprop\")}return\"meta\"==a?\"block\":C||\"hash\"!=a&&\"qualifier\"!=a?F.top(a,b,c):(p=\"error\",\"block\")},F.maybeprop=function(a,b,c){return\":\"==a?i(c,b,\"prop\"):k(a,b,c)},F.prop=function(a,b,c){if(\";\"==a)return j(c);if(\"{\"==a&&C)return i(c,b,\"propBlock\");if(\"}\"==a||\"{\"==a)return l(a,b,c);if(\"(\"==a)return i(c,b,\"parens\");if(\"hash\"!=a||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(b.current())){if(\"word\"==a)m(b);else if(\"interpolation\"==a)return i(c,b,\"interpolation\")}else p+=\" error\";return\"prop\"},F.propBlock=function(a,b,c){return\"}\"==a?j(c):\"word\"==a?(p=\"property\",\"maybeprop\"):c.context.type},F.parens=function(a,b,c){return\"{\"==a||\"}\"==a?l(a,b,c):\")\"==a?j(c):\"(\"==a?i(c,b,\"parens\"):\"interpolation\"==a?i(c,b,\"interpolation\"):(\"word\"==a&&m(b),\"parens\")},F.pseudo=function(a,b,c){return\"meta\"==a?\"pseudo\":\"word\"==a?(p=\"variable-3\",c.context.type):k(a,b,c)},F.documentTypes=function(a,b,c){return\"word\"==a&&s.hasOwnProperty(b.current())?(p=\"tag\",c.context.type):F.atBlock(a,b,c)},F.atBlock=function(a,b,c){if(\"(\"==a)return i(c,b,\"atBlock_parens\");if(\"}\"==a||\";\"==a)return l(a,b,c);if(\"{\"==a)return j(c)&&i(c,b,C?\"block\":\"top\");if(\"interpolation\"==a)return i(c,b,\"interpolation\");if(\"word\"==a){var d=b.current().toLowerCase();p=\"only\"==d||\"not\"==d||\"and\"==d||\"or\"==d?\"keyword\":t.hasOwnProperty(d)?\"attribute\":u.hasOwnProperty(d)?\"property\":v.hasOwnProperty(d)?\"keyword\":w.hasOwnProperty(d)?\"property\":x.hasOwnProperty(d)?\"string-2\":B.hasOwnProperty(d)?\"atom\":A.hasOwnProperty(d)?\"keyword\":\"error\"}return c.context.type},F.atComponentBlock=function(a,b,c){return\"}\"==a?l(a,b,c):\"{\"==a?j(c)&&i(c,b,C?\"block\":\"top\",!1):(\"word\"==a&&(p=\"error\"),c.context.type)},F.atBlock_parens=function(a,b,c){return\")\"==a?j(c):\"{\"==a||\"}\"==a?l(a,b,c,2):F.atBlock(a,b,c)},F.restricted_atBlock_before=function(a,b,c){return\"{\"==a?i(c,b,\"restricted_atBlock\"):\"word\"==a&&\"@counter-style\"==c.stateArg?(p=\"variable\",\"restricted_atBlock_before\"):k(a,b,c)},F.restricted_atBlock=function(a,b,c){return\"}\"==a?(c.stateArg=null,j(c)):\"word\"==a?(p=\"@font-face\"==c.stateArg&&!y.hasOwnProperty(b.current().toLowerCase())||\"@counter-style\"==c.stateArg&&!z.hasOwnProperty(b.current().toLowerCase())?\"error\":\"property\",\"maybeprop\"):\"restricted_atBlock\"},F.keyframes=function(a,b,c){return\"word\"==a?(p=\"variable\",\"keyframes\"):\"{\"==a?i(c,b,\"top\"):k(a,b,c)},F.at=function(a,b,c){return\";\"==a?j(c):\"{\"==a||\"}\"==a?l(a,b,c):(\"word\"==a?p=\"tag\":\"hash\"==a&&(p=\"builtin\"),\"at\")},F.interpolation=function(a,b,c){return\"}\"==a?j(c):\"{\"==a||\";\"==a?l(a,b,c):(\"word\"==a?p=\"variable\":\"variable\"!=a&&\"(\"!=a&&\")\"!=a&&(p=\"error\"),\"interpolation\")},{startState:function(a){return{tokenize:null,state:n?\"block\":\"top\",stateArg:null,context:new h(n?\"block\":\"top\",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||e)(a,b);return c&&\"object\"==typeof c&&(o=c[1],c=c[0]),p=c,\"comment\"!=o&&(b.state=F[b.state](o,a,b)),p},indent:function(a,b){var c=a.context,d=b&&b.charAt(0),e=c.indent;return\"prop\"!=c.type||\"}\"!=d&&\")\"!=d||(c=c.prev),c.prev&&(\"}\"!=d||\"block\"!=c.type&&\"top\"!=c.type&&\"interpolation\"!=c.type&&\"restricted_atBlock\"!=c.type?(\")\"!=d||\"parens\"!=c.type&&\"atBlock_parens\"!=c.type)&&(\"{\"!=d||\"at\"!=c.type&&\"atBlock\"!=c.type)||(e=Math.max(0,c.indent-q)):(c=c.prev,e=c.indent)),e},electricChars:\"}\",blockCommentStart:\"/*\",blockCommentEnd:\"*/\",lineComment:D,fold:\"brace\"}});var d=[\"domain\",\"regexp\",\"url\",\"url-prefix\"],e=b(d),f=[\"all\",\"aural\",\"braille\",\"handheld\",\"print\",\"projection\",\"screen\",\"tty\",\"tv\",\"embossed\"],g=b(f),h=[\"width\",\"min-width\",\"max-width\",\"height\",\"min-height\",\"max-height\",\"device-width\",\"min-device-width\",\"max-device-width\",\"device-height\",\"min-device-height\",\"max-device-height\",\"aspect-ratio\",\"min-aspect-ratio\",\"max-aspect-ratio\",\"device-aspect-ratio\",\"min-device-aspect-ratio\",\"max-device-aspect-ratio\",\"color\",\"min-color\",\"max-color\",\"color-index\",\"min-color-index\",\"max-color-index\",\"monochrome\",\"min-monochrome\",\"max-monochrome\",\"resolution\",\"min-resolution\",\"max-resolution\",\"scan\",\"grid\",\"orientation\",\"device-pixel-ratio\",\"min-device-pixel-ratio\",\"max-device-pixel-ratio\",\"pointer\",\"any-pointer\",\"hover\",\"any-hover\"],i=b(h),j=[\"landscape\",\"portrait\",\"none\",\"coarse\",\"fine\",\"on-demand\",\"hover\",\"interlace\",\"progressive\"],k=b(j),l=[\"align-content\",\"align-items\",\"align-self\",\"alignment-adjust\",\"alignment-baseline\",\"anchor-point\",\"animation\",\"animation-delay\",\"animation-direction\",\"animation-duration\",\"animation-fill-mode\",\"animation-iteration-count\",\"animation-name\",\"animation-play-state\",\"animation-timing-function\",\"appearance\",\"azimuth\",\"backface-visibility\",\"background\",\"background-attachment\",\"background-blend-mode\",\"background-clip\",\"background-color\",\"background-image\",\"background-origin\",\"background-position\",\"background-repeat\",\"background-size\",\"baseline-shift\",\"binding\",\"bleed\",\"bookmark-label\",\"bookmark-level\",\"bookmark-state\",\"bookmark-target\",\"border\",\"border-bottom\",\"border-bottom-color\",\"border-bottom-left-radius\",\"border-bottom-right-radius\",\"border-bottom-style\",\"border-bottom-width\",\"border-collapse\",\"border-color\",\"border-image\",\"border-image-outset\",\"border-image-repeat\",\"border-image-slice\",\"border-image-source\",\"border-image-width\",\"border-left\",\"border-left-color\",\"border-left-style\",\"border-left-width\",\"border-radius\",\"border-right\",\"border-right-color\",\"border-right-style\",\"border-right-width\",\"border-spacing\",\"border-style\",\"border-top\",\"border-top-color\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-top-style\",\"border-top-width\",\"border-width\",\"bottom\",\"box-decoration-break\",\"box-shadow\",\"box-sizing\",\"break-after\",\"break-before\",\"break-inside\",\"caption-side\",\"caret-color\",\"clear\",\"clip\",\"color\",\"color-profile\",\"column-count\",\"column-fill\",\"column-gap\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-width\",\"columns\",\"content\",\"counter-increment\",\"counter-reset\",\"crop\",\"cue\",\"cue-after\",\"cue-before\",\"cursor\",\"direction\",\"display\",\"dominant-baseline\",\"drop-initial-after-adjust\",\"drop-initial-after-align\",\"drop-initial-before-adjust\",\"drop-initial-before-align\",\"drop-initial-size\",\"drop-initial-value\",\"elevation\",\"empty-cells\",\"fit\",\"fit-position\",\"flex\",\"flex-basis\",\"flex-direction\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-wrap\",\"float\",\"float-offset\",\"flow-from\",\"flow-into\",\"font\",\"font-feature-settings\",\"font-family\",\"font-kerning\",\"font-language-override\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-synthesis\",\"font-variant\",\"font-variant-alternates\",\"font-variant-caps\",\"font-variant-east-asian\",\"font-variant-ligatures\",\"font-variant-numeric\",\"font-variant-position\",\"font-weight\",\"grid\",\"grid-area\",\"grid-auto-columns\",\"grid-auto-flow\",\"grid-auto-rows\",\"grid-column\",\"grid-column-end\",\"grid-column-gap\",\"grid-column-start\",\"grid-gap\",\"grid-row\",\"grid-row-end\",\"grid-row-gap\",\"grid-row-start\",\"grid-template\",\"grid-template-areas\",\"grid-template-columns\",\"grid-template-rows\",\"hanging-punctuation\",\"height\",\"hyphens\",\"icon\",\"image-orientation\",\"image-rendering\",\"image-resolution\",\"inline-box-align\",\"justify-content\",\"justify-items\",\"justify-self\",\"left\",\"letter-spacing\",\"line-break\",\"line-height\",\"line-stacking\",\"line-stacking-ruby\",\"line-stacking-shift\",\"line-stacking-strategy\",\"list-style\",\"list-style-image\",\"list-style-position\",\"list-style-type\",\"margin\",\"margin-bottom\",\"margin-left\",\"margin-right\",\"margin-top\",\"marks\",\"marquee-direction\",\"marquee-loop\",\"marquee-play-count\",\"marquee-speed\",\"marquee-style\",\"max-height\",\"max-width\",\"min-height\",\"min-width\",\"move-to\",\"nav-down\",\"nav-index\",\"nav-left\",\"nav-right\",\"nav-up\",\"object-fit\",\"object-position\",\"opacity\",\"order\",\"orphans\",\"outline\",\"outline-color\",\"outline-offset\",\"outline-style\",\"outline-width\",\"overflow\",\"overflow-style\",\"overflow-wrap\",\"overflow-x\",\"overflow-y\",\"padding\",\"padding-bottom\",\"padding-left\",\"padding-right\",\"padding-top\",\"page\",\"page-break-after\",\"page-break-before\",\"page-break-inside\",\"page-policy\",\"pause\",\"pause-after\",\"pause-before\",\"perspective\",\"perspective-origin\",\"pitch\",\"pitch-range\",\"place-content\",\"place-items\",\"place-self\",\"play-during\",\"position\",\"presentation-level\",\"punctuation-trim\",\"quotes\",\"region-break-after\",\"region-break-before\",\"region-break-inside\",\"region-fragment\",\"rendering-intent\",\"resize\",\"rest\",\"rest-after\",\"rest-before\",\"richness\",\"right\",\"rotation\",\"rotation-point\",\"ruby-align\",\"ruby-overhang\",\"ruby-position\",\"ruby-span\",\"shape-image-threshold\",\"shape-inside\",\"shape-margin\",\"shape-outside\",\"size\",\"speak\",\"speak-as\",\"speak-header\",\"speak-numeral\",\"speak-punctuation\",\"speech-rate\",\"stress\",\"string-set\",\"tab-size\",\"table-layout\",\"target\",\"target-name\",\"target-new\",\"target-position\",\"text-align\",\"text-align-last\",\"text-decoration\",\"text-decoration-color\",\"text-decoration-line\",\"text-decoration-skip\",\"text-decoration-style\",\"text-emphasis\",\"text-emphasis-color\",\"text-emphasis-position\",\"text-emphasis-style\",\"text-height\",\"text-indent\",\"text-justify\",\"text-outline\",\"text-overflow\",\"text-shadow\",\"text-size-adjust\",\"text-space-collapse\",\"text-transform\",\"text-underline-position\",\"text-wrap\",\"top\",\"transform\",\"transform-origin\",\"transform-style\",\"transition\",\"transition-delay\",\"transition-duration\",\"transition-property\",\"transition-timing-function\",\"unicode-bidi\",\"user-select\",\"vertical-align\",\"visibility\",\"voice-balance\",\"voice-duration\",\"voice-family\",\"voice-pitch\",\"voice-range\",\"voice-rate\",\"voice-stress\",\"voice-volume\",\"volume\",\"white-space\",\"widows\",\"width\",\"will-change\",\"word-break\",\"word-spacing\",\"word-wrap\",\"z-index\",\"clip-path\",\"clip-rule\",\"mask\",\"enable-background\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"stop-color\",\"stop-opacity\",\"pointer-events\",\"color-interpolation\",\"color-interpolation-filters\",\"color-rendering\",\"fill\",\"fill-opacity\",\"fill-rule\",\"image-rendering\",\"marker\",\"marker-end\",\"marker-mid\",\"marker-start\",\"shape-rendering\",\"stroke\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke-width\",\"text-rendering\",\"baseline-shift\",\"dominant-baseline\",\"glyph-orientation-horizontal\",\"glyph-orientation-vertical\",\"text-anchor\",\"writing-mode\"],m=b(l),n=[\"scrollbar-arrow-color\",\"scrollbar-base-color\",\"scrollbar-dark-shadow-color\",\"scrollbar-face-color\",\"scrollbar-highlight-color\",\"scrollbar-shadow-color\",\"scrollbar-3d-light-color\",\"scrollbar-track-color\",\"shape-inside\",\"searchfield-cancel-button\",\"searchfield-decoration\",\"searchfield-results-button\",\"searchfield-results-decoration\",\"zoom\"],o=b(n),p=[\"font-family\",\"src\",\"unicode-range\",\"font-variant\",\"font-feature-settings\",\"font-stretch\",\"font-weight\",\"font-style\"],q=b(p),r=[\"additive-symbols\",\"fallback\",\"negative\",\"pad\",\"prefix\",\"range\",\"speak-as\",\"suffix\",\"symbols\",\"system\"],s=b(r),t=[\"aliceblue\",\"antiquewhite\",\"aqua\",\"aquamarine\",\"azure\",\"beige\",\"bisque\",\"black\",\"blanchedalmond\",\"blue\",\"blueviolet\",\"brown\",\"burlywood\",\"cadetblue\",\"chartreuse\",\"chocolate\",\"coral\",\"cornflowerblue\",\"cornsilk\",\"crimson\",\"cyan\",\"darkblue\",\"darkcyan\",\"darkgoldenrod\",\"darkgray\",\"darkgreen\",\"darkkhaki\",\"darkmagenta\",\"darkolivegreen\",\"darkorange\",\"darkorchid\",\"darkred\",\"darksalmon\",\"darkseagreen\",\"darkslateblue\",\"darkslategray\",\"darkturquoise\",\"darkviolet\",\"deeppink\",\"deepskyblue\",\"dimgray\",\"dodgerblue\",\"firebrick\",\"floralwhite\",\"forestgreen\",\"fuchsia\",\"gainsboro\",\"ghostwhite\",\"gold\",\"goldenrod\",\"gray\",\"grey\",\"green\",\"greenyellow\",\"honeydew\",\"hotpink\",\"indianred\",\"indigo\",\"ivory\",\"khaki\",\"lavender\",\"lavenderblush\",\"lawngreen\",\"lemonchiffon\",\"lightblue\",\"lightcoral\",\"lightcyan\",\"lightgoldenrodyellow\",\"lightgray\",\"lightgreen\",\"lightpink\",\"lightsalmon\",\"lightseagreen\",\"lightskyblue\",\"lightslategray\",\"lightsteelblue\",\"lightyellow\",\"lime\",\"limegreen\",\"linen\",\"magenta\",\"maroon\",\"mediumaquamarine\",\"mediumblue\",\"mediumorchid\",\"mediumpurple\",\"mediumseagreen\",\"mediumslateblue\",\"mediumspringgreen\",\"mediumturquoise\",\"mediumvioletred\",\"midnightblue\",\"mintcream\",\"mistyrose\",\"moccasin\",\"navajowhite\",\"navy\",\"oldlace\",\"olive\",\"olivedrab\",\"orange\",\"orangered\",\"orchid\",\"palegoldenrod\",\"palegreen\",\"paleturquoise\",\"palevioletred\",\"papayawhip\",\"peachpuff\",\"peru\",\"pink\",\"plum\",\"powderblue\",\"purple\",\"rebeccapurple\",\"red\",\"rosybrown\",\"royalblue\",\"saddlebrown\",\"salmon\",\"sandybrown\",\"seagreen\",\"seashell\",\"sienna\",\"silver\",\"skyblue\",\"slateblue\",\"slategray\",\"snow\",\"springgreen\",\"steelblue\",\"tan\",\"teal\",\"thistle\",\"tomato\",\"turquoise\",\"violet\",\"wheat\",\"white\",\"whitesmoke\",\"yellow\",\"yellowgreen\"],u=b(t),v=[\"above\",\"absolute\",\"activeborder\",\"additive\",\"activecaption\",\"afar\",\"after-white-space\",\"ahead\",\"alias\",\"all\",\"all-scroll\",\"alphabetic\",\"alternate\",\"always\",\"amharic\",\"amharic-abegede\",\"antialiased\",\"appworkspace\",\"arabic-indic\",\"armenian\",\"asterisks\",\"attr\",\"auto\",\"auto-flow\",\"avoid\",\"avoid-column\",\"avoid-page\",\"avoid-region\",\"background\",\"backwards\",\"baseline\",\"below\",\"bidi-override\",\"binary\",\"bengali\",\"blink\",\"block\",\"block-axis\",\"bold\",\"bolder\",\"border\",\"border-box\",\"both\",\"bottom\",\"break\",\"break-all\",\"break-word\",\"bullets\",\"button\",\"button-bevel\",\"buttonface\",\"buttonhighlight\",\"buttonshadow\",\"buttontext\",\"calc\",\"cambodian\",\"capitalize\",\"caps-lock-indicator\",\"caption\",\"captiontext\",\"caret\",\"cell\",\"center\",\"checkbox\",\"circle\",\"cjk-decimal\",\"cjk-earthly-branch\",\"cjk-heavenly-stem\",\"cjk-ideographic\",\"clear\",\"clip\",\"close-quote\",\"col-resize\",\"collapse\",\"color\",\"color-burn\",\"color-dodge\",\"column\",\"column-reverse\",\"compact\",\"condensed\",\"contain\",\"content\",\"contents\",\"content-box\",\"context-menu\",\"continuous\",\"copy\",\"counter\",\"counters\",\"cover\",\"crop\",\"cross\",\"crosshair\",\"currentcolor\",\"cursive\",\"cyclic\",\"darken\",\"dashed\",\"decimal\",\"decimal-leading-zero\",\"default\",\"default-button\",\"dense\",\"destination-atop\",\"destination-in\",\"destination-out\",\"destination-over\",\"devanagari\",\"difference\",\"disc\",\"discard\",\"disclosure-closed\",\"disclosure-open\",\"document\",\"dot-dash\",\"dot-dot-dash\",\"dotted\",\"double\",\"down\",\"e-resize\",\"ease\",\"ease-in\",\"ease-in-out\",\"ease-out\",\"element\",\"ellipse\",\"ellipsis\",\"embed\",\"end\",\"ethiopic\",\"ethiopic-abegede\",\"ethiopic-abegede-am-et\",\"ethiopic-abegede-gez\",\"ethiopic-abegede-ti-er\",\"ethiopic-abegede-ti-et\",\"ethiopic-halehame-aa-er\",\"ethiopic-halehame-aa-et\",\"ethiopic-halehame-am-et\",\"ethiopic-halehame-gez\",\"ethiopic-halehame-om-et\",\"ethiopic-halehame-sid-et\",\"ethiopic-halehame-so-et\",\"ethiopic-halehame-ti-er\",\"ethiopic-halehame-ti-et\",\"ethiopic-halehame-tig\",\"ethiopic-numeric\",\"ew-resize\",\"exclusion\",\"expanded\",\"extends\",\"extra-condensed\",\"extra-expanded\",\"fantasy\",\"fast\",\"fill\",\"fixed\",\"flat\",\"flex\",\"flex-end\",\"flex-start\",\"footnotes\",\"forwards\",\"from\",\"geometricPrecision\",\"georgian\",\"graytext\",\"grid\",\"groove\",\"gujarati\",\"gurmukhi\",\"hand\",\"hangul\",\"hangul-consonant\",\"hard-light\",\"hebrew\",\"help\",\"hidden\",\"hide\",\"higher\",\"highlight\",\"highlighttext\",\"hiragana\",\"hiragana-iroha\",\"horizontal\",\"hsl\",\"hsla\",\"hue\",\"icon\",\"ignore\",\"inactiveborder\",\"inactivecaption\",\"inactivecaptiontext\",\"infinite\",\"infobackground\",\"infotext\",\"inherit\",\"initial\",\"inline\",\"inline-axis\",\"inline-block\",\"inline-flex\",\"inline-grid\",\"inline-table\",\"inset\",\"inside\",\"intrinsic\",\"invert\",\"italic\",\"japanese-formal\",\"japanese-informal\",\"justify\",\"kannada\",\"katakana\",\"katakana-iroha\",\"keep-all\",\"khmer\",\"korean-hangul-formal\",\"korean-hanja-formal\",\"korean-hanja-informal\",\"landscape\",\"lao\",\"large\",\"larger\",\"left\",\"level\",\"lighter\",\"lighten\",\"line-through\",\"linear\",\"linear-gradient\",\"lines\",\"list-item\",\"listbox\",\"listitem\",\"local\",\"logical\",\"loud\",\"lower\",\"lower-alpha\",\"lower-armenian\",\"lower-greek\",\"lower-hexadecimal\",\"lower-latin\",\"lower-norwegian\",\"lower-roman\",\"lowercase\",\"ltr\",\"luminosity\",\"malayalam\",\"match\",\"matrix\",\"matrix3d\",\"media-controls-background\",\"media-current-time-display\",\"media-fullscreen-button\",\"media-mute-button\",\"media-play-button\",\"media-return-to-realtime-button\",\"media-rewind-button\",\"media-seek-back-button\",\"media-seek-forward-button\",\"media-slider\",\"media-sliderthumb\",\"media-time-remaining-display\",\"media-volume-slider\",\"media-volume-slider-container\",\"media-volume-sliderthumb\",\"medium\",\"menu\",\"menulist\",\"menulist-button\",\"menulist-text\",\"menulist-textfield\",\"menutext\",\"message-box\",\"middle\",\"min-intrinsic\",\"mix\",\"mongolian\",\"monospace\",\"move\",\"multiple\",\"multiply\",\"myanmar\",\"n-resize\",\"narrower\",\"ne-resize\",\"nesw-resize\",\"no-close-quote\",\"no-drop\",\"no-open-quote\",\"no-repeat\",\"none\",\"normal\",\"not-allowed\",\"nowrap\",\"ns-resize\",\"numbers\",\"numeric\",\"nw-resize\",\"nwse-resize\",\"oblique\",\"octal\",\"opacity\",\"open-quote\",\"optimizeLegibility\",\"optimizeSpeed\",\"oriya\",\"oromo\",\"outset\",\"outside\",\"outside-shape\",\"overlay\",\"overline\",\"padding\",\"padding-box\",\"painted\",\"page\",\"paused\",\"persian\",\"perspective\",\"plus-darker\",\"plus-lighter\",\"pointer\",\"polygon\",\"portrait\",\"pre\",\"pre-line\",\"pre-wrap\",\"preserve-3d\",\"progress\",\"push-button\",\"radial-gradient\",\"radio\",\"read-only\",\"read-write\",\"read-write-plaintext-only\",\"rectangle\",\"region\",\"relative\",\"repeat\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeat-x\",\"repeat-y\",\"reset\",\"reverse\",\"rgb\",\"rgba\",\"ridge\",\"right\",\"rotate\",\"rotate3d\",\"rotateX\",\"rotateY\",\"rotateZ\",\"round\",\"row\",\"row-resize\",\"row-reverse\",\"rtl\",\"run-in\",\"running\",\"s-resize\",\"sans-serif\",\"saturation\",\"scale\",\"scale3d\",\"scaleX\",\"scaleY\",\"scaleZ\",\"screen\",\"scroll\",\"scrollbar\",\"scroll-position\",\"se-resize\",\"searchfield\",\"searchfield-cancel-button\",\"searchfield-decoration\",\"searchfield-results-button\",\"searchfield-results-decoration\",\"self-start\",\"self-end\",\"semi-condensed\",\"semi-expanded\",\"separate\",\"serif\",\"show\",\"sidama\",\"simp-chinese-formal\",\"simp-chinese-informal\",\"single\",\"skew\",\"skewX\",\"skewY\",\"skip-white-space\",\"slide\",\"slider-horizontal\",\"slider-vertical\",\"sliderthumb-horizontal\",\"sliderthumb-vertical\",\"slow\",\"small\",\"small-caps\",\"small-caption\",\"smaller\",\"soft-light\",\"solid\",\"somali\",\"source-atop\",\"source-in\",\"source-out\",\"source-over\",\"space\",\"space-around\",\"space-between\",\"space-evenly\",\"spell-out\",\"square\",\"square-button\",\"start\",\"static\",\"status-bar\",\"stretch\",\"stroke\",\"sub\",\"subpixel-antialiased\",\"super\",\"sw-resize\",\"symbolic\",\"symbols\",\"system-ui\",\"table\",\"table-caption\",\"table-cell\",\"table-column\",\"table-column-group\",\"table-footer-group\",\"table-header-group\",\"table-row\",\"table-row-group\",\"tamil\",\"telugu\",\"text\",\"text-bottom\",\"text-top\",\"textarea\",\"textfield\",\"thai\",\"thick\",\"thin\",\"threeddarkshadow\",\"threedface\",\"threedhighlight\",\"threedlightshadow\",\"threedshadow\",\"tibetan\",\"tigre\",\"tigrinya-er\",\"tigrinya-er-abegede\",\"tigrinya-et\",\"tigrinya-et-abegede\",\"to\",\"top\",\"trad-chinese-formal\",\"trad-chinese-informal\",\"transform\",\"translate\",\"translate3d\",\"translateX\",\"translateY\",\"translateZ\",\"transparent\",\"ultra-condensed\",\"ultra-expanded\",\"underline\",\"unset\",\"up\",\"upper-alpha\",\"upper-armenian\",\"upper-greek\",\"upper-hexadecimal\",\"upper-latin\",\"upper-norwegian\",\"upper-roman\",\"uppercase\",\"urdu\",\"url\",\"var\",\"vertical\",\"vertical-text\",\"visible\",\"visibleFill\",\"visiblePainted\",\"visibleStroke\",\"visual\",\"w-resize\",\"wait\",\"wave\",\"wider\",\"window\",\"windowframe\",\"windowtext\",\"words\",\"wrap\",\"wrap-reverse\",\"x-large\",\"x-small\",\"xor\",\"xx-large\",\"xx-small\"],w=b(v),x=d.concat(f).concat(h).concat(j).concat(l).concat(n).concat(t).concat(v);\n\";i:12;s:32022:\"widget:c})}},a.defineExtension(\"foldCode\",function(a,c,d){b(this,a,c,d)}),a.defineExtension(\"isFolded\",function(a){for(var b=this.findMarksAt(a),c=0;c<b.length;++c)if(b[c].__isFold)return!0}),a.commands.toggleFold=function(a){a.foldCode(a.getCursor())},a.commands.fold=function(a){a.foldCode(a.getCursor(),null,\"fold\")},a.commands.unfold=function(a){a.foldCode(a.getCursor(),null,\"unfold\")},a.commands.foldAll=function(b){b.operation(function(){for(var c=b.firstLine(),d=b.lastLine();c<=d;c++)b.foldCode(a.Pos(c,0),null,\"fold\")})},a.commands.unfoldAll=function(b){b.operation(function(){for(var c=b.firstLine(),d=b.lastLine();c<=d;c++)b.foldCode(a.Pos(c,0),null,\"unfold\")})},a.registerHelper(\"fold\",\"combine\",function(){var a=Array.prototype.slice.call(arguments,0);return function(b,c){for(var d=0;d<a.length;++d){var e=a[d](b,c);if(e)return e}}}),a.registerHelper(\"fold\",\"auto\",function(a,b){for(var c=a.getHelpers(b,\"fold\"),d=0;d<c.length;d++){var e=c[d](a,b);if(e)return e}});var e={rangeFinder:a.fold.auto,widget:\"\\u2194\",minFoldSize:0,scanUp:!1,clearOnEnter:!0};a.defineOption(\"foldOptions\",null),a.defineExtension(\"foldOption\",function(a,b){return d(this,a,b)})})},{\"../../lib/codemirror\":59}],18:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\"),a(\"./foldcode\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\",\"./foldcode\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a){this.options=a,this.from=this.to=0}function c(a){return a===!0&&(a={}),null==a.gutter&&(a.gutter=\"CodeMirror-foldgutter\"),null==a.indicatorOpen&&(a.indicatorOpen=\"CodeMirror-foldgutter-open\"),null==a.indicatorFolded&&(a.indicatorFolded=\"CodeMirror-foldgutter-folded\"),a}function d(a,b){for(var c=a.findMarks(l(b,0),l(b+1,0)),d=0;d<c.length;++d)if(c[d].__isFold&&c[d].find().from.line==b)return c[d]}function e(a){if(\"string\"==typeof a){var b=document.createElement(\"div\");return b.className=a+\" CodeMirror-guttermarker-subtle\",b}return a.cloneNode(!0)}function f(a,b,c){var f=a.state.foldGutter.options,g=b,h=a.foldOption(f,\"minFoldSize\"),i=a.foldOption(f,\"rangeFinder\");a.eachLine(b,c,function(b){var c=null;if(d(a,g))c=e(f.indicatorFolded);else{var j=l(g,0),k=i&&i(a,j);k&&k.to.line-k.from.line>=h&&(c=e(f.indicatorOpen))}a.setGutterMarker(b,f.gutter,c),++g})}function g(a){var b=a.getViewport(),c=a.state.foldGutter;c&&(a.operation(function(){f(a,b.from,b.to)}),c.from=b.from,c.to=b.to)}function h(a,b,c){var e=a.state.foldGutter;if(e){var f=e.options;if(c==f.gutter){var g=d(a,b);g?g.clear():a.foldCode(l(b,0),f.rangeFinder)}}}function i(a){var b=a.state.foldGutter;if(b){var c=b.options;b.from=b.to=0,clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){g(a)},c.foldOnChangeTimeSpan||600)}}function j(a){var b=a.state.foldGutter;if(b){var c=b.options;clearTimeout(b.changeUpdate),b.changeUpdate=setTimeout(function(){var c=a.getViewport();b.from==b.to||c.from-b.to>20||b.from-c.to>20?g(a):a.operation(function(){c.from<b.from&&(f(a,c.from,b.from),b.from=c.from),c.to>b.to&&(f(a,b.to,c.to),b.to=c.to)})},c.updateViewportTimeSpan||400)}}function k(a,b){var c=a.state.foldGutter;if(c){var d=b.line;d>=c.from&&d<c.to&&f(a,d,d+1)}}a.defineOption(\"foldGutter\",!1,function(d,e,f){f&&f!=a.Init&&(d.clearGutter(d.state.foldGutter.options.gutter),d.state.foldGutter=null,d.off(\"gutterClick\",h),d.off(\"change\",i),d.off(\"viewportChange\",j),d.off(\"fold\",k),d.off(\"unfold\",k),d.off(\"swapDoc\",i)),e&&(d.state.foldGutter=new b(c(e)),g(d),d.on(\"gutterClick\",h),d.on(\"change\",i),d.on(\"viewportChange\",j),d.on(\"fold\",k),d.on(\"unfold\",k),d.on(\"swapDoc\",i))});var l=a.Pos})},{\"../../lib/codemirror\":59,\"./foldcode\":17}],19:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(b,c){var d=b.getLine(c),e=d.search(/\\S/);return e==-1||/\\bcomment\\b/.test(b.getTokenTypeAt(a.Pos(c,e+1)))?-1:a.countColumn(d,null,b.getOption(\"tabSize\"))}a.registerHelper(\"fold\",\"indent\",function(c,d){var e=b(c,d.line);if(!(e<0)){for(var f=null,g=d.line+1,h=c.lastLine();g<=h;++g){var i=b(c,g);if(i==-1);else{if(!(i>e))break;f=g}}return f?{from:a.Pos(d.line,c.getLine(d.line).length),to:a.Pos(f,c.getLine(f).length)}:void 0}})})},{\"../../lib/codemirror\":59}],20:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";a.registerHelper(\"fold\",\"markdown\",function(b,c){function d(c){var d=b.getTokenTypeAt(a.Pos(c,0));return d&&/\\bheader\\b/.test(d)}function e(a,b,c){var e=b&&b.match(/^#+/);return e&&d(a)?e[0].length:(e=c&&c.match(/^[=\\-]+\\s*$/),e&&d(a+1)?\"=\"==c[0]?1:2:f)}var f=100,g=b.getLine(c.line),h=b.getLine(c.line+1),i=e(c.line,g,h);if(i!==f){for(var j=b.lastLine(),k=c.line,l=b.getLine(k+2);k<j&&!(e(k+1,h,l)<=i);)++k,h=l,l=b.getLine(k+2);return{from:a.Pos(c.line,g.length),to:a.Pos(k,b.getLine(k).length)}}})})},{\"../../lib/codemirror\":59}],21:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a,b){return a.line-b.line||a.ch-b.ch}function c(a,b,c,d){this.line=b,this.ch=c,this.cm=a,this.text=a.getLine(b),this.min=d?Math.max(d.from,a.firstLine()):a.firstLine(),this.max=d?Math.min(d.to-1,a.lastLine()):a.lastLine()}function d(a,b){var c=a.cm.getTokenTypeAt(m(a.line,b));return c&&/\\btag\\b/.test(c)}function e(a){if(!(a.line>=a.max))return a.ch=0,a.text=a.cm.getLine(++a.line),!0}function f(a){if(!(a.line<=a.min))return a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0}function g(a){for(;;){var b=a.text.indexOf(\">\",a.ch);if(b==-1){if(e(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf(\"/\",b),f=c>-1&&!/\\S/.test(a.text.slice(c+1,b));return a.ch=b+1,f?\"selfClose\":\"regular\"}a.ch=b+1}}}function h(a){for(;;){var b=a.ch?a.text.lastIndexOf(\"<\",a.ch-1):-1;if(b==-1){if(f(a))continue;return}if(d(a,b+1)){p.lastIndex=b,a.ch=b;var c=p.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function i(a){for(;;){p.lastIndex=a.ch;var b=p.exec(a.text);if(!b){if(e(a))continue;return}{if(d(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function j(a){for(;;){var b=a.ch?a.text.lastIndexOf(\">\",a.ch-1):-1;if(b==-1){if(f(a))continue;return}{if(d(a,b+1)){var c=a.text.lastIndexOf(\"/\",b),e=c>-1&&!/\\S/.test(a.text.slice(c+1,b));return a.ch=b+1,e?\"selfClose\":\"regular\"}a.ch=b}}}function k(a,b){for(var c=[];;){var d,e=i(a),f=a.line,h=a.ch-(e?e[0].length:0);if(!e||!(d=g(a)))return;if(\"selfClose\"!=d)if(e[1]){for(var j=c.length-1;j>=0;--j)if(c[j]==e[2]){c.length=j;break}if(j<0&&(!b||b==e[2]))return{tag:e[2],from:m(f,h),to:m(a.line,a.ch)}}else c.push(e[2])}}function l(a,b){for(var c=[];;){var d=j(a);if(!d)return;if(\"selfClose\"!=d){var e=a.line,f=a.ch,g=h(a);if(!g)return;if(g[1])c.push(g[2]);else{for(var i=c.length-1;i>=0;--i)if(c[i]==g[2]){c.length=i;break}if(i<0&&(!b||b==g[2]))return{tag:g[2],from:m(a.line,a.ch),to:m(e,f)}}}else h(a)}}var m=a.Pos,n=\"A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\",o=n+\"-:.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\",p=new RegExp(\"<(/?)([\"+n+\"][\"+o+\"]*)\",\"g\");a.registerHelper(\"fold\",\"xml\",function(a,b){for(var d=new c(a,b.line,0);;){var e,f=i(d);if(!f||d.line!=b.line||!(e=g(d)))return;if(!f[1]&&\"selfClose\"!=e){var h=m(d.line,d.ch),j=k(d,f[2]);return j&&{from:h,to:j.from}}}}),a.findMatchingTag=function(a,d,e){var f=new c(a,d.line,d.ch,e);if(f.text.indexOf(\">\")!=-1||f.text.indexOf(\"<\")!=-1){var i=g(f),j=i&&m(f.line,f.ch),n=i&&h(f);if(i&&n&&!(b(f,d)>0)){var o={from:m(f.line,f.ch),to:j,tag:n[2]};return\"selfClose\"==i?{open:o,close:null,at:\"open\"}:n[1]?{open:l(f,n[2]),close:o,at:\"close\"}:(f=new c(a,j.line,j.ch,e),{open:o,close:k(f,n[2]),at:\"open\"})}}},a.findEnclosingTag=function(a,b,d,e){for(var f=new c(a,b.line,b.ch,d);;){var g=l(f,e);if(!g)break;var h=new c(a,b.line,b.ch,d),i=k(h,g.tag);if(i)return{open:g,close:i}}},a.scanForClosingTag=function(a,b,d,e){var f=new c(a,b.line,b.ch,e?{from:0,to:e}:null);return k(f,d)}})},{\"../../lib/codemirror\":59}],22:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";var b=/[\\w$]+/,c=500;a.registerHelper(\"hint\",\"anyword\",function(d,e){for(var f=e&&e.word||b,g=e&&e.range||c,h=d.getCursor(),i=d.getLine(h.line),j=h.ch,k=j;k&&f.test(i.charAt(k-1));)--k;for(var l=k!=j&&i.slice(k,j),m=e&&e.list||[],n={},o=new RegExp(f.source,\"g\"),p=-1;p<=1;p+=2)for(var q=h.line,r=Math.min(Math.max(q+p*g,d.firstLine()),d.lastLine())+p;q!=r;q+=p)for(var s,t=d.getLine(q);s=o.exec(t);)q==h.line&&s[0]===l||l&&0!=s[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(n,s[0])||(n[s[0]]=!0,m.push(s[0]));return{list:m,from:a.Pos(h.line,k),to:a.Pos(h.line,j)}})})},{\"../../lib/codemirror\":59}],23:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\"),a(\"../../mode/css/css\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\",\"../../mode/css/css\"],d):d(CodeMirror)}(function(a){\"use strict\";var b={link:1,visited:1,active:1,hover:1,focus:1,\"first-letter\":1,\"first-line\":1,\"first-child\":1,before:1,after:1,lang:1};a.registerHelper(\"hint\",\"css\",function(c){function d(a){for(var b in a)j&&0!=b.lastIndexOf(j,0)||l.push(b)}var e=c.getCursor(),f=c.getTokenAt(e),g=a.innerMode(c.getMode(),f.state);if(\"css\"==g.mode.name){if(\"keyword\"==f.type&&0==\"!important\".indexOf(f.string))return{list:[\"!important\"],from:a.Pos(e.line,f.start),to:a.Pos(e.line,f.end)};var h=f.start,i=e.ch,j=f.string.slice(0,i-h);/[^\\w$_-]/.test(j)&&(j=\"\",h=i=e.ch);var k=a.resolveMode(\"text/css\"),l=[],m=g.state.state;return\"pseudo\"==m||\"variable-3\"==f.type?d(b):\"block\"==m||\"maybeprop\"==m?d(k.propertyKeywords):\"prop\"==m||\"parens\"==m||\"at\"==m||\"params\"==m?(d(k.valueKeywords),d(k.colorKeywords)):\"media\"!=m&&\"media_parens\"!=m||(d(k.mediaTypes),d(k.mediaFeatures)),l.length?{list:l,from:a.Pos(e.line,h),to:a.Pos(e.line,i)}:void 0}})})},{\"../../lib/codemirror\":59,\"../../mode/css/css\":61}],24:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\"),a(\"./xml-hint\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\",\"./xml-hint\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a){for(var b in l)l.hasOwnProperty(b)&&(a.attrs[b]=l[b])}function c(b,c){var d={schemaInfo:k};if(c)for(var e in c)d[e]=c[e];return a.hint.xml(b,d)}var d=\"ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu\".split(\" \"),e=[\"_blank\",\"_self\",\"_top\",\"_parent\"],f=[\"ascii\",\"utf-8\",\"utf-16\",\"latin1\",\"latin1\"],g=[\"get\",\"post\",\"put\",\"delete\"],h=[\"application/x-www-form-urlencoded\",\"multipart/form-data\",\"text/plain\"],i=[\"all\",\"screen\",\"print\",\"embossed\",\"braille\",\"handheld\",\"print\",\"projection\",\"screen\",\"tty\",\"tv\",\"speech\",\"3d-glasses\",\"resolution [>][<][=] [X]\",\"device-aspect-ratio: X/Y\",\"orientation:portrait\",\"orientation:landscape\",\"device-height: [X]\",\"device-width: [X]\"],j={attrs:{}},k={a:{attrs:{href:null,ping:null,type:null,media:i,target:e,hreflang:d}},abbr:j,acronym:j,address:j,applet:j,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:i,hreflang:d,type:null,shape:[\"default\",\"rect\",\"circle\",\"poly\"]}},article:j,aside:j,audio:{attrs:{src:null,mediagroup:null,crossorigin:[\"anonymous\",\"use-credentials\"],preload:[\"none\",\"metadata\",\"auto\"],autoplay:[\"\",\"autoplay\"],loop:[\"\",\"loop\"],controls:[\"\",\"controls\"]}},b:j,base:{attrs:{href:null,target:e}},basefont:j,bdi:j,bdo:j,big:j,blockquote:{attrs:{cite:null}},body:j,br:j,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[\"\",\"autofocus\"],disabled:[\"\",\"autofocus\"],formenctype:h,formmethod:g,formnovalidate:[\"\",\"novalidate\"],formtarget:e,type:[\"submit\",\"reset\",\"button\"]}},canvas:{attrs:{width:null,height:null}},caption:j,center:j,cite:j,code:j,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[\"command\",\"checkbox\",\"radio\"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[\"\",\"disabled\"],checked:[\"\",\"checked\"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[\"\",\"disabled\"],multiple:[\"\",\"multiple\"]}},datalist:{attrs:{data:null}},dd:j,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[\"\",\"open\"]}},dfn:j,dir:j,div:j,dl:j,dt:j,em:j,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[\"\",\"disabled\"],form:null,name:null}},figcaption:j,figure:j,font:j,footer:j,form:{attrs:{action:null,name:null,\"accept-charset\":f,autocomplete:[\"on\",\"off\"],enctype:h,method:g,novalidate:[\"\",\"novalidate\"],target:e}},frame:j,frameset:j,h1:j,h2:j,h3:j,h4:j,h5:j,h6:j,head:{attrs:{},children:[\"title\",\"base\",\"link\",\"style\",\"meta\",\"script\",\"noscript\",\"command\"]},header:j,hgroup:j,hr:j,html:{attrs:{manifest:null},children:[\"head\",\"body\"]},i:j,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[\"allow-top-navigation\",\"allow-same-origin\",\"allow-forms\",\"allow-scripts\"],seamless:[\"\",\"seamless\"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[\"anonymous\",\"use-credentials\"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[\"audio/*\",\"video/*\",\"image/*\"],autocomplete:[\"on\",\"off\"],autofocus:[\"\",\"autofocus\"],checked:[\"\",\"checked\"],disabled:[\"\",\"disabled\"],formenctype:h,formmethod:g,formnovalidate:[\"\",\"novalidate\"],formtarget:e,multiple:[\"\",\"multiple\"],readonly:[\"\",\"readonly\"],required:[\"\",\"required\"],type:[\"hidden\",\"text\",\"search\",\"tel\",\"url\",\"email\",\"password\",\"datetime\",\"date\",\"month\",\"week\",\"time\",\"datetime-local\",\"number\",\"range\",\"color\",\"checkbox\",\"radio\",\"file\",\"submit\",\"image\",\"reset\",\"button\"]}},ins:{attrs:{cite:null,datetime:null}},kbd:j,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[\"\",\"autofocus\"],disabled:[\"\",\"disabled\"],keytype:[\"RSA\"]}},label:{attrs:{\"for\":null,form:null}},legend:j,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:d,media:i,sizes:[\"all\",\"16x16\",\"16x16 32x32\",\"16x16 32x32 64x64\"]}},map:{attrs:{name:null}},mark:j,menu:{attrs:{label:null,type:[\"list\",\"context\",\"toolbar\"]}},meta:{attrs:{content:null,charset:f,name:[\"viewport\",\"application-name\",\"author\",\"description\",\"generator\",\"keywords\"],\"http-equiv\":[\"content-language\",\"content-type\",\"default-style\",\"refresh\"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:j,noframes:j,noscript:j,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[\"\",\"typemustmatch\"]}},ol:{attrs:{reversed:[\"\",\"reversed\"],start:null,type:[\"1\",\"a\",\"A\",\"i\",\"I\"]}},optgroup:{attrs:{disabled:[\"\",\"disabled\"],label:null}},option:{attrs:{disabled:[\"\",\"disabled\"],label:null,selected:[\"\",\"selected\"],value:null}},output:{attrs:{\"for\":null,form:null,name:null}},p:j,param:{attrs:{name:null,value:null}},pre:j,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:j,rt:j,ruby:j,s:j,samp:j,script:{attrs:{type:[\"text/javascript\"],src:null,async:[\"\",\"async\"],defer:[\"\",\"defer\"],charset:f}},section:j,select:{attrs:{form:null,name:null,size:null,autofocus:[\"\",\"autofocus\"],disabled:[\"\",\"disabled\"],multiple:[\"\",\"multiple\"]}},small:j,source:{attrs:{src:null,type:null,media:null}},span:j,strike:j,strong:j,style:{attrs:{type:[\"text/css\"],media:i,scoped:null}},sub:j,summary:j,sup:j,table:j,tbody:j,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[\"\",\"autofocus\"],disabled:[\"\",\"disabled\"],readonly:[\"\",\"readonly\"],required:[\"\",\"required\"],wrap:[\"soft\",\"hard\"]}},tfoot:j,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]}},thead:j,time:{attrs:{datetime:null}},title:j,tr:j,track:{attrs:{src:null,label:null,\"default\":null,kind:[\"subtitles\",\"captions\",\"descriptions\",\"chapters\",\"metadata\"],srclang:d}},tt:j,u:j,ul:j,\"var\":j,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[\"anonymous\",\"use-credentials\"],preload:[\"auto\",\"metadata\",\"none\"],autoplay:[\"\",\"autoplay\"],mediagroup:[\"movie\"],muted:[\"\",\"muted\"],controls:[\"\",\"controls\"]}},wbr:j},l={accesskey:[\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],\"class\":null,contenteditable:[\"true\",\"false\"],contextmenu:null,dir:[\"ltr\",\"rtl\",\"auto\"],draggable:[\"true\",\"false\",\"auto\"],dropzone:[\"copy\",\"move\",\"link\",\"string:\",\"file:\"],hidden:[\"hidden\"],id:null,inert:[\"inert\"],itemid:null,itemprop:null,itemref:null,itemscope:[\"itemscope\"],itemtype:null,lang:[\"en\",\"es\"],spellcheck:[\"true\",\"false\"],style:null,tabindex:[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],title:null,translate:[\"yes\",\"no\"],onclick:null,rel:[\"stylesheet\",\"alternate\",\"author\",\"bookmark\",\"help\",\"license\",\"next\",\"nofollow\",\"noreferrer\",\"prefetch\",\"prev\",\"search\",\"tag\"]};b(j);for(var m in k)k.hasOwnProperty(m)&&k[m]!=j&&b(k[m]);a.htmlSchema=k,a.registerHelper(\"hint\",\"html\",c)})},{\"../../lib/codemirror\":59,\"./xml-hint\":28}],25:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){function b(a,b){for(var c=0,d=a.length;c<d;++c)b(a[c])}function c(a,b){if(!Array.prototype.indexOf){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}return a.indexOf(b)!=-1}function d(b,c,d,e){var f=b.getCursor(),g=d(b,f);if(!/\\b(?:string|comment)\\b/.test(g.type)){g.state=a.innerMode(b.getMode(),g.state).state,/^[\\w$_]*$/.test(g.string)?g.end>f.ch&&(g.end=f.ch,g.string=g.string.slice(0,f.ch-g.start)):g={start:f.ch,end:f.ch,string:\"\",state:g.state,type:\".\"==g.string?\"property\":null};for(var h=g;\"property\"==h.type;){if(h=d(b,j(f.line,h.start)),\".\"!=h.string)return;if(h=d(b,j(f.line,h.start)),!k)var k=[];k.push(h)}return{list:i(g,k,c,e),from:j(f.line,g.start),to:j(f.line,g.end)}}}function e(a,b){return d(a,n,function(a,b){return a.getTokenAt(b)},b)}function f(a,b){var c=a.getTokenAt(b);return b.ch==c.start+1&&\".\"==c.string.charAt(0)?(c.end=c.start,c.string=\".\",c.type=\"property\"):/^\\.[\\w$_]*$/.test(c.string)&&(c.type=\"property\",c.start++,c.string=c.string.replace(/\\./,\"\")),c}function g(a,b){return d(a,o,f,b)}function h(a,b){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var c=a;c;c=Object.getPrototypeOf(c))Object.getOwnPropertyNames(c).forEach(b);else for(var d in a)b(d)}function i(a,d,e,f){function g(a){0!=a.lastIndexOf(n,0)||c(j,a)||j.push(a)}function i(a){\"string\"==typeof a?b(k,g):a instanceof Array?b(l,g):a instanceof Function&&b(m,g),h(a,g)}var j=[],n=a.string,o=f&&f.globalScope||window;if(d&&d.length){var p,q=d.pop();for(q.type&&0===q.type.indexOf(\"variable\")?(f&&f.additionalContext&&(p=f.additionalContext[q.string]),f&&f.useGlobalScope===!1||(p=p||o[q.string])):\"string\"==q.type?p=\"\":\"atom\"==q.type?p=1:\"function\"==q.type&&(null==o.jQuery||\"$\"!=q.string&&\"jQuery\"!=q.string||\"function\"!=typeof o.jQuery?null!=o._&&\"_\"==q.string&&\"function\"==typeof o._&&(p=o._()):p=o.jQuery());null!=p&&d.length;)p=p[d.pop().string];null!=p&&i(p)}else{for(var r=a.state.localVars;r;r=r.next)g(r.name);for(var r=a.state.globalVars;r;r=r.next)g(r.name);f&&f.useGlobalScope===!1||i(o),b(e,g)}return j}var j=a.Pos;a.registerHelper(\"hint\",\"javascript\",e),a.registerHelper(\"hint\",\"coffeescript\",g);var k=\"charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search\".split(\" \"),l=\"length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight \".split(\" \"),m=\"prototype apply call bind\".split(\" \"),n=\"break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with\".split(\" \"),o=\"and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes\".split(\" \")})},{\"../../lib/codemirror\":59}],26:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a,b){this.cm=a,this.options=b,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor(\"start\"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var c=this;a.on(\"cursorActivity\",this.activityFunc=function(){c.cursorActivity()})}function c(b,c){var d=a.cmpPos(c.from,b.from);return d>0&&b.to.ch-b.from.ch!=c.to.ch-c.from.ch}function d(a,b,c){var d=a.options.hintOptions,e={};for(var f in p)e[f]=p[f];if(d)for(var f in d)void 0!==d[f]&&(e[f]=d[f]);if(c)for(var f in c)void 0!==c[f]&&(e[f]=c[f]);return e.hint.resolve&&(e.hint=e.hint.resolve(a,b)),e}function e(a){return\"string\"==typeof a?a:a.text}function f(a,b){function c(a,c){var e;e=\"string\"!=typeof c?function(a){return c(a,b)}:d.hasOwnProperty(c)?d[c]:c,f[a]=e}var d={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},e=a.options.customKeys,f=e?{}:d;if(e)for(var g in e)e.hasOwnProperty(g)&&c(g,e[g]);var h=a.options.extraKeys;if(h)for(var g in h)h.hasOwnProperty(g)&&c(g,h[g]);return f}function g(a,b){for(;b&&b!=a;){if(\"LI\"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function h(b,c){this.completion=b,this.data=c,this.picked=!1;var d=this,h=b.cm,i=this.hints=document.createElement(\"ul\");i.className=\"CodeMirror-hints\",this.selectedHint=c.selectedHint||0;for(var j=c.list,k=0;k<j.length;++k){var n=i.appendChild(document.createElement(\"li\")),o=j[k],p=l+(k!=this.selectedHint?\"\":\" \"+m);null!=o.className&&(p=o.className+\" \"+p),n.className=p,o.render?o.render(n,c,o):n.appendChild(document.createTextNode(o.displayText||e(o))),n.hintId=k}var q=h.cursorCoords(b.options.alignWithWord?c.from:null),r=q.left,s=q.bottom,t=!0;i.style.left=r+\"px\",i.style.top=s+\"px\";var u=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),v=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(b.options.container||document.body).appendChild(i);var w=i.getBoundingClientRect(),x=w.bottom-v,y=i.scrollHeight>i.clientHeight+1,z=h.getScrollInfo();if(x>0){var A=w.bottom-w.top,B=q.top-(q.bottom-w.top);if(B-A>0)i.style.top=(s=q.top-A)+\"px\",t=!1;else if(A>v){i.style.height=v-5+\"px\",i.style.top=(s=q.bottom-w.top)+\"px\";var C=h.getCursor();c.from.ch!=C.ch&&(q=h.cursorCoords(C),i.style.left=(r=q.left)+\"px\",w=i.getBoundingClientRect())}}var D=w.right-u;if(D>0&&(w.right-w.left>u&&(i.style.width=u-5+\"px\",D-=w.right-w.left-u),i.style.left=(r=q.left-D)+\"px\"),y)for(var E=i.firstChild;E;E=E.nextSibling)E.style.paddingRight=h.display.nativeBarWidth+\"px\";if(h.addKeyMap(this.keyMap=f(b,{moveFocus:function(a,b){d.changeActive(d.selectedHint+a,b)},setFocus:function(a){d.changeActive(a)},menuSize:function(){return d.screenAmount()},length:j.length,close:function(){b.close()},pick:function(){d.pick()},data:c})),b.options.closeOnUnfocus){var F;h.on(\"blur\",this.onBlur=function(){F=setTimeout(function(){b.close()},100)}),h.on(\"focus\",this.onFocus=function(){clearTimeout(F)})}return h.on(\"scroll\",this.onScroll=function(){var a=h.getScrollInfo(),c=h.getWrapperElement().getBoundingClientRect(),d=s+z.top-a.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return t||(e+=i.offsetHeight),e<=c.top||e>=c.bottom?b.close():(i.style.top=d+\"px\",void(i.style.left=r+z.left-a.left+\"px\"))}),a.on(i,\"dblclick\",function(a){var b=g(i,a.target||a.srcElement);b&&null!=b.hintId&&(d.changeActive(b.hintId),d.pick())}),a.on(i,\"click\",function(a){var c=g(i,a.target||a.srcElement);c&&null!=c.hintId&&(d.changeActive(c.hintId),b.options.completeOnSingleClick&&d.pick())}),a.on(i,\"mousedown\",function(){setTimeout(function(){h.focus()},20)}),a.signal(c,\"select\",j[this.selectedHint],i.childNodes[this.selectedHint]),!0}function i(a,b){if(!a.somethingSelected())return b;for(var c=[],d=0;d<b.length;d++)b[d].supportsSelection&&c.push(b[d]);return c}function j(a,b,c,d){if(a.async)a(b,d,c);else{var e=a(b,c);e&&e.then?e.then(d):d(e)}}function k(b,c){var d,e=b.getHelpers(c,\"hint\");if(e.length){var f=function(a,b,c){function d(e){return e==f.length?b(null):void j(f[e],a,c,function(a){a&&a.list.length>0?b(a):d(e+1)})}var f=i(a,e);d(0)};return f.async=!0,f.supportsSelection=!0,f}return(d=b.getHelper(b.getCursor(),\"hintWords\"))?function(b){return a.hint.fromList(b,{words:d})}:a.hint.anyword?function(b,c){return a.hint.anyword(b,c)}:function(){}}var l=\"CodeMirror-hint\",m=\"CodeMirror-hint-active\";a.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);var d={hint:b};if(c)for(var e in c)d[e]=c[e];return a.showHint(d)},a.defineExtension(\"showHint\",function(c){c=d(this,this.getCursor(\"start\"),c);var e=this.listSelections();if(!(e.length>1)){if(this.somethingSelected()){if(!c.hint.supportsSelection)return;for(var f=0;f<e.length;f++)if(e[f].head.line!=e[f].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var g=this.state.completionActive=new b(this,c);g.options.hint&&(a.signal(this,\"startCompletion\",this),g.update(!0))}});var n=window.requestAnimationFrame||function(a){return setTimeout(a,1e3/60)},o=window.cancelAnimationFrame||clearTimeout;b.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off(\"cursorActivity\",this.activityFunc),this.widget&&this.data&&a.signal(this.data,\"close\"),this.widget&&this.widget.close(),a.signal(this.cm,\"endCompletion\",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(b,c){var d=b.list[c];d.hint?d.hint(this.cm,b,d):this.cm.replaceRange(e(d),d.from||b.from,d.to||b.to,\"complete\"),a.signal(b,\"pick\",d),this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch<this.startPos.ch||this.cm.somethingSelected()||a.ch&&this.options.closeCharacters.test(b.charAt(a.ch-1)))this.close();else{var c=this;this.debounce=n(function(){c.update()}),this.widget&&this.widget.disable()}},update:function(a){if(null!=this.tick){var b=this,c=++this.tick;j(this.options.hint,this.cm,this.options,function(d){b.tick==c&&b.finishUpdate(d,a)})}},finishUpdate:function(b,d){this.data&&a.signal(this.data,\"update\");var e=this.widget&&this.widget.picked||d&&this.options.completeSingle;this.widget&&this.widget.close(),b&&this.data&&c(this.data,b)||(this.data=b,b&&b.list.length&&(e&&1==b.list.length?this.pick(b,0):(this.widget=new h(this,b),a.signal(b,\"shown\"))))}},h.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus&&(a.off(\"blur\",this.onBlur),a.off(\"focus\",this.onFocus)),a.off(\"scroll\",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var a=this;this.keyMap={Enter:function(){a.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(b,c){if(b>=this.data.list.length?b=c?this.data.list.length-1:0:b<0&&(b=c?0:this.data.list.length-1),this.selectedHint!=b){var d=this.hints.childNodes[this.selectedHint];d.className=d.className.replace(\" \"+m,\"\"),d=this.hints.childNodes[this.selectedHint=b],d.className+=\" \"+m,d.offsetTop<this.hints.scrollTop?this.hints.scrollTop=d.offsetTop-3:d.offsetTop+d.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=d.offsetTop+d.offsetHeight-this.hints.clientHeight+3),a.signal(this.data,\"select\",this.data.list[this.selectedHint],d)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},a.registerHelper(\"hint\",\"auto\",{resolve:k}),a.registerHelper(\"hint\",\"fromList\",function(b,c){var d=b.getCursor(),e=b.getTokenAt(d),f=a.Pos(d.line,e.end);if(e.string&&/\\w/.test(e.string[e.string.length-1]))var g=e.string,h=a.Pos(d.line,e.start);else var g=\"\",h=f;for(var i=[],j=0;j<c.words.length;j++){var k=c.words[j];k.slice(0,g.length)==g&&i.push(k)}if(i.length)return{list:i,from:h,to:f}}),a.commands.autocomplete=a.showHint;var p={hint:a.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\\s()\\[\\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};a.defineOption(\"hintOptions\",null)})},{\"../../lib/codemirror\":59}],27:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\"),a(\"../../mode/sql/sql\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\",\"../../mode/sql/sql\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a){return\"[object Array]\"==Object.prototype.toString.call(a)}function c(b){var c=b.doc.modeOption;return\"sql\"===c&&(c=\"text/x-sql\"),a.resolveMode(c).keywords}function d(b){var c=b.doc.modeOption;return\"sql\"===c&&(c=\"text/x-sql\"),a.resolveMode(c).identifierQuote||\"`\"}function e(a){return\"string\"==typeof a?a:a.text}function f(a,c){return b(c)&&(c={columns:c}),c.text||(c.text=a),c}function g(a){var c={};if(b(a))for(var d=a.length-1;d>=0;d--){var g=a[d];c[e(g).toUpperCase()]=f(e(g),g)}else if(a)for(var h in a)c[h.toUpperCase()]=f(h,a[h]);return c}function h(a){return q[a.toUpperCase()]}function i(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function j(a,b){var c=a.length,d=e(b).substr(0,c);return a.toUpperCase()===d.toUpperCase()}function k(a,c,d,e){if(b(d))for(var f=0;f<d.length;f++)j(c,d[f])&&a.push(e(d[f]));else for(var g in d)if(d.hasOwnProperty(g)){var h=d[g];h=h&&h!==!0?h.displayText?{text:h.text,displayText:h.displayText}:h.text:g,j(c,h)&&a.push(e(h))}}function l(a){\".\"==a.charAt(0)&&(a=a.substr(1));for(var b=a.split(t+t),c=0;c<b.length;c++)b[c]=b[c].replace(new RegExp(t,\"g\"),\"\");return b.join(t)}function m(a){for(var b=e(a).split(\".\"),c=0;c<b.length;c++)b[c]=t+b[c].replace(new RegExp(t,\"g\"),t+t)+t;var d=b.join(\".\");return\"string\"==typeof a?d:(a=i(a),a.text=d,a)}function n(a,b,c,d){for(var e=!1,f=[],g=b.start,j=!0;j;)j=\".\"==b.string.charAt(0),e=e||b.string.charAt(0)==t,g=b.start,f.unshift(l(b.string)),b=d.getTokenAt(v(a.line,b.start)),\".\"==b.string&&(j=!0,b=d.getTokenAt(v(a.line,b.start)));var n=f.join(\".\");k(c,n,q,function(a){return e?m(a):a}),k(c,n,r,function(a){return e?m(a):a}),n=f.pop();var o=f.join(\".\"),s=!1,u=o;\n\";i:13;s:32007:\"if(!h(o)){var w=o;o=p(o,d),o!==w&&(s=!0)}var x=h(o);return x&&x.columns&&(x=x.columns),x&&k(c,n,x,function(a){var b=o;return 1==s&&(b=u),\"string\"==typeof a?a=b+\".\"+a:(a=i(a),a.text=b+\".\"+a.text),e?m(a):a}),g}function o(a,b){for(var c=a.split(/\\s+/),d=0;d<c.length;d++)c[d]&&b(c[d].replace(/[,;]/g,\"\"))}function p(a,b){for(var c=b.doc,d=c.getValue(),e=a.toUpperCase(),f=\"\",g=\"\",i=[],j={start:v(0,0),end:v(b.lastLine(),b.getLineHandle(b.lastLine()).length)},k=d.indexOf(u.QUERY_DIV);k!=-1;)i.push(c.posFromIndex(k)),k=d.indexOf(u.QUERY_DIV,k+1);i.unshift(v(0,0)),i.push(v(b.lastLine(),b.getLineHandle(b.lastLine()).text.length));for(var l=null,m=b.getCursor(),n=0;n<i.length;n++){if((null==l||w(m,l)>0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;n<p.length;n++){var q=p[n];if(o(q,function(a){var b=a.toUpperCase();b===e&&h(f)&&(g=f),b!==u.ALIAS_KEYWORD&&(f=a)}),g)break}return g}var q,r,s,t,u={QUERY_DIV:\";\",ALIAS_KEYWORD:\"AS\"},v=a.Pos,w=a.cmpPos;a.registerHelper(\"hint\",\"sql\",function(a,b){q=g(b&&b.tables);var e=b&&b.defaultTable,f=b&&b.disableKeywords;r=e&&h(e),s=c(a),t=d(a),e&&!r&&(r=p(e,a)),r=r||[],r.columns&&(r=r.columns);var i,j,l,m=a.getCursor(),o=[],u=a.getTokenAt(m);return u.end>m.ch&&(u.end=m.ch,u.string=u.string.slice(0,m.ch-u.start)),u.string.match(/^[.`\"\\w@]\\w*$/)?(l=u.string,i=u.start,j=u.end):(i=j=m.ch,l=\"\"),\".\"==l.charAt(0)||l.charAt(0)==t?i=n(m,u,o,a):(k(o,l,q,function(a){return a}),k(o,l,r,function(a){return a}),f||k(o,l,s,function(a){return a.toUpperCase()})),{list:o,from:v(m.line,i),to:v(m.line,j)}})})},{\"../../lib/codemirror\":59,\"../../mode/sql/sql\":74}],28:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(b,d){var e=d&&d.schemaInfo,f=d&&d.quoteChar||\'\"\';if(e){var g=b.getCursor(),h=b.getTokenAt(g);h.end>g.ch&&(h.end=g.ch,h.string=h.string.slice(0,g.ch-h.start));var i=a.innerMode(b.getMode(),h.state);if(\"xml\"==i.mode.name){var j,k,l=[],m=!1,n=/\\btag\\b/.test(h.type)&&!/>$/.test(h.string),o=n&&/^\\w/.test(h.string);if(o){var p=b.getLine(g.line).slice(Math.max(0,h.start-2),h.start),q=/<\\/$/.test(p)?\"close\":/<$/.test(p)?\"open\":null;q&&(k=h.start-(\"close\"==q?2:1))}else n&&\"<\"==h.string?q=\"open\":n&&\"</\"==h.string&&(q=\"close\");if(!n&&!i.state.tagName||q){o&&(j=h.string),m=q;var r=i.state.context,s=r&&e[r.tagName],t=r?s&&s.children:e[\"!top\"];if(t&&\"close\"!=q)for(var u=0;u<t.length;++u)j&&0!=t[u].lastIndexOf(j,0)||l.push(\"<\"+t[u]);else if(\"close\"!=q)for(var v in e)!e.hasOwnProperty(v)||\"!top\"==v||\"!attrs\"==v||j&&0!=v.lastIndexOf(j,0)||l.push(\"<\"+v);r&&(!j||\"close\"==q&&0==r.tagName.lastIndexOf(j,0))&&l.push(\"</\"+r.tagName+\">\")}else{var s=e[i.state.tagName],w=s&&s.attrs,x=e[\"!attrs\"];if(!w&&!x)return;if(w){if(x){var y={};for(var z in x)x.hasOwnProperty(z)&&(y[z]=x[z]);for(var z in w)w.hasOwnProperty(z)&&(y[z]=w[z]);w=y}}else w=x;if(\"string\"==h.type||\"=\"==h.string){var A,p=b.getRange(c(g.line,Math.max(0,g.ch-60)),c(g.line,\"string\"==h.type?h.start:h.end)),B=p.match(/([^\\s\\u00a0=<>\\\"\\\']+)=$/);if(!B||!w.hasOwnProperty(B[1])||!(A=w[B[1]]))return;if(\"function\"==typeof A&&(A=A.call(this,b)),\"string\"==h.type){j=h.string;var C=0;/[\'\"]/.test(h.string.charAt(0))&&(f=h.string.charAt(0),j=h.string.slice(1),C++);var D=h.string.length;/[\'\"]/.test(h.string.charAt(D-1))&&(f=h.string.charAt(D-1),j=h.string.substr(C,D-2)),m=!0}for(var u=0;u<A.length;++u)j&&0!=A[u].lastIndexOf(j,0)||l.push(f+A[u]+f)}else{\"attribute\"==h.type&&(j=h.string,m=!0);for(var E in w)!w.hasOwnProperty(E)||j&&0!=E.lastIndexOf(j,0)||l.push(E)}}return{list:l,from:m?c(g.line,null==k?h.start:k):g,to:m?c(g.line,h.end):g}}}}var c=a.Pos;a.registerHelper(\"hint\",\"xml\",b)})},{\"../../lib/codemirror\":59}],29:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";a.registerHelper(\"lint\",\"css\",function(b,c){var d=[];if(!window.CSSLint)return window.console&&window.console.error(\"Error: window.CSSLint not defined, CodeMirror CSS linting cannot run.\"),d;for(var e=CSSLint.verify(b,c),f=e.messages,g=null,h=0;h<f.length;h++){g=f[h];var i=g.line-1,j=g.line-1,k=g.col-1,l=g.col;d.push({from:a.Pos(i,k),to:a.Pos(j,l),message:g.message,severity:g.type})}return d})})},{\"../../lib/codemirror\":59}],30:[function(a,b,c){(function(d){!function(e){\"object\"==typeof c&&\"object\"==typeof b?e(a(\"../../lib/codemirror\"),\"undefined\"!=typeof window?window.HTMLHint:\"undefined\"!=typeof d?d.HTMLHint:null):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\",\"htmlhint\"],e):e(CodeMirror,window.HTMLHint)}(function(a,b){\"use strict\";var c={\"tagname-lowercase\":!0,\"attr-lowercase\":!0,\"attr-value-double-quotes\":!0,\"doctype-first\":!1,\"tag-pair\":!0,\"spec-char-escape\":!0,\"id-unique\":!0,\"src-not-empty\":!0,\"attr-no-duplication\":!0};a.registerHelper(\"lint\",\"html\",function(d,e){var f=[];if(b&&!b.verify&&(b=b.HTMLHint),b||(b=window.HTMLHint),!b)return window.console&&window.console.error(\"Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run.\"),f;for(var g=b.verify(d,e&&e.rules||c),h=0;h<g.length;h++){var i=g[h],j=i.line-1,k=i.line-1,l=i.col-1,m=i.col;f.push({from:a.Pos(j,l),to:a.Pos(k,m),message:i.message,severity:i.type})}return f})})}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"../../lib/codemirror\":59}],31:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a,b){if(!window.JSHINT)return window.console&&window.console.error(\"Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run.\"),[];JSHINT(a,b,b.globals);var c=JSHINT.data().errors,d=[];return c&&f(c,d),d}function c(a){return d(a,h,\"warning\",!0),d(a,i,\"error\"),e(a)?null:a}function d(a,b,c,d){var e,f,g,h,i;e=a.description;for(var j=0;j<b.length;j++)f=b[j],g=\"string\"==typeof f?f:f[0],h=\"string\"==typeof f?null:f[1],i=e.indexOf(g)!==-1,(d||i)&&(a.severity=c),i&&h&&(a.description=h)}function e(a){for(var b=a.description,c=0;c<g.length;c++)if(b.indexOf(g[c])!==-1)return!0;return!1}function f(b,d){for(var e=0;e<b.length;e++){var f=b[e];if(f){var g,h;if(g=[],f.evidence){var i=g[f.line];if(!i){var j=f.evidence;i=[],Array.prototype.forEach.call(j,function(a,b){\"\\t\"===a&&i.push(b+1)}),g[f.line]=i}if(i.length>0){var k=f.character;i.forEach(function(a){k>a&&(k-=1)}),f.character=k}}var l=f.character-1,m=l+1;f.evidence&&(h=f.evidence.substring(l).search(/.\\b/),h>-1&&(m+=h)),f.description=f.reason,f.start=f.character,f.end=m,f=c(f),f&&d.push({message:f.description,severity:f.severity,from:a.Pos(f.line-1,l),to:a.Pos(f.line-1,m)})}}}var g=[\"Dangerous comment\"],h=[[\"Expected \'{\'\",\"Statement body should be inside \'{ }\' braces.\"]],i=[\"Missing semicolon\",\"Extra comma\",\"Missing property name\",\"Unmatched \",\" and instead saw\",\" is not defined\",\"Unclosed string\",\"Stopping, unable to continue\"];a.registerHelper(\"lint\",\"javascript\",b)})},{\"../../lib/codemirror\":59}],32:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";a.registerHelper(\"lint\",\"json\",function(b){var c=[];if(!window.jsonlint)return window.console&&window.console.error(\"Error: window.jsonlint not defined, CodeMirror JSON linting cannot run.\"),c;jsonlint.parseError=function(b,d){var e=d.loc;c.push({from:a.Pos(e.first_line-1,e.first_column),to:a.Pos(e.last_line-1,e.last_column),message:b})};try{jsonlint.parse(b)}catch(d){}return c})})},{\"../../lib/codemirror\":59}],33:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(b,c){function d(b){return e.parentNode?(e.style.top=Math.max(0,b.clientY-e.offsetHeight-5)+\"px\",void(e.style.left=b.clientX+5+\"px\")):a.off(document,\"mousemove\",d)}var e=document.createElement(\"div\");return e.className=\"CodeMirror-lint-tooltip\",e.appendChild(c.cloneNode(!0)),document.body.appendChild(e),a.on(document,\"mousemove\",d),d(b),null!=e.style.opacity&&(e.style.opacity=1),e}function c(a){a.parentNode&&a.parentNode.removeChild(a)}function d(a){a.parentNode&&(null==a.style.opacity&&c(a),a.style.opacity=0,setTimeout(function(){c(a)},600))}function e(c,e,f){function g(){a.off(f,\"mouseout\",g),h&&(d(h),h=null)}var h=b(c,e),i=setInterval(function(){if(h)for(var a=f;;a=a.parentNode){if(a&&11==a.nodeType&&(a=a.host),a==document.body)return;if(!a){g();break}}if(!h)return clearInterval(i)},400);a.on(f,\"mouseout\",g)}function f(a,b,c){this.marked=[],this.options=b,this.timeout=null,this.hasGutter=c,this.onMouseOver=function(b){r(a,b)},this.waitingFor=0}function g(a,b){return b instanceof Function?{getAnnotations:b}:(b&&b!==!0||(b={}),b)}function h(a){var b=a.state.lint;b.hasGutter&&a.clearGutter(s);for(var c=0;c<b.marked.length;++c)b.marked[c].clear();b.marked.length=0}function i(b,c,d,f){var g=document.createElement(\"div\"),h=g;return g.className=\"CodeMirror-lint-marker-\"+c,d&&(h=g.appendChild(document.createElement(\"div\")),h.className=\"CodeMirror-lint-marker-multiple\"),0!=f&&a.on(h,\"mouseover\",function(a){e(a,b,h)}),g}function j(a,b){return\"error\"==a?a:b}function k(a){for(var b=[],c=0;c<a.length;++c){var d=a[c],e=d.from.line;(b[e]||(b[e]=[])).push(d)}return b}function l(a){var b=a.severity;b||(b=\"error\");var c=document.createElement(\"div\");return c.className=\"CodeMirror-lint-message-\"+b,\"undefined\"!=typeof a.messageHTML?c.innerHTML=a.messageHTML:c.appendChild(document.createTextNode(a.message)),c}function m(b,c,d){function e(){g=-1,b.off(\"change\",e)}var f=b.state.lint,g=++f.waitingFor;b.on(\"change\",e),c(b.getValue(),function(c,d){b.off(\"change\",e),f.waitingFor==g&&(d&&c instanceof a&&(c=d),o(b,c))},d,b)}function n(b){var c=b.state.lint,d=c.options,e=d.options||d,f=d.getAnnotations||b.getHelper(a.Pos(0,0),\"lint\");if(f)if(d.async||f.async)m(b,f,e);else{var g=f(b.getValue(),e,b);if(!g)return;g.then?g.then(function(a){o(b,a)}):o(b,g)}}function o(a,b){h(a);for(var c=a.state.lint,d=c.options,e=k(b),f=0;f<e.length;++f){var g=e[f];if(g){for(var m=null,n=c.hasGutter&&document.createDocumentFragment(),o=0;o<g.length;++o){var p=g[o],q=p.severity;q||(q=\"error\"),m=j(m,q),d.formatAnnotation&&(p=d.formatAnnotation(p)),c.hasGutter&&n.appendChild(l(p)),p.to&&c.marked.push(a.markText(p.from,p.to,{className:\"CodeMirror-lint-mark-\"+q,__annotation:p}))}c.hasGutter&&a.setGutterMarker(f,s,i(n,m,g.length>1,c.options.tooltips))}}d.onUpdateLinting&&d.onUpdateLinting(b,e,a)}function p(a){var b=a.state.lint;b&&(clearTimeout(b.timeout),b.timeout=setTimeout(function(){n(a)},b.options.delay||500))}function q(a,b){for(var c=b.target||b.srcElement,d=document.createDocumentFragment(),f=0;f<a.length;f++){var g=a[f];d.appendChild(l(g))}e(b,d,c)}function r(a,b){var c=b.target||b.srcElement;if(/\\bCodeMirror-lint-mark-/.test(c.className)){for(var d=c.getBoundingClientRect(),e=(d.left+d.right)/2,f=(d.top+d.bottom)/2,g=a.findMarksAt(a.coordsChar({left:e,top:f},\"client\")),h=[],i=0;i<g.length;++i){var j=g[i].__annotation;j&&h.push(j)}h.length&&q(h,b)}}var s=\"CodeMirror-lint-markers\";a.defineOption(\"lint\",!1,function(b,c,d){if(d&&d!=a.Init&&(h(b),b.state.lint.options.lintOnChange!==!1&&b.off(\"change\",p),a.off(b.getWrapperElement(),\"mouseover\",b.state.lint.onMouseOver),clearTimeout(b.state.lint.timeout),delete b.state.lint),c){for(var e=b.getOption(\"gutters\"),i=!1,j=0;j<e.length;++j)e[j]==s&&(i=!0);var k=b.state.lint=new f(b,g(b,c),i);k.options.lintOnChange!==!1&&b.on(\"change\",p),0!=k.options.tooltips&&\"gutter\"!=k.options.tooltips&&a.on(b.getWrapperElement(),\"mouseover\",k.onMouseOver),n(b)}}),a.defineExtension(\"performLint\",function(){this.state.lint&&n(this)})})},{\"../../lib/codemirror\":59}],34:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\",\"diff_match_patch\"],d):d(CodeMirror)}(function(a){\"use strict\";function b(a,b){this.mv=a,this.type=b,this.classes=\"left\"==b?{chunk:\"CodeMirror-merge-l-chunk\",start:\"CodeMirror-merge-l-chunk-start\",end:\"CodeMirror-merge-l-chunk-end\",insert:\"CodeMirror-merge-l-inserted\",del:\"CodeMirror-merge-l-deleted\",connect:\"CodeMirror-merge-l-connect\"}:{chunk:\"CodeMirror-merge-r-chunk\",start:\"CodeMirror-merge-r-chunk-start\",end:\"CodeMirror-merge-r-chunk-end\",insert:\"CodeMirror-merge-r-inserted\",del:\"CodeMirror-merge-r-deleted\",connect:\"CodeMirror-merge-r-connect\"}}function c(b){b.diffOutOfDate&&(b.diff=z(b.orig.getValue(),b.edit.getValue(),b.mv.options.ignoreWhitespace),b.chunks=A(b.diff),b.diffOutOfDate=!1,a.signal(b.edit,\"updateDiff\",b.diff))}function d(b){function d(a){W=!0,p=!1,\"full\"==a&&(b.svg&&J(b.svg),b.copyButtons&&J(b.copyButtons),j(b.edit,m.marked,b.classes),j(b.orig,o.marked,b.classes),m.from=m.to=o.from=o.to=0),c(b),b.showDifferences&&(k(b.edit,b.diff,m,DIFF_INSERT,b.classes),k(b.orig,b.diff,o,DIFF_DELETE,b.classes)),\"align\"==b.mv.options.connect&&s(b),n(b),null!=b.needsScrollSync&&f(b,b.needsScrollSync),W=!1}function e(a){W||(b.dealigned=!0,g(a))}function g(a){W||p||(clearTimeout(l),a===!0&&(p=!0),l=setTimeout(d,a===!0?20:250))}function h(a,c){b.diffOutOfDate||(b.diffOutOfDate=!0,m.from=m.to=o.from=o.to=0),e(c.text.length-1!=c.to.line-c.from.line)}function i(){b.diffOutOfDate=!0,b.dealigned=!0,d(\"full\")}var l,m={from:0,to:0,marked:[]},o={from:0,to:0,marked:[]},p=!1;return b.edit.on(\"change\",h),b.orig.on(\"change\",h),b.edit.on(\"swapDoc\",i),b.orig.on(\"swapDoc\",i),\"align\"==b.mv.options.connect&&(a.on(b.edit.state.trackAlignable,\"realign\",e),a.on(b.orig.state.trackAlignable,\"realign\",e)),b.edit.on(\"viewportChange\",function(){g(!1)}),b.orig.on(\"viewportChange\",function(){g(!1)}),d(),d}function e(a,b){a.edit.on(\"scroll\",function(){f(a,!0)&&n(a)}),a.orig.on(\"scroll\",function(){f(a,!1)&&n(a),b&&f(b,!0)&&n(b)})}function f(a,b){if(a.diffOutOfDate)return a.lockScroll&&null==a.needsScrollSync&&(a.needsScrollSync=b),!1;if(a.needsScrollSync=null,!a.lockScroll)return!0;var c,d,e=+new Date;if(b?(c=a.edit,d=a.orig):(c=a.orig,d=a.edit),c.state.scrollSetBy==a&&(c.state.scrollSetAt||0)+250>e)return!1;var f=c.getScrollInfo();if(\"align\"==a.mv.options.connect)q=f.top;else{var h,i,j=.5*f.clientHeight,k=f.top+j,l=c.lineAtHeight(k,\"local\"),m=D(a.chunks,l,b),n=g(c,b?m.edit:m.orig),o=g(d,b?m.orig:m.edit),p=(k-n.top)/(n.bot-n.top),q=o.top-j+p*(o.bot-o.top);if(q>f.top&&(i=f.top/j)<1)q=q*i+f.top*(1-i);else if((h=f.height-f.clientHeight-f.top)<j){var r=d.getScrollInfo(),s=r.height-r.clientHeight-q;s>h&&(i=h/j)<1&&(q=q*i+(r.height-r.clientHeight-h)*(1-i))}}return d.scrollTo(f.left,q),d.state.scrollSetAt=e,d.state.scrollSetBy=a,!0}function g(a,b){var c=b.after;return null==c&&(c=a.lastLine()+1),{top:a.heightAtLine(b.before||0,\"local\"),bot:a.heightAtLine(c,\"local\")}}function h(a,b,c){a.lockScroll=b,b&&0!=c&&f(a,DIFF_INSERT)&&n(a),a.lockButton.innerHTML=b?\"\\u21db\\u21da\":\"\\u21db&nbsp;&nbsp;\\u21da\"}function i(a,b,c){for(var d=c.classLocation,e=0;e<d.length;e++)a.removeLineClass(b,d[e],c.chunk),a.removeLineClass(b,d[e],c.start),a.removeLineClass(b,d[e],c.end)}function j(b,c,d){for(var e=0;e<c.length;++e){var f=c[e];f instanceof a.TextMarker?f.clear():f.parent&&i(b,f,d)}c.length=0}function k(a,b,c,d,e){var f=a.getViewport();a.operation(function(){c.from==c.to||f.from-c.to>20||c.from-f.to>20?(j(a,c.marked,e),m(a,b,d,c.marked,f.from,f.to,e),c.from=f.from,c.to=f.to):(f.from<c.from&&(m(a,b,d,c.marked,f.from,c.from,e),c.from=f.from),f.to>c.to&&(m(a,b,d,c.marked,c.to,f.to,e),c.to=f.to))})}function l(a,b,c,d,e,f){for(var g=c.classLocation,h=a.getLineHandle(b),i=0;i<g.length;i++)d&&a.addLineClass(h,g[i],c.chunk),e&&a.addLineClass(h,g[i],c.start),f&&a.addLineClass(h,g[i],c.end);return h}function m(a,b,c,d,e,f,g){function h(b,c){for(var h=Math.max(e,b),i=Math.min(f,c),j=h;j<i;++j)d.push(l(a,j,g,!0,j==b,j==c-1));b==c&&h==c&&i==c&&(h?d.push(l(a,h-1,g,!1,!1,!0)):d.push(l(a,h,g,!1,!0,!1)))}for(var i=U(0,0),j=U(e,0),k=a.clipPos(U(f-1)),m=c==DIFF_DELETE?g.del:g.insert,n=0,o=!1,p=0;p<b.length;++p){var q=b[p],r=q[0],s=q[1];if(r==DIFF_EQUAL){var t=i.line+(C(b,p)?0:1);M(i,s);var u=i.line+(B(b,p)?1:0);u>t&&(o&&(h(n,t),o=!1),n=u)}else if(o=!0,r==c){var v=M(i,s,!0),w=P(j,i),x=O(k,v);Q(w,x)||d.push(a.markText(w,x,{className:m})),i=v}}o&&h(n,i.line+1)}function n(a){if(a.showDifferences){if(a.svg){J(a.svg);var b=a.gap.offsetWidth;K(a.svg,\"width\",b,\"height\",a.gap.offsetHeight)}a.copyButtons&&J(a.copyButtons);for(var c=a.edit.getViewport(),d=a.orig.getViewport(),e=a.mv.wrap.getBoundingClientRect().top,f=e-a.edit.getScrollerElement().getBoundingClientRect().top+a.edit.getScrollInfo().top,g=e-a.orig.getScrollerElement().getBoundingClientRect().top+a.orig.getScrollInfo().top,h=0;h<a.chunks.length;h++){var i=a.chunks[h];i.editFrom<=c.to&&i.editTo>=c.from&&i.origFrom<=d.to&&i.origTo>=d.from&&v(a,i,g,f,b)}}}function o(a,b){for(var c=0,d=0,e=0;e<b.length;e++){var f=b[e];if(f.editTo>a&&f.editFrom<=a)return null;if(f.editFrom>a)break;c=f.editTo,d=f.origTo}return d+(a-c)}function p(a,b,c){for(var d=a.state.trackAlignable,e=a.firstLine(),f=0,g=[],h=0;;h++){for(var i=b[h],j=i?c?i.origFrom:i.editFrom:1e9;f<d.alignable.length;f+=2){var k=d.alignable[f]+1;if(!(k<=e)){if(!(k<=j))break;g.push(k)}}if(!i)break;g.push(e=c?i.origTo:i.editTo)}return g}function q(a,b,c,d){var e=0,f=0,g=0,h=0;a:for(;;e++){var i=a[e],j=b[f];if(!i&&null==j)break;for(var k=i?i[0]:1e9,l=null==j?1e9:j;g<c.length;){var m=c[g];if(m.origFrom<=l&&m.origTo>l){f++,e--;continue a}if(m.editTo>k){if(m.editFrom<=k)continue a;break}h+=m.origTo-m.origFrom-(m.editTo-m.editFrom),g++}if(k==l-h)i[d]=l,f++;else if(k<l-h)i[d]=k+h;else{var n=[l-h,null,null];n[d]=l,a.splice(e,0,n),f++}}}function r(a,b){var c=p(a.edit,a.chunks,!1),d=[];if(b)for(var e=0,f=0;e<b.chunks.length;e++){for(var g=b.chunks[e].editTo;f<c.length&&c[f]<g;)f++;f!=c.length&&c[f]==g||c.splice(f++,0,g)}for(var e=0;e<c.length;e++)d.push([c[e],null,null]);return q(d,p(a.orig,a.chunks,!0),a.chunks,1),b&&q(d,p(b.orig,b.chunks,!0),b.chunks,2),d}function s(a,b){if(a.dealigned||b){if(!a.orig.curOp)return a.orig.operation(function(){s(a,b)});a.dealigned=!1;var d=a.mv.left==a?a.mv.right:a.mv.left;d&&(c(d),d.dealigned=!1);for(var e=r(a,d),f=a.mv.aligners,g=0;g<f.length;g++)f[g].clear();f.length=0;var h=[a.edit,a.orig],i=[];d&&h.push(d.orig);for(var g=0;g<h.length;g++)i.push(h[g].getScrollInfo().top);for(var j=0;j<e.length;j++)t(h,e[j],f);for(var g=0;g<h.length;g++)h[g].scrollTo(null,i[g])}}function t(a,b,c){for(var d=0,e=[],f=0;f<a.length;f++)if(null!=b[f]){var g=a[f].heightAtLine(b[f],\"local\");e[f]=g,d=Math.max(d,g)}for(var f=0;f<a.length;f++)if(null!=b[f]){var h=d-e[f];h>1&&c.push(u(a[f],b[f],h))}}function u(a,b,c){var d=!0;b>a.lastLine()&&(b--,d=!1);var e=document.createElement(\"div\");return e.className=\"CodeMirror-merge-spacer\",e.style.height=c+\"px\",e.style.minWidth=\"1px\",a.addLineWidget(b,e,{height:c,above:d,mergeSpacer:!0,handleMouseEvents:!0})}function v(a,b,c,d,e){var f=\"left\"==a.type,g=a.orig.heightAtLine(b.origFrom,\"local\",!0)-c;if(a.svg){var h=g,i=a.edit.heightAtLine(b.editFrom,\"local\",!0)-d;if(f){var j=h;h=i,i=j}var k=a.orig.heightAtLine(b.origTo,\"local\",!0)-c,l=a.edit.heightAtLine(b.editTo,\"local\",!0)-d;if(f){var j=k;k=l,l=j}var m=\" C \"+e/2+\" \"+i+\" \"+e/2+\" \"+h+\" \"+(e+2)+\" \"+h,n=\" C \"+e/2+\" \"+k+\" \"+e/2+\" \"+l+\" -1 \"+l;K(a.svg.appendChild(document.createElementNS(V,\"path\")),\"d\",\"M -1 \"+i+m+\" L \"+(e+2)+\" \"+k+n+\" z\",\"class\",a.classes.connect)}if(a.copyButtons){var o=a.copyButtons.appendChild(I(\"div\",\"left\"==a.type?\"\\u21dd\":\"\\u21dc\",\"CodeMirror-merge-copy\")),p=a.mv.options.allowEditingOriginals;if(o.title=p?\"Push to left\":\"Revert chunk\",o.chunk=b,o.style.top=(b.origTo>b.origFrom?g:a.edit.heightAtLine(b.editFrom,\"local\")-d)+\"px\",p){var q=a.edit.heightAtLine(b.editFrom,\"local\")-d,r=a.copyButtons.appendChild(I(\"div\",\"right\"==a.type?\"\\u21dd\":\"\\u21dc\",\"CodeMirror-merge-copy-reverse\"));r.title=\"Push to right\",r.chunk={editFrom:b.origFrom,editTo:b.origTo,origFrom:b.editFrom,origTo:b.editTo},r.style.top=q+\"px\",\"right\"==a.type?r.style.left=\"2px\":r.style.right=\"2px\"}}}function w(a,b,c,d){if(!a.diffOutOfDate){var e=d.origTo>c.lastLine()?U(d.origFrom-1):U(d.origFrom,0),f=U(d.origTo,0),g=d.editTo>b.lastLine()?U(d.editFrom-1):U(d.editFrom,0),h=U(d.editTo,0),i=a.mv.options.revertChunk;i?i(a.mv,c,e,f,b,g,h):b.replaceRange(c.getRange(e,f),g,h)}}function x(b){var c=b.lockButton=I(\"div\",null,\"CodeMirror-merge-scrolllock\");c.title=\"Toggle locked scrolling\";var d=I(\"div\",[c],\"CodeMirror-merge-scrolllock-wrap\");a.on(c,\"click\",function(){h(b,!b.lockScroll)});var e=[d];if(b.mv.options.revertButtons!==!1&&(b.copyButtons=I(\"div\",null,\"CodeMirror-merge-copybuttons-\"+b.type),a.on(b.copyButtons,\"click\",function(a){var c=a.target||a.srcElement;if(c.chunk)return\"CodeMirror-merge-copy-reverse\"==c.className?void w(b,b.orig,b.edit,c.chunk):void w(b,b.edit,b.orig,c.chunk)}),e.unshift(b.copyButtons)),\"align\"!=b.mv.options.connect){var f=document.createElementNS&&document.createElementNS(V,\"svg\");f&&!f.createSVGRect&&(f=null),b.svg=f,f&&e.push(f)}return b.gap=I(\"div\",e,\"CodeMirror-merge-gap\")}function y(a){return\"string\"==typeof a?a:a.getValue()}function z(a,b,c){Y||(Y=new diff_match_patch);for(var d=Y.diff_main(a,b),e=0;e<d.length;++e){var f=d[e];(c?/[^ \\t]/.test(f[1]):f[1])?e&&d[e-1][0]==f[0]&&(d.splice(e--,1),d[e][1]+=f[1]):d.splice(e--,1)}return d}function A(a){for(var b=[],c=0,d=0,e=U(0,0),f=U(0,0),g=0;g<a.length;++g){var h=a[g],i=h[0];if(i==DIFF_EQUAL){var j=!C(a,g)||e.line<c||f.line<d?1:0,k=e.line+j,l=f.line+j;M(e,h[1],null,f);var m=B(a,g)?1:0,n=e.line+m,o=f.line+m;n>k&&(g&&b.push({origFrom:d,origTo:l,editFrom:c,editTo:k}),c=n,d=o)}else M(i==DIFF_INSERT?e:f,h[1])}return(c<=e.line||d<=f.line)&&b.push({origFrom:d,origTo:f.line+1,editFrom:c,editTo:e.line+1}),b}function B(a,b){if(b==a.length-1)return!0;var c=a[b+1][1];return!(1==c.length&&b<a.length-2||10!=c.charCodeAt(0))&&(b==a.length-2||(c=a[b+2][1],(c.length>1||b==a.length-3)&&10==c.charCodeAt(0)))}function C(a,b){if(0==b)return!0;var c=a[b-1][1];return 10==c.charCodeAt(c.length-1)&&(1==b||(c=a[b-2][1],10==c.charCodeAt(c.length-1)))}function D(a,b,c){for(var d,e,f,g,h=0;h<a.length;h++){var i=a[h],j=c?i.editFrom:i.origFrom,k=c?i.editTo:i.origTo;null==e&&(j>b?(e=i.editFrom,g=i.origFrom):k>b&&(e=i.editTo,g=i.origTo)),k<=b?(d=i.editTo,f=i.origTo):j<=b&&(d=i.editFrom,f=i.origFrom)}return{edit:{before:d,after:e},orig:{before:f,after:g}}}function E(b,c,d){function e(){g.clear(),b.removeLineClass(c,\"wrap\",\"CodeMirror-merge-collapsed-line\")}b.addLineClass(c,\"wrap\",\"CodeMirror-merge-collapsed-line\");var f=document.createElement(\"span\");f.className=\"CodeMirror-merge-collapsed-widget\",f.title=\"Identical text collapsed. Click to expand.\";var g=b.markText(U(c,0),U(d-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:f,clearOnEnter:!0});return a.on(f,\"click\",e),{mark:g,clear:e}}function F(a,b){function c(){for(var a=0;a<d.length;a++)d[a].clear()}for(var d=[],e=0;e<b.length;e++){var f=b[e],g=E(f.cm,f.line,f.line+a);d.push(g),g.mark.on(\"clear\",c)}return d[0].mark}function G(a,b,c,d){for(var e=0;e<a.chunks.length;e++)for(var f=a.chunks[e],g=f.editFrom-b;g<f.editTo+b;g++){var h=g+c;h>=0&&h<d.length&&(d[h]=!1)}}function H(a,b){\"number\"!=typeof b&&(b=2);for(var c=[],d=a.editor(),e=d.firstLine(),f=e,g=d.lastLine();f<=g;f++)c.push(!0);a.left&&G(a.left,b,e,c),a.right&&G(a.right,b,e,c);for(var h=0;h<c.length;h++)if(c[h]){for(var i=h+e,j=1;h<c.length-1&&c[h+1];h++,j++);if(j>b){var k=[{line:i,cm:d}];a.left&&k.push({line:o(i,a.left.chunks),cm:a.left.orig}),a.right&&k.push({line:o(i,a.right.chunks),cm:a.right.orig});var l=F(j,k);a.options.onCollapse&&a.options.onCollapse(a,i,j,l)}}}function I(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),\"string\"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function J(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild)}function K(a){for(var b=1;b<arguments.length;b+=2)a.setAttribute(arguments[b],arguments[b+1])}function L(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function M(a,b,c,d){for(var e=c?U(a.line,a.ch):a,f=0;;){var g=b.indexOf(\"\\n\",f);if(g==-1)break;++e.line,d&&++d.line,f=g+1}return e.ch=(f?0:e.ch)+(b.length-f),d&&(d.ch=(f?0:d.ch)+(b.length-f)),e}function N(a){this.cm=a,this.alignable=[],this.height=a.doc.height;var b=this;a.on(\"markerAdded\",function(a,c){if(c.collapsed){var d=c.find(1);null!=d&&b.set(d.line,_)}}),a.on(\"markerCleared\",function(a,c,d,e){null!=e&&c.collapsed&&b.check(e,_,b.hasMarker)}),a.on(\"markerChanged\",this.signal.bind(this)),a.on(\"lineWidgetAdded\",function(a,c,d){c.mergeSpacer||(c.above?b.set(d-1,$):b.set(d,Z))}),a.on(\"lineWidgetCleared\",function(a,c,d){c.mergeSpacer||(c.above?b.check(d-1,$,b.hasWidgetBelow):b.check(d,Z,b.hasWidget))}),a.on(\"lineWidgetChanged\",this.signal.bind(this)),a.on(\"change\",function(a,c){var d=c.from.line,e=c.to.line-c.from.line,f=c.text.length-1,g=d+f;(e||f)&&b.map(d,e,f),b.check(g,_,b.hasMarker),(e||f)&&b.check(c.from.line,_,b.hasMarker)}),a.on(\"viewportChange\",function(){b.cm.doc.height!=b.height&&b.signal()})}function O(a,b){return(a.line-b.line||a.ch-b.ch)<0?a:b}function P(a,b){return(a.line-b.line||a.ch-b.ch)>0?a:b}function Q(a,b){return a.line==b.line&&a.ch==b.ch}function R(a,b,c){for(var d=a.length-1;d>=0;d--){var e=a[d],f=(c?e.origTo:e.editTo)-1;if(f<b)return f}}function S(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=c?e.origFrom:e.editFrom;if(f>b)return f}}function T(b,d){var e=null,f=b.state.diffViews,g=b.getCursor().line;if(f)for(var h=0;h<f.length;h++){var i=f[h],j=b==i.orig;c(i);var k=d<0?R(i.chunks,g,j):S(i.chunks,g,j);null==k||null!=e&&!(d<0?k>e:k<e)||(e=k)}return null==e?a.Pass:void b.setCursor(e,0)}var U=a.Pos,V=\"http://www.w3.org/2000/svg\";b.prototype={constructor:b,init:function(b,c,d){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=a(b,L({value:c,readOnly:!this.mv.options.allowEditingOriginals},L(d))),\"align\"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new N(this.edit)),this.orig.state.trackAlignable=new N(this.orig)),this.orig.state.diffViews=[this];var e=d.chunkClassLocation||\"background\";\"[object Array]\"!=Object.prototype.toString.call(e)&&(e=[e]),this.classes.classLocation=e,this.diff=z(y(c),y(d.value),this.mv.options.ignoreWhitespace),this.chunks=A(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=d.showDifferences!==!1},registerEvents:function(a){this.forceUpdate=d(this),h(this,!0,!1),e(this,a)},setShowDifferences:function(a){a=a!==!1,a!=this.showDifferences&&(this.showDifferences=a,this.forceUpdate(\"full\"))}};var W=!1,X=a.MergeView=function(c,d){if(!(this instanceof X))return new X(c,d);this.options=d;var e=d.origLeft,f=null==d.origRight?d.orig:d.origRight,g=null!=e,h=null!=f,i=1+(g?1:0)+(h?1:0),j=[],k=this.left=null,l=this.right=null,m=this;if(g){k=this.left=new b(this,\"left\");var o=I(\"div\",null,\"CodeMirror-merge-pane CodeMirror-merge-left\");j.push(o),j.push(x(k))}var p=I(\"div\",null,\"CodeMirror-merge-pane CodeMirror-merge-editor\");if(j.push(p),h){l=this.right=new b(this,\"right\"),j.push(x(l));var q=I(\"div\",null,\"CodeMirror-merge-pane CodeMirror-merge-right\");j.push(q)}(h?q:p).className+=\" CodeMirror-merge-pane-rightmost\",j.push(I(\"div\",null,null,\"height: 0; clear: both;\"));var r=this.wrap=c.appendChild(I(\"div\",j,\"CodeMirror-merge CodeMirror-merge-\"+i+\"pane\"));this.edit=a(p,L(d)),k&&k.init(o,e,d),l&&l.init(q,f,d),d.collapseIdentical&&this.editor().operation(function(){H(m,d.collapseIdentical)}),\"align\"==d.connect&&(this.aligners=[],s(this.left||this.right,!0)),k&&k.registerEvents(l),l&&l.registerEvents(k);var t=function(){k&&n(k),l&&n(l)};a.on(window,\"resize\",t);var u=setInterval(function(){for(var b=r.parentNode;b&&b!=document.body;b=b.parentNode);b||(clearInterval(u),a.off(window,\"resize\",t))},5e3)};X.prototype={constructor:X,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(a){this.right&&this.right.setShowDifferences(a),this.left&&this.left.setShowDifferences(a)},rightChunks:function(){if(this.right)return c(this.right),this.right.chunks},leftChunks:function(){if(this.left)return c(this.left),this.left.chunks}};var Y,Z=1,$=2,_=4;N.prototype={signal:function(){a.signal(this,\"realign\"),this.height=this.cm.doc.height},set:function(a,b){for(var c=-1;c<this.alignable.length;c+=2){var d=this.alignable[c]-a;if(0==d){if((this.alignable[c+1]&b)==b)return;return this.alignable[c+1]|=b,void this.signal()}if(d>0)break}this.signal(),this.alignable.splice(c,0,a,b)},find:function(a){for(var b=0;b<this.alignable.length;b+=2)if(this.alignable[b]==a)return b;return-1},check:function(a,b,c){var d=this.find(a);if(d!=-1&&this.alignable[d+1]&b&&!c.call(this,a)){this.signal();var e=this.alignable[d+1]&~b;e?this.alignable[d+1]=e:this.alignable.splice(d,2)}},hasMarker:function(a){var b=this.cm.getLineHandle(a);if(b.markedSpans)for(var c=0;c<b.markedSpans.length;c++)if(b.markedSpans[c].mark.collapsed&&null!=b.markedSpans[c].to)return!0;return!1},hasWidget:function(a){var b=this.cm.getLineHandle(a);if(b.widgets)for(var c=0;c<b.widgets.length;c++)if(!b.widgets[c].above&&!b.widgets[c].mergeSpacer)return!0;return!1},hasWidgetBelow:function(a){if(a==this.cm.lastLine())return!1;var b=this.cm.getLineHandle(a+1);if(b.widgets)for(var c=0;c<b.widgets.length;c++)if(b.widgets[c].above&&!b.widgets[c].mergeSpacer)return!0;return!1},map:function(a,b,c){for(var d=c-b,e=a+b,f=-1,g=-1,h=0;h<this.alignable.length;h+=2){var i=this.alignable[h];i==a&&this.alignable[h+1]&$&&(f=h),i==e&&this.alignable[h+1]&$&&(g=h),i<=a||(i<e?this.alignable.splice(h--,2):this.alignable[h]+=d)}if(f>-1){var j=this.alignable[f+1];j==$?this.alignable.splice(f,2):this.alignable[f+1]=j&~$}g>-1&&c&&this.set(a+c,$)}},a.commands.goNextDiff=function(a){return T(a,1)},a.commands.goPrevDiff=function(a){return T(a,-1)}})},{\"../../lib/codemirror\":59}],35:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\"),\"cjs\"):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],function(a){d(a,\"amd\")}):d(CodeMirror,\"plain\")}(function(b,c){function d(a,b){var c=b;return function(){0==--c&&a()}}function e(a,c){var e=b.modes[a].dependencies;if(!e)return c();for(var f=[],g=0;g<e.length;++g)b.modes.hasOwnProperty(e[g])||f.push(e[g]);if(!f.length)return c();for(var h=d(c,f.length),g=0;g<f.length;++g)b.requireMode(f[g],h)}b.modeURL||(b.modeURL=\"../mode/%N/%N.js\");var f={};b.requireMode=function(d,g){if(\"string\"!=typeof d&&(d=d.name),b.modes.hasOwnProperty(d))return e(d,g);if(f.hasOwnProperty(d))return f[d].push(g);var h=b.modeURL.replace(/%N/g,d);if(\"plain\"==c){var i=document.createElement(\"script\");i.src=h;var j=document.getElementsByTagName(\"script\")[0],k=f[d]=[g];b.on(i,\"load\",function(){e(d,function(){for(var a=0;a<k.length;++a)k[a]()})}),j.parentNode.insertBefore(i,j)}else\"cjs\"==c?(a(h),g()):\"amd\"==c&&requirejs([h],g)},b.autoLoadMode=function(a,c){b.modes.hasOwnProperty(c)||b.requireMode(c,function(){a.setOption(\"mode\",a.getOption(\"mode\"))})}})},{\"../../lib/codemirror\":59}],36:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../../lib/codemirror\")):\"function\"==typeof define&&define.amd?define([\"../../lib/codemirror\"],d):d(CodeMirror)}(function(a){\"use strict\";a.multiplexingMode=function(b){\n\";i:16;s:32028:\"d.push({head:h,anchor:h}),e=g.line+1}}b.setSelections(d)}),void b.execCommand(\"indentAuto\"))}function e(b,c){for(var d=c.ch,e=d,f=b.getLine(c.line);d&&a.isWordChar(f.charAt(d-1));)--d;for(;e<f.length&&a.isWordChar(f.charAt(e));)++e;return{from:o(c.line,d),to:o(c.line,e),word:f.slice(d,e)}}function f(a,b){for(var c=a.listSelections(),d=[],e=0;e<c.length;e++){var f=c[e],g=a.findPosV(f.anchor,b,\"line\"),h=a.findPosV(f.head,b,\"line\"),i={anchor:g,head:h};d.push(f),d.push(i)}a.setSelections(d)}function g(a,b,c){for(var d=0;d<a.length;d++)if(a[d].from()==b&&a[d].to()==c)return!0;return!1}function h(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d],f=e.head,g=a.scanForBracket(f,-1);if(!g)return!1;for(;;){var h=a.scanForBracket(f,1);if(!h)return!1;if(h.ch==u.charAt(u.indexOf(g.ch)+1)){c.push({anchor:o(g.pos.line,g.pos.ch+1),head:h.pos});break}f=o(h.pos.line,h.pos.ch+1)}}return a.setSelections(c),!0}function i(b,c){if(b.isReadOnly())return a.Pass;for(var d,e=b.listSelections(),f=[],g=0;g<e.length;g++){var h=e[g];if(!h.empty()){for(var i=h.from().line,j=h.to().line;g<e.length-1&&e[g+1].from().line==j;)j=e[++g].to().line;e[g].to().ch||j--,f.push(i,j)}}f.length?d=!0:f.push(b.firstLine(),b.lastLine()),b.operation(function(){for(var a=[],e=0;e<f.length;e+=2){var g=f[e],h=f[e+1],i=o(g,0),j=o(h),k=b.getRange(i,j,!1);c?k.sort():k.sort(function(a,b){var c=a.toUpperCase(),d=b.toUpperCase();return c!=d&&(a=c,b=d),a<b?-1:a==b?0:1}),b.replaceRange(k,i,j),d&&a.push({anchor:i,head:o(h+1,0)})}d&&b.setSelections(a,0)})}function j(b,c){b.operation(function(){for(var d=b.listSelections(),f=[],g=[],h=0;h<d.length;h++){var i=d[h];i.empty()?(f.push(h),g.push(\"\")):g.push(c(b.getRange(i.from(),i.to())))}b.replaceSelections(g,\"around\",\"case\");for(var j,h=f.length-1;h>=0;h--){var i=d[f[h]];if(!(j&&a.cmpPos(i.head,j)>0)){var k=e(b,i.head);j=k.from,b.replaceRange(c(k.word),k.from,k.to)}}})}function k(b){var c=b.getCursor(\"from\"),d=b.getCursor(\"to\");if(0==a.cmpPos(c,d)){var f=e(b,c);if(!f.word)return;c=f.from,d=f.to}return{from:c,to:d,query:b.getRange(c,d),word:f}}function l(a,b){var c=k(a);if(c){var d=c.query,e=a.getSearchCursor(d,b?c.to:c.from);(b?e.findNext():e.findPrevious())?a.setSelection(e.from(),e.to()):(e=a.getSearchCursor(d,b?o(a.firstLine(),0):a.clipPos(o(a.lastLine()))),(b?e.findNext():e.findPrevious())?a.setSelection(e.from(),e.to()):c.word&&a.setSelection(c.from,c.to))}}var m=a.keyMap.sublime={fallthrough:\"default\"},n=a.commands,o=a.Pos,p=a.keyMap[\"default\"]==a.keyMap.macDefault,q=p?\"Cmd-\":\"Ctrl-\",r=p?\"Ctrl-\":\"Alt-\";n[m[r+\"Left\"]=\"goSubwordLeft\"]=function(a){c(a,-1)},n[m[r+\"Right\"]=\"goSubwordRight\"]=function(a){c(a,1)},p&&(m[\"Cmd-Left\"]=\"goLineStartSmart\");var s=p?\"Ctrl-Alt-\":\"Ctrl-\";n[m[s+\"Up\"]=\"scrollLineUp\"]=function(a){var b=a.getScrollInfo();if(!a.somethingSelected()){var c=a.lineAtHeight(b.top+b.clientHeight,\"local\");a.getCursor().line>=c&&a.execCommand(\"goLineUp\")}a.scrollTo(null,b.top-a.defaultTextHeight())},n[m[s+\"Down\"]=\"scrollLineDown\"]=function(a){var b=a.getScrollInfo();if(!a.somethingSelected()){var c=a.lineAtHeight(b.top,\"local\")+1;a.getCursor().line<=c&&a.execCommand(\"goLineDown\")}a.scrollTo(null,b.top+a.defaultTextHeight())},n[m[\"Shift-\"+q+\"L\"]=\"splitSelectionByLine\"]=function(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++)for(var e=b[d].from(),f=b[d].to(),g=e.line;g<=f.line;++g)f.line>e.line&&g==f.line&&0==f.ch||c.push({anchor:g==e.line?e:o(g,0),head:g==f.line?f:o(g)});a.setSelections(c,0)},m[\"Shift-Tab\"]=\"indentLess\",n[m.Esc=\"singleSelectionTop\"]=function(a){var b=a.listSelections()[0];a.setSelection(b.anchor,b.head,{scroll:!1})},n[m[q+\"L\"]=\"selectLine\"]=function(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d];c.push({anchor:o(e.from().line,0),head:o(e.to().line+1,0)})}a.setSelections(c)},m[\"Shift-Ctrl-K\"]=\"deleteLine\",n[m[q+\"Enter\"]=\"insertLineAfter\"]=function(a){return d(a,!1)},n[m[\"Shift-\"+q+\"Enter\"]=\"insertLineBefore\"]=function(a){return d(a,!0)},n[m[q+\"D\"]=\"selectNextOccurrence\"]=function(b){var c=b.getCursor(\"from\"),d=b.getCursor(\"to\"),f=b.state.sublimeFindFullWord==b.doc.sel;if(0==a.cmpPos(c,d)){var h=e(b,c);if(!h.word)return;b.setSelection(h.from,h.to),f=!0}else{var i=b.getRange(c,d),j=f?new RegExp(\"\\\\b\"+i+\"\\\\b\"):i,k=b.getSearchCursor(j,d),l=k.findNext();if(l||(k=b.getSearchCursor(j,o(b.firstLine(),0)),l=k.findNext()),!l||g(b.listSelections(),k.from(),k.to()))return a.Pass;b.addSelection(k.from(),k.to())}f&&(b.state.sublimeFindFullWord=b.doc.sel)};var t=p?\"Shift-Cmd\":\"Alt-Ctrl\";n[m[t+\"Up\"]=\"addCursorToPrevLine\"]=function(a){f(a,-1)},n[m[t+\"Down\"]=\"addCursorToNextLine\"]=function(a){f(a,1)};var u=\"(){}[]\";n[m[\"Shift-\"+q+\"Space\"]=\"selectScope\"]=function(a){h(a)||a.execCommand(\"selectAll\")},n[m[\"Shift-\"+q+\"M\"]=\"selectBetweenBrackets\"]=function(b){if(!h(b))return a.Pass},n[m[q+\"M\"]=\"goToBracket\"]=function(b){b.extendSelectionsBy(function(c){var d=b.scanForBracket(c.head,1);if(d&&0!=a.cmpPos(d.pos,c.head))return d.pos;var e=b.scanForBracket(c.head,-1);return e&&o(e.pos.line,e.pos.ch+1)||c.head})};var v=p?\"Cmd-Ctrl-\":\"Shift-Ctrl-\";n[m[v+\"Up\"]=\"swapLineUp\"]=function(b){if(b.isReadOnly())return a.Pass;for(var c=b.listSelections(),d=[],e=b.firstLine()-1,f=[],g=0;g<c.length;g++){var h=c[g],i=h.from().line-1,j=h.to().line;f.push({anchor:o(h.anchor.line-1,h.anchor.ch),head:o(h.head.line-1,h.head.ch)}),0!=h.to().ch||h.empty()||--j,i>e?d.push(i,j):d.length&&(d[d.length-1]=j),e=j}b.operation(function(){for(var a=0;a<d.length;a+=2){var c=d[a],e=d[a+1],g=b.getLine(c);b.replaceRange(\"\",o(c,0),o(c+1,0),\"+swapLine\"),e>b.lastLine()?b.replaceRange(\"\\n\"+g,o(b.lastLine()),null,\"+swapLine\"):b.replaceRange(g+\"\\n\",o(e,0),null,\"+swapLine\")}b.setSelections(f),b.scrollIntoView()})},n[m[v+\"Down\"]=\"swapLineDown\"]=function(b){if(b.isReadOnly())return a.Pass;for(var c=b.listSelections(),d=[],e=b.lastLine()+1,f=c.length-1;f>=0;f--){var g=c[f],h=g.to().line+1,i=g.from().line;0!=g.to().ch||g.empty()||h--,h<e?d.push(h,i):d.length&&(d[d.length-1]=i),e=i}b.operation(function(){for(var a=d.length-2;a>=0;a-=2){var c=d[a],e=d[a+1],f=b.getLine(c);c==b.lastLine()?b.replaceRange(\"\",o(c-1),o(c),\"+swapLine\"):b.replaceRange(\"\",o(c,0),o(c+1,0),\"+swapLine\"),b.replaceRange(f+\"\\n\",o(e,0),null,\"+swapLine\")}b.scrollIntoView()})},n[m[q+\"/\"]=\"toggleCommentIndented\"]=function(a){a.toggleComment({indent:!0})},n[m[q+\"J\"]=\"joinLines\"]=function(a){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){for(var e=b[d],f=e.from(),g=f.line,h=e.to().line;d<b.length-1&&b[d+1].from().line==h;)h=b[++d].to().line;c.push({start:g,end:h,anchor:!e.empty()&&f})}a.operation(function(){for(var b=0,d=[],e=0;e<c.length;e++){for(var f,g=c[e],h=g.anchor&&o(g.anchor.line-b,g.anchor.ch),i=g.start;i<=g.end;i++){var j=i-b;i==g.end&&(f=o(j,a.getLine(j).length+1)),j<a.lastLine()&&(a.replaceRange(\" \",o(j),o(j+1,/^\\s*/.exec(a.getLine(j+1))[0].length)),++b)}d.push({anchor:h||f,head:f})}a.setSelections(d,0)})},n[m[\"Shift-\"+q+\"D\"]=\"duplicateLine\"]=function(a){a.operation(function(){for(var b=a.listSelections().length,c=0;c<b;c++){var d=a.listSelections()[c];d.empty()?a.replaceRange(a.getLine(d.head.line)+\"\\n\",o(d.head.line,0)):a.replaceRange(a.getRange(d.from(),d.to()),d.from())}a.scrollIntoView()})},p||(m[q+\"T\"]=\"transposeChars\"),n[m.F9=\"sortLines\"]=function(a){i(a,!0)},n[m[q+\"F9\"]=\"sortLinesInsensitive\"]=function(a){i(a,!1)},n[m.F2=\"nextBookmark\"]=function(a){var b=a.state.sublimeBookmarks;if(b)for(;b.length;){var c=b.shift(),d=c.find();if(d)return b.push(c),a.setSelection(d.from,d.to)}},n[m[\"Shift-F2\"]=\"prevBookmark\"]=function(a){var b=a.state.sublimeBookmarks;if(b)for(;b.length;){b.unshift(b.pop());var c=b[b.length-1].find();if(c)return a.setSelection(c.from,c.to);b.pop()}},n[m[q+\"F2\"]=\"toggleBookmark\"]=function(a){for(var b=a.listSelections(),c=a.state.sublimeBookmarks||(a.state.sublimeBookmarks=[]),d=0;d<b.length;d++){for(var e=b[d].from(),f=b[d].to(),g=a.findMarks(e,f),h=0;h<g.length;h++)if(g[h].sublimeBookmark){g[h].clear();for(var i=0;i<c.length;i++)c[i]==g[h]&&c.splice(i--,1);break}h==g.length&&c.push(a.markText(e,f,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},n[m[\"Shift-\"+q+\"F2\"]=\"clearBookmarks\"]=function(a){var b=a.state.sublimeBookmarks;if(b)for(var c=0;c<b.length;c++)b[c].clear();b.length=0},n[m[\"Alt-F2\"]=\"selectBookmarks\"]=function(a){var b=a.state.sublimeBookmarks,c=[];if(b)for(var d=0;d<b.length;d++){var e=b[d].find();e?c.push({anchor:e.from,head:e.to}):b.splice(d--,0)}c.length&&a.setSelections(c,0)},m[\"Alt-Q\"]=\"wrapLines\";var w=q+\"K \";m[w+q+\"Backspace\"]=\"delLineLeft\",n[m.Backspace=\"smartBackspace\"]=function(b){return b.somethingSelected()?a.Pass:void b.operation(function(){for(var c=b.listSelections(),d=b.getOption(\"indentUnit\"),e=c.length-1;e>=0;e--){var f=c[e].head,g=b.getRange({line:f.line,ch:0},f),h=a.countColumn(g,null,b.getOption(\"tabSize\")),i=b.findPosH(f,-1,\"char\",!1);if(g&&!/\\S/.test(g)&&h%d==0){var j=new o(f.line,a.findColumn(g,h-d,d));j.ch!=f.ch&&(i=j)}b.replaceRange(\"\",i,f,\"+delete\")}})},n[m[w+q+\"K\"]=\"delLineRight\"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=b.length-1;c>=0;c--)a.replaceRange(\"\",b[c].anchor,o(b[c].to().line),\"+delete\");a.scrollIntoView()})},n[m[w+q+\"U\"]=\"upcaseAtCursor\"]=function(a){j(a,function(a){return a.toUpperCase()})},n[m[w+q+\"L\"]=\"downcaseAtCursor\"]=function(a){j(a,function(a){return a.toLowerCase()})},n[m[w+q+\"Space\"]=\"setSublimeMark\"]=function(a){a.state.sublimeMark&&a.state.sublimeMark.clear(),a.state.sublimeMark=a.setBookmark(a.getCursor())},n[m[w+q+\"A\"]=\"selectToSublimeMark\"]=function(a){var b=a.state.sublimeMark&&a.state.sublimeMark.find();b&&a.setSelection(a.getCursor(),b)},n[m[w+q+\"W\"]=\"deleteToSublimeMark\"]=function(b){var c=b.state.sublimeMark&&b.state.sublimeMark.find();if(c){var d=b.getCursor(),e=c;if(a.cmpPos(d,e)>0){var f=e;e=d,d=f}b.state.sublimeKilled=b.getRange(d,e),b.replaceRange(\"\",d,e)}},n[m[w+q+\"X\"]=\"swapWithSublimeMark\"]=function(a){var b=a.state.sublimeMark&&a.state.sublimeMark.find();b&&(a.state.sublimeMark.clear(),a.state.sublimeMark=a.setBookmark(a.getCursor()),a.setCursor(b))},n[m[w+q+\"Y\"]=\"sublimeYank\"]=function(a){null!=a.state.sublimeKilled&&a.replaceSelection(a.state.sublimeKilled,null,\"paste\")},m[w+q+\"G\"]=\"clearBookmarks\",n[m[w+q+\"C\"]=\"showInCenter\"]=function(a){var b=a.cursorCoords(null,\"local\");a.scrollTo(null,(b.top+b.bottom)/2-a.getScrollInfo().clientHeight/2)};var x=p?\"Ctrl-Shift-\":\"Ctrl-Alt-\";n[m[x+\"Up\"]=\"selectLinesUpward\"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=0;c<b.length;c++){var d=b[c];d.head.line>a.firstLine()&&a.addSelection(o(d.head.line-1,d.head.ch))}})},n[m[x+\"Down\"]=\"selectLinesDownward\"]=function(a){a.operation(function(){for(var b=a.listSelections(),c=0;c<b.length;c++){var d=b[c];d.head.line<a.lastLine()&&a.addSelection(o(d.head.line+1,d.head.ch))}})},n[m[q+\"F3\"]=\"findUnder\"]=function(a){l(a,!0)},n[m[\"Shift-\"+q+\"F3\"]=\"findUnderPrevious\"]=function(a){l(a,!1)},n[m[\"Alt-F3\"]=\"findAllUnder\"]=function(a){var b=k(a);if(b){for(var c=a.getSearchCursor(b.query),d=[],e=-1;c.findNext();)d.push({anchor:c.from(),head:c.to()}),c.from().line<=b.from.line&&c.from().ch<=b.from.ch&&e++;a.setSelections(d,e)}},m[\"Shift-\"+q+\"[\"]=\"fold\",m[\"Shift-\"+q+\"]\"]=\"unfold\",m[w+q+\"0\"]=m[w+q+\"J\"]=\"unfoldAll\",m[q+\"I\"]=\"findIncremental\",m[\"Shift-\"+q+\"I\"]=\"findIncrementalReverse\",m[q+\"H\"]=\"replace\",m.F3=\"findNext\",m[\"Shift-F3\"]=\"findPrev\",a.normalizeKeyMap(m)})},{\"../addon/edit/matchbrackets\":12,\"../addon/search/searchcursor\":49,\"../lib/codemirror\":59}],58:[function(a,b,c){!function(d){\"object\"==typeof c&&\"object\"==typeof b?d(a(\"../lib/codemirror\"),a(\"../addon/search/searchcursor\"),a(\"../addon/dialog/dialog\"),a(\"../addon/edit/matchbrackets.js\")):\"function\"==typeof define&&define.amd?define([\"../lib/codemirror\",\"../addon/search/searchcursor\",\"../addon/dialog/dialog\",\"../addon/edit/matchbrackets\"],d):d(CodeMirror)}(function(a){\"use strict\";var b=[{keys:\"<Left>\",type:\"keyToKey\",toKeys:\"h\"},{keys:\"<Right>\",type:\"keyToKey\",toKeys:\"l\"},{keys:\"<Up>\",type:\"keyToKey\",toKeys:\"k\"},{keys:\"<Down>\",type:\"keyToKey\",toKeys:\"j\"},{keys:\"<Space>\",type:\"keyToKey\",toKeys:\"l\"},{keys:\"<BS>\",type:\"keyToKey\",toKeys:\"h\",context:\"normal\"},{keys:\"<C-Space>\",type:\"keyToKey\",toKeys:\"W\"},{keys:\"<C-BS>\",type:\"keyToKey\",toKeys:\"B\",context:\"normal\"},{keys:\"<S-Space>\",type:\"keyToKey\",toKeys:\"w\"},{keys:\"<S-BS>\",type:\"keyToKey\",toKeys:\"b\",context:\"normal\"},{keys:\"<C-n>\",type:\"keyToKey\",toKeys:\"j\"},{keys:\"<C-p>\",type:\"keyToKey\",toKeys:\"k\"},{keys:\"<C-[>\",type:\"keyToKey\",toKeys:\"<Esc>\"},{keys:\"<C-c>\",type:\"keyToKey\",toKeys:\"<Esc>\"},{keys:\"<C-[>\",type:\"keyToKey\",toKeys:\"<Esc>\",context:\"insert\"},{keys:\"<C-c>\",type:\"keyToKey\",toKeys:\"<Esc>\",context:\"insert\"},{keys:\"s\",type:\"keyToKey\",toKeys:\"cl\",context:\"normal\"},{keys:\"s\",type:\"keyToKey\",toKeys:\"c\",context:\"visual\"},{keys:\"S\",type:\"keyToKey\",toKeys:\"cc\",context:\"normal\"},{keys:\"S\",type:\"keyToKey\",toKeys:\"VdO\",context:\"visual\"},{keys:\"<Home>\",type:\"keyToKey\",toKeys:\"0\"},{keys:\"<End>\",type:\"keyToKey\",toKeys:\"$\"},{keys:\"<PageUp>\",type:\"keyToKey\",toKeys:\"<C-b>\"},{keys:\"<PageDown>\",type:\"keyToKey\",toKeys:\"<C-f>\"},{keys:\"<CR>\",type:\"keyToKey\",toKeys:\"j^\",context:\"normal\"},{keys:\"<Ins>\",type:\"action\",action:\"toggleOverwrite\",context:\"insert\"},{keys:\"H\",type:\"motion\",motion:\"moveToTopLine\",motionArgs:{linewise:!0,toJumplist:!0}},{keys:\"M\",type:\"motion\",motion:\"moveToMiddleLine\",motionArgs:{linewise:!0,toJumplist:!0}},{keys:\"L\",type:\"motion\",motion:\"moveToBottomLine\",motionArgs:{linewise:!0,toJumplist:!0}},{keys:\"h\",type:\"motion\",motion:\"moveByCharacters\",motionArgs:{forward:!1}},{keys:\"l\",type:\"motion\",motion:\"moveByCharacters\",motionArgs:{forward:!0}},{keys:\"j\",type:\"motion\",motion:\"moveByLines\",motionArgs:{forward:!0,linewise:!0}},{keys:\"k\",type:\"motion\",motion:\"moveByLines\",motionArgs:{forward:!1,linewise:!0}},{keys:\"gj\",type:\"motion\",motion:\"moveByDisplayLines\",motionArgs:{forward:!0}},{keys:\"gk\",type:\"motion\",motion:\"moveByDisplayLines\",motionArgs:{forward:!1}},{keys:\"w\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!0,wordEnd:!1}},{keys:\"W\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:\"e\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:\"E\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:\"b\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!1,wordEnd:!1}},{keys:\"B\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:\"ge\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:\"gE\",type:\"motion\",motion:\"moveByWords\",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:\"{\",type:\"motion\",motion:\"moveByParagraph\",motionArgs:{forward:!1,toJumplist:!0}},{keys:\"}\",type:\"motion\",motion:\"moveByParagraph\",motionArgs:{forward:!0,toJumplist:!0}},{keys:\"<C-f>\",type:\"motion\",motion:\"moveByPage\",motionArgs:{forward:!0}},{keys:\"<C-b>\",type:\"motion\",motion:\"moveByPage\",motionArgs:{forward:!1}},{keys:\"<C-d>\",type:\"motion\",motion:\"moveByScroll\",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:\"<C-u>\",type:\"motion\",motion:\"moveByScroll\",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:\"gg\",type:\"motion\",motion:\"moveToLineOrEdgeOfDocument\",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:\"G\",type:\"motion\",motion:\"moveToLineOrEdgeOfDocument\",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:\"0\",type:\"motion\",motion:\"moveToStartOfLine\"},{keys:\"^\",type:\"motion\",motion:\"moveToFirstNonWhiteSpaceCharacter\"},{keys:\"+\",type:\"motion\",motion:\"moveByLines\",motionArgs:{forward:!0,toFirstChar:!0}},{keys:\"-\",type:\"motion\",motion:\"moveByLines\",motionArgs:{forward:!1,toFirstChar:!0}},{keys:\"_\",type:\"motion\",motion:\"moveByLines\",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:\"$\",type:\"motion\",motion:\"moveToEol\",motionArgs:{inclusive:!0}},{keys:\"%\",type:\"motion\",motion:\"moveToMatchedSymbol\",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:\"f<character>\",type:\"motion\",motion:\"moveToCharacter\",motionArgs:{forward:!0,inclusive:!0}},{keys:\"F<character>\",type:\"motion\",motion:\"moveToCharacter\",motionArgs:{forward:!1}},{keys:\"t<character>\",type:\"motion\",motion:\"moveTillCharacter\",motionArgs:{forward:!0,inclusive:!0}},{keys:\"T<character>\",type:\"motion\",motion:\"moveTillCharacter\",motionArgs:{forward:!1}},{keys:\";\",type:\"motion\",motion:\"repeatLastCharacterSearch\",motionArgs:{forward:!0}},{keys:\",\",type:\"motion\",motion:\"repeatLastCharacterSearch\",motionArgs:{forward:!1}},{keys:\"\'<character>\",type:\"motion\",motion:\"goToMark\",motionArgs:{toJumplist:!0,linewise:!0}},{keys:\"`<character>\",type:\"motion\",motion:\"goToMark\",motionArgs:{toJumplist:!0}},{keys:\"]`\",type:\"motion\",motion:\"jumpToMark\",motionArgs:{forward:!0}},{keys:\"[`\",type:\"motion\",motion:\"jumpToMark\",motionArgs:{forward:!1}},{keys:\"]\'\",type:\"motion\",motion:\"jumpToMark\",motionArgs:{forward:!0,linewise:!0}},{keys:\"[\'\",type:\"motion\",motion:\"jumpToMark\",motionArgs:{forward:!1,linewise:!0}},{keys:\"]p\",type:\"action\",action:\"paste\",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:\"[p\",type:\"action\",action:\"paste\",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:\"]<character>\",type:\"motion\",motion:\"moveToSymbol\",motionArgs:{forward:!0,toJumplist:!0}},{keys:\"[<character>\",type:\"motion\",motion:\"moveToSymbol\",motionArgs:{forward:!1,toJumplist:!0}},{keys:\"|\",type:\"motion\",motion:\"moveToColumn\"},{keys:\"o\",type:\"motion\",motion:\"moveToOtherHighlightedEnd\",context:\"visual\"},{keys:\"O\",type:\"motion\",motion:\"moveToOtherHighlightedEnd\",motionArgs:{sameLine:!0},context:\"visual\"},{keys:\"d\",type:\"operator\",operator:\"delete\"},{keys:\"y\",type:\"operator\",operator:\"yank\"},{keys:\"c\",type:\"operator\",operator:\"change\"},{keys:\">\",type:\"operator\",operator:\"indent\",operatorArgs:{indentRight:!0}},{keys:\"<\",type:\"operator\",operator:\"indent\",operatorArgs:{indentRight:!1}},{keys:\"g~\",type:\"operator\",operator:\"changeCase\"},{keys:\"gu\",type:\"operator\",operator:\"changeCase\",operatorArgs:{toLower:!0},isEdit:!0},{keys:\"gU\",type:\"operator\",operator:\"changeCase\",operatorArgs:{toLower:!1},isEdit:!0},{keys:\"n\",type:\"motion\",motion:\"findNext\",motionArgs:{forward:!0,toJumplist:!0}},{keys:\"N\",type:\"motion\",motion:\"findNext\",motionArgs:{forward:!1,toJumplist:!0}},{keys:\"x\",type:\"operatorMotion\",operator:\"delete\",motion:\"moveByCharacters\",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:\"X\",type:\"operatorMotion\",operator:\"delete\",motion:\"moveByCharacters\",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:\"D\",type:\"operatorMotion\",operator:\"delete\",motion:\"moveToEol\",motionArgs:{inclusive:!0},context:\"normal\"},{keys:\"D\",type:\"operator\",operator:\"delete\",operatorArgs:{linewise:!0},context:\"visual\"},{keys:\"Y\",type:\"operatorMotion\",operator:\"yank\",motion:\"expandToLine\",motionArgs:{linewise:!0},context:\"normal\"},{keys:\"Y\",type:\"operator\",operator:\"yank\",operatorArgs:{linewise:!0},context:\"visual\"},{keys:\"C\",type:\"operatorMotion\",operator:\"change\",motion:\"moveToEol\",motionArgs:{inclusive:!0},context:\"normal\"},{keys:\"C\",type:\"operator\",operator:\"change\",operatorArgs:{linewise:!0},context:\"visual\"},{keys:\"~\",type:\"operatorMotion\",operator:\"changeCase\",motion:\"moveByCharacters\",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:\"normal\"},{keys:\"~\",type:\"operator\",operator:\"changeCase\",context:\"visual\"},{keys:\"<C-w>\",type:\"operatorMotion\",operator:\"delete\",motion:\"moveByWords\",motionArgs:{forward:!1,wordEnd:!1},context:\"insert\"},{keys:\"<C-i>\",type:\"action\",action:\"jumpListWalk\",actionArgs:{forward:!0}},{keys:\"<C-o>\",type:\"action\",action:\"jumpListWalk\",actionArgs:{forward:!1}},{keys:\"<C-e>\",type:\"action\",action:\"scroll\",actionArgs:{forward:!0,linewise:!0}},{keys:\"<C-y>\",type:\"action\",action:\"scroll\",actionArgs:{forward:!1,linewise:!0}},{keys:\"a\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{insertAt:\"charAfter\"},context:\"normal\"},{keys:\"A\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{insertAt:\"eol\"},context:\"normal\"},{keys:\"A\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{insertAt:\"endOfSelectedArea\"},context:\"visual\"},{keys:\"i\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{insertAt:\"inplace\"},context:\"normal\"},{keys:\"I\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{insertAt:\"firstNonBlank\"},context:\"normal\"},{keys:\"I\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{insertAt:\"startOfSelectedArea\"},context:\"visual\"},{keys:\"o\",type:\"action\",action:\"newLineAndEnterInsertMode\",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:\"normal\"},{keys:\"O\",type:\"action\",action:\"newLineAndEnterInsertMode\",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:\"normal\"},{keys:\"v\",type:\"action\",action:\"toggleVisualMode\"},{keys:\"V\",type:\"action\",action:\"toggleVisualMode\",actionArgs:{linewise:!0}},{keys:\"<C-v>\",type:\"action\",action:\"toggleVisualMode\",actionArgs:{blockwise:!0}},{keys:\"<C-q>\",type:\"action\",action:\"toggleVisualMode\",actionArgs:{blockwise:!0}},{keys:\"gv\",type:\"action\",action:\"reselectLastSelection\"},{keys:\"J\",type:\"action\",action:\"joinLines\",isEdit:!0},{keys:\"p\",type:\"action\",action:\"paste\",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:\"P\",type:\"action\",action:\"paste\",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:\"r<character>\",type:\"action\",action:\"replace\",isEdit:!0},{keys:\"@<character>\",type:\"action\",action:\"replayMacro\"},{keys:\"q<character>\",type:\"action\",action:\"enterMacroRecordMode\"},{keys:\"R\",type:\"action\",action:\"enterInsertMode\",isEdit:!0,actionArgs:{replace:!0}},{keys:\"u\",type:\"action\",action:\"undo\",context:\"normal\"},{keys:\"u\",type:\"operator\",operator:\"changeCase\",operatorArgs:{toLower:!0},context:\"visual\",isEdit:!0},{keys:\"U\",type:\"operator\",operator:\"changeCase\",operatorArgs:{toLower:!1},context:\"visual\",isEdit:!0},{keys:\"<C-r>\",type:\"action\",action:\"redo\"},{keys:\"m<character>\",type:\"action\",action:\"setMark\"},{keys:\'\"<character>\',type:\"action\",action:\"setRegister\"},{keys:\"zz\",type:\"action\",action:\"scrollToCursor\",actionArgs:{position:\"center\"}},{keys:\"z.\",type:\"action\",action:\"scrollToCursor\",actionArgs:{position:\"center\"},motion:\"moveToFirstNonWhiteSpaceCharacter\"},{keys:\"zt\",type:\"action\",action:\"scrollToCursor\",actionArgs:{position:\"top\"}},{keys:\"z<CR>\",type:\"action\",action:\"scrollToCursor\",actionArgs:{position:\"top\"},motion:\"moveToFirstNonWhiteSpaceCharacter\"},{keys:\"z-\",type:\"action\",action:\"scrollToCursor\",actionArgs:{position:\"bottom\"}},{keys:\"zb\",type:\"action\",action:\"scrollToCursor\",actionArgs:{position:\"bottom\"},motion:\"moveToFirstNonWhiteSpaceCharacter\"},{keys:\".\",type:\"action\",action:\"repeatLastEdit\"},{keys:\"<C-a>\",type:\"action\",action:\"incrementNumberToken\",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:\"<C-x>\",type:\"action\",action:\"incrementNumberToken\",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:\"<C-t>\",type:\"action\",action:\"indent\",actionArgs:{indentRight:!0},context:\"insert\"},{keys:\"<C-d>\",type:\"action\",action:\"indent\",actionArgs:{indentRight:!1},context:\"insert\"},{keys:\"a<character>\",type:\"motion\",motion:\"textObjectManipulation\"},{keys:\"i<character>\",type:\"motion\",motion:\"textObjectManipulation\",motionArgs:{textObjectInner:!0}},{keys:\"/\",type:\"search\",searchArgs:{forward:!0,querySrc:\"prompt\",toJumplist:!0}},{keys:\"?\",type:\"search\",searchArgs:{forward:!1,querySrc:\"prompt\",toJumplist:!0}},{keys:\"*\",type:\"search\",searchArgs:{forward:!0,querySrc:\"wordUnderCursor\",wholeWordOnly:!0,toJumplist:!0}},{keys:\"#\",type:\"search\",searchArgs:{forward:!1,querySrc:\"wordUnderCursor\",wholeWordOnly:!0,toJumplist:!0}},{keys:\"g*\",type:\"search\",searchArgs:{forward:!0,querySrc:\"wordUnderCursor\",toJumplist:!0}},{keys:\"g#\",type:\"search\",searchArgs:{forward:!1,querySrc:\"wordUnderCursor\",toJumplist:!0}},{keys:\":\",type:\"ex\"}],c=[{name:\"colorscheme\",shortName:\"colo\"},{name:\"map\"},{name:\"imap\",shortName:\"im\"},{name:\"nmap\",shortName:\"nm\"},{name:\"vmap\",shortName:\"vm\"},{name:\"unmap\"},{name:\"write\",shortName:\"w\"},{name:\"undo\",shortName:\"u\"},{name:\"redo\",shortName:\"red\"},{name:\"set\",shortName:\"se\"},{name:\"set\",shortName:\"se\"},{name:\"setlocal\",shortName:\"setl\"},{name:\"setglobal\",shortName:\"setg\"},{name:\"sort\",shortName:\"sor\"},{name:\"substitute\",shortName:\"s\",possiblyAsync:!0},{name:\"nohlsearch\",shortName:\"noh\"},{name:\"yank\",shortName:\"y\"},{name:\"delmarks\",shortName:\"delm\"},{name:\"registers\",shortName:\"reg\",excludeFromCommandHistory:!0},{name:\"global\",shortName:\"g\"}],d=a.Pos,e=function(){function e(b){b.setOption(\"disableInput\",!0),b.setOption(\"showCursorWhenSelecting\",!1),a.signal(b,\"vim-mode-change\",{mode:\"normal\"}),b.on(\"cursorActivity\",bb),x(b),a.on(b.getInputField(),\"paste\",k(b))}function f(b){b.setOption(\"disableInput\",!1),b.off(\"cursorActivity\",bb),a.off(b.getInputField(),\"paste\",k(b)),b.state.vim=null}function g(b,c){this==a.keyMap.vim&&a.rmClass(b.getWrapperElement(),\"cm-fat-cursor\"),c&&c.attach==h||f(b)}function h(b,c){this==a.keyMap.vim&&a.addClass(b.getWrapperElement(),\"cm-fat-cursor\"),c&&c.attach==h||e(b)}function i(b,c){if(c){if(this[b])return this[b];var d=j(b);if(!d)return!1;var e=a.Vim.findKey(c,d);return\"function\"==typeof e&&a.signal(c,\"vim-keypress\",d),e}}function j(a){if(\"\'\"==a.charAt(0))return a.charAt(1);var b=a.split(/-(?!$)/),c=b[b.length-1];if(1==b.length&&1==b[0].length)return!1;if(2==b.length&&\"Shift\"==b[0]&&1==c.length)return!1;for(var d=!1,e=0;e<b.length;e++){var f=b[e];f in ib?b[e]=ib[f]:d=!0,f in jb&&(b[e]=jb[f])}return!!d&&(q(c)&&(b[b.length-1]=c.toLowerCase()),\"<\"+b.join(\"-\")+\">\")}function k(a){var b=a.state.vim;return b.onPasteFn||(b.onPasteFn=function(){b.insertMode||(a.setCursor(L(a.getCursor(),0,1)),Bb.enterInsertMode(a,{},b))}),b.onPasteFn}function l(a,b){for(var c=[],d=a;d<a+b;d++)c.push(String.fromCharCode(d));return c}function m(a,b){return b>=a.firstLine()&&b<=a.lastLine()}function n(a){return/^[a-z]$/.test(a)}function o(a){return\"()[]{}\".indexOf(a)!=-1}function p(a){return kb.test(a)}function q(a){return/^[A-Z]$/.test(a)}function r(a){return/^\\s*$/.test(a)}function s(a,b){for(var c=0;c<b.length;c++)if(b[c]==a)return!0;return!1}function t(a,b,c,d,e){if(void 0===b&&!e)throw Error(\"defaultValue is required unless callback is provided\");if(c||(c=\"string\"),sb[a]={type:c,defaultValue:b,callback:e},d)for(var f=0;f<d.length;f++)sb[d[f]]=sb[a];b&&u(a,b)}function u(a,b,c,d){var e=sb[a];d=d||{};var f=d.scope;if(!e)return new Error(\"Unknown option: \"+a);if(\"boolean\"==e.type){if(b&&b!==!0)return new Error(\"Invalid argument: \"+a+\"=\"+b);b!==!1&&(b=!0)}e.callback?(\"local\"!==f&&e.callback(b,void 0),\"global\"!==f&&c&&e.callback(b,c)):(\"local\"!==f&&(e.value=\"boolean\"==e.type?!!b:b),\"global\"!==f&&c&&(c.state.vim.options[a]={value:b}))}function v(a,b,c){var d=sb[a];c=c||{};var e=c.scope;if(!d)return new Error(\"Unknown option: \"+a);{if(!d.callback){var f=\"global\"!==e&&b&&b.state.vim.options[a];return(f||\"local\"!==e&&d||{}).value}var f=b&&d.callback(void 0,b);if(\"global\"!==e&&void 0!==f)return f;if(\"local\"!==e)return d.callback()}}function w(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=ub()}function x(a){return a.state.vim||(a.state.vim={inputState:new z,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),a.state.vim}function y(){vb={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:tb(),macroModeState:new w,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:\"\"},registerController:new D({}),searchHistoryController:new E,exCommandHistoryController:new E};for(var a in sb){var b=sb[a];b.value=b.defaultValue}}function z(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function A(b,c){b.state.vim.inputState=new z,a.signal(b,\"vim-command-done\",c)}function B(a,b,c){this.clear(),this.keyBuffer=[a||\"\"],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!b,this.blockwise=!!c}function C(a,b){var c=vb.registerController.registers;if(!a||1!=a.length)throw Error(\"Register name must be 1 character\");if(c[a])throw Error(\"Register already defined \"+a);c[a]=b,rb.push(a)}function D(a){this.registers=a,this.unnamedRegister=a[\'\"\']=new B,a[\".\"]=new B,a[\":\"]=new B,a[\"/\"]=new B}function E(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function F(a,b){zb[a]=b}function G(a,b){for(var c=[],d=0;d<b;d++)c.push(a);return c}function H(a,b){Ab[a]=b}function I(a,b){Bb[a]=b}function J(a,b,c){var e=Math.min(Math.max(a.firstLine(),b.line),a.lastLine()),f=X(a,e)-1;f=c?f+1:f;var g=Math.min(Math.max(0,b.ch),f);return d(e,g)}function K(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function L(a,b,c){return\"object\"==typeof b&&(c=b.ch,b=b.line),d(a.line+b,a.ch+c)}function M(a,b){return{line:b.line-a.line,ch:b.line-a.line}}function N(a,b,c,d){for(var e,f=[],g=[],h=0;h<b.length;h++){var i=b[h];\"insert\"==c&&\"insert\"!=i.context||i.context&&i.context!=c||d.operator&&\"action\"==i.type||!(e=O(a,i.keys))||(\"partial\"==e&&f.push(i),\"full\"==e&&g.push(i))}return{partial:f.length&&f,full:g.length&&g}}function O(a,b){if(\"<character>\"==b.slice(-11)){var c=b.length-11,d=a.slice(0,c),e=b.slice(0,c);return d==e&&a.length>c?\"full\":0==e.indexOf(d)&&\"partial\"}return a==b?\"full\":0==b.indexOf(a)&&\"partial\"}function P(a){var b=/^.*(<[^>]+>)$/.exec(a),c=b?b[1]:a.slice(-1);if(c.length>1)switch(c){case\"<CR>\":c=\"\\n\";break;case\"<Space>\":c=\" \";break;default:c=\"\"}return c}function Q(a,b,c){return function(){for(var d=0;d<c;d++)b(a)}}function R(a){return d(a.line,a.ch)}function S(a,b){return a.ch==b.ch&&a.line==b.line}function T(a,b){return a.line<b.line||a.line==b.line&&a.ch<b.ch}function U(a,b){return arguments.length>2&&(b=U.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?a:b}function V(a,b){return arguments.length>2&&(b=V.apply(void 0,Array.prototype.slice.call(arguments,1))),T(a,b)?b:a}function W(a,b,c){var d=T(a,b),e=T(b,c);return d&&e}function X(a,b){return a.getLine(b).length}function Y(a){return a.trim?a.trim():a.replace(/^\\s+|\\s+$/g,\"\")}function Z(a){return a.replace(/([.?*+$\\[\\]\\/\\\\(){}|\\-])/g,\"\\\\$1\")}function $(a,b,c){var e=X(a,b),f=new Array(c-e+1).join(\" \");a.setCursor(d(b,e)),a.replaceRange(f,a.getCursor())}function _(a,b){var c=[],e=a.listSelections(),f=R(a.clipPos(b)),g=!S(b,f),h=a.getCursor(\"head\"),i=ba(e,h),j=S(e[i].head,e[i].anchor),k=e.length-1,l=k-i>i?k:0,m=e[l].anchor,n=Math.min(m.line,f.line),o=Math.max(m.line,f.line),p=m.ch,q=f.ch,r=e[l].head.ch-p,s=q-p;r>0&&s<=0?(p++,g||q--):r<0&&s>=0?(p--,j||q++):r<0&&s==-1&&(p--,q++);for(var t=n;t<=o;t++){var u={anchor:new d(t,p),head:new d(t,q)};c.push(u)}return a.setSelections(c),b.ch=q,m.ch=p,m}function aa(a,b,c){for(var d=[],e=0;e<c;e++){var f=L(b,e,0);d.push({anchor:f,head:f})}a.setSelections(d,0)}function ba(a,b,c){for(var d=0;d<a.length;d++){var e=\"head\"!=c&&S(a[d].anchor,b),f=\"anchor\"!=c&&S(a[d].head,b);if(e||f)return d}return-1}function ca(a,b){var c=b.lastSelection,e=function(){var b=a.listSelections(),c=b[0],d=b[b.length-1],e=T(c.anchor,c.head)?c.anchor:c.head,f=T(d.anchor,d.head)?d.head:d.anchor;return[e,f]},f=function(){var b=a.getCursor(),e=a.getCursor(),f=c.visualBlock;if(f){var g=f.width,h=f.height;e=d(b.line+h,b.ch+g);for(var i=[],j=b.line;j<e.line;j++){var k=d(j,b.ch),l=d(j,e.ch),m={anchor:k,head:l};i.push(m)}a.setSelections(i)}else{var n=c.anchorMark.find(),o=c.headMark.find(),p=o.line-n.line,q=o.ch-n.ch;e={line:e.line+p,ch:p?e.ch:q+e.ch},c.visualLine&&(b=d(b.line,0),e=d(e.line,X(a,e.line))),a.setSelection(b,e)}return[b,e]};return b.visualMode?e():f()}function da(a,b){var c=b.sel.anchor,d=b.sel.head;b.lastPastedText&&(d=a.posFromIndex(a.indexFromPos(c)+b.lastPastedText.length),b.lastPastedText=null),b.lastSelection={anchorMark:a.setBookmark(c),\n\";i:17;s:32003:\"headMark:a.setBookmark(d),anchor:R(c),head:R(d),visualMode:b.visualMode,visualLine:b.visualLine,visualBlock:b.visualBlock}}function ea(a,b,c){var e,f=a.state.vim.sel,g=f.head,h=f.anchor;return T(c,b)&&(e=c,c=b,b=e),T(g,h)?(g=U(b,g),h=V(h,c)):(h=U(b,h),g=V(g,c),g=L(g,0,-1),g.ch==-1&&g.line!=a.firstLine()&&(g=d(g.line-1,X(a,g.line-1)))),[h,g]}function fa(a,b,c){var d=a.state.vim;b=b||d.sel;var c=c||d.visualLine?\"line\":d.visualBlock?\"block\":\"char\",e=ga(a,b,c);a.setSelections(e.ranges,e.primary),cb(a)}function ga(a,b,c,e){var f=R(b.head),g=R(b.anchor);if(\"char\"==c){var h=e||T(b.head,b.anchor)?0:1,i=T(b.head,b.anchor)?1:0;return f=L(b.head,0,h),g=L(b.anchor,0,i),{ranges:[{anchor:g,head:f}],primary:0}}if(\"line\"==c){if(T(b.head,b.anchor))f.ch=0,g.ch=X(a,g.line);else{g.ch=0;var j=a.lastLine();f.line>j&&(f.line=j),f.ch=X(a,f.line)}return{ranges:[{anchor:g,head:f}],primary:0}}if(\"block\"==c){for(var k=Math.min(g.line,f.line),l=Math.min(g.ch,f.ch),m=Math.max(g.line,f.line),n=Math.max(g.ch,f.ch)+1,o=m-k+1,p=f.line==k?0:o-1,q=[],r=0;r<o;r++)q.push({anchor:d(k+r,l),head:d(k+r,n)});return{ranges:q,primary:p}}}function ha(a){var b=a.getCursor(\"head\");return 1==a.getSelection().length&&(b=U(b,a.getCursor(\"anchor\"))),b}function ia(b,c){var d=b.state.vim;c!==!1&&b.setCursor(J(b,d.sel.head)),da(b,d),d.visualMode=!1,d.visualLine=!1,d.visualBlock=!1,a.signal(b,\"vim-mode-change\",{mode:\"normal\"}),d.fakeCursor&&d.fakeCursor.clear()}function ja(a,b,c){var d=a.getRange(b,c);if(/\\n\\s*$/.test(d)){var e=d.split(\"\\n\");e.pop();for(var f,f=e.pop();e.length>0&&f&&r(f);f=e.pop())c.line--,c.ch=0;f?(c.line--,c.ch=X(a,c.line)):c.ch=0}}function ka(a,b,c){b.ch=0,c.ch=0,c.line++}function la(a){if(!a)return 0;var b=a.search(/\\S/);return b==-1?a.length:b}function ma(a,b,c,e,f){for(var g=ha(a),h=a.getLine(g.line),i=g.ch,j=f?lb[0]:mb[0];!j(h.charAt(i));)if(i++,i>=h.length)return null;e?j=mb[0]:(j=lb[0],j(h.charAt(i))||(j=lb[1]));for(var k=i,l=i;j(h.charAt(k))&&k<h.length;)k++;for(;j(h.charAt(l))&&l>=0;)l--;if(l++,b){for(var m=k;/\\s/.test(h.charAt(k))&&k<h.length;)k++;if(m==k){for(var n=l;/\\s/.test(h.charAt(l-1))&&l>0;)l--;l||(l=n)}}return{start:d(g.line,l),end:d(g.line,k)}}function na(a,b,c){S(b,c)||vb.jumpList.add(a,b,c)}function oa(a,b){vb.lastCharacterSearch.increment=a,vb.lastCharacterSearch.forward=b.forward,vb.lastCharacterSearch.selectedCharacter=b.selectedCharacter}function pa(a,b,c,e){var f=R(a.getCursor()),g=c?1:-1,h=c?a.lineCount():-1,i=f.ch,j=f.line,k=a.getLine(j),l={lineText:k,nextCh:k.charAt(i),lastCh:null,index:i,symb:e,reverseSymb:(c?{\")\":\"(\",\"}\":\"{\"}:{\"(\":\")\",\"{\":\"}\"})[e],forward:c,depth:0,curMoveThrough:!1},m=Cb[e];if(!m)return f;var n=Db[m].init,o=Db[m].isComplete;for(n&&n(l);j!==h&&b;){if(l.index+=g,l.nextCh=l.lineText.charAt(l.index),!l.nextCh){if(j+=g,l.lineText=a.getLine(j)||\"\",g>0)l.index=0;else{var p=l.lineText.length;l.index=p>0?p-1:0}l.nextCh=l.lineText.charAt(l.index)}o(l)&&(f.line=j,f.ch=l.index,b--)}return l.nextCh||l.curMoveThrough?d(j,l.index):f}function qa(a,b,c,d,e){var f=b.line,g=b.ch,h=a.getLine(f),i=c?1:-1,j=d?mb:lb;if(e&&\"\"==h){if(f+=i,h=a.getLine(f),!m(a,f))return null;g=c?0:h.length}for(;;){if(e&&\"\"==h)return{from:0,to:0,line:f};for(var k=i>0?h.length:-1,l=k,n=k;g!=k;){for(var o=!1,p=0;p<j.length&&!o;++p)if(j[p](h.charAt(g))){for(l=g;g!=k&&j[p](h.charAt(g));)g+=i;if(n=g,o=l!=n,l==b.ch&&f==b.line&&n==l+i)continue;return{from:Math.min(l,n+1),to:Math.max(l,n),line:f}}o||(g+=i)}if(f+=i,!m(a,f))return null;h=a.getLine(f),g=i>0?0:h.length}}function ra(a,b,c,e,f,g){var h=R(b),i=[];(e&&!f||!e&&f)&&c++;for(var j=!(e&&f),k=0;k<c;k++){var l=qa(a,b,e,g,j);if(!l){var m=X(a,a.lastLine());i.push(e?{line:a.lastLine(),from:m,to:m}:{line:0,from:0,to:0});break}i.push(l),b=d(l.line,e?l.to-1:l.from)}var n=i.length!=c,o=i[0],p=i.pop();return e&&!f?(n||o.from==h.ch&&o.line==h.line||(p=i.pop()),d(p.line,p.from)):e&&f?d(p.line,p.to-1):!e&&f?(n||o.to==h.ch&&o.line==h.line||(p=i.pop()),d(p.line,p.to)):d(p.line,p.from)}function sa(a,b,c,e){for(var f,g=a.getCursor(),h=g.ch,i=0;i<b;i++){var j=a.getLine(g.line);if(f=va(h,j,e,c,!0),f==-1)return null;h=f}return d(a.getCursor().line,f)}function ta(a,b){var c=a.getCursor().line;return J(a,d(c,b-1))}function ua(a,b,c,d){s(c,qb)&&(b.marks[c]&&b.marks[c].clear(),b.marks[c]=a.setBookmark(d))}function va(a,b,c,d,e){var f;return d?(f=b.indexOf(c,a+1),f==-1||e||(f-=1)):(f=b.lastIndexOf(c,a-1),f==-1||e||(f+=1)),f}function wa(a,b,c,e,f){function g(b){return!a.getLine(b)}function h(a,b,c){return c?g(a)!=g(a+b):!g(a)&&g(a+b)}var i,j,k=b.line,l=a.firstLine(),m=a.lastLine(),n=k;if(e){for(;l<=n&&n<=m&&c>0;)h(n,e)&&c--,n+=e;return new d(n,0)}var o=a.state.vim;if(o.visualLine&&h(k,1,!0)){var p=o.sel.anchor;h(p.line,-1,!0)&&(f&&p.line==k||(k+=1))}var q=g(k);for(n=k;n<=m&&c;n++)h(n,1,!0)&&(f&&g(n)==q||c--);for(j=new d(n,0),n>m&&!q?q=!0:f=!1,n=k;n>l&&(f&&g(n)!=q&&n!=k||!h(n,-1,!0));n--);return i=new d(n,0),{start:i,end:j}}function xa(a,b,c,e){var f,g,h=b,i={\"(\":/[()]/,\")\":/[()]/,\"[\":/[[\\]]/,\"]\":/[[\\]]/,\"{\":/[{}]/,\"}\":/[{}]/}[c],j={\"(\":\"(\",\")\":\"(\",\"[\":\"[\",\"]\":\"[\",\"{\":\"{\",\"}\":\"{\"}[c],k=a.getLine(h.line).charAt(h.ch),l=k===j?1:0;if(f=a.scanForBracket(d(h.line,h.ch+l),-1,null,{bracketRegex:i}),g=a.scanForBracket(d(h.line,h.ch+l),1,null,{bracketRegex:i}),!f||!g)return{start:h,end:h};if(f=f.pos,g=g.pos,f.line==g.line&&f.ch>g.ch||f.line>g.line){var m=f;f=g,g=m}return e?g.ch+=1:f.ch+=1,{start:f,end:g}}function ya(a,b,c,e){var f,g,h,i,j=R(b),k=a.getLine(j.line),l=k.split(\"\"),m=l.indexOf(c);if(j.ch<m?j.ch=m:m<j.ch&&l[j.ch]==c&&(g=j.ch,--j.ch),l[j.ch]!=c||g)for(h=j.ch;h>-1&&!f;h--)l[h]==c&&(f=h+1);else f=j.ch+1;if(f&&!g)for(h=f,i=l.length;h<i&&!g;h++)l[h]==c&&(g=h);return f&&g?(e&&(--f,++g),{start:d(j.line,f),end:d(j.line,g)}):{start:j,end:j}}function za(){}function Aa(a){var b=a.state.vim;return b.searchState_||(b.searchState_=new za)}function Ba(a,b,c,d,e){a.openDialog?a.openDialog(b,d,{bottom:!0,value:e.value,onKeyDown:e.onKeyDown,onKeyUp:e.onKeyUp,selectValueOnOpen:!1}):d(prompt(c,\"\"))}function Ca(a){var b=Da(a)||[];if(!b.length)return[];var c=[];if(0===b[0]){for(var d=0;d<b.length;d++)\"number\"==typeof b[d]&&c.push(a.substring(b[d]+1,b[d+1]));return c}}function Da(a){for(var b=!1,c=[],d=0;d<a.length;d++){var e=a.charAt(d);b||\"/\"!=e||c.push(d),b=!b&&\"\\\\\"==e}return c}function Ea(a){for(var b=\"|(){\",c=\"}\",d=!1,e=[],f=-1;f<a.length;f++){var g=a.charAt(f)||\"\",h=a.charAt(f+1)||\"\",i=h&&b.indexOf(h)!=-1;d?(\"\\\\\"===g&&i||e.push(g),d=!1):\"\\\\\"===g?(d=!0,h&&c.indexOf(h)!=-1&&(i=!0),i&&\"\\\\\"!==h||e.push(g)):(e.push(g),i&&\"\\\\\"!==h&&e.push(\"\\\\\"))}return e.join(\"\")}function Fa(a){for(var b=!1,c=[],d=-1;d<a.length;d++){var e=a.charAt(d)||\"\",f=a.charAt(d+1)||\"\";Eb[e+f]?(c.push(Eb[e+f]),d++):b?(c.push(e),b=!1):\"\\\\\"===e?(b=!0,p(f)||\"$\"===f?c.push(\"$\"):\"/\"!==f&&\"\\\\\"!==f&&c.push(\"\\\\\")):(\"$\"===e&&c.push(\"$\"),c.push(e),\"/\"===f&&c.push(\"\\\\\"))}return c.join(\"\")}function Ga(b){for(var c=new a.StringStream(b),d=[];!c.eol();){for(;c.peek()&&\"\\\\\"!=c.peek();)d.push(c.next());var e=!1;for(var f in Fb)if(c.match(f,!0)){e=!0,d.push(Fb[f]);break}e||d.push(c.next())}return d.join(\"\")}function Ha(a,b,c){var d=vb.registerController.getRegister(\"/\");if(d.setText(a),a instanceof RegExp)return a;var e,f,g=Da(a);if(g.length){e=a.substring(0,g[0]);var h=a.substring(g[0]);f=h.indexOf(\"i\")!=-1}else e=a;if(!e)return null;v(\"pcre\")||(e=Ea(e)),c&&(b=/^[^A-Z]*$/.test(e));var i=new RegExp(e,b||f?\"i\":void 0);return i}function Ia(a,b){a.openNotification?a.openNotification(\'<span style=\"color: red\">\'+b+\"</span>\",{bottom:!0,duration:5e3}):alert(b)}function Ja(a,b){var c=\'<span style=\"font-family: monospace; white-space: pre\">\'+(a||\"\")+\'<input type=\"text\"></span>\';return b&&(c+=\' <span style=\"color: #888\">\'+b+\"</span>\"),c}function Ka(a,b){var c=(b.prefix||\"\")+\" \"+(b.desc||\"\"),d=Ja(b.prefix,b.desc);Ba(a,d,c,b.onClose,b)}function La(a,b){if(a instanceof RegExp&&b instanceof RegExp){for(var c=[\"global\",\"multiline\",\"ignoreCase\",\"source\"],d=0;d<c.length;d++){var e=c[d];if(a[e]!==b[e])return!1}return!0}return!1}function Ma(a,b,c,d){if(b){var e=Aa(a),f=Ha(b,!!c,!!d);if(f)return Oa(a,f),La(f,e.getQuery())?f:(e.setQuery(f),f)}}function Na(a){if(\"^\"==a.source.charAt(0))var b=!0;return{token:function(c){if(b&&!c.sol())return void c.skipToEnd();var d=c.match(a,!1);if(d)return 0==d[0].length?(c.next(),\"searching\"):c.sol()||(c.backUp(1),a.exec(c.next()+d[0]))?(c.match(a),\"searching\"):(c.next(),null);for(;!c.eol()&&(c.next(),!c.match(a,!1)););},query:a}}function Oa(a,b){var c=Aa(a),d=c.getOverlay();d&&b==d.query||(d&&a.removeOverlay(d),d=Na(b),a.addOverlay(d),a.showMatchesOnScrollbar&&(c.getScrollbarAnnotate()&&c.getScrollbarAnnotate().clear(),c.setScrollbarAnnotate(a.showMatchesOnScrollbar(b))),c.setOverlay(d))}function Pa(a,b,c,e){return void 0===e&&(e=1),a.operation(function(){for(var f=a.getCursor(),g=a.getSearchCursor(c,f),h=0;h<e;h++){var i=g.find(b);if(0==h&&i&&S(g.from(),f)&&(i=g.find(b)),!i&&(g=a.getSearchCursor(c,b?d(a.lastLine()):d(a.firstLine(),0)),!g.find(b)))return}return g.from()})}function Qa(a){var b=Aa(a);a.removeOverlay(Aa(a).getOverlay()),b.setOverlay(null),b.getScrollbarAnnotate()&&(b.getScrollbarAnnotate().clear(),b.setScrollbarAnnotate(null))}function Ra(a,b,c){return\"number\"!=typeof a&&(a=a.line),b instanceof Array?s(a,b):c?a>=b&&a<=c:a==b}function Sa(a){var b=a.getScrollInfo(),c=6,d=10,e=a.coordsChar({left:0,top:c+b.top},\"local\"),f=b.clientHeight-d+b.top,g=a.coordsChar({left:0,top:f},\"local\");return{top:e.line,bottom:g.line}}function Ta(a,b,c){if(\"\'\"==c){var d=a.doc.history.done,e=d[d.length-2];return e&&e.ranges&&e.ranges[0].head}var f=b.marks[c];return f&&f.find()}function Ua(b,c,d,e,f,g,h,i,j){function k(){b.operation(function(){for(;!p;)l(),m();n()})}function l(){var a=b.getRange(g.from(),g.to()),c=a.replace(h,i);g.replace(c)}function m(){for(;g.findNext()&&Ra(g.from(),e,f);)if(d||!q||g.from().line!=q.line)return b.scrollIntoView(g.from(),30),b.setSelection(g.from(),g.to()),q=g.from(),void(p=!1);p=!0}function n(a){if(a&&a(),b.focus(),q){b.setCursor(q);var c=b.state.vim;c.exMode=!1,c.lastHPos=c.lastHSPos=q.ch}j&&j()}function o(c,d,e){a.e_stop(c);var f=a.keyName(c);switch(f){case\"Y\":l(),m();break;case\"N\":m();break;case\"A\":var g=j;j=void 0,b.operation(k),j=g;break;case\"L\":l();case\"Q\":case\"Esc\":case\"Ctrl-C\":case\"Ctrl-[\":n(e)}return p&&n(e),!0}b.state.vim.exMode=!0;var p=!1,q=g.from();return m(),p?void Ia(b,\"No matches for \"+h.source):c?void Ka(b,{prefix:\"replace with <strong>\"+i+\"</strong> (y/n/a/q/l)\",onKeyDown:o}):(k(),void(j&&j()))}function Va(b){var c=b.state.vim,d=vb.macroModeState,e=vb.registerController.getRegister(\".\"),f=d.isPlaying,g=d.lastInsertModeChanges,h=[];if(!f){for(var i=g.inVisualBlock?c.lastSelection.visualBlock.height:1,j=g.changes,h=[],k=0;k<j.length;)h.push(j[k]),j[k]instanceof eb?k++:k+=i;g.changes=h,b.off(\"change\",ab),a.off(b.getInputField(),\"keydown\",fb)}!f&&c.insertModeRepeat>1&&(gb(b,c,c.insertModeRepeat-1,!0),c.lastEditInputState.repeatOverride=c.insertModeRepeat),delete c.insertModeRepeat,c.insertMode=!1,b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption(\"keyMap\",\"vim\"),b.setOption(\"disableInput\",!0),b.toggleOverwrite(!1),e.setText(g.changes.join(\"\")),a.signal(b,\"vim-mode-change\",{mode:\"normal\"}),d.isRecording&&$a(d)}function Wa(a){b.unshift(a)}function Xa(a,b,c,d,e){var f={keys:a,type:b};f[b]=c,f[b+\"Args\"]=d;for(var g in e)f[g]=e[g];Wa(f)}function Ya(b,c,d,e){var f=vb.registerController.getRegister(e);if(\":\"==e)return f.keyBuffer[0]&&Jb.processCommand(b,f.keyBuffer[0]),void(d.isPlaying=!1);var g=f.keyBuffer,h=0;d.isPlaying=!0,d.replaySearchQueries=f.searchQueries.slice(0);for(var i=0;i<g.length;i++)for(var j,k,l=g[i];l;)if(j=/<\\w+-.+?>|<\\w+>|./.exec(l),k=j[0],l=l.substring(j.index+k.length),a.Vim.handleKey(b,k,\"macro\"),c.insertMode){var m=f.insertModeChanges[h++].changes;vb.macroModeState.lastInsertModeChanges.changes=m,hb(b,m,1),Va(b)}d.isPlaying=!1}function Za(a,b){if(!a.isPlaying){var c=a.latestRegister,d=vb.registerController.getRegister(c);d&&d.pushText(b)}}function $a(a){if(!a.isPlaying){var b=a.latestRegister,c=vb.registerController.getRegister(b);c&&c.pushInsertModeChanges&&c.pushInsertModeChanges(a.lastInsertModeChanges)}}function _a(a,b){if(!a.isPlaying){var c=a.latestRegister,d=vb.registerController.getRegister(c);d&&d.pushSearchQuery&&d.pushSearchQuery(b)}}function ab(a,b){var c=vb.macroModeState,d=c.lastInsertModeChanges;if(!c.isPlaying)for(;b;){if(d.expectCursorActivityForChange=!0,\"+input\"==b.origin||\"paste\"==b.origin||void 0===b.origin){var e=b.text.join(\"\\n\");d.maybeReset&&(d.changes=[],d.maybeReset=!1),a.state.overwrite&&!/\\n/.test(e)?d.changes.push([e]):d.changes.push(e)}b=b.next}}function bb(a){var b=a.state.vim;if(b.insertMode){var c=vb.macroModeState;if(c.isPlaying)return;var d=c.lastInsertModeChanges;d.expectCursorActivityForChange?d.expectCursorActivityForChange=!1:d.maybeReset=!0}else a.curOp.isVimOp||db(a,b);b.visualMode&&cb(a)}function cb(a){var b=a.state.vim,c=J(a,R(b.sel.head)),d=L(c,0,1);b.fakeCursor&&b.fakeCursor.clear(),b.fakeCursor=a.markText(c,d,{className:\"cm-animate-fat-cursor\"})}function db(b,c){var d=b.getCursor(\"anchor\"),e=b.getCursor(\"head\");if(c.visualMode&&!b.somethingSelected()?ia(b,!1):c.visualMode||c.insertMode||!b.somethingSelected()||(c.visualMode=!0,c.visualLine=!1,a.signal(b,\"vim-mode-change\",{mode:\"visual\"})),c.visualMode){var f=T(e,d)?0:-1,g=T(e,d)?-1:0;e=L(e,0,f),d=L(d,0,g),c.sel={anchor:d,head:e},ua(b,c,\"<\",U(e,d)),ua(b,c,\">\",V(e,d))}else c.insertMode||(c.lastHPos=b.getCursor().ch)}function eb(a){this.keyName=a}function fb(b){function c(){return e.maybeReset&&(e.changes=[],e.maybeReset=!1),e.changes.push(new eb(f)),!0}var d=vb.macroModeState,e=d.lastInsertModeChanges,f=a.keyName(b);f&&(f.indexOf(\"Delete\")==-1&&f.indexOf(\"Backspace\")==-1||a.lookupKey(f,\"vim-insert\",c))}function gb(a,b,c,d){function e(){h?yb.processAction(a,b,b.lastEditActionCommand):yb.evalInput(a,b)}function f(c){if(g.lastInsertModeChanges.changes.length>0){c=b.lastEditActionCommand?c:1;var d=g.lastInsertModeChanges;hb(a,d.changes,c)}}var g=vb.macroModeState;g.isPlaying=!0;var h=!!b.lastEditActionCommand,i=b.inputState;if(b.inputState=b.lastEditInputState,h&&b.lastEditActionCommand.interlaceInsertRepeat)for(var j=0;j<c;j++)e(),f(1);else d||e(),f(c);b.inputState=i,b.insertMode&&!d&&Va(a),g.isPlaying=!1}function hb(b,c,d){function e(c){return\"string\"==typeof c?a.commands[c](b):c(b),!0}var f=b.getCursor(\"head\"),g=vb.macroModeState.lastInsertModeChanges.inVisualBlock;if(g){var h=b.state.vim,i=h.lastSelection,j=M(i.anchor,i.head);aa(b,f,j.line+1),d=b.listSelections().length,b.setCursor(f)}for(var k=0;k<d;k++){g&&b.setCursor(L(f,k,0));for(var l=0;l<c.length;l++){var m=c[l];if(m instanceof eb)a.lookupKey(m.keyName,\"vim-insert\",e);else if(\"string\"==typeof m){var n=b.getCursor();b.replaceRange(m,n,n)}else{var o=b.getCursor(),p=L(o,0,m[0].length);b.replaceRange(m[0],o,p)}}}g&&b.setCursor(L(f,0,1))}a.defineOption(\"vimMode\",!1,function(b,c,d){c&&\"vim\"!=b.getOption(\"keyMap\")?b.setOption(\"keyMap\",\"vim\"):!c&&d!=a.Init&&/^vim/.test(b.getOption(\"keyMap\"))&&b.setOption(\"keyMap\",\"default\")});var ib={Shift:\"S\",Ctrl:\"C\",Alt:\"A\",Cmd:\"D\",Mod:\"A\"},jb={Enter:\"CR\",Backspace:\"BS\",Delete:\"Del\",Insert:\"Ins\"},kb=/[\\d]/,lb=[a.isWordChar,function(b){return b&&!a.isWordChar(b)&&!/\\s/.test(b)}],mb=[function(a){return/\\S/.test(a)}],nb=l(65,26),ob=l(97,26),pb=l(48,10),qb=[].concat(nb,ob,pb,[\"<\",\">\"]),rb=[].concat(nb,ob,pb,[\"-\",\'\"\',\".\",\":\",\"/\"]),sb={};t(\"filetype\",void 0,\"string\",[\"ft\"],function(a,b){if(void 0!==b){if(void 0===a){var c=b.getOption(\"mode\");return\"null\"==c?\"\":c}var c=\"\"==a?\"null\":a;b.setOption(\"mode\",c)}});var tb=function(){function a(a,b,h){function i(b){var e=++d%c,f=g[e];f&&f.clear(),g[e]=a.setBookmark(b)}var j=d%c,k=g[j];if(k){var l=k.find();l&&!S(l,b)&&i(b)}else i(b);i(h),e=d,f=d-c+1,f<0&&(f=0)}function b(a,b){d+=b,d>e?d=e:d<f&&(d=f);var h=g[(c+d)%c];if(h&&!h.find()){var i,j=b>0?1:-1,k=a.getCursor();do if(d+=j,h=g[(c+d)%c],h&&(i=h.find())&&!S(k,i))break;while(d<e&&d>f)}return h}var c=100,d=-1,e=0,f=0,g=new Array(c);return{cachedCursor:void 0,add:a,move:b}},ub=function(a){return a?{changes:a.changes,expectCursorActivityForChange:a.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};w.prototype={exitMacroRecordMode:function(){var a=vb.macroModeState;a.onRecordingDone&&a.onRecordingDone(),a.onRecordingDone=void 0,a.isRecording=!1},enterMacroRecordMode:function(a,b){var c=vb.registerController.getRegister(b);c&&(c.clear(),this.latestRegister=b,a.openDialog&&(this.onRecordingDone=a.openDialog(\"(recording)[\"+b+\"]\",null,{bottom:!0})),this.isRecording=!0)}};var vb,wb,xb={buildKeyMap:function(){},getRegisterController:function(){return vb.registerController},resetVimGlobalState_:y,getVimGlobalState_:function(){return vb},maybeInitVimState_:x,suppressErrorLogging:!1,InsertModeKey:eb,map:function(a,b,c){Jb.map(a,b,c)},unmap:function(a,b){Jb.unmap(a,b)},setOption:u,getOption:v,defineOption:t,defineEx:function(a,b,c){if(b){if(0!==a.indexOf(b))throw new Error(\'(Vim.defineEx) \"\'+b+\'\" is not a prefix of \"\'+a+\'\", command not registered\')}else b=a;Ib[a]=c,Jb.commandMap_[b]={name:a,shortName:b,type:\"api\"}},handleKey:function(a,b,c){var d=this.findKey(a,b,c);if(\"function\"==typeof d)return d()},findKey:function(c,d,e){function f(){var a=vb.macroModeState;if(a.isRecording){if(\"q\"==d)return a.exitMacroRecordMode(),A(c),!0;\"mapping\"!=e&&Za(a,d)}}function g(){if(\"<Esc>\"==d)return A(c),l.visualMode?ia(c):l.insertMode&&Va(c),!0}function h(b){for(var e;b;)e=/<\\w+-.+?>|<\\w+>|./.exec(b),d=e[0],b=b.substring(e.index+d.length),a.Vim.handleKey(c,d,\"mapping\")}function i(){if(g())return!0;for(var a=l.inputState.keyBuffer=l.inputState.keyBuffer+d,e=1==d.length,f=yb.matchCommand(a,b,l.inputState,\"insert\");a.length>1&&\"full\"!=f.type;){var a=l.inputState.keyBuffer=a.slice(1),h=yb.matchCommand(a,b,l.inputState,\"insert\");\"none\"!=h.type&&(f=h)}if(\"none\"==f.type)return A(c),!1;if(\"partial\"==f.type)return wb&&window.clearTimeout(wb),wb=window.setTimeout(function(){l.insertMode&&l.inputState.keyBuffer&&A(c)},v(\"insertModeEscKeysTimeout\")),!e;if(wb&&window.clearTimeout(wb),e){for(var i=c.listSelections(),j=0;j<i.length;j++){var k=i[j].head;c.replaceRange(\"\",L(k,0,-(a.length-1)),k,\"+input\")}vb.macroModeState.lastInsertModeChanges.changes.pop()}return A(c),f.command}function j(){if(f()||g())return!0;var a=l.inputState.keyBuffer=l.inputState.keyBuffer+d;if(/^[1-9]\\d*$/.test(a))return!0;var e=/^(\\d*)(.*)$/.exec(a);if(!e)return A(c),!1;var h=l.visualMode?\"visual\":\"normal\",i=yb.matchCommand(e[2]||e[1],b,l.inputState,h);if(\"none\"==i.type)return A(c),!1;if(\"partial\"==i.type)return!0;l.inputState.keyBuffer=\"\";var e=/^(\\d*)(.*)$/.exec(a);return e[1]&&\"0\"!=e[1]&&l.inputState.pushRepeatDigit(e[1]),i.command}var k,l=x(c);return k=l.insertMode?i():j(),k===!1?void 0:k===!0?function(){return!0}:function(){return c.operation(function(){c.curOp.isVimOp=!0;try{\"keyToKey\"==k.type?h(k.toKeys):yb.processCommand(c,l,k)}catch(b){throw c.state.vim=void 0,x(c),a.Vim.suppressErrorLogging||console.log(b),b}return!0})}},handleEx:function(a,b){Jb.processCommand(a,b)},defineMotion:F,defineAction:I,defineOperator:H,mapCommand:Xa,_mapCommand:Wa,defineRegister:C,exitVisualMode:ia,exitInsertMode:Va};z.prototype.pushRepeatDigit=function(a){this.operator?this.motionRepeat=this.motionRepeat.concat(a):this.prefixRepeat=this.prefixRepeat.concat(a)},z.prototype.getRepeat=function(){var a=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(a=1,this.prefixRepeat.length>0&&(a*=parseInt(this.prefixRepeat.join(\"\"),10)),this.motionRepeat.length>0&&(a*=parseInt(this.motionRepeat.join(\"\"),10))),a},B.prototype={setText:function(a,b,c){this.keyBuffer=[a||\"\"],this.linewise=!!b,this.blockwise=!!c},pushText:function(a,b){b&&(this.linewise||this.keyBuffer.push(\"\\n\"),this.linewise=!0),this.keyBuffer.push(a)},pushInsertModeChanges:function(a){this.insertModeChanges.push(ub(a))},pushSearchQuery:function(a){this.searchQueries.push(a)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join(\"\")}},D.prototype={pushText:function(a,b,c,d,e){d&&\"\\n\"!==c.charAt(c.length-1)&&(c+=\"\\n\");var f=this.isValidRegister(a)?this.getRegister(a):null;if(!f){switch(b){case\"yank\":this.registers[0]=new B(c,d,e);break;case\"delete\":case\"change\":c.indexOf(\"\\n\")==-1?this.registers[\"-\"]=new B(c,d):(this.shiftNumericRegisters_(),this.registers[1]=new B(c,d))}return void this.unnamedRegister.setText(c,d,e)}var g=q(a);g?f.pushText(c,d):f.setText(c,d,e),this.unnamedRegister.setText(f.toString(),d)},getRegister:function(a){return this.isValidRegister(a)?(a=a.toLowerCase(),this.registers[a]||(this.registers[a]=new B),this.registers[a]):this.unnamedRegister},isValidRegister:function(a){return a&&s(a,rb)},shiftNumericRegisters_:function(){for(var a=9;a>=2;a--)this.registers[a]=this.getRegister(\"\"+(a-1))}},E.prototype={nextMatch:function(a,b){var c=this.historyBuffer,d=b?-1:1;null===this.initialPrefix&&(this.initialPrefix=a);for(var e=this.iterator+d;b?e>=0:e<c.length;e+=d)for(var f=c[e],g=0;g<=f.length;g++)if(this.initialPrefix==f.substring(0,g))return this.iterator=e,f;return e>=c.length?(this.iterator=c.length,this.initialPrefix):e<0?a:void 0},pushInput:function(a){var b=this.historyBuffer.indexOf(a);b>-1&&this.historyBuffer.splice(b,1),a.length&&this.historyBuffer.push(a)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var yb={matchCommand:function(a,b,c,d){var e=N(a,b,d,c);if(!e.full&&!e.partial)return{type:\"none\"};if(!e.full&&e.partial)return{type:\"partial\"};for(var f,g=0;g<e.full.length;g++){var h=e.full[g];f||(f=h)}if(\"<character>\"==f.keys.slice(-11)){var i=P(a);if(!i)return{type:\"none\"};c.selectedCharacter=i}return{type:\"full\",command:f}},processCommand:function(a,b,c){switch(b.inputState.repeatOverride=c.repeatOverride,c.type){case\"motion\":this.processMotion(a,b,c);break;case\"operator\":this.processOperator(a,b,c);break;case\"operatorMotion\":this.processOperatorMotion(a,b,c);break;case\"action\":this.processAction(a,b,c);break;case\"search\":this.processSearch(a,b,c);break;case\"ex\":case\"keyToEx\":this.processEx(a,b,c)}},processMotion:function(a,b,c){b.inputState.motion=c.motion,b.inputState.motionArgs=K(c.motionArgs),this.evalInput(a,b)},processOperator:function(a,b,c){var d=b.inputState;if(d.operator){if(d.operator==c.operator)return d.motion=\"expandToLine\",d.motionArgs={linewise:!0},void this.evalInput(a,b);A(a)}d.operator=c.operator,d.operatorArgs=K(c.operatorArgs),b.visualMode&&this.evalInput(a,b)},processOperatorMotion:function(a,b,c){var d=b.visualMode,e=K(c.operatorMotionArgs);e&&d&&e.visualLine&&(b.visualLine=!0),this.processOperator(a,b,c),d||this.processMotion(a,b,c)},processAction:function(a,b,c){var d=b.inputState,e=d.getRepeat(),f=!!e,g=K(c.actionArgs)||{};d.selectedCharacter&&(g.selectedCharacter=d.selectedCharacter),c.operator&&this.processOperator(a,b,c),c.motion&&this.processMotion(a,b,c),(c.motion||c.operator)&&this.evalInput(a,b),g.repeat=e||1,g.repeatIsExplicit=f,g.registerName=d.registerName,A(a),b.lastMotion=null,c.isEdit&&this.recordLastEdit(b,d,c),Bb[c.action](a,g,b)},processSearch:function(b,c,d){function e(a,e,f){vb.searchHistoryController.pushInput(a),vb.searchHistoryController.reset();try{Ma(b,a,e,f)}catch(g){return Ia(b,\"Invalid regex: \"+a),void A(b)}yb.processMotion(b,c,{type:\"motion\",motion:\"findNext\",motionArgs:{forward:!0,toJumplist:d.searchArgs.toJumplist}})}function f(a){b.scrollTo(m.left,m.top),e(a,!0,!0);var c=vb.macroModeState;c.isRecording&&_a(c,a)}function g(c,d,e){var f,g,h=a.keyName(c);\"Up\"==h||\"Down\"==h?(f=\"Up\"==h,g=c.target?c.target.selectionEnd:0,d=vb.searchHistoryController.nextMatch(d,f)||\"\",e(d),g&&c.target&&(c.target.selectionEnd=c.target.selectionStart=Math.min(g,c.target.value.length))):\"Left\"!=h&&\"Right\"!=h&&\"Ctrl\"!=h&&\"Alt\"!=h&&\"Shift\"!=h&&vb.searchHistoryController.reset();var j;try{j=Ma(b,d,!0,!0)}catch(c){}j?b.scrollIntoView(Pa(b,!i,j),30):(Qa(b),b.scrollTo(m.left,m.top))}function h(c,d,e){var f=a.keyName(c);\"Esc\"==f||\"Ctrl-C\"==f||\"Ctrl-[\"==f||\"Backspace\"==f&&\"\"==d?(vb.searchHistoryController.pushInput(d),vb.searchHistoryController.reset(),Ma(b,l),Qa(b),b.scrollTo(m.left,m.top),a.e_stop(c),A(b),e(),b.focus()):\"Up\"==f||\"Down\"==f?a.e_stop(c):\"Ctrl-U\"==f&&(a.e_stop(c),e(\"\"))}if(b.getSearchCursor){var i=d.searchArgs.forward,j=d.searchArgs.wholeWordOnly;Aa(b).setReversed(!i);var k=i?\"/\":\"?\",l=Aa(b).getQuery(),m=b.getScrollInfo();switch(d.searchArgs.querySrc){case\"prompt\":var n=vb.macroModeState;if(n.isPlaying){var o=n.replaySearchQueries.shift();e(o,!0,!1)}else Ka(b,{onClose:f,prefix:k,desc:Gb,onKeyUp:g,onKeyDown:h});break;case\"wordUnderCursor\":var p=ma(b,!1,!0,!1,!0),q=!0;if(p||(p=ma(b,!1,!0,!1,!1),q=!1),!p)return;var o=b.getLine(p.start.line).substring(p.start.ch,p.end.ch);o=q&&j?\"\\\\b\"+o+\"\\\\b\":Z(o),vb.jumpList.cachedCursor=b.getCursor(),b.setCursor(p.start),e(o,!0,!1)}}},processEx:function(b,c,d){function e(a){vb.exCommandHistoryController.pushInput(a),vb.exCommandHistoryController.reset(),Jb.processCommand(b,a)}function f(c,d,e){var f,g,h=a.keyName(c);(\"Esc\"==h||\"Ctrl-C\"==h||\"Ctrl-[\"==h||\"Backspace\"==h&&\"\"==d)&&(vb.exCommandHistoryController.pushInput(d),vb.exCommandHistoryController.reset(),a.e_stop(c),A(b),e(),b.focus()),\"Up\"==h||\"Down\"==h?(a.e_stop(c),f=\"Up\"==h,g=c.target?c.target.selectionEnd:0,d=vb.exCommandHistoryController.nextMatch(d,f)||\"\",e(d),g&&c.target&&(c.target.selectionEnd=c.target.selectionStart=Math.min(g,c.target.value.length))):\"Ctrl-U\"==h?(a.e_stop(c),e(\"\")):\"Left\"!=h&&\"Right\"!=h&&\"Ctrl\"!=h&&\"Alt\"!=h&&\"Shift\"!=h&&vb.exCommandHistoryController.reset()}\"keyToEx\"==d.type?Jb.processCommand(b,d.exArgs.input):c.visualMode?Ka(b,{onClose:e,prefix:\":\",value:\"\'<,\'>\",onKeyDown:f}):Ka(b,{onClose:e,prefix:\":\",onKeyDown:f})},evalInput:function(a,b){var c,e,f,g=b.inputState,h=g.motion,i=g.motionArgs||{},j=g.operator,k=g.operatorArgs||{},l=g.registerName,m=b.sel,n=R(b.visualMode?J(a,m.head):a.getCursor(\"head\")),o=R(b.visualMode?J(a,m.anchor):a.getCursor(\"anchor\")),p=R(n),q=R(o);if(j&&this.recordLastEdit(b,g),f=void 0!==g.repeatOverride?g.repeatOverride:g.getRepeat(),f>0&&i.explicitRepeat?i.repeatIsExplicit=!0:(i.noRepeat||!i.explicitRepeat&&0===f)&&(f=1,i.repeatIsExplicit=!1),g.selectedCharacter&&(i.selectedCharacter=k.selectedCharacter=g.selectedCharacter),i.repeat=f,A(a),h){var r=zb[h](a,n,i,b);if(b.lastMotion=zb[h],!r)return;if(i.toJumplist){var s=vb.jumpList,t=s.cachedCursor;t?(na(a,t,r),delete s.cachedCursor):na(a,n,r)}r instanceof Array?(e=r[0],c=r[1]):c=r,c||(c=R(n)),b.visualMode?(b.visualBlock&&c.ch===1/0||(c=J(a,c,b.visualBlock)),e&&(e=J(a,e,!0)),e=e||q,m.anchor=e,m.head=c,fa(a),ua(a,b,\"<\",T(e,c)?e:c),ua(a,b,\">\",T(e,c)?c:e)):j||(c=J(a,c),a.setCursor(c.line,c.ch))}if(j){if(k.lastSel){e=q;var u=k.lastSel,v=Math.abs(u.head.line-u.anchor.line),w=Math.abs(u.head.ch-u.anchor.ch);c=u.visualLine?d(q.line+v,q.ch):u.visualBlock?d(q.line+v,q.ch+w):u.head.line==u.anchor.line?d(q.line,q.ch+w):d(q.line+v,q.ch),b.visualMode=!0,b.visualLine=u.visualLine,b.visualBlock=u.visualBlock,m=b.sel={anchor:e,head:c},fa(a)}else b.visualMode&&(k.lastSel={anchor:R(m.anchor),head:R(m.head),visualBlock:b.visualBlock,visualLine:b.visualLine});var x,y,z,B,C;if(b.visualMode){if(x=U(m.head,m.anchor),y=V(m.head,m.anchor),z=b.visualLine||k.linewise,B=b.visualBlock?\"block\":z?\"line\":\"char\",C=ga(a,{anchor:x,head:y},B),z){var D=C.ranges;if(\"block\"==B)for(var E=0;E<D.length;E++)D[E].head.ch=X(a,D[E].head.line);else\"line\"==B&&(D[0].head=d(D[0].head.line+1,0))}}else{if(x=R(e||q),y=R(c||p),T(y,x)){var F=x;x=y,y=F}z=i.linewise||k.linewise,z?ka(a,x,y):i.forward&&ja(a,x,y),B=\"char\";var G=!i.inclusive||z;C=ga(a,{anchor:x,head:y},B,G)}a.setSelections(C.ranges,C.primary),b.lastMotion=null,k.repeat=f,k.registerName=l,k.linewise=z;var H=Ab[j](a,k,C.ranges,q,c);b.visualMode&&ia(a,null!=H),H&&a.setCursor(H)}},recordLastEdit:function(a,b,c){var d=vb.macroModeState;d.isPlaying||(a.lastEditInputState=b,a.lastEditActionCommand=c,d.lastInsertModeChanges.changes=[],d.lastInsertModeChanges.expectCursorActivityForChange=!1)}},zb={moveToTopLine:function(a,b,c){var e=Sa(a).top+c.repeat-1;return d(e,la(a.getLine(e)))},moveToMiddleLine:function(a){var b=Sa(a),c=Math.floor(.5*(b.top+b.bottom));return d(c,la(a.getLine(c)))},moveToBottomLine:function(a,b,c){var e=Sa(a).bottom-c.repeat+1;return d(e,la(a.getLine(e)))},expandToLine:function(a,b,c){var e=b;return d(e.line+c.repeat-1,1/0)},findNext:function(a,b,c){var d=Aa(a),e=d.getQuery();if(e){var f=!c.forward;return f=d.isReversed()?!f:f,Oa(a,e),Pa(a,f,e,c.repeat)}},goToMark:function(a,b,c,d){var e=Ta(a,d,c.selectedCharacter);return e?c.linewise?{line:e.line,ch:la(a.getLine(e.line))}:e:null},moveToOtherHighlightedEnd:function(a,b,c,e){if(e.visualBlock&&c.sameLine){var f=e.sel;return[J(a,d(f.anchor.line,f.head.ch)),J(a,d(f.head.line,f.anchor.ch))]}return[e.sel.head,e.sel.anchor]},jumpToMark:function(a,b,c,e){for(var f=b,g=0;g<c.repeat;g++){var h=f;for(var i in e.marks)if(n(i)){var j=e.marks[i].find(),k=c.forward?T(j,h):T(h,j);if(!(k||c.linewise&&j.line==h.line)){var l=S(h,f),m=c.forward?W(h,j,f):W(f,j,h);(l||m)&&(f=j)}}}return c.linewise&&(f=d(f.line,la(a.getLine(f.line)))),f},moveByCharacters:function(a,b,c){var e=b,f=c.repeat,g=c.forward?e.ch+f:e.ch-f;return d(e.line,g)},moveByLines:function(a,b,c,e){var f=b,g=f.ch;switch(e.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:g=e.lastHPos;break;default:e.lastHPos=g}var h=c.repeat+(c.repeatOffset||0),i=c.forward?f.line+h:f.line-h,j=a.firstLine(),k=a.lastLine();return i<j&&f.line==j?this.moveToStartOfLine(a,b,c,e):i>k&&f.line==k?this.moveToEol(a,b,c,e):(c.toFirstChar&&(g=la(a.getLine(i)),e.lastHPos=g),e.lastHSPos=a.charCoords(d(i,g),\"div\").left,d(i,g))},moveByDisplayLines:function(a,b,c,e){var f=b;switch(e.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:e.lastHSPos=a.charCoords(f,\"div\").left}var g=c.repeat,h=a.findPosV(f,c.forward?g:-g,\"line\",e.lastHSPos);if(h.hitSide)if(c.forward)var i=a.charCoords(h,\"div\"),j={top:i.top+8,left:e.lastHSPos},h=a.coordsChar(j,\"div\");else{var k=a.charCoords(d(a.firstLine(),0),\"div\");k.left=e.lastHSPos,h=a.coordsChar(k,\"div\")}return e.lastHPos=h.ch,h},moveByPage:function(a,b,c){var d=b,e=c.repeat;return a.findPosV(d,c.forward?e:-e,\"page\")},moveByParagraph:function(a,b,c){var d=c.forward?1:-1;return wa(a,b,c.repeat,d)},moveByScroll:function(a,b,c,d){var e=a.getScrollInfo(),f=null,g=c.repeat;g||(g=e.clientHeight/(2*a.defaultTextHeight()));var h=a.charCoords(b,\"local\");c.repeat=g;var f=zb.moveByDisplayLines(a,b,c,d);if(!f)return null;var i=a.charCoords(f,\"local\");return a.scrollTo(null,e.top+i.top-h.top),f},moveByWords:function(a,b,c){return ra(a,b,c.repeat,!!c.forward,!!c.wordEnd,!!c.bigWord)},moveTillCharacter:function(a,b,c){var d=c.repeat,e=sa(a,d,c.forward,c.selectedCharacter),f=c.forward?-1:1;return oa(f,c),e?(e.ch+=f,e):null},moveToCharacter:function(a,b,c){var d=c.repeat;return oa(0,c),sa(a,d,c.forward,c.selectedCharacter)||b},moveToSymbol:function(a,b,c){var d=c.repeat;return pa(a,d,c.forward,c.selectedCharacter)||b},moveToColumn:function(a,b,c,d){var e=c.repeat;return d.lastHPos=e-1,d.lastHSPos=a.charCoords(b,\"div\").left,ta(a,e)},moveToEol:function(a,b,c,e){var f=b;e.lastHPos=1/0;var g=d(f.line+c.repeat-1,1/0),h=a.clipPos(g);return h.ch--,e.lastHSPos=a.charCoords(h,\"div\").left,g},moveToFirstNonWhiteSpaceCharacter:function(a,b){var c=b;return d(c.line,la(a.getLine(c.line)))},moveToMatchedSymbol:function(a,b){for(var c,e=b,f=e.line,g=e.ch,h=a.getLine(f);g<h.length;g++)if(c=h.charAt(g),c&&o(c)){var i=a.getTokenTypeAt(d(f,g+1));if(\"string\"!==i&&\"comment\"!==i)break}if(g<h.length){var j=a.findMatchingBracket(d(f,g));return j.to}return e},moveToStartOfLine:function(a,b){return d(b.line,0)},moveToLineOrEdgeOfDocument:function(a,b,c){var e=c.forward?a.lastLine():a.firstLine();\n\";i:18;s:32034:\"return c.repeatIsExplicit&&(e=c.repeat-a.getOption(\"firstLineNumber\")),d(e,la(a.getLine(e)))},textObjectManipulation:function(a,b,c,d){var e={\"(\":\")\",\")\":\"(\",\"{\":\"}\",\"}\":\"{\",\"[\":\"]\",\"]\":\"[\"},f={\"\'\":!0,\'\"\':!0},g=c.selectedCharacter;\"b\"==g?g=\"(\":\"B\"==g&&(g=\"{\");var h,i=!c.textObjectInner;if(e[g])h=xa(a,b,g,i);else if(f[g])h=ya(a,b,g,i);else if(\"W\"===g)h=ma(a,i,!0,!0);else if(\"w\"===g)h=ma(a,i,!0,!1);else{if(\"p\"!==g)return null;if(h=wa(a,b,c.repeat,0,i),c.linewise=!0,d.visualMode)d.visualLine||(d.visualLine=!0);else{var j=d.inputState.operatorArgs;j&&(j.linewise=!0),h.end.line--}}return a.state.vim.visualMode?ea(a,h.start,h.end):[h.start,h.end]},repeatLastCharacterSearch:function(a,b,c){var d=vb.lastCharacterSearch,e=c.repeat,f=c.forward===d.forward,g=(d.increment?1:0)*(f?-1:1);a.moveH(-g,\"char\"),c.inclusive=!!f;var h=sa(a,e,f,d.selectedCharacter);return h?(h.ch+=g,h):(a.moveH(g,\"char\"),b)}},Ab={change:function(b,c,e){var f,g,h=b.state.vim;if(vb.macroModeState.lastInsertModeChanges.inVisualBlock=h.visualBlock,h.visualMode){g=b.getSelection();var i=G(\"\",e.length);b.replaceSelections(i),f=U(e[0].head,e[0].anchor)}else{var j=e[0].anchor,k=e[0].head;g=b.getRange(j,k);var l=h.lastEditInputState||{};if(\"moveByWords\"==l.motion&&!r(g)){var m=/\\s+$/.exec(g);m&&l.motionArgs&&l.motionArgs.forward&&(k=L(k,0,-m[0].length),g=g.slice(0,-m[0].length))}var n=new d(j.line-1,Number.MAX_VALUE),o=b.firstLine()==b.lastLine();k.line>b.lastLine()&&c.linewise&&!o?b.replaceRange(\"\",n,k):b.replaceRange(\"\",j,k),c.linewise&&(o||(b.setCursor(n),a.commands.newlineAndIndent(b)),j.ch=Number.MAX_VALUE),f=j}vb.registerController.pushText(c.registerName,\"change\",g,c.linewise,e.length>1),Bb.enterInsertMode(b,{head:f},b.state.vim)},\"delete\":function(a,b,c){var e,f,g=a.state.vim;if(g.visualBlock){f=a.getSelection();var h=G(\"\",c.length);a.replaceSelections(h),e=c[0].anchor}else{var i=c[0].anchor,j=c[0].head;b.linewise&&j.line!=a.firstLine()&&i.line==a.lastLine()&&i.line==j.line-1&&(i.line==a.firstLine()?i.ch=0:i=d(i.line-1,X(a,i.line-1))),f=a.getRange(i,j),a.replaceRange(\"\",i,j),e=i,b.linewise&&(e=zb.moveToFirstNonWhiteSpaceCharacter(a,i))}return vb.registerController.pushText(b.registerName,\"delete\",f,b.linewise,g.visualBlock),J(a,e)},indent:function(a,b,c){var d=a.state.vim,e=c[0].anchor.line,f=d.visualBlock?c[c.length-1].anchor.line:c[0].head.line,g=d.visualMode?b.repeat:1;b.linewise&&f--;for(var h=e;h<=f;h++)for(var i=0;i<g;i++)a.indentLine(h,b.indentRight);return zb.moveToFirstNonWhiteSpaceCharacter(a,c[0].anchor)},changeCase:function(a,b,c,d,e){for(var f=a.getSelections(),g=[],h=b.toLower,i=0;i<f.length;i++){var j=f[i],k=\"\";if(h===!0)k=j.toLowerCase();else if(h===!1)k=j.toUpperCase();else for(var l=0;l<j.length;l++){var m=j.charAt(l);k+=q(m)?m.toLowerCase():m.toUpperCase()}g.push(k)}return a.replaceSelections(g),b.shouldMoveCursor?e:!a.state.vim.visualMode&&b.linewise&&c[0].anchor.line+1==c[0].head.line?zb.moveToFirstNonWhiteSpaceCharacter(a,d):b.linewise?d:U(c[0].anchor,c[0].head)},yank:function(a,b,c,d){var e=a.state.vim,f=a.getSelection(),g=e.visualMode?U(e.sel.anchor,e.sel.head,c[0].head,c[0].anchor):d;return vb.registerController.pushText(b.registerName,\"yank\",f,b.linewise,e.visualBlock),g}},Bb={jumpListWalk:function(a,b,c){if(!c.visualMode){var d=b.repeat,e=b.forward,f=vb.jumpList,g=f.move(a,e?d:-d),h=g?g.find():void 0;h=h?h:a.getCursor(),a.setCursor(h)}},scroll:function(a,b,c){if(!c.visualMode){var d=b.repeat||1,e=a.defaultTextHeight(),f=a.getScrollInfo().top,g=e*d,h=b.forward?f+g:f-g,i=R(a.getCursor()),j=a.charCoords(i,\"local\");if(b.forward)h>j.top?(i.line+=(h-j.top)/e,i.line=Math.ceil(i.line),a.setCursor(i),j=a.charCoords(i,\"local\"),a.scrollTo(null,j.top)):a.scrollTo(null,h);else{var k=h+a.getScrollInfo().clientHeight;k<j.bottom?(i.line-=(j.bottom-k)/e,i.line=Math.floor(i.line),a.setCursor(i),j=a.charCoords(i,\"local\"),a.scrollTo(null,j.bottom-a.getScrollInfo().clientHeight)):a.scrollTo(null,h)}}},scrollToCursor:function(a,b){var c=a.getCursor().line,e=a.charCoords(d(c,0),\"local\"),f=a.getScrollInfo().clientHeight,g=e.top,h=e.bottom-g;switch(b.position){case\"center\":g=g-f/2+h;break;case\"bottom\":g=g-f+h}a.scrollTo(null,g)},replayMacro:function(a,b,c){var d=b.selectedCharacter,e=b.repeat,f=vb.macroModeState;for(\"@\"==d&&(d=f.latestRegister);e--;)Ya(a,c,f,d)},enterMacroRecordMode:function(a,b){var c=vb.macroModeState,d=b.selectedCharacter;vb.registerController.isValidRegister(d)&&c.enterMacroRecordMode(a,d)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption(\"keyMap\",\"vim-insert\"),a.signal(b,\"vim-mode-change\",{mode:\"insert\"})):(b.toggleOverwrite(!0),b.setOption(\"keyMap\",\"vim-replace\"),a.signal(b,\"vim-mode-change\",{mode:\"replace\"}))},enterInsertMode:function(b,c,e){if(!b.getOption(\"readOnly\")){e.insertMode=!0,e.insertModeRepeat=c&&c.repeat||1;var f=c?c.insertAt:null,g=e.sel,h=c.head||b.getCursor(\"head\"),i=b.listSelections().length;if(\"eol\"==f)h=d(h.line,X(b,h.line));else if(\"charAfter\"==f)h=L(h,0,1);else if(\"firstNonBlank\"==f)h=zb.moveToFirstNonWhiteSpaceCharacter(b,h);else if(\"startOfSelectedArea\"==f)e.visualBlock?(h=d(Math.min(g.head.line,g.anchor.line),Math.min(g.head.ch,g.anchor.ch)),i=Math.abs(g.head.line-g.anchor.line)+1):h=g.head.line<g.anchor.line?g.head:d(g.anchor.line,0);else if(\"endOfSelectedArea\"==f)e.visualBlock?(h=d(Math.min(g.head.line,g.anchor.line),Math.max(g.head.ch+1,g.anchor.ch)),i=Math.abs(g.head.line-g.anchor.line)+1):h=g.head.line>=g.anchor.line?L(g.head,0,1):d(g.anchor.line,0);else if(\"inplace\"==f&&e.visualMode)return;b.setOption(\"disableInput\",!1),c&&c.replace?(b.toggleOverwrite(!0),b.setOption(\"keyMap\",\"vim-replace\"),a.signal(b,\"vim-mode-change\",{mode:\"replace\"})):(b.toggleOverwrite(!1),b.setOption(\"keyMap\",\"vim-insert\"),a.signal(b,\"vim-mode-change\",{mode:\"insert\"})),vb.macroModeState.isPlaying||(b.on(\"change\",ab),a.on(b.getInputField(),\"keydown\",fb)),e.visualMode&&ia(b),aa(b,h,i)}},toggleVisualMode:function(b,c,e){var f,g=c.repeat,h=b.getCursor();e.visualMode?e.visualLine^c.linewise||e.visualBlock^c.blockwise?(e.visualLine=!!c.linewise,e.visualBlock=!!c.blockwise,a.signal(b,\"vim-mode-change\",{mode:\"visual\",subMode:e.visualLine?\"linewise\":e.visualBlock?\"blockwise\":\"\"}),fa(b)):ia(b):(e.visualMode=!0,e.visualLine=!!c.linewise,e.visualBlock=!!c.blockwise,f=J(b,d(h.line,h.ch+g-1),!0),e.sel={anchor:h,head:f},a.signal(b,\"vim-mode-change\",{mode:\"visual\",subMode:e.visualLine?\"linewise\":e.visualBlock?\"blockwise\":\"\"}),fa(b),ua(b,e,\"<\",U(h,f)),ua(b,e,\">\",V(h,f)))},reselectLastSelection:function(b,c,d){var e=d.lastSelection;if(d.visualMode&&da(b,d),e){var f=e.anchorMark.find(),g=e.headMark.find();if(!f||!g)return;d.sel={anchor:f,head:g},d.visualMode=!0,d.visualLine=e.visualLine,d.visualBlock=e.visualBlock,fa(b),ua(b,d,\"<\",U(f,g)),ua(b,d,\">\",V(f,g)),a.signal(b,\"vim-mode-change\",{mode:\"visual\",subMode:d.visualLine?\"linewise\":d.visualBlock?\"blockwise\":\"\"})}},joinLines:function(a,b,c){var e,f;if(c.visualMode){if(e=a.getCursor(\"anchor\"),f=a.getCursor(\"head\"),T(f,e)){var g=f;f=e,e=g}f.ch=X(a,f.line)-1}else{var h=Math.max(b.repeat,2);e=a.getCursor(),f=J(a,d(e.line+h-1,1/0))}for(var i=0,j=e.line;j<f.line;j++){i=X(a,e.line);var g=d(e.line+1,X(a,e.line+1)),k=a.getRange(e,g);k=k.replace(/\\n\\s*/g,\" \"),a.replaceRange(k,e,g)}var l=d(e.line,i);c.visualMode&&ia(a,!1),a.setCursor(l)},newLineAndEnterInsertMode:function(b,c,e){e.insertMode=!0;var f=R(b.getCursor());if(f.line!==b.firstLine()||c.after){f.line=c.after?f.line:f.line-1,f.ch=X(b,f.line),b.setCursor(f);var g=a.commands.newlineAndIndentContinueComment||a.commands.newlineAndIndent;g(b)}else b.replaceRange(\"\\n\",d(b.firstLine(),0)),b.setCursor(b.firstLine(),0);this.enterInsertMode(b,{repeat:c.repeat},e)},paste:function(a,b,c){var e=R(a.getCursor()),f=vb.registerController.getRegister(b.registerName),g=f.toString();if(g){if(b.matchIndent){var h=a.getOption(\"tabSize\"),i=function(a){var b=a.split(\"\\t\").length-1,c=a.split(\" \").length-1;return b*h+1*c},j=a.getLine(a.getCursor().line),k=i(j.match(/^\\s*/)[0]),l=g.replace(/\\n$/,\"\"),m=g!==l,n=i(g.match(/^\\s*/)[0]),g=l.replace(/^\\s*/gm,function(b){var c=k+(i(b)-n);if(c<0)return\"\";if(a.getOption(\"indentWithTabs\")){var d=Math.floor(c/h);return Array(d+1).join(\"\\t\")}return Array(c+1).join(\" \")});g+=m?\"\\n\":\"\"}if(b.repeat>1)var g=Array(b.repeat+1).join(g);var o=f.linewise,p=f.blockwise;if(o)c.visualMode?g=c.visualLine?g.slice(0,-1):\"\\n\"+g.slice(0,g.length-1)+\"\\n\":b.after?(g=\"\\n\"+g.slice(0,g.length-1),e.ch=X(a,e.line)):e.ch=0;else{if(p){g=g.split(\"\\n\");for(var q=0;q<g.length;q++)g[q]=\"\"==g[q]?\" \":g[q]}e.ch+=b.after?1:0}var r,s;if(c.visualMode){c.lastPastedText=g;var t,u=ca(a,c),v=u[0],w=u[1],x=a.getSelection(),y=a.listSelections(),z=new Array(y.length).join(\"1\").split(\"1\");c.lastSelection&&(t=c.lastSelection.headMark.find()),vb.registerController.unnamedRegister.setText(x),p?(a.replaceSelections(z),w=d(v.line+g.length-1,v.ch),a.setCursor(v),_(a,w),a.replaceSelections(g),r=v):c.visualBlock?(a.replaceSelections(z),a.setCursor(v),a.replaceRange(g,v,v),r=v):(a.replaceRange(g,v,w),r=a.posFromIndex(a.indexFromPos(v)+g.length-1)),t&&(c.lastSelection.headMark=a.setBookmark(t)),o&&(r.ch=0)}else if(p){a.setCursor(e);for(var q=0;q<g.length;q++){var A=e.line+q;A>a.lastLine()&&a.replaceRange(\"\\n\",d(A,0));var B=X(a,A);B<e.ch&&$(a,A,e.ch)}a.setCursor(e),_(a,d(e.line+g.length-1,e.ch)),a.replaceSelections(g),r=e}else a.replaceRange(g,e),o&&b.after?r=d(e.line+1,la(a.getLine(e.line+1))):o&&!b.after?r=d(e.line,la(a.getLine(e.line))):!o&&b.after?(s=a.indexFromPos(e),r=a.posFromIndex(s+g.length-1)):(s=a.indexFromPos(e),r=a.posFromIndex(s+g.length));c.visualMode&&ia(a,!1),a.setCursor(r)}},undo:function(b,c){b.operation(function(){Q(b,a.commands.undo,c.repeat)(),b.setCursor(b.getCursor(\"anchor\"))})},redo:function(b,c){Q(b,a.commands.redo,c.repeat)()},setRegister:function(a,b,c){c.inputState.registerName=b.selectedCharacter},setMark:function(a,b,c){var d=b.selectedCharacter;ua(a,c,d,a.getCursor())},replace:function(b,c,e){var f,g,h=c.selectedCharacter,i=b.getCursor(),j=b.listSelections();if(e.visualMode)i=b.getCursor(\"start\"),g=b.getCursor(\"end\");else{var k=b.getLine(i.line);f=i.ch+c.repeat,f>k.length&&(f=k.length),g=d(i.line,f)}if(\"\\n\"==h)e.visualMode||b.replaceRange(\"\",i,g),(a.commands.newlineAndIndentContinueComment||a.commands.newlineAndIndent)(b);else{var l=b.getRange(i,g);if(l=l.replace(/[^\\n]/g,h),e.visualBlock){var m=new Array(b.getOption(\"tabSize\")+1).join(\" \");l=b.getSelection(),l=l.replace(/\\t/g,m).replace(/[^\\n]/g,h).split(\"\\n\"),b.replaceSelections(l)}else b.replaceRange(l,i,g);e.visualMode?(i=T(j[0].anchor,j[0].head)?j[0].anchor:j[0].head,b.setCursor(i),ia(b,!1)):b.setCursor(L(g,0,-1))}},incrementNumberToken:function(a,b){for(var c,e,f,g,h,i=a.getCursor(),j=a.getLine(i.line),k=/-?\\d+/g;null!==(c=k.exec(j))&&(h=c[0],e=c.index,f=e+h.length,!(i.ch<f)););if((b.backtrack||!(f<=i.ch))&&h){var l=b.increase?1:-1,m=parseInt(h)+l*b.repeat,n=d(i.line,e),o=d(i.line,f);g=m.toString(),a.replaceRange(g,n,o),a.setCursor(d(i.line,e+g.length-1))}},repeatLastEdit:function(a,b,c){var d=c.lastEditInputState;if(d){var e=b.repeat;e&&b.repeatIsExplicit?c.lastEditInputState.repeatOverride=e:e=c.lastEditInputState.repeatOverride||e,gb(a,c,e,!1)}},indent:function(a,b){a.indentLine(a.getCursor().line,b.indentRight)},exitInsertMode:Va},Cb={\"(\":\"bracket\",\")\":\"bracket\",\"{\":\"bracket\",\"}\":\"bracket\",\"[\":\"section\",\"]\":\"section\",\"*\":\"comment\",\"/\":\"comment\",m:\"method\",M:\"method\",\"#\":\"preprocess\"},Db={bracket:{isComplete:function(a){if(a.nextCh===a.symb){if(a.depth++,a.depth>=1)return!0}else a.nextCh===a.reverseSymb&&a.depth--;return!1}},section:{init:function(a){a.curMoveThrough=!0,a.symb=(a.forward?\"]\":\"[\")===a.symb?\"{\":\"}\"},isComplete:function(a){return 0===a.index&&a.nextCh===a.symb}},comment:{isComplete:function(a){var b=\"*\"===a.lastCh&&\"/\"===a.nextCh;return a.lastCh=a.nextCh,b}},method:{init:function(a){a.symb=\"m\"===a.symb?\"{\":\"}\",a.reverseSymb=\"{\"===a.symb?\"}\":\"{\"},isComplete:function(a){return a.nextCh===a.symb}},preprocess:{init:function(a){a.index=0},isComplete:function(a){if(\"#\"===a.nextCh){var b=a.lineText.match(/#(\\w+)/)[1];if(\"endif\"===b){if(a.forward&&0===a.depth)return!0;a.depth++}else if(\"if\"===b){if(!a.forward&&0===a.depth)return!0;a.depth--}if(\"else\"===b&&0===a.depth)return!0}return!1}}};t(\"pcre\",!0,\"boolean\"),za.prototype={getQuery:function(){return vb.query},setQuery:function(a){vb.query=a},getOverlay:function(){return this.searchOverlay},setOverlay:function(a){this.searchOverlay=a},isReversed:function(){return vb.isReversed},setReversed:function(a){vb.isReversed=a},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(a){this.annotate=a}};var Eb={\"\\\\n\":\"\\n\",\"\\\\r\":\"\\r\",\"\\\\t\":\"\\t\"},Fb={\"\\\\/\":\"/\",\"\\\\\\\\\":\"\\\\\",\"\\\\n\":\"\\n\",\"\\\\r\":\"\\r\",\"\\\\t\":\"\\t\"},Gb=\"(Javascript regexp)\",Hb=function(){this.buildCommandMap_()};Hb.prototype={processCommand:function(a,b,c){var d=this;a.operation(function(){a.curOp.isVimOp=!0,d._processCommand(a,b,c)})},_processCommand:function(b,c,d){var e=b.state.vim,f=vb.registerController.getRegister(\":\"),g=f.toString();e.visualMode&&ia(b);var h=new a.StringStream(c);f.setText(c);var i=d||{};i.input=c;try{this.parseInput_(b,h,i)}catch(j){throw Ia(b,j),j}var k,l;if(i.commandName){if(k=this.matchCommand_(i.commandName)){if(l=k.name,k.excludeFromCommandHistory&&f.setText(g),this.parseCommandArgs_(h,i,k),\"exToKey\"==k.type){for(var m=0;m<k.toKeys.length;m++)a.Vim.handleKey(b,k.toKeys[m],\"mapping\");return}if(\"exToEx\"==k.type)return void this.processCommand(b,k.toInput)}}else void 0!==i.line&&(l=\"move\");if(!l)return void Ia(b,\'Not an editor command \":\'+c+\'\"\');try{Ib[l](b,i),k&&k.possiblyAsync||!i.callback||i.callback()}catch(j){throw Ia(b,j),j}},parseInput_:function(a,b,c){b.eatWhile(\":\"),b.eat(\"%\")?(c.line=a.firstLine(),c.lineEnd=a.lastLine()):(c.line=this.parseLineSpec_(a,b),void 0!==c.line&&b.eat(\",\")&&(c.lineEnd=this.parseLineSpec_(a,b)));var d=b.match(/^(\\w+)/);return d?c.commandName=d[1]:c.commandName=b.match(/.*/)[0],c},parseLineSpec_:function(a,b){var c=b.match(/^(\\d+)/);if(c)return parseInt(c[1],10)-1;switch(b.next()){case\".\":return this.parseLineSpecOffset_(b,a.getCursor().line);case\"$\":return this.parseLineSpecOffset_(b,a.lastLine());case\"\'\":var d=b.next(),e=Ta(a,a.state.vim,d);if(!e)throw new Error(\"Mark not set\");return this.parseLineSpecOffset_(b,e.line);case\"-\":case\"+\":return b.backUp(1),this.parseLineSpecOffset_(b,a.getCursor().line);default:return void b.backUp(1)}},parseLineSpecOffset_:function(a,b){var c=a.match(/^([+-])?(\\d+)/);if(c){var d=parseInt(c[2],10);\"-\"==c[1]?b-=d:b+=d}return b},parseCommandArgs_:function(a,b,c){if(!a.eol()){b.argString=a.match(/.*/)[0];var d=c.argDelimiter||/\\s+/,e=Y(b.argString).split(d);e.length&&e[0]&&(b.args=e)}},matchCommand_:function(a){for(var b=a.length;b>0;b--){var c=a.substring(0,b);if(this.commandMap_[c]){var d=this.commandMap_[c];if(0===d.name.indexOf(a))return d}}return null},buildCommandMap_:function(){this.commandMap_={};for(var a=0;a<c.length;a++){var b=c[a],d=b.shortName||b.name;this.commandMap_[d]=b}},map:function(a,c,d){if(\":\"!=a&&\":\"==a.charAt(0)){if(d)throw Error(\"Mode not supported for ex mappings\");var e=a.substring(1);\":\"!=c&&\":\"==c.charAt(0)?this.commandMap_[e]={name:e,type:\"exToEx\",toInput:c.substring(1),user:!0}:this.commandMap_[e]={name:e,type:\"exToKey\",toKeys:c,user:!0}}else if(\":\"!=c&&\":\"==c.charAt(0)){var f={keys:a,type:\"keyToEx\",exArgs:{input:c.substring(1)}};d&&(f.context=d),b.unshift(f)}else{var f={keys:a,type:\"keyToKey\",toKeys:c};d&&(f.context=d),b.unshift(f)}},unmap:function(a,c){if(\":\"!=a&&\":\"==a.charAt(0)){if(c)throw Error(\"Mode not supported for ex mappings\");var d=a.substring(1);if(this.commandMap_[d]&&this.commandMap_[d].user)return void delete this.commandMap_[d]}else for(var e=a,f=0;f<b.length;f++)if(e==b[f].keys&&b[f].context===c)return void b.splice(f,1);throw Error(\"No such mapping.\")}};var Ib={colorscheme:function(a,b){return!b.args||b.args.length<1?void Ia(a,a.getOption(\"theme\")):void a.setOption(\"theme\",b.args[0])},map:function(a,b,c){var d=b.args;return!d||d.length<2?void(a&&Ia(a,\"Invalid mapping: \"+b.input)):void Jb.map(d[0],d[1],c)},imap:function(a,b){this.map(a,b,\"insert\")},nmap:function(a,b){this.map(a,b,\"normal\")},vmap:function(a,b){this.map(a,b,\"visual\")},unmap:function(a,b,c){var d=b.args;return!d||d.length<1?void(a&&Ia(a,\"No such mapping: \"+b.input)):void Jb.unmap(d[0],c)},move:function(a,b){yb.processCommand(a,a.state.vim,{type:\"motion\",motion:\"moveToLineOrEdgeOfDocument\",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:b.line+1})},set:function(a,b){var c=b.args,d=b.setCfg||{};if(!c||c.length<1)return void(a&&Ia(a,\"Invalid mapping: \"+b.input));var e=c[0].split(\"=\"),f=e[0],g=e[1],h=!1;if(\"?\"==f.charAt(f.length-1)){if(g)throw Error(\"Trailing characters: \"+b.argString);f=f.substring(0,f.length-1),h=!0}void 0===g&&\"no\"==f.substring(0,2)&&(f=f.substring(2),g=!1);var i=sb[f]&&\"boolean\"==sb[f].type;if(i&&void 0==g&&(g=!0),!i&&void 0===g||h){var j=v(f,a,d);j instanceof Error?Ia(a,j.message):j===!0||j===!1?Ia(a,\" \"+(j?\"\":\"no\")+f):Ia(a,\"  \"+f+\"=\"+j)}else{var k=u(f,g,a,d);k instanceof Error&&Ia(a,k.message)}},setlocal:function(a,b){b.setCfg={scope:\"local\"},this.set(a,b)},setglobal:function(a,b){b.setCfg={scope:\"global\"},this.set(a,b)},registers:function(a,b){var c=b.args,d=vb.registerController.registers,e=\"----------Registers----------<br><br>\";if(c){var f;c=c.join(\"\");for(var g=0;g<c.length;g++)if(f=c.charAt(g),vb.registerController.isValidRegister(f)){var h=d[f]||new B;e+=\'\"\'+f+\"    \"+h.toString()+\"<br>\"}}else for(var f in d){var i=d[f].toString();i.length&&(e+=\'\"\'+f+\"    \"+i+\"<br>\")}Ia(a,e)},sort:function(b,c){function e(){if(c.argString){var b=new a.StringStream(c.argString);if(b.eat(\"!\")&&(h=!0),b.eol())return;if(!b.eatSpace())return\"Invalid arguments\";var d=b.match(/([dinuox]+)?\\s*(\\/.+\\/)?\\s*/);if(!d&&!b.eol())return\"Invalid arguments\";if(d[1]){i=d[1].indexOf(\"i\")!=-1,j=d[1].indexOf(\"u\")!=-1;var e=d[1].indexOf(\"d\")!=-1||d[1].indexOf(\"n\")!=-1&&1,f=d[1].indexOf(\"x\")!=-1&&1,g=d[1].indexOf(\"o\")!=-1&&1;if(e+f+g>1)return\"Invalid arguments\";k=e&&\"decimal\"||f&&\"hex\"||g&&\"octal\"}d[2]&&(l=new RegExp(d[2].substr(1,d[2].length-2),i?\"i\":\"\"))}}function f(a,b){if(h){var c;c=a,a=b,b=c}i&&(a=a.toLowerCase(),b=b.toLowerCase());var d=k&&s.exec(a),e=k&&s.exec(b);return d?(d=parseInt((d[1]+d[2]).toLowerCase(),t),e=parseInt((e[1]+e[2]).toLowerCase(),t),d-e):a<b?-1:1}function g(a,b){if(h){var c;c=a,a=b,b=c}return i&&(a[0]=a[0].toLowerCase(),b[0]=b[0].toLowerCase()),a[0]<b[0]?-1:1}var h,i,j,k,l,m=e();if(m)return void Ia(b,m+\": \"+c.argString);var n=c.line||b.firstLine(),o=c.lineEnd||c.line||b.lastLine();if(n!=o){var p=d(n,0),q=d(o,X(b,o)),r=b.getRange(p,q).split(\"\\n\"),s=l?l:\"decimal\"==k?/(-?)([\\d]+)/:\"hex\"==k?/(-?)(?:0x)?([0-9a-f]+)/i:\"octal\"==k?/([0-7]+)/:null,t=\"decimal\"==k?10:\"hex\"==k?16:\"octal\"==k?8:null,u=[],v=[];if(k||l)for(var w=0;w<r.length;w++){var x=l?r[w].match(l):null;x&&\"\"!=x[0]?u.push(x):!l&&s.exec(r[w])?u.push(r[w]):v.push(r[w])}else v=r;if(u.sort(l?g:f),l)for(var w=0;w<u.length;w++)u[w]=u[w].input;else k||v.sort(f);if(r=h?u.concat(v):v.concat(u),j){var y,z=r;r=[];for(var w=0;w<z.length;w++)z[w]!=y&&r.push(z[w]),y=z[w]}b.replaceRange(r.join(\"\\n\"),p,q)}},global:function(a,b){var c=b.argString;if(!c)return void Ia(a,\"Regular Expression missing from global\");var d,e=void 0!==b.line?b.line:a.firstLine(),f=b.lineEnd||b.line||a.lastLine(),g=Ca(c),h=c;if(g.length&&(h=g[0],d=g.slice(1,g.length).join(\"/\")),h)try{Ma(a,h,!0,!0)}catch(i){return void Ia(a,\"Invalid regex: \"+h)}for(var j=Aa(a).getQuery(),k=[],l=\"\",m=e;m<=f;m++){var n=j.test(a.getLine(m));n&&(k.push(m+1),l+=a.getLine(m)+\"<br>\")}if(!d)return void Ia(a,l);var o=0,p=function(){if(o<k.length){var b=k[o]+d;Jb.processCommand(a,b,{callback:p})}o++};p()},substitute:function(a,b){if(!a.getSearchCursor)throw new Error(\"Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.\");var c,e,f,g,h=b.argString,i=h?Ca(h):[],j=\"\",k=!1,l=!1;if(i.length)c=i[0],j=i[1],c&&\"$\"===c[c.length-1]&&(c=c.slice(0,c.length-1)+\"\\\\n\",j=j?j+\"\\n\":\"\\n\"),void 0!==j&&(j=v(\"pcre\")?Ga(j):Fa(j),vb.lastSubstituteReplacePart=j),e=i[2]?i[2].split(\" \"):[];else if(h&&h.length)return void Ia(a,\"Substitutions should be of the form :s/pattern/replace/\");if(e&&(f=e[0],g=parseInt(e[1]),f&&(f.indexOf(\"c\")!=-1&&(k=!0,f.replace(\"c\",\"\")),f.indexOf(\"g\")!=-1&&(l=!0,f.replace(\"g\",\"\")),c=c+\"/\"+f)),c)try{Ma(a,c,!0,!0)}catch(m){return void Ia(a,\"Invalid regex: \"+c)}if(j=j||vb.lastSubstituteReplacePart,void 0===j)return void Ia(a,\"No previous substitute regular expression\");var n=Aa(a),o=n.getQuery(),p=void 0!==b.line?b.line:a.getCursor().line,q=b.lineEnd||p;p==a.firstLine()&&q==a.lastLine()&&(q=1/0),g&&(p=q,q=p+g-1);var r=J(a,d(p,0)),s=a.getSearchCursor(o,r);Ua(a,k,l,p,q,s,o,j,b.callback)},redo:a.commands.redo,undo:a.commands.undo,write:function(b){a.commands.save?a.commands.save(b):b.save&&b.save()},nohlsearch:function(a){Qa(a)},yank:function(a){var b=R(a.getCursor()),c=b.line,d=a.getLine(c);vb.registerController.pushText(\"0\",\"yank\",d,!0,!0)},delmarks:function(b,c){if(!c.argString||!Y(c.argString))return void Ia(b,\"Argument required\");for(var d=b.state.vim,e=new a.StringStream(Y(c.argString));!e.eol();){e.eatSpace();var f=e.pos;if(!e.match(/[a-zA-Z]/,!1))return void Ia(b,\"Invalid argument: \"+c.argString.substring(f));var g=e.next();if(e.match(\"-\",!0)){if(!e.match(/[a-zA-Z]/,!1))return void Ia(b,\"Invalid argument: \"+c.argString.substring(f));var h=g,i=e.next();if(!(n(h)&&n(i)||q(h)&&q(i)))return void Ia(b,\"Invalid argument: \"+h+\"-\");var j=h.charCodeAt(0),k=i.charCodeAt(0);if(j>=k)return void Ia(b,\"Invalid argument: \"+c.argString.substring(f));for(var l=0;l<=k-j;l++){var m=String.fromCharCode(j+l);delete d.marks[m]}}else delete d.marks[g]}}},Jb=new Hb;return a.keyMap.vim={attach:h,detach:g,call:i},t(\"insertModeEscKeysTimeout\",200,\"number\"),a.keyMap[\"vim-insert\"]={fallthrough:[\"default\"],attach:h,detach:g,call:i},a.keyMap[\"vim-replace\"]={Backspace:\"goCharLeft\",fallthrough:[\"vim-insert\"],attach:h,detach:g,call:i},y(),xb};a.Vim=e()})},{\"../addon/dialog/dialog\":3,\"../addon/edit/matchbrackets.js\":12,\"../addon/search/searchcursor\":49,\"../lib/codemirror\":59}],59:[function(a,b,c){!function(a,d){\"object\"==typeof c&&\"undefined\"!=typeof b?b.exports=d():\"function\"==typeof define&&define.amd?define(d):a.CodeMirror=d()}(this,function(){\"use strict\";function a(a){return new RegExp(\"(^|\\\\s)\"+a+\"(?:$|\\\\s)\\\\s*\")}function b(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function c(a,c){return b(a).appendChild(c)}function d(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),\"string\"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function e(a,b,c,e){var f=d(a,b,c,e);return f.setAttribute(\"role\",\"presentation\"),f}function f(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)}function g(){var a;try{a=document.activeElement}catch(b){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function h(b,c){var d=b.className;a(c).test(d)||(b.className+=(d?\" \":\"\")+c)}function i(b,c){for(var d=b.split(\" \"),e=0;e<d.length;e++)d[e]&&!a(d[e]).test(c)&&(c+=\" \"+d[e]);return c}function j(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function k(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function l(a,b,c,d,e){null==b&&(b=a.search(/[^\\s\\u00a0]/),b==-1&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf(\"\\t\",f);if(h<0||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}}function m(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function n(a,b,c){for(var d=0,e=0;;){var f=a.indexOf(\"\\t\",d);f==-1&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}}function o(a){for(;Qg.length<=a;)Qg.push(p(Qg)+\" \");return Qg[a]}function p(a){return a[a.length-1]}function q(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function r(a,b,c){for(var d=0,e=c(b);d<a.length&&c(a[d])<=e;)d++;a.splice(d,0,b)}function s(){}function t(a,b){var c;return Object.create?c=Object.create(a):(s.prototype=a,c=new s),b&&k(b,c),c}function u(a){return/\\w/.test(a)||a>\"\\x80\"&&(a.toUpperCase()!=a.toLowerCase()||Rg.test(a))}function v(a,b){return b?!!(b.source.indexOf(\"\\\\w\")>-1&&u(a))||b.test(a):u(a)}function w(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function x(a){return a.charCodeAt(0)>=768&&Sg.test(a)}function y(a,b,c){for(;(c<0?b>0:b<a.length)&&x(a.charAt(b));)b+=c;return b}function z(a,b,c){for(;;){if(Math.abs(b-c)<=1)return a(b)?b:c;var d=Math.floor((b+c)/2);a(d)?c=d:b=d}}function A(a,b,c){var f=this;this.input=c,f.scrollbarFiller=d(\"div\",null,\"CodeMirror-scrollbar-filler\"),f.scrollbarFiller.setAttribute(\"cm-not-content\",\"true\"),f.gutterFiller=d(\"div\",null,\"CodeMirror-gutter-filler\"),f.gutterFiller.setAttribute(\"cm-not-content\",\"true\"),f.lineDiv=e(\"div\",null,\"CodeMirror-code\"),f.selectionDiv=d(\"div\",null,null,\"position: relative; z-index: 1\"),f.cursorDiv=d(\"div\",null,\"CodeMirror-cursors\"),f.measure=d(\"div\",null,\"CodeMirror-measure\"),f.lineMeasure=d(\"div\",null,\"CodeMirror-measure\"),f.lineSpace=e(\"div\",[f.measure,f.lineMeasure,f.selectionDiv,f.cursorDiv,f.lineDiv],null,\"position: relative; outline: none\");var g=e(\"div\",[f.lineSpace],\"CodeMirror-lines\");f.mover=d(\"div\",[g],null,\"position: relative\"),f.sizer=d(\"div\",[f.mover],\"CodeMirror-sizer\"),f.sizerWidth=null,f.heightForcer=d(\"div\",null,null,\"position: absolute; height: \"+Lg+\"px; width: 1px;\"),f.gutters=d(\"div\",null,\"CodeMirror-gutters\"),f.lineGutter=null,f.scroller=d(\"div\",[f.sizer,f.heightForcer,f.gutters],\"CodeMirror-scroll\"),f.scroller.setAttribute(\"tabIndex\",\"-1\"),f.wrapper=d(\"div\",[f.scrollbarFiller,f.gutterFiller,f.scroller],\"CodeMirror\"),ng&&og<8&&(f.gutters.style.zIndex=-1,f.scroller.style.paddingRight=0),pg||jg&&yg||(f.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(f.wrapper):a(f.wrapper)),f.viewFrom=f.viewTo=b.first,f.reportedViewFrom=f.reportedViewTo=b.first,f.view=[],f.renderedView=null,f.externalMeasured=null,f.viewOffset=0,f.lastWrapHeight=f.lastWrapWidth=0,f.updateLineNumbers=null,f.nativeBarWidth=f.barHeight=f.barWidth=0,f.scrollbarsClipped=!1,f.lineNumWidth=f.lineNumInnerWidth=f.lineNumChars=null,f.alignWidgets=!1,f.cachedCharWidth=f.cachedTextHeight=f.cachedPaddingH=null,f.maxLine=null,f.maxLineLength=0,f.maxLineChanged=!1,f.wheelDX=f.wheelDY=f.wheelStartX=f.wheelStartY=null,f.shift=!1,f.selForContextMenu=null,f.activeTouch=null,c.init(f)}function B(a,b){if(b-=a.first,b<0||b>=a.size)throw new Error(\"There is no line \"+(b+a.first)+\" in the document.\");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b<f){c=e;break}b-=f}return c.lines[b]}function C(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function D(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function E(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function F(a){if(null==a.parent)return null;for(var b=a.parent,c=m(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function G(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(b<f){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var g=0;g<a.lines.length;++g){var h=a.lines[g],i=h.height;if(b<i)break;b-=i}return c+g}function H(a,b){return b>=a.first&&b<a.first+a.size}function I(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function J(a,b,c){return void 0===c&&(c=null),this instanceof J?(this.line=a,this.ch=b,void(this.sticky=c)):new J(a,b,c)}function K(a,b){return a.line-b.line||a.ch-b.ch}function L(a,b){return a.sticky==b.sticky&&0==K(a,b)}function M(a){return J(a.line,a.ch)}function N(a,b){return K(a,b)<0?b:a}function O(a,b){return K(a,b)<0?a:b}function P(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function Q(a,b){if(b.line<a.first)return J(a.first,0);var c=a.first+a.size-1;return b.line>c?J(c,B(a,c).text.length):R(b,B(a,b.line).text.length)}function R(a,b){var c=a.ch;return null==c||c>b?J(a.line,b):c<0?J(a.line,0):a}function S(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=Q(a,b[d]);return c}function T(){Tg=!0}function U(){Ug=!0}function V(a,b,c){this.marker=a,this.from=b,this.to=c}function W(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function X(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function Y(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function Z(a,b,c){var d;if(a)for(var e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&\"bookmark\"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(d||(d=[])).push(new V(g,f.from,i?null:f.to))}}return d}function $(a,b,c){var d;if(a)for(var e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&\"bookmark\"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(d||(d=[])).push(new V(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return d}function _(a,b){if(b.full)return null;var c=H(a,b.from.line)&&B(a,b.from.line).markedSpans,d=H(a,b.to.line)&&B(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==K(b.from,b.to),h=Z(c,e,g),i=$(d,f,g),j=1==b.text.length,k=p(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=W(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var o=0;o<i.length;++o){var q=i[o];if(null!=q.to&&(q.to+=k),null==q.from){var r=W(h,q.marker);r||(q.from=k,j&&(h||(h=[])).push(q))}else q.from+=k,j&&(h||(h=[])).push(q)}h&&(h=aa(h)),i&&i!=h&&(i=aa(i));var s=[h];if(!j){var t,u=b.text.length-2;if(u>0&&h)for(var v=0;v<h.length;++v)null==h[v].to&&(t||(t=[])).push(new V(h[v].marker,null,null));for(var w=0;w<u;++w)s.push(t);s.push(i)}return s}function aa(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function ba(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&m(d,c)!=-1||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];if(!(K(j.to,h.from)<0||K(j.from,h.to)>0)){var k=[i,1],l=K(j.from,h.from),n=K(j.to,h.to);(l<0||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),