%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/stash-home/tmp/webresources/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/stash-home/tmp/webresources/14.cachedfile

;/* module-key = 'com.atlassian.stash.stash-web-plugin:breadcrumbs', location = '/static/widget/breadcrumbs/breadcrumbs.js' */
define("widget/breadcrumbs",["jquery","lodash","memoir","stash/api/util/navbuilder","util/dom-event","util/events","model/page-state"],function(E,I,H,A,C,K,G){function F(L){this.$container=E(L);if(H.nativeSupport()){var M=this;this.$container.on("click","a",function(N){if(C.openInSameTab(N)){K.trigger("stash.widget.breadcrumbs.urlChanged",M,E(this).attr("href"));N.preventDefault()}})}}var D=A.currentRepo().browse(),J=function(L,M){if(!M.isDefault()){return D.path(L).at(M.getId()).build()}else{return D.path(L).build()}};function B(O,N){var M=[],L=I.map(N,function(P){M=M.slice(0);M.push(P);return{text:P,url:J(M,O)}});L.unshift({text:G.getRepository().getName(),url:J([],O)});return L}F.prototype.update=function(N,M,L){this.$container.empty().append(stash.widget.breadcrumbs.crumbs({pathComponents:B(N,M.getComponents()),trailingSlash:L}))};return F});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:breadcrumbs', location = '/static/widget/breadcrumbs/breadcrumbs.soy' */
// This file was automatically generated from breadcrumbs.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.breadcrumbs.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }
if (typeof stash.widget.breadcrumbs == 'undefined') { stash.widget.breadcrumbs = {}; }


stash.widget.breadcrumbs.back = function(opt_data, opt_ignored) {
  return '<li><a id="' + soy.$$escapeHtml(opt_data.id) + '" class="breadcrumbs" href="' + soy.$$escapeHtml(opt_data.href) + '"><span class="aui-icon icon-breadcrumbs-back"></span>' + soy.$$escapeHtml(opt_data.text) + '</a></li>' + ((opt_data.crumb) ? '<li>' + soy.$$escapeHtml(opt_data.crumb) + ((opt_data.state) ? stash.widget.lozenge.pullRequestState(opt_data) : '') + '</li>' : '');
};
if (goog.DEBUG) {
  stash.widget.breadcrumbs.back.soyTemplateName = 'stash.widget.breadcrumbs.back';
}


stash.widget.breadcrumbs.crumbs = function(opt_data, opt_ignored) {
  var output = '';
  var pathComponentList20 = opt_data.pathComponents;
  var pathComponentListLen20 = pathComponentList20.length;
  for (var pathComponentIndex20 = 0; pathComponentIndex20 < pathComponentListLen20; pathComponentIndex20++) {
    var pathComponentData20 = pathComponentList20[pathComponentIndex20];
    output += stash.widget.breadcrumbs.breadcrumbFragment({isLast: pathComponentIndex20 == pathComponentListLen20 - 1, url: pathComponentIndex20 == pathComponentListLen20 - 1 ? opt_data.primaryLink : pathComponentData20.url, text: pathComponentData20.text}) + ((! (pathComponentIndex20 == pathComponentListLen20 - 1) || opt_data.trailingSlash) ? stash.widget.breadcrumbs.sep(null) : '');
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.breadcrumbs.crumbs.soyTemplateName = 'stash.widget.breadcrumbs.crumbs';
}


stash.widget.breadcrumbs.breadcrumbs = function(opt_data, opt_ignored) {
  return '<div class="breadcrumbs">' + stash.widget.breadcrumbs.crumbs(opt_data) + '</div>';
};
if (goog.DEBUG) {
  stash.widget.breadcrumbs.breadcrumbs.soyTemplateName = 'stash.widget.breadcrumbs.breadcrumbs';
}


stash.widget.breadcrumbs.breadcrumbFragment = function(opt_data, opt_ignored) {
  return '' + ((opt_data.url) ? '<a' + ((opt_data.isLast) ? ' class="stub"' : '') + ' href="' + soy.$$escapeHtml(opt_data.url) + '">' + soy.$$escapeHtml(opt_data.text) + '</a>' : '<span' + ((opt_data.isLast) ? ' class="stub"' : '') + '>' + soy.$$escapeHtml(opt_data.text) + '</span>');
};
if (goog.DEBUG) {
  stash.widget.breadcrumbs.breadcrumbFragment.soyTemplateName = 'stash.widget.breadcrumbs.breadcrumbFragment';
}


stash.widget.breadcrumbs.sep = function(opt_data, opt_ignored) {
  return '<span class="sep">/</span>';
};
if (goog.DEBUG) {
  stash.widget.breadcrumbs.sep.soyTemplateName = 'stash.widget.breadcrumbs.sep';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:person-model', location = '/static/model/person.js' */
define("model/person",["backbone-brace"],function(A){return A.Model.extend({namedAttributes:{emailAddress:"string",name:"string"},idAttribute:"name",initialize:function(){if(this.namedAttributes.id==null){this.setId(this.attributes[this.idAttribute])}}})});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:stash-user-model', location = '/static/model/stash-user.js' */
define("model/stash-user",["model/person"],function(B){var A=B.extend({namedAttributes:{active:"boolean",avatarUrl:"string",displayName:"string",id:"number",isAdmin:"boolean",link:Object,links:Object,type:"string",slug:"string"}});return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:project-model', location = '/static/model/project.js' */
define("model/project",["backbone-brace","model/stash-user"],function(B,A){var C=B.Model.extend({namedAttributes:{id:"number",name:"string",key:"string",description:"string",type:"string",owner:A,avatarUrl:"string",link:Object,links:Object,"public":"boolean"},isEqual:function(D){return !!(D&&D instanceof C&&this.id===D.id)}},{projectType:{NORMAL:"NORMAL",PERSONAL:"PERSONAL"}});return C});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-model', location = '/static/model/repository.js' */
define("model/repository",["backbone-brace","model/project"],function(B,C){var A=B.Model.extend({namedAttributes:{id:"number",name:"string",slug:"string",project:C,"public":"boolean",scmId:"string",state:"string",statusMessage:"string",forkable:"boolean",cloneUrl:"string",link:Object,links:Object,origin:null},isEqual:function(D){return !!(D&&D instanceof A&&this.id===D.id)}});B.Mixins.applyMixin(A,{namedAttributes:{origin:A}});return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:revision-reference', location = '/static/model/revision-reference.js' */
define("model/revision-reference",["aui","backbone-brace","lodash","model/page-state","model/repository"],function(C,F,D,E,A){var B={TAG:{id:"tag",name:"Tag"},BRANCH:{id:"branch",name:"Branch"},COMMIT:{id:"commit",name:"Commit"},isTag:function(H){return H&&(H===B.TAG.id||H.id===B.TAG.id)},isBranch:function(H){return H&&(H===B.BRANCH.id||H.id===B.BRANCH.id)},isCommit:function(H){return H&&(H===B.COMMIT.id||H.id===B.COMMIT.id)},from:function(H){if(B.isTag(H)){return B.TAG}else{if(B.isBranch(H)){return B.BRANCH}else{if(B.isCommit(H)){return B.COMMIT}}}window.console&&console.error("Unknown RevisionReference type "+H);return null}};var G=F.Model.extend({namedAttributes:{id:"string",displayId:"string",type:B.from,isDefault:"boolean",latestChangeset:"string",latestCommit:"string",hash:"string",repository:A},initialize:function(){if(!this.getDisplayId()){this.setDisplayId(this.getId())}if(!this.getIsDefault()){this.setIsDefault(false)}if(!this.getRepository()){this.setRepository(E.getRepository())}},getTypeName:function(){return this.getType().name},isDefault:function(){return this.get("isDefault")||false},isTag:function(){return B.isTag(this.getType())},isBranch:function(){return B.isBranch(this.getType())},isCommit:function(){return B.isCommit(this.getType())},isEqual:function(H){return(H instanceof G)&&this.getId()===H.getId()&&this.getType().id===H.getType().id&&this.getRepository().isEqual(H.getRepository())}},{fromChangeset:function(H){return new G({id:H.id,displayId:H.displayId,type:B.COMMIT,isDefault:false})},hydrateRefFromId:function(N,M,K,L){if(!D.isString(N)){return null}var H=/^refs\/(heads|tags)\/(.+)/;var J=N.replace(H,"$2");if(!K){K=G.type.BRANCH;var I=N.match(H);if(I&&I[1]==="tags"){K=G.type.TAG}}return new G({id:N,displayId:J,type:K,isDefault:M,latestChangeset:L})},hydrateDeprecated:function(H){if(!H.__json){return new G(H.toJSON())}return new G(H.__json)}});G.type=B;return G});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:filetable', location = '/static/feature/filebrowser/file-table/file-table.soy' */
// This file was automatically generated from file-table.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.filebrowser.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.filebrowser == 'undefined') { stash.feature.filebrowser = {}; }


stash.feature.filebrowser.fileTable = function(opt_data, opt_ignored) {
  var param5 = '';
  if (opt_data.isError) {
    param5 += stash.feature.filebrowser.fileTableError({message: opt_data.errorMessage});
  } else {
    param5 += (opt_data.parentDirectoryUrl) ? stash.feature.filebrowser.fileTableRow({type: 'DIRECTORY', extraClasses: 'browse-up file-row', iconClasses: 'browse-up', iconAccessibilityText: "Parent directory", url: opt_data.parentDirectoryUrl, name: '..', contentId: ''}) : '';
    if (opt_data.files.length == 0) {
      param5 += stash.feature.filebrowser.tableRow({extraClasses: 'message-row', content: '<h3 class="entity-empty">' + soy.$$escapeHtml("No files in this directory.") + '</h3>'});
    } else {
      var fileList30 = opt_data.files;
      var fileListLen30 = fileList30.length;
      for (var fileIndex30 = 0; fileIndex30 < fileListLen30; fileIndex30++) {
        var fileData30 = fileList30[fileIndex30];
        var param38 = '';
        switch (fileData30.type) {
          case 'DIRECTORY':
            param38 += 'folder-closed';
            break;
          case 'FILE':
            param38 += 'file';
            break;
          case 'SUBMODULE':
            param38 += 'submodule';
            break;
        }
        var param47 = '';
        switch (fileData30.type) {
          case 'DIRECTORY':
            param47 += soy.$$escapeHtml("Directory") + ' ';
            break;
          case 'FILE':
            param47 += soy.$$escapeHtml("File") + ' ';
            break;
          case 'SUBMODULE':
            param47 += soy.$$escapeHtml("Submodule") + ' ';
            break;
        }
        param5 += stash.feature.filebrowser.fileTableRow({type: fileData30.type, url: fileData30.url, name: fileData30.name, repositoryUrl: fileData30.repositoryUrl, browseUrl: fileData30.browseUrl, contentId: fileData30.contentId, fileExtension: '', iconClasses: param38, extraClasses: 'file-row', iconAccessibilityText: param47});
      }
    }
  }
  var output = '' + widget.aui.table({id: 'browse-table', extraClasses: 'filebrowser-table', content: param5});
  return output;
};
if (goog.DEBUG) {
  stash.feature.filebrowser.fileTable.soyTemplateName = 'stash.feature.filebrowser.fileTable';
}


stash.feature.filebrowser.fileTableRow = function(opt_data, opt_ignored) {
  return '' + stash.feature.filebrowser.tableRow({extraClasses: '' + ((opt_data.type == 'DIRECTORY') ? 'folder' : (opt_data.type == 'FILE') ? 'file' : (opt_data.type == 'SUBMODULE') ? 'submodule' : '') + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : ''), content: '' + aui.icons.icon({useIconFont: true, iconFontSet: 'devtools', icon: opt_data.iconClasses, accessibilityText: opt_data.iconAccessibilityText}) + ((opt_data.type != 'SUBMODULE') ? '<a href="' + soy.$$escapeHtml(opt_data.url) + '" ' + ((opt_data.type != 'DIRECTORY') ? ((opt_data.fileExtension) ? ' class="filetype-' + soy.$$escapeHtml(opt_data.fileExtension) + '"' : '') + ' data-contentId="' + soy.$$escapeHtml(opt_data.contentId) + '"' : '') + '>' + soy.$$escapeHtml(opt_data.name) + '</a>' : stash.feature.filebrowser.fileTableSubmodule(opt_data)), extraAttributes: '' + ((opt_data.type == 'DIRECTORY' && opt_data.iconClasses == 'browse-up') ? 'title="' + soy.$$escapeHtml("Go to the parent directory") + '"' : '')});
};
if (goog.DEBUG) {
  stash.feature.filebrowser.fileTableRow.soyTemplateName = 'stash.feature.filebrowser.fileTableRow';
}


stash.feature.filebrowser.fileTableSubmodule = function(opt_data, opt_ignored) {
  return '' + ((opt_data.browseUrl) ? '<a class="submodule-name" href="' + soy.$$escapeHtml(opt_data.repositoryUrl) + '" data-contentId="' + soy.$$escapeHtml(opt_data.contentId) + '">' + soy.$$escapeHtml(opt_data.name) + '</a><span class="submodule-sep"> @ </span><a title="' + soy.$$escapeHtml(opt_data.url) + ' @ ' + soy.$$escapeHtml(opt_data.contentId) + '" class="changesetid" href="' + soy.$$escapeHtml(opt_data.browseUrl) + '">' + soy.$$escapeHtml(soy.$$truncate(opt_data.contentId, 11, false)) + '</a>' : '<span class="submodule-name" data-contentId="' + soy.$$escapeHtml(opt_data.contentId) + '">' + soy.$$escapeHtml(opt_data.name) + '</span><span class="submodule-sep"> @ </span><span title="' + soy.$$escapeHtml(opt_data.url) + ' @ ' + soy.$$escapeHtml(opt_data.contentId) + '" class="changesetid">' + soy.$$escapeHtml(soy.$$truncate(opt_data.contentId, 11, false)) + '</span>');
};
if (goog.DEBUG) {
  stash.feature.filebrowser.fileTableSubmodule.soyTemplateName = 'stash.feature.filebrowser.fileTableSubmodule';
}


stash.feature.filebrowser.fileTableError = function(opt_data, opt_ignored) {
  return '' + stash.feature.filebrowser.tableRow({extraClasses: 'message-row' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : ''), content: '' + aui.message.warning({content: '' + soy.$$escapeHtml(opt_data.message)})});
};
if (goog.DEBUG) {
  stash.feature.filebrowser.fileTableError.soyTemplateName = 'stash.feature.filebrowser.fileTableError';
}


stash.feature.filebrowser.tableRow = function(opt_data, opt_ignored) {
  return '<tr class="' + soy.$$escapeHtml(opt_data.extraClasses) + '" ' + aui.renderExtraAttributes(opt_data) + '><td>' + soy.$$filterNoAutoescape(opt_data.content) + '</td></tr>';
};
if (goog.DEBUG) {
  stash.feature.filebrowser.tableRow.soyTemplateName = 'stash.feature.filebrowser.tableRow';
}


stash.feature.filebrowser.warnings = function(opt_data, opt_ignored) {
  return '<div class="filebrowser-banner' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '">' + ((opt_data.isTruncated) ? aui.message.warning({content: '' + soy.$$escapeHtml(opt_data.message)}) : '') + '</div>';
};
if (goog.DEBUG) {
  stash.feature.filebrowser.warnings.soyTemplateName = 'stash.feature.filebrowser.warnings';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:filetable', location = '/static/feature/filebrowser/file-table/file-table.js' */
define("feature/filebrowser/file-table",["aui","jquery","lodash","memoir","stash/api/util/navbuilder","util/ajax","util/deprecation","util/dom-event","util/events","model/page-state","model/path","model/revision-reference","exports"],function(J,D,V,P,H,N,S,a,B,M,R,Y,X){function A(c,e,f,b){var d=f&&f.getParent();if(d){return F(c,e,d,b)}return""}function U(){var b,d=window.location.href,c=P.state();if(c&&c.prevUrl){b=c.prevUrl}else{b=document.referrer}return W(b,d)}function L(b){if(typeof b!=="string"){return"/"}else{return b+((b.charAt(b.length-1)!=="/")?"/":"")}}function W(d,f){var b,e,c;if(!(d&&f)||(typeof d!=="string")||(typeof f!=="string")){return null}d=d.split("?")[0];f=f.split("?")[0];if(d.length<f.length){return null}f=L(f);e=H.currentRepo().build();c=new RegExp(e.substring(0,e.lastIndexOf("/"))+"/.*?/");f=L(e)+f.split(c)[1];d=L(e)+d.split(c)[1];b=d.split(f)[1];if(b&&b.indexOf("/")>=0){b=b.substring(0,b.indexOf("/"))}return b?decodeURIComponent(b):null}function F(c,d,e,b){var f=H.project(c).repo(d).browse().path(e.toJSON());if(b&&!(typeof b.isDefault==="function"?b.isDefault():b.isDefault)){return f.at(b.id||b.getId()).build()}else{return f.build()}}function C(c,b){D(".filebrowser-banner").replaceWith(stash.feature.filebrowser.warnings({isTruncated:b,message:J.format("There are too many files in this directory. Only showing the first {0}.",""+c)}))}function K(c){var b={revisionRef:S.jsonAsBrace(c.revisionRef,"3.2","4.0"),path:c.path&&S.jsonAsBrace(c.path,"3.2","4.0"),parent:c.parent&&S.jsonAsBrace(c.parent,"3.2","4.0")};b.children=c.children;b.children.values=c.children.values.map(function(d){return D.extend({},d,{path:S.jsonAsBrace(d.path,"3.2","4.0")})});return b}function T(c){var b=D.extend({},c);b.path=c.path&&new R(c.path);b.revisionRef=c.revisionRef&&Y.hydrateDeprecated(c.revisionRef);if(c.children&&c.children.values){D.extend(b.children={},c.children);b.children.values=c.children.values.map(function(d){return D.extend({},d,{path:new R(d.path)})})}return b}function O(e,b,d){var c=this;this.currentPath=e;this.currentRevisionRef=b;this.maxDirectoryChildren=d;B.on("memoir.changestate",function(g){var f=g.state;if(!f||(f.path===c.currentPath.toString()&&f.revisionRef.revisionName===c.currentRevisionRef.getId())){}else{if(!f.children&&!f.errors){c.requestData(M.getProject().getKey(),M.getRepository().getSlug(),new R(f.path),new Y(f.revisionRef),{popState:true}).done(function(h){c.dataReceived(D.extend(f,h))}).fail(function(j,k,i,h){c.dataReceived(D.extend(f,h))})}else{c.dataReceived(f)}}});P.initialState({path:e.toString(),revisionRef:b.toJSON()});B.on("stash.page.*.revisionRefChanged",function(f){f=Y.hydrateDeprecated(f);if(c.currentRevisionRef.getId()!==f.getId()){c.requestData(M.getProject().getKey(),M.getRepository().getSlug(),c.currentPath,f)}});B.on("stash.page.*.urlChanged",function(f){c.requestDataAtUrl(f)})}function Z(b){b.revisionRef=new Y(b.revisionRef);b.path=new R(b.path);if(!E(b)){b.parent=new R(b.parent);V.each(b.children.values,function(c){c.name=c.path.name;c.path=R.fromParentAndName(b.path,c.name);c.url=c.url||F(M.getProject().getKey(),M.getRepository().getSlug(),c.path,b.revisionRef)})}}O.prototype.reload=function(){this.requestData(M.getProject().getKey(),M.getRepository().getSlug(),this.currentPath,this.currentRevisionRef)};O.prototype.dataReceived=function(b){Z(b);if(b.path){this.currentPath=b.path}var c=K(b);if(b.revisionRef&&this.currentRevisionRef.getId()!==b.revisionRef.getId()){this.currentRevisionRef=b.revisionRef;B.trigger("stash.feature.filetable.revisionRefChanged",this,c.revisionRef)}B.trigger("stash.feature.filetable.dataReceived",this,c)};O.prototype.requestData=function(c,d,f,b,e){return this.requestDataAtUrl(F(c,d,f,b),b,e)};var I=new RegExp("(?:/?([^?#]*))([?][^#]*)?");O.prototype.parsePathUrl=function(c){if(c&&c.length>0){var b=M.getProject().getKey(),e=M.getRepository().getSlug(),f=H.project(b).repo(e).browse().build();c=c.substring(c.indexOf(f)+f.length);var d=c.match(I);if(d&&d.length>=2){var g={projectKey:b,repoSlug:e,path:decodeURIComponent(d[1])};if(d.length===3){g.query=d[2]}return g}}return{}};O.prototype.requestDataAtUrl=function(d,f,b){var j=this,g=j.parsePathUrl(d),k=new R(g.path),i=g.query?g.query:"",c=H.parseQuery(i).replaceParam("limit",this.maxDirectoryChildren).toString(),h=H.rest().project(g.projectKey).repo(g.repoSlug).browse().path(k).build()+c;b=b||{};var e=function(o){if(!b.popState){var n=j.data=D.extend({},o,{revisionRef:(f||j.currentRevisionRef).toJSON(),projectKey:g.projectKey,repoSlug:g.repoSlug,path:g.path,prevUrl:window.location.href});var l=window.location.href,m=l.substring(window.location.href.indexOf(window.location.pathname));if(m!==d){P.pushState(n,"",d)}else{j.dataReceived(n)}}};B.trigger("stash.feature.filetable.showSpinner",this,true);return N.rest({url:h,statusCode:N.ignore404WithinRepository()}).done(function(l){e(l)}).fail(function(n,o,m,l){e(l)})};function G(b){var c=this;this.fileTableSelector=b;this.$spinner=D("<div class='spinner'/>").hide().insertAfter(this.fileTableSelector);if(P.nativeSupport()){D(document).on("click",b+" .folder a",function(d){if(a.openInSameTab(d)){B.trigger("stash.feature.filetable.urlChanged",c,D(this).attr("href"));d.preventDefault()}})}else{D(document).on("click",b+" .folder a",function(d){B.trigger("stash.feature.filetable.showSpinner",this)})}B.on("stash.feature.filetable.showSpinner",function(){D(".filebrowser-banner").empty();D(c.fileTableSelector).empty();c.$spinner.show().spin("large")});B.on("stash.feature.filetable.dataReceived",function(e){e=T(e);var d=U();c.update(e);B.trigger("stash.feature.filetable.hideSpinner",this);if(E(e)){return }if(e.children.size===1&&e.children.values[0].type===Q){var f=D(c.fileTableSelector+" .folder:not(.browse-up) a")[0];if(f.textContent!==d){f.click()}}});B.on("stash.feature.filetable.hideSpinner",function(){c.$spinner.spinStop().hide()});this.focusInitialRow()}var Q="DIRECTORY";G.prototype.getSortedFiles=function(b){if(!b||b.length===0){return b}return b.sort(function(d,c){if(d.type===Q^c.type===Q){return d.type===Q?-1:1}else{return d.path.getName().toLowerCase().localeCompare(c.path.getName().toLowerCase())||(d.path.getName()===c.path.getName()?0:d.path.getName()<c.path.getName()?-1:1)}})};G.prototype.update=function(e){if(E(e)){this.handleError(e)}else{var d=e.children.values,c=!e.children.isLastPage;if(!c){d=this.getSortedFiles(d)}C(d.length,c);var b=D(stash.feature.filebrowser.fileTable({files:d,parentDirectoryUrl:A(M.getProject().getKey(),M.getRepository().getSlug(),new R(e.path),e.revisionRef)}));D(this.fileTableSelector).replaceWith(b);this.focusInitialRow()}B.trigger("stash.feature.filetable.pathChanged",this,S.jsonAsBrace(e.path,"3.2","4.0"))};G.prototype.handleError=function(d){var b=d&&d.errors&&d.errors.length?d.errors[0].message:"An unexpected error occurred.";var c=stash.feature.filebrowser.fileTable({files:[],isError:true,errorMessage:b});D(this.fileTableSelector).replaceWith(D(c))};G.prototype.getParentDirSelector=function(){return this.fileTableSelector+" tr.browse-up a"};G.prototype.focusInitialRow=function(){var c=D(this.fileTableSelector).find("tr.file-row").not(".browse-up"),d,b=U();if(b){d=c.filter(function(){return D(this).find("a").text()===b})}if(d&&d.length){d.addClass("focused-file")}else{if(c.first().length){c.first().addClass("focused-file")}}};var E=function(b){return !(b&&b.children)};X.FileTableView=G;X.FileTable=O;X.getChildPathDifferenceBetweenUrls=W});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:internal-regexp-util', location = '/static/bower/atlassian-regexp/lib/internal/util/regexp.js' */
define("internal/util/regexp",["exports"],function(A){function B(C){return C.replace(/[\-\[\]{}()+?.,\\\^$|#\s]/g,"\\$&")}A.escape=B});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:regexp-util', location = '/static/util/regexp.js' */
define("util/regexp",["internal/util/regexp"],function(A){return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:keyboard-controller', location = '/static/widget/keyboard-controller.js' */
define("widget/keyboard-controller",["aui","jquery"],function(B,D){function A(I,G){if(!(this instanceof A)){return new A(I,G)}var F=D(I);var H;F.on("keydown",H=function(J){if(J.keyCode in G){if(!G[J.keyCode](J)){J.preventDefault()}}});this.destroy=function(){F.off("keydown",H)};return this}function C(I,G){G=D.extend({},C.defaults,G);function H(J){J.focus().addClass(G.focusedClass)}var F={};F[B.keyCode.TAB]=function(N){var K,J,L,M=N.target;K=D("a:visible, :input:visible:enabled, :checkbox:visible:enabled, :radio:visible:enabled, [tabindex]",I).not("[tabindex=-1]").filter(function(){return D(this).css("visibility")!=="hidden"});L=K.last();J=K.first();K.removeClass(G.focusedClass);if(N.shiftKey&&M===J[0]){if(!G.wrapAround){return true}H(L)}else{if(!N.shiftKey&&M===L[0]){if(!G.wrapAround){return true}H(J)}else{if(N.shiftKey){H(K.eq(K.index(M)-1))}else{H(K.eq(K.index(M)+1))}}}};return new A(I,F)}C.defaults={focusedClass:"item-focused",wrapAround:true};function E(S,T,U){U=D.extend({},E.defaults,U);var G=D(T);var R=D.Callbacks();var P=D.Callbacks();if(U.onSelect){R.add(U.onSelect)}if(U.onFocus){P.add(U.onFocus)}var J=false,F=false,L=false;function I(W){do{var X=W.find(">:first-child");var V=W.next();if(X.length){W=X}else{if(V.length){W=V}else{W=W.parentsUntil(G[0]).next().first()}}}while(W.length&&!W.is(U.itemSelector));return W}function O(X){do{var W=X.prev();if(W.length){var V;while((V=W.find(">:last-child")).length){W=V}X=W}else{X=X.parent();if(X[0]===G[0]){X=D()}}}while(X.length&&!X.is(U.itemSelector));return X}function Q(V){return function W(d){var c=D(U.itemSelector,G);var f=c.filter(function(){return D(this).hasClass(U.focusedClass)});var X=false;var g=V==="next";var a;if(f.length){if(U.adjacentItems){a=f[V](U.itemSelector)}else{if(V==="next"){a=I(f)}else{a=O(f)}}}else{if(V==="next"){a=c.first()}else{if(U.wrapAround){a=c.last()}else{return }}}L=true;if(!a.length){if(V==="next"&&U.requestMore&&!J){if(!F){L=false;var i=U.requestMore();if(i){F=true;i.done(function(e){J=e;if(!L){W(d)}}).always(function(){F=false;L=false});return }else{J=true;W(d);return }}else{L=false;return }}else{if(U.wrapAround){X=true;g=!g;a=c[V==="next"?"first":"last"]()}else{return }}}f.removeClass(U.focusedClass);a.addClass(U.focusedClass);var Y=a[V](),b=!X&&Y.length?Y:a;var Z=document.activeElement;if(U.focusIntoView&&Z){var h=b.attr("tabindex");b.attr("tabindex","0");b.focus();Z.focus();if(h==null){b.removeAttr("tabindex")}else{b.attr("tabindex",h)}}else{a[0].scrollIntoView(false)}P.fire(a,d)}}var K={};var N=K[B.keyCode.UP]=Q("prev");var H=K[B.keyCode.DOWN]=Q("next");K[B.keyCode.ENTER]=function(V){var X=D(U.itemSelector,G);var W=X.filter(function(){return D(this).hasClass(U.focusedClass)});if(W.length){R.fire(W,V)}};var M=new A(S,K);M.setListElement=function(V){G=D(V)};M.blur=function(){D(U.itemSelector,G).removeClass(U.focusedClass)};M.focus=function(){P.add.apply(P,arguments);return this};M.select=function(){R.add.apply(R,arguments);return this};M.moveToNext=H;M.moveToPrev=N;return M}E.defaults={itemSelector:"li",focusedClass:"item-focused",wrapAround:false,adjacentItems:true,requestMore:undefined,onFocus:undefined,onSelect:undefined};return{KeyboardController:A,TabKeyboardController:C,ListKeyboardController:E}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:loaded-range', location = '/static/widget/loaded-range.js' */
define("widget/loaded-range",function(){function A(B){this.start=undefined;this.nextPageStart=undefined;this._reachedStart=false;this._reachedEnd=false;this._reachedCapacity=false;this._capacity=B||Infinity}A.prototype.isEmpty=function(){return this.start===undefined};A.prototype.isBeforeStart=function(B){return B<this.start};A.prototype.isAfterNextPageStart=function(B){return B>this.nextPageStart};A.prototype.isLoaded=function(B){return !(this.isEmpty()||this.isBeforeStart(B)||this.isAfterNextPageStart(B))};A.prototype.getAttachmentMethod=function(C,B){return this.isEmpty()?"html":this.isBeforeStart(C)?"prepend":"append"};A.prototype.add=function(G,C,B,E){var F=this.isEmpty();E=E||(G+C);if(F||this.isBeforeStart(G)){this.start=G}if(F||this.isAfterNextPageStart(E)){this.nextPageStart=E}this._reachedStart=this._reachedStart||G<=0;var D=this._reachedEnd=this._reachedEnd||B;if(!D&&this.nextPageStart>=this._capacity){this._reachedCapacity=this._reachedEnd=true}return this};A.prototype.reachedStart=function(){return this._reachedStart};A.prototype.reachedEnd=function(){return this._reachedEnd};A.prototype.reachedCapacity=function(){return this._reachedCapacity};A.prototype.pageBefore=function(B){if(this.reachedStart()){return null}var C=Math.max(0,this.start-B);return{start:C,limit:this.start-C}};A.prototype.pageAfter=function(B){if(this.reachedEnd()){return null}return{start:this.nextPageStart,limit:B}};return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:paged-scrollable', location = '/static/widget/paged-scrollable.js' */
define("widget/paged-scrollable",["aui","jquery","lodash","util/events","util/function","util/navigator","widget/loaded-range"],function(H,C,I,J,E,F,B){var A=F.isIE();function G(L,K){this.options=C.extend({},G.defaults,K);this.$scrollElement=C(L||window);if(C.isWindow(this.$scrollElement[0])){var M=window.document.documentElement;this.getPaneHeight=function(){return M.clientHeight};this.getContentHeight=function(){return M.scrollHeight}}this._eventHandlers=[]}G.defaults={pageSize:50,scrollDelay:250,bufferPixels:0,precedingSpaceMaintained:true,suspendOnFailure:true,dataLoadedEvent:"stash.widget.pagedscrollable.dataLoaded",autoLoad:true,preventOverscroll:false,idForEntity:null};G.prototype.init=function(M){G.prototype.reset.call(this);M=M||{};this.loadedRange=M.loadedRange||new B();var L=this;var K=this.options.pageSize;var N=M.targetedItem?Math.floor(M.targetedItem/K)*K:0;if(M.suspended){this.suspend()}if(this.loadedRange.isLoaded(N)){return(this.loadIfRequired()||C.Deferred().resolve()).done(function(){L.onFirstDataLoaded()})}return D(this,N,K).then(undefined,function(){var O=N!==0;if(O){return D(L,0,K)}else{return C.Deferred().rejectWith(this,arguments)}}).fail(function(R,Q,O,P){if(P&&P.errors&&P.errors.length){L.handleErrors(P.errors)}})};G.prototype.reset=function(){if(this.currentXHR){this.cancelRequest()}this.clearListeners();if(this._resizeHandler){C(window).off("resize",this._resizeHandler);this._resizeHandler=null}if(this.options.idForEntity){this._ids={}}this._suspended=false};G.prototype.destroy=function(){this.reset();delete this.$scrollElement};G.prototype.suspend=function(){this._suspended=true};G.prototype.resume=function(){this._suspended=false;return this.loadIfRequired()};G.prototype.isSuspended=function(){return this._suspended};G.prototype.getScrollTop=function(){return this.$scrollElement.scrollTop()};G.prototype.setScrollTop=function(K){this.$scrollElement.scrollTop(K)};G.prototype.getPane=function(){return this.$scrollElement};G.prototype.getPaneHeight=function(){return this.$scrollElement[0].clientHeight};G.prototype.getContentHeight=function(){return this.$scrollElement[0].scrollHeight};G.prototype.getOption=function(K){if(Object.prototype.hasOwnProperty.call(this.options,K)){return this.options[K]}return undefined};G.prototype.setOptions=function(K){if(C.isPlainObject(K)){this.options=C.extend(this.options,K)}};G.prototype.addScrollListener=function(L){var K=this.scrollDelay?I.debounce(L,this.scrollDelay):L;this._eventHandlers.push(K);this.$scrollElement.on("scroll.paged-scrollable",K)};G.prototype._bindOverscrollPrevention=function(){function K(N,O){var L=C(this).outerHeight();var M=this.scrollHeight;if((this.scrollTop===(M-L)&&O<0)||(this.scrollTop===0&&O>0)){N.preventDefault()}}this._eventHandlers.push(K);this.$scrollElement.on("mousewheel.paged-scrollable",K)};G.prototype.clearListeners=function(){var K=this;I.each(this._eventHandlers,function(L){K.$scrollElement.unbind(".paged-scrollable",L)});this._eventHandlers.length=0};G.prototype.loadIfRequired=function(){if(this.isSuspended()||(this.loadedRange.reachedEnd()&&this.loadedRange.reachedStart())){return }var P=this.getScrollTop(),L=this.getPaneHeight(),N=this.getContentHeight(),O=L+P;if(!C.isWindow(this.getPane()[0])&&this.getPane().is(":hidden")){return }if(I.any([true,"previous"],E.eq(this.options.autoLoad))&&P<this.options.bufferPixels+(this.loadedRange.start/this.loadedRange.nextPageStart)*N){var K=this.loadedRange.pageBefore(this.options.pageSize);if(K){return this.load(K.start,K.limit)}}var Q=1;if(I.any([true,"next"],E.eq(this.options.autoLoad))&&O+Q>=N-this.options.bufferPixels){var M=this.loadedRange.pageAfter(this.options.pageSize);if(M){return this.load(M.start,M.limit)}}};function D(L,M,K){if(L.currentXHR){return C.Deferred().reject()}L.currentXHR=L.requestData(M,K);return L.currentXHR.always(function(){L.currentXHR=null}).done(function(N){L.onDataLoaded(M,K,N)}).fail(function(){L.suspend()})}G.prototype.load=function(M,K){var L=this;return D(this,M,K).fail(function(Q,P,N,O){if(O&&O.errors){L.handleErrors(O.errors)}})};G.prototype.loadAfter=function(){var K=this.loadedRange.pageAfter(this.options.pageSize);return K&&this.load(K.start,K.limit)};G.prototype.loadBefore=function(){var K=this.loadedRange.pageBefore(this.options.pageSize);return K&&this.load(K.start,K.limit)};G.prototype.onDataLoaded=function(M,N,P){if(P.start!==undefined){M=P.start}var R=this.loadedRange.isEmpty(),K=this.loadedRange.getAttachmentMethod(M,P.size),Q=K==="prepend";this.loadedRange.add(M,P.size,P.isLastPage,P.nextPageStart);var S,O;if(Q||A){O=this.getScrollTop();S=this.getContentHeight()}P=this._addPage(P,K);if(Q||A){var L=Q?this.getContentHeight()-S:0;this.setScrollTop(O+L)}if(R){this.onFirstDataLoaded(M,N,P)}J.trigger(this.options.dataLoadedEvent,this,M,N,P);this.loadIfRequired()};G.prototype._addPage=function(L,K){L=this._dedupe(L);this.attachNewContent(L,K);return L};G.prototype._dedupe=function(M){if(M&&M.values&&this.options.idForEntity){var L=this._ids;var K=this.options.idForEntity;M=C.extend({},M,{values:I.filter(M.values,function(N){var O=K(N);if(!I.has(L,O)){L[O]=true;return true}return false})})}return M};G.prototype.onFirstDataLoaded=function(){var K=this;this.addScrollListener(function(){K.loadIfRequired()});if(this.options.preventOverscroll){this._bindOverscrollPrevention()}C(window).on("resize",this._resizeHandler=function(){K.loadIfRequired()})};G.prototype.cancelRequest=function(){if(this.currentXHR){if(this.currentXHR.abort){this.currentXHR.abort()}else{if(this.currentXHR.reject){this.currentXHR.reject()}else{H.log("Couldn't cancel the current request.")}}this.currentXHR=null}};G.prototype.add=function(L,K){if(L.length){L=this._addPage({values:L,size:L.length},K||"prepend");return true}return false};G.prototype.remove=function(K){if(this.options.idForEntity){var L=this.options.idForEntity(K);if(I.has(this._ids,L)){delete this._ids[L];if(typeof this.loadedRange.nextPageStart==="number"){this.loadedRange.nextPageStart=Math.max(0,this.loadedRange.nextPageStart-1)}return true}}return false};G.prototype.attachNewContent=function(L,K){throw new Error("attachNewContent is abstract and must be implemented.")};G.prototype.requestData=function(L,K){throw new Error("requestData is abstract and must be implemented.  It must return a promise. It is preferred to return a jqXHR.")};G.prototype.handleErrors=function(K){throw new Error("handleErrors is abstract and must be implemented.")};return G});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:filefinder', location = '/static/feature/filebrowser/file-finder/file-finder.soy' */
// This file was automatically generated from file-finder.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.filefinder.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.filefinder == 'undefined') { stash.feature.filefinder = {}; }


stash.feature.filefinder.fileFinderInput = function(opt_data, opt_ignored) {
  return '<div class="file-finder-input">' + aui.icons.icon({size: 'small', useIconFont: true, icon: 'search'}) + '<input type="text" autofocus="autofocus" maxlength="1000" size="30" class="filter-files" placeholder="' + soy.$$escapeHtml("Find files") + '"></div><span id="file-finder-tip"></span>';
};
if (goog.DEBUG) {
  stash.feature.filefinder.fileFinderInput.soyTemplateName = 'stash.feature.filefinder.fileFinderInput';
}


stash.feature.filefinder.fileFinderTable = function(opt_data, opt_ignored) {
  var param15 = '';
  if (opt_data.files.length > 0) {
    var fileList18 = opt_data.files;
    var fileListLen18 = fileList18.length;
    for (var fileIndex18 = 0; fileIndex18 < fileListLen18; fileIndex18++) {
      var fileData18 = fileList18[fileIndex18];
      param15 += stash.feature.filefinder.fileFinderRow({url: fileData18.url, name: fileData18.highlightedName ? fileData18.highlightedName : fileData18.name});
    }
  } else {
    param15 += stash.feature.filefinder.tableRow({extraClasses: 'no-results-row', content: '' + soy.$$escapeHtml("No matching files")});
  }
  var output = '' + widget.aui.table({id: 'browse-table', extraClasses: 'file-finder-table', dataAttributes: {'result-set-id': opt_data.resultSetId}, content: param15});
  return output;
};
if (goog.DEBUG) {
  stash.feature.filefinder.fileFinderTable.soyTemplateName = 'stash.feature.filefinder.fileFinderTable';
}


stash.feature.filefinder.fileFinderRow = function(opt_data, opt_ignored) {
  return '' + stash.feature.filefinder.tableRow({extraClasses: 'file file-row', content: '<a href="' + soy.$$escapeHtml(opt_data.url) + '" tabindex="-1">' + soy.$$filterNoAutoescape(opt_data.name) + '</a>'});
};
if (goog.DEBUG) {
  stash.feature.filefinder.fileFinderRow.soyTemplateName = 'stash.feature.filefinder.fileFinderRow';
}


stash.feature.filefinder.tableRow = function(opt_data, opt_ignored) {
  return '<tr class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"><td>' + soy.$$filterNoAutoescape(opt_data.content) + '</td></tr>';
};
if (goog.DEBUG) {
  stash.feature.filefinder.tableRow.soyTemplateName = 'stash.feature.filefinder.tableRow';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:filefinder', location = '/static/feature/filebrowser/file-finder/file-finder.js' */
define("feature/filebrowser/file-finder",["aui","jquery","lodash","stash/api/util/navbuilder","util/ajax","util/events","util/function","util/regexp","model/path","widget/keyboard-controller","widget/paged-scrollable","exports"],function(I,E,S,H,N,B,J,U,Q,K,F,T){var G=K.ListKeyboardController;function P(V){return H.rest().currentRepo().files().at(V.getId()).withParams({limit:100000}).build()}function D(X,V){var W=H.currentRepo().browse().path(X);if(!V.isDefault()){W=W.at(V.getDisplayId())}return W.build()}function C(V){return(V!==V.toUpperCase())?"["+U.escape(V.toUpperCase()+V)+"]":U.escape(V)}function A(V){return V.replace(/(^\s*)|(\s*$)/gi,"").replace(/[ ]{2,}/gi," ")}function L(V){if(V){var W="",X=A(V).split(/\*|\s|(?=[A-Z0-9]|\/|\.|-|_)/g);X=S.filter(X,J.not(S.isEmpty));var Y=X.length;if(Y){W=S.map(X,function(Z){return"("+S.map(Z.split(""),C).join("")+")"}).join(".*?");return new RegExp("("+W+")","g")}}return null}function M(V,W){W=I.escapeHtml(W);return V?W.replace(V,"<mark>$1</mark>"):W}function R(W,V){var X=this;this._isLoaded=false;this.fileTableSelector=W;this.currentRevisionRef=V;this.resultSetId=0;this.$fileFinderInput=E(".file-finder-input");this.$textInput=E("input.filter-files");this.$finderTip=E("#file-finder-tip");this.$spinner=E("<div class='spinner'/>").hide().insertAfter(this.fileTableSelector);B.on("stash.page.filebrowser.revisionRefChanged",function(Y){X.currentRevisionRef=Y;X.files=undefined})}R.prototype.tips=["Filter by directory path e.g. \u0027\u003cstrong\u003e/ssh pom.xml\u003c/strong\u003e\u0027 to search for \u0027src\u003cstrong\u003e/ssh/pom.xml\u003c/strong\u003e\u0027.","Use camelCasing e.g. \u0027\u003cstrong\u003eProjME\u003c/strong\u003e\u0027 to search for \u0027\u003cstrong\u003eProjectModifiedE\u003c/strong\u003event.java\u0027.","Filter by extension type e.g. \u0027\u003cstrong\u003e/repo .js\u003c/strong\u003e\u0027 to search for all \u0027\u003cstrong\u003e.js\u003c/strong\u003e\u0027 files in the \u0027\u003cstrong\u003e/repo\u003c/strong\u003e\u0027 directory.","Separate your search with spaces e.g. \u0027\u003cstrong\u003e/ssh pom.xml\u003c/strong\u003e\u0027 to search for \u0027src\u003cstrong\u003e/ssh/pom.xml\u003c/strong\u003e\u0027.","Use \u2191 and \u2193 arrow keys to navigate and \u0027\u003cstrong\u003ereturn\u003c/strong\u003e\u0027 to view the file."];R.prototype._bindKeyboardNavigation=function(){this._filesKeyboardController=new G(this.$textInput,E(this.fileTableSelector),{wrapAround:false,focusedClass:"focused-file",itemSelector:"tr.file-row",onSelect:function(V){window.location.href=V.find("a").attr("href")},requestMore:function(){var V=E.Deferred();window.scrollTo(0,document.documentElement.scrollHeight);setTimeout(function(){V.resolve()});return V}})};R.prototype._showSpinner=function(){E(".filebrowser-banner").empty();E(this.fileTableSelector).empty();this.$spinner.show().spin("large")};R.prototype._hideSpinner=function(){this.$spinner.spinStop().hide()};R.prototype.isLoaded=function(){return this._isLoaded};R.prototype.unloadFinder=function(){E(".breadcrumbs").removeClass("file-finder-mode");this.$textInput.blur().hide().val("");this.$fileFinderInput.removeClass("visible");this.$finderTip.removeClass("visible");this._isLoaded=false;if(this._filesKeyboardController){this._filesKeyboardController.destroy();this._filesKeyboardController=null}this.tableView.reset()};R.prototype.loadFinder=function(){E(".filebrowser-banner").empty();E(".breadcrumbs").addClass("file-finder-mode");this.$textInput.focus();if(!this._isLoaded){this.requestFiles();this._isLoaded=true}};R.prototype.requestFiles=function(){var V=this;this._showSpinner();if(this.files){this.onFilesLoaded();this._hideSpinner()}else{N.rest({url:P(V.currentRevisionRef)}).done(function(Y){var X=Y.values;V.files=[];for(var W=0;W<X.length;W++){V.files.push({name:X[W]})}V.onFilesLoaded()}).always(function(){V._hideSpinner()})}};R.prototype.onFilesLoaded=function(){var W=this;this.$fileFinderInput.addClass("visible");this.$textInput.show();var V=this.tips[Math.floor(Math.random()*this.tips.length)];this.$finderTip.html("Tip:"+V).addClass("visible");this.showFiles();this._bindKeyboardNavigation();this._filesKeyboardController.moveToNext();var Z=this.$textInput,X=Z.val();function Y(a){W.showFiles(a);W._filesKeyboardController.setListElement(E(W.fileTableSelector));W._filesKeyboardController.moveToNext()}this.$textInput.unbind("keyup").on("keyup",function(a){if(a.keyCode===27){B.trigger("stash.feature.filetable.hideFind",W)}}).on("keyup",S.debounce(function(a){if(a.keyCode!==27&&X!==(X=Z.val())){Y(E(this).val())}},200)).focus();if(X){Y(X)}};R.prototype.showFiles=function(V){this.filteredFiles=this.files;var Z=L(V);if(this.tableView){this.tableView.reset()}if(Z&&this.files.length>0){this.filteredFiles=S.filter(this.files,function(a){Z.lastIndex=0;return Z.test(a.name)});Z.lastIndex=0;var Y=new RegExp(Z.source+"(?!.*/)");var W=function(a){if(a.exactMatches){return a.exactMatches}return(a.exactMatches=(a.name.indexOf(V)>=0))};var X=function(a){if(a.matches){return a.matches}return(a.matches=Y.test(a.name))};this.filteredFiles.sort(function(a,f){var d=W(a),e=W(f);if(d!==e){return d?-1:1}var c=X(a),b=X(f);if(c===b){return a.name.localeCompare(f.name)}return c?-1:1})}else{S.forEach(this.files,function(a){a.highlightedName=null;a.matches=null;a.exactMatches=null})}this._makeFileFinderView(Z)};R.prototype._makeFileFinderView=function(V){this.tableView=new O(this.filteredFiles,V,this.fileTableSelector,this.currentRevisionRef,this.resultSetId++);this.tableView.init()};function O(X,Y,W,V,Z){F.call(this,null,{pageSize:50});this.pattern=Y;this.fileTableSelector=W;this.filteredFiles=X;this.currentRevisionRef=V;this.resultSetId=Z}E.extend(O.prototype,F.prototype);O.prototype.requestData=function(Y,V){var W=this,X=this.filteredFiles.slice(Y,Y+V);S.forEach(X,function(Z){if(!Z.url){Z.url=D(new Q(Z.name),W.currentRevisionRef)}Z.highlightedName=M(W.pattern,Z.name)});return E.Deferred().resolve({values:X,size:X.length,isLastPage:(Y+V)>=this.filteredFiles.length})};O.prototype.attachNewContent=function(a,Z){var Y=E(this.fileTableSelector);if(Z==="html"){var X=E(stash.feature.filefinder.fileFinderTable({files:a.values,resultSetId:this.resultSetId}));Y.replaceWith(X)}else{var W=Z==="append",V=E(Y,"table > tbody");S.each(a.values,function(c){var b=E(stash.feature.filefinder.fileFinderRow(E.extend({},c,{name:c.highlightedName})));if(W){V.append(b)}else{V.prepend(b)}})}};T.FileFinder=R;R.highlightMatches=M;R.getPattern=L});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:content-tree-node-types', location = '/static/model/content-tree-node-types.js' */
define("model/content-tree-node-types",function(){return{DIRECTORY:"DIRECTORY",FILE:"FILE",SUBMODULE:"SUBMODULE"}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:filebrowser-page', location = '/static/page/filebrowser/filebrowser.js' */
define("page/filebrowser",["aui","jquery","lodash","memoir","util/deprecation","util/events","model/content-tree-node-types","model/path","model/revision-reference","feature/filebrowser/file-finder","feature/filebrowser/file-table","exports"],function(G,E,Z,N,V,A,J,U,b,X,D,a){var L=D.FileTable,F=D.FileTableView,W=X.FileFinder,P;var H,K,I;var O,T,R,C,S,M;function Y(){return C.find(".file-row a").map(function(d,f){var c=E(f);var e=c.parent().parent();return{name:c.text(),contentId:c.attr("data-contentId"),type:e.hasClass("file")?J.FILE:e.hasClass("directory")?J.DIRECTORY:J.SUBMODULE}})}a.onReady=function(l,g,f,i){var k=new U(l),h=new b(g);R=E(".find-files");C=E(".filebrowser-content");S=R.find(".find-files-button");M=R.find(".browse-files-button");K=new F(f);H=new L(k,h,i);I=new W(f,h);E(document).on("focus","#browse-table tr.file-row",function(){E(".focused-file").removeClass("focused-file");E(this).addClass("focused-file")});A.on("memoir.popstate",function(m){if(m.state){h=new b(m.state.revisionRef)}});var d=function(m){if(h!==m){h=m;A.trigger("stash.page.filebrowser.revisionRefChanged",null,m)}};A.on("stash.layout.branch.revisionRefChanged",d);A.on("stash.feature.filetable.revisionRefChanged",d);A.on("stash.widget.branchselector.dialogShown",function(){P=true});A.on("stash.widget.branchselector.dialogHidden",function(){P=false});var j=function(m){A.trigger("stash.page.filebrowser.urlChanged",null,m)};A.on("stash.layout.*.urlChanged",j);A.on("stash.feature.*.urlChanged",j);A.on("stash.feature.*.pathChanged",function(m){k=new U(m);A.trigger("stash.page.filebrowser.pathChanged",null,V.jsonAsBrace(k,"3.2","4.0"))});A.on("stash.widget.keyboard-shortcuts.register-contexts",function(m){m.enableContext("filebrowser")});var e=function(){if(!I.isLoaded()){S.attr("aria-pressed",true);M.attr("aria-pressed",false);I.loadFinder()}};var c=function(){if(I.isLoaded()){S.attr("aria-pressed",false);M.attr("aria-pressed",true);I.unloadFinder();if(H.data){K.update(H.data)}else{H.reload()}}};A.on("stash.feature.filetable.showFind",e);A.on("stash.feature.filetable.hideFind",c);A.on("stash.page.filebrowser.revisionRefChanged",c);A.trigger("stash.feature.filebrowser.filesChanged",null,{files:Y(),path:V.jsonAsBrace(new U(l),"3.2","4.0"),revision:h.getId()});A.on("stash.feature.filetable.dataReceived",function(m){if(B(m)){return }A.trigger("stash.feature.filebrowser.filesChanged",null,{files:m.children.values.map(function(n){return Z.pick(n,"name","contentId","type")}),path:m.path,revision:m.revisionRef&&m.revisionRef.id})});S.click(function(){A.trigger("stash.feature.filetable.showFind");return false});M.click(function(){A.trigger("stash.feature.filetable.hideFind");return false});Q()};function B(c){return !(c&&c.children)}function Q(){var c={focusedClass:"focused-file",wrapAround:false,escToCancel:false},d="#browse-table tr.file-row",e=d+"."+c.focusedClass;A.on("stash.keyboard.shortcuts.requestMoveToNextHandler",function(f){(this.moveToNextItem?this:G.whenIType(f)).moveToNextItem(d,c)});A.on("stash.keyboard.shortcuts.requestMoveToPreviousHandler",function(f){(this.moveToPrevItem?this:G.whenIType(f)).moveToPrevItem(d,c)});A.on("stash.keyboard.shortcuts.requestOpenItemHandler",function(f){(this.execute?this:G.whenIType(f)).execute(function(){if(!P){var g=E(e);if(g.length){if(g.hasClass("file")||!N.nativeSupport()){A.trigger("stash.feature.filetable.showSpinner",this);window.location.href=g.find("a").attr("href")}else{g.find("a").click()}}}})});A.on("stash.keyboard.shortcuts.requestOpenParentHandler",function(f){(this.execute?this:G.whenIType(f)).execute(function(){if(!P){var g=E(K.getParentDirSelector());if(g.length){if(N.nativeSupport()){g.click()}else{A.trigger("stash.feature.filetable.showSpinner",this);window.location.href=g.attr("href")}}}})});A.on("stash.keyboard.shortcuts.requestOpenFileFinderHandler",function(f){O=G.format("Find files in this repository (Type \u0027\u0027{0}\u0027\u0027)",f);S.attr("title",O).tooltip({gravity:"ne"});(this.execute?this:G.whenIType(f)).execute(function(){A.trigger("stash.feature.filetable.showFind",this)})});A.on("stash.keyboard.shortcuts.requestCloseFileFinderHandler",function(f){T=G.format("Browse files in this repository (Type \u0027\u0027{0}\u0027\u0027)",f);M.attr("title",T).tooltip();(this.execute?this:G.whenIType(f)).execute(function(){A.trigger("stash.feature.filetable.hideFind",this)})})}});;
;/* module-key = 'com.stiltsoft.stash.graphs:graphs-sticky-branches', location = 'js/common/graph-sticky-branches.js' */
define('page/graphs-sticky-branches', ['jquery', 'util/events', 'stash/api/util/navbuilder', 'exports'],
    function($, events, nav, exports) {

    exports.onReady = function() {
        events.on('stash.layout.branch.revisionRefChanged', function(revisionRef) {
            if (revisionRef) {
                var $graphsLink = $('#repository-nav-graphs');
                if (!revisionRef.getIsDefault()) {
                    $graphsLink.attr('href', nav.parse($graphsLink.attr('href')).replaceQueryParam('refId', revisionRef.getId()));
                } else {
                    $graphsLink.attr('href', nav.parse($graphsLink.attr('href')).deleteQueryParam('refId'));
                }
            }
        });
    };
});

AJS.$(document).ready(function() {
    require('page/graphs-sticky-branches').onReady();
});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:code-block', location = '/static/widget/code-block/code-block.soy' */
// This file was automatically generated from code-block.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.codeBlock = function(opt_data, opt_ignored) {
  return '<div class="code-block' + ((opt_data.instructionBlock) ? ' instruction-block' : '') + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '"><pre><code>' + soy.$$filterNoAutoescape(opt_data.content) + '</code></pre></div>';
};
if (goog.DEBUG) {
  stash.widget.codeBlock.soyTemplateName = 'stash.widget.codeBlock';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:dialog-selection', location = '/static/widget/dialog-selection/dialog-selection.soy' */
// This file was automatically generated from dialog-selection.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.dialogSelection = function(opt_data, opt_ignored) {
  var output = '<ol class="dialog-selection">';
  var optionList4 = opt_data.options;
  var optionListLen4 = optionList4.length;
  for (var optionIndex4 = 0; optionIndex4 < optionListLen4; optionIndex4++) {
    var optionData4 = optionList4[optionIndex4];
    output += '<li class="option' + ((optionData4.styleClass) ? ' ' + soy.$$escapeHtml(optionData4.styleClass) : '') + ((optionIndex4 == 0) ? ' selected' : '') + '" data-option="' + soy.$$escapeHtml(optionData4.key) + '"><span class="option-icon"></span><div class="option-meta"><div class="option-name">' + soy.$$escapeHtml(optionData4.linkText) + '</div><div class="option-description">' + soy.$$escapeHtml(optionData4.description) + '</div></div></li>';
  }
  output += '</ol>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.dialogSelection.soyTemplateName = 'stash.widget.dialogSelection';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:submit-spinner', location = '/static/widget/submit-spinner/submit-spinner.js' */
define("widget/submit-spinner",["jquery"],function(B){function A(D,C){if(!(this instanceof A)){return new A(D)}this.$button=B(D);this.$spinner=B('<div class="submit-spinner invisible" />');if(C==="before"){this.$spinner.insertBefore(this.$button)}else{this.$spinner.insertAfter(this.$button)}}A.prototype.show=function(){this.$spinner.removeClass("invisible");this.$spinner.spin();return this};A.prototype.hide=function(){this.$spinner.addClass("invisible");this.$spinner.spinStop();return this};A.prototype.remove=function(){this.$spinner.remove();return this};return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:lozenge-internal', location = '/static/widget/lozenge/lozenge.soy' */
// This file was automatically generated from lozenge.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.lozenge.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }
if (typeof stash.widget.lozenge == 'undefined') { stash.widget.lozenge = {}; }


stash.widget.lozenge.lozenge = function(opt_data, opt_ignored) {
  var output = '';
  var tag__soy3 = opt_data.href ? 'a' : opt_data.htmlElement ? opt_data.htmlElement : opt_data.clickable ? 'button' : 'span';
  output += '<' + soy.$$escapeHtml(tag__soy3) + ' class="aui-lozenge' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + ((opt_data.monospace) ? ' monospace-lozenge' : '') + '"' + ((opt_data.href) ? ' href="' + soy.$$escapeHtml(opt_data.href) + '"' : '') + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + '>' + ((opt_data.maxLength) ? soy.$$escapeHtml(soy.$$truncate(opt_data.text, opt_data.maxLength, true)) : soy.$$escapeHtml(opt_data.text)) + '</' + soy.$$escapeHtml(tag__soy3) + '>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.lozenge.lozenge.soyTemplateName = 'stash.widget.lozenge.lozenge';
}


stash.widget.lozenge.htmlLozenge = function(opt_data, opt_ignored) {
  return '<' + ((opt_data.htmlElement) ? soy.$$escapeHtml(opt_data.htmlElement) : 'a') + ' class="aui-lozenge' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + ((opt_data.monospace) ? ' monospace-lozenge' : '') + '"' + ((opt_data.href) ? ' href="' + soy.$$escapeHtml(opt_data.href) + '"' : '') + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + ((opt_data.extraAttributes) ? aui.renderExtraAttributes(opt_data) : '') + '>' + soy.$$filterNoAutoescape(opt_data.content) + '</' + ((opt_data.htmlElement) ? soy.$$escapeHtml(opt_data.htmlElement) : 'a') + '>';
};
if (goog.DEBUG) {
  stash.widget.lozenge.htmlLozenge.soyTemplateName = 'stash.widget.lozenge.htmlLozenge';
}


stash.widget.lozenge.merge = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + stash.widget.lozenge.lozenge({extraClasses: 'merge-lozenge' + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : '') + (opt_data.abbreviated ? ' abbreviated' : ''), text: '' + soy.$$escapeHtml(opt_data.abbreviated ? "M" : "Merge"), tooltip: '' + soy.$$escapeHtml("This commit is a merge.")});
};
if (goog.DEBUG) {
  stash.widget.lozenge.merge.soyTemplateName = 'stash.widget.lozenge.merge';
}


stash.widget.lozenge.pullRequestState = function(opt_data, opt_ignored) {
  var output = '';
  var commonClasses__soy84 = opt_data.extraClasses ? opt_data.extraClasses + ' pull-request-state-lozenge' : ' pull-request-state-lozenge';
  switch (opt_data.state) {
    case 'OPEN':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-complete open' + commonClasses__soy84, text: "OPEN", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request is in progress.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'OPENED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-complete opened' + commonClasses__soy84, text: opt_data.isActivityContext ? "opened" : "OPENED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request is in progress.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'MERGED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-success merged' + commonClasses__soy84, text: opt_data.isActivityContext ? "merged" : "MERGED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been merged.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'DECLINED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-error declined' + commonClasses__soy84, text: opt_data.isActivityContext ? "declined" : "DECLINED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been declined.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'REOPENED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-complete reopened' + commonClasses__soy84, text: opt_data.isActivityContext ? "reopened" : "REOPENED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been reopened.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'UPDATED':
    case 'RESCOPED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-current updated' + commonClasses__soy84, text: opt_data.isActivityContext ? "updated" : "UPDATED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been updated.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'APPROVED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-success approved' + commonClasses__soy84, text: opt_data.isActivityContext ? "approved" : "Approved", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been approved.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'UNAPPROVED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-error unapproved' + commonClasses__soy84, text: opt_data.isActivityContext ? "unapproved" : "Unapproved", tooltip: opt_data.tooltip ? opt_data.tooltip : "The approval has been withdrawn from this pull request.", clickable: opt_data.clickable, href: opt_data.href});
      break;
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.lozenge.pullRequestState.soyTemplateName = 'stash.widget.lozenge.pullRequestState';
}


stash.widget.lozenge.enabled = function(opt_data, opt_ignored) {
  return '' + stash.widget.lozenge.lozenge({extraClasses: opt_data.isEnabled ? 'lozenge-enabled' : 'lozenge-disabled', text: opt_data.isEnabled ? "Enabled" : "Disabled", tooltip: opt_data.tooltip});
};
if (goog.DEBUG) {
  stash.widget.lozenge.enabled.soyTemplateName = 'stash.widget.lozenge.enabled';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:project-avatar', location = '/static/feature/project/project-avatar/project-avatar.soy' */
// This file was automatically generated from project-avatar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.project.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.project == 'undefined') { stash.feature.project = {}; }


stash.feature.project.avatar = function(opt_data, opt_ignored) {
  return '' + aui.avatar.avatar({tagName: opt_data.tagName, size: opt_data.size, avatarImageUrl: opt_data.imageUrl ? opt_data.imageUrl : opt_data.project ? require('stash/api/util/navbuilder')._avatarUrl(opt_data.project, ({XSMALL:32,SMALL:48,MEDIUM:64,LARGE:96,XLARGE:128,XXLARGE:192,XXXLARGE:256})[opt_data.size.toUpperCase()]).build() : '', accessibilityText: opt_data.project ? opt_data.project.name : '', title: opt_data.tooltip, badgeContent: opt_data.badgeContent, isProject: ! opt_data.project.owner, imageClasses: opt_data.imageClasses, extraClasses: (opt_data.hideBadge ? ' badge-hidden' : '') + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : ''), extraAttributes: opt_data.extraAttributes});
};
if (goog.DEBUG) {
  stash.feature.project.avatar.soyTemplateName = 'stash.feature.project.avatar';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:ref-lozenge', location = '/static/feature/repository/ref-lozenge/ref-lozenge.soy' */
// This file was automatically generated from ref-lozenge.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.refLozenge = function(opt_data, opt_ignored) {
  return '' + stash.widget.lozenge.htmlLozenge({extraClasses: (opt_data.extraClasses ? opt_data.extraClasses + ' ' : '') + 'ref-lozenge', monospace: true, htmlElement: 'span', content: ((opt_data.repository) ? '<span class="repository">' + stash.feature.project.avatar({size: 'xsmall', project: opt_data.repository.project, tagName: 'span'}) + '<span class="name">' + soy.$$escapeHtml(opt_data.repository.name) + '</span></span>' : '') + '<span class="ref ' + soy.$$escapeHtml(opt_data.ref.type && opt_data.ref.type.id ? opt_data.ref.type.id.toLowerCase() : 'branch') + '">' + aui.icons.icon({size: 'small', useIconFont: true, iconFontSet: 'devtools', icon: opt_data.ref.type && opt_data.ref.type.id.toLowerCase() == 'tag' ? 'tag' : 'branch-small'}) + '<span class="name" aria-label="' + ((opt_data.refAccessibilityText) ? soy.$$escapeHtml(opt_data.refAccessibilityText) : soy.$$escapeHtml(AJS.format("branch {0}",opt_data.ref.displayId))) + '">' + soy.$$escapeHtml(opt_data.ref.displayId) + '</span></span>', extraAttributes: {'data-ref-tooltip': opt_data.tooltip ? opt_data.tooltip : (opt_data.repository ? opt_data.repository.project.name + ' / ' + opt_data.repository.name + ' : ' : '') + opt_data.ref.displayId}});
};
if (goog.DEBUG) {
  stash.feature.repository.refLozenge.soyTemplateName = 'stash.feature.repository.refLozenge';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:ref-lozenge', location = '/static/feature/repository/ref-lozenge/ref-lozenge.js' */
define("feature/repository/ref-lozenge",["jquery"],function(A){A(".ref-lozenge").tooltip({live:true,title:"data-ref-tooltip",hoverable:true,gravity:function(){return A.fn.tipsy.autoNS.call(this)+A.fn.tipsy.autoWE.call(this)},delayIn:500,className:function(){var K=A(".tipsy");var C=K[0];var L=K.prop("className");var D=/tipsy-[ns]?e/.test(L);var J=/tipsy-s/.test(L);var E=D?C.offsetWidth:undefined;var N=J?C.offsetHeight:undefined;K.addClass("ref-lozenge-tooltip");if(D){var G=C.offsetWidth;var I=G-E;var H=parseFloat(K.css("left"),10);K.css("left",(H-I)+"px")}if(J){var B=C.offsetHeight;var F=B-N;var M=parseFloat(K.css("top"),10);K.css("top",(M-F)+"px")}return"ref-lozenge-tooltip"}})});require("feature/repository/ref-lozenge");;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:ref-sync-common', location = '/static/feature/sync/common/ref-sync-common.js' */
define("feature/sync/common/ref-sync-common",["stash/api/util/navbuilder","stash/api/util/server","exports"],function(e,c,a){function b(f){return c.rest({url:e.rest("sync").currentRepo().build(),type:"POST",data:{enabled:f}})}function d(){return e.rest("sync").currentRepo().addPathComponents("synchronize").build()}a.enableRefSyncing=b;a.getSyncUrl=d});;
;/* module-key = 'com.atlassian.stash.stash-page-data-plugin:page-data-loader', location = '/static/util/page-data-loader.js' */
var _PageDataPlugin=(function(){var B=Object.prototype.hasOwnProperty;var F=jQuery;var E={};var A={};function D(J,I){for(var K in I){if(B.call(I,K)){var L=A[K]||(A[K]={});var M=L[J]||(L[J]=F.Deferred());var H=E[K]||(E[K]={});H[J]=I[K];if(M.state()!=="pending"){throw new Error("Attempt to set context "+J+" for plugin key "+K+" multiple times.")}M.resolve(H[J])}}}function C(J,I){var H=Array.prototype.slice.call(arguments,2);var K=A[J]||(A[J]={});var L=K[I]||(K[I]=F.Deferred());H.forEach(function(M){L.done(M)});return L}function G(){F.each(A,function(I,H){F.each(H,function(J,K){K.reject(E[I]?new Error("Provider "+I+" not included with context "+J):new Error("Provider "+I+" not included on page."))})})}F(document).ready(G);return{load:D,data:E,ready:C,_domReady:G}}());;
;/* module-key = 'com.atlassian.stash.stash-client-web-fragments-plugin:web-fragment-manager', location = '/static/util/web-fragment-manager.js' */
var WebFragments=(function(){var M=Object.prototype.hasOwnProperty;var N={item:{},section:{},panel:{}};var O=function(S){var R=[];for(var Q in S){if(M.call(S,Q)){R.push(Q)}}return R};function J(V){var T=Array.prototype.slice.call(arguments,1);for(var R=0,X=T.length;R<X;R++){var U=T[R];if(U){for(var Y=O(U),Q=0,S=Y.length;Q<S;Q++){var W=Y[Q];V[W]=U[W]}}}return V}var K;if(!window._PageDataPlugin||!_PageDataPlugin.ready){K=function(Q){return Q}}else{K=function(Q){_PageDataPlugin.ready(Q.completeModuleKey,Q.location,function(R){if(M.call(R,"serverCondition")){Q.serverCondition=R.serverCondition}if(M.call(R,"serverContext")){Q.serverContext=R.serverContext}})}}var E={item:function(Q,R){return{url:"#example-web-item-url",pluginKey:"org.example.plugins",moduleKey:"example-web-item",completeModuleKey:"org.example.plugins:example-web-item",linkText:"Client Web Item: "+Q,hasTooltip:true,tooltip:"Client Context Items: "+O(R).join(", "),hasIcon:false,iconUrl:null,iconWidth:0,iconHeight:0,styleClass:"plugin-point",linkId:null,description:null,params:{},type:"ITEM",weight:1000}},section:function(Q,R){return{name:"example-web-section",key:"example-web-section",location:Q,labelText:"Client Web Section: "+Q,type:"SECTION",params:{},weight:1000}},panel:function(Q,R){return{view:'<div class="plugin-point web-panel"><strong>Client Web Panel</strong>: '+Q+"<br /><strong>Client Context Items</strong>: "+O(R).join(", ")+"</div>",weight:1000}}};function F(Q){return new RegExp("[\\?&]web\\."+Q+"s(=|&|$)").test(window.location.search)}function H(R,Q){return typeof R==="function"?R(J({},Q)):R}function B(Q,R,V){var Y,W,T,X;var U={type:V.toUpperCase()};if(M.call(Q,"serverCondition")&&!Q.serverCondition){return null}R=J({},R,Q.serverContext,Q.params);if(M.call(Q,"condition")&&!H(Q.condition,R)){return null}if(Q["context-provider"]&&typeof Q["context-provider"]==="function"){R=H(Q["context-provider"],R)}for(Y=O(Q),T=0,X=Y.length;T<X;T++){W=Y[T];if(!/con(dition|text-provider)|params/.test(W)){U[W]=H(Q[W],R)}}if(Q.params){var S=U.params={};for(Y=O(Q.params),T=0,X=Y.length;T<X;T++){W=Y[T];S[W]=H(Q.params[W],R)}}return U}function I(R){var Q=N[R];return function(T,W){var Y=Q[T];var S=[];if(Y&&Y.length){for(var V=0,X=Y.length;V<X;V++){var U=B(Y[V],W,R);if(U){S.push(U)}}}if(F(R)){S.push(E[R](T,W))}return S}}var L=I("panel");function A(Q,T){var R=L(Q,T);for(var S=0,U=R.length;S<U;S++){R[S]=R[S].view}return R}var D=I("item");function G(Q,T){var R=D(Q,T);for(var S=0,U=R.length;S<U;S++){R[S].hasIcon=!!R[S].iconUrl;R[S].hasTooltip=!!R[S].tooltip}return R}function P(R){var Q=N[R];return function(S){if(!S){throw new Error("No descriptor provided")}if(typeof S.location!=="string"){throw new Error("No location provided, or location was not a string.")}if(typeof S.completeModuleKey!=="string"){throw new Error("No completeModuleKey provided, or completeModuleKey was not a string.")}K(S);if(!Q[S.location]){Q[S.location]=[]}Q[S.location].push(S);Q[S.location].sort(C)}}function C(R,Q){return(R.weight>=0?R.weight:1000)-(Q.weight>=0?Q.weight:1000)}return{getWebItems:I("item"),getWebSections:I("section"),getWebPanels:A,getWebFragmentDescriptors:function(Q,S){var R=N[S];var T=R&&R[Q];return T&&T.slice()},addWebItemDescriptor:P("item"),addWebSectionDescriptor:P("section"),addWebPanelDescriptor:P("panel"),getWebFragments:function(U,T,R){if(typeof T!=="string"){R=T;T=U}var Q=this.getWebItems(U,R);var V=this.getWebSections(T,R);var S=Q.concat(V);S.sort(C);return S},_getValue:H,_formatI18n:function(Q,R,T){var S=(Q===R?T:Q)||R||T||"";return function(W){var U=[];var Y=O(W);Y.sort();for(var V=0,X=Y.length;V<X;V++){U.push(W[Y[V]])}return AJS.format(S,U)}}}}());;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:merge', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-repository-ref-sync','key':'merge','moduleKey':'merge','completeModuleKey':'com.atlassian.stash.stash-repository-ref-sync:merge','weight':10.0,'params':{},'styleClass':WebFragments._formatI18n(null, null, 'merge-action'),'description':WebFragments._formatI18n(null, null, 'Merge the upstream branch into the fork branch.'),'location':'stash.refsync.diverged.actions','linkText':WebFragments._formatI18n("Merge", 'stash.refsync.dialog.action.merge', '')});;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:discard', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-repository-ref-sync','key':'discard','moduleKey':'discard','completeModuleKey':'com.atlassian.stash.stash-repository-ref-sync:discard','weight':20.0,'params':{},'styleClass':WebFragments._formatI18n(null, null, 'discard-action'),'description':WebFragments._formatI18n(null, null, 'Overwrite the branch with upstream, discarding your changes.'),'location':'stash.refsync.diverged.actions','linkText':WebFragments._formatI18n("Discard", 'stash.refsync.dialog.action.discard', '')});;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:ref-sync-dialog', location = '/static/feature/sync/dialog/ref-sync-dialog.js' */
define("feature/sync/dialog/ref-sync-dialog",["aui","jquery","lodash","stash/api/util/navbuilder","util/ajax","model/page-state","widget/submit-spinner","feature/sync/common/ref-sync-common"],function(i,d,j,a,g,h,e,b){function f(k){return a.project(k.getProject()).repo(k).clone(k.getScmId()).buildAbsolute()}function c(){this.initDialog()}c.prototype.initDialog=function(){var k=this;var l;this.ref=h.getRevisionRef();this.dialog=new i.Dialog({width:840,height:420,closeOnOutsideClick:true});j.bindAll(this.dialog,"hide");this.dialog.popup.element.addClass("ref-sync-dialog");this.dialog.addHeader().addPanel().addSubmit("",function(){l.show();k.doSynchronization().fail(function(){l.hide()}).done(function(){window.location.reload(true)})}).addCancel("Cancel",this.dialog.hide);this.$syncPanel=this.dialog.getCurrentPanel().body;this.$syncPanel.on("click",".option",function(){k.$syncPanel.find(".selected").removeClass("selected");var n=d(this);n.addClass("selected");k._setAction(n)});var m=this.dialog.getCurrentPanel().page.buttonpanel.find(".button-panel-submit-button");m.addClass("aui-button aui-button-primary").removeClass("button-panel-button");l=new e(m,"before")};c.prototype.doSynchronization=function(){var k=this;return g.rest({url:b.getSyncUrl(),type:"POST",data:{action:this.action,refId:this.ref.getId()},statusCode:{409:function(o,p,m,l){k.dialog.addPage("merge-conflict").addHeader("Merge conflicts").addPanel().addButtonPanel().addCancel("Close",k.dialog.hide);d(document).one("hideLayer",function(){k.dialog.prevPage().page.pop().body.remove()});var n=k.dialog.getCurrentPanel().body;n.append(stash.feature.sync.mergeConflictHelp({conflicts:l.conflicts,branchName:k.ref.getDisplayId(),upstreamRemote:f(h.getRepository().getOrigin()),forkRemote:f(h.getRepository())}));k.dialog.updateHeight();return false}}})};c.prototype._setAction=function(l){this.action=l.attr("data-option");var k=this.dialog.getCurrentPanel().page.buttonpanel;var m=k.find(".button-panel-submit-button");m.text(l.find(".option-name").text());d(".discard-warning").remove();if(this.action==="discard"){k.prepend(stash.feature.sync.discardWarning())}};c.prototype.showFor=function(k){this.ref=k;this.dialog.addHeader(i.format("Synchronize {0}",k.getDisplayId()));this.$syncPanel.html(stash.feature.sync.dialog({ref:k.toJSON()}));this._setAction(this.$syncPanel.find(".selected"));this.dialog.show();this.dialog.updateHeight()};return c});;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:ref-sync-dialog', location = '/static/feature/sync/dialog/ref-sync-dialog.soy' */
// This file was automatically generated from ref-sync-dialog.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.sync.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.sync == 'undefined') { stash.feature.sync = {}; }


stash.feature.sync.dialog = function(opt_data, opt_ignored) {
  return '<div class="diverge-message">' + stash.feature.sync.divergeMessage({refLozengeContent: '' + stash.feature.repository.refLozenge(opt_data)}) + '</div>' + stash.widget.dialogSelection({options: WebFragments.getWebItems('stash.refsync.diverged.actions')});
};
if (goog.DEBUG) {
  stash.feature.sync.dialog.soyTemplateName = 'stash.feature.sync.dialog';
}


stash.feature.sync.divergeMessage = function(opt_data, opt_ignored) {
  return '<p>' + soy.$$filterNoAutoescape(AJS.format("{0} could not be synchronized automatically because it has diverged from upstream. Each branch includes changesets the other does not.",opt_data.refLozengeContent)) + '</p><p>' + soy.$$escapeHtml("To synchronize, select one of these strategies:") + '</p>';
};
if (goog.DEBUG) {
  stash.feature.sync.divergeMessage.soyTemplateName = 'stash.feature.sync.divergeMessage';
}


stash.feature.sync.discardWarning = function(opt_data, opt_ignored) {
  return '<span class=\'discard-warning\'>' + aui.icons.icon({icon: 'error', size: 'small', useIconFont: true}) + '<span>' + soy.$$escapeHtml("Discarding means your changes will be lost") + '</span></span>';
};
if (goog.DEBUG) {
  stash.feature.sync.discardWarning.soyTemplateName = 'stash.feature.sync.discardWarning';
}


stash.feature.sync.mergeConflictHelp = function(opt_data, opt_ignored) {
  var output = '<div class="merge-conflict-message">' + soy.$$escapeHtml(AJS.format("Upstream changes could not be merged in automatically due to conflicts in the following {0,choice,1#file|1\x3cfiles}:",opt_data.conflicts.length)) + '</div><ul class="conflicted-files">';
  var conflictList31 = opt_data.conflicts;
  var conflictListLen31 = conflictList31.length;
  for (var conflictIndex31 = 0; conflictIndex31 < conflictListLen31; conflictIndex31++) {
    var conflictData31 = conflictList31[conflictIndex31];
    output += (conflictIndex31 < 2 || conflictIndex31 == 2 && conflictIndex31 == conflictListLen31 - 1) ? '<li class="conflicted-file">' + soy.$$escapeHtml(conflictData31.path) + '</li>' : '';
  }
  output += ((opt_data.conflicts.length > 3) ? '<li class="more-conflicted">' + soy.$$escapeHtml(AJS.format("and {0} more conflicted files",opt_data.conflicts.length - 2)) + '</li>' : '') + '</ul>' + stash.feature.sync.manualMergeInstructions(opt_data);
  return output;
};
if (goog.DEBUG) {
  stash.feature.sync.mergeConflictHelp.soyTemplateName = 'stash.feature.sync.mergeConflictHelp';
}


stash.feature.sync.manualMergeInstructions = function(opt_data, opt_ignored) {
  return '<h4>' + soy.$$escapeHtml("How to perform a manual merge:") + '</h4><p><strong>' + soy.$$escapeHtml("Step 1:") + '</strong> ' + soy.$$escapeHtml("Fetch changes from the upstream repository (saving the upstream branch as FETCH_HEAD).") + '</p>' + stash.widget.codeBlock({content: 'git fetch ' + soy.$$escapeHtml(opt_data.upstreamRemote) + ' ' + soy.$$escapeHtml(opt_data.branchName) + '\n', instructionBlock: true}) + '<p><strong>' + soy.$$escapeHtml("Step 2:") + '</strong> ' + soy.$$escapeHtml("Checkout the fork branch and merge in the changes from the upstream branch. Resolve conflicts.") + '</p>' + stash.widget.codeBlock({content: 'git checkout ' + soy.$$escapeHtml(opt_data.branchName) + ' \ngit merge FETCH_HEAD', instructionBlock: true}) + '<p><strong>' + soy.$$escapeHtml("Step 3:") + '</strong> ' + soy.$$escapeHtml("After the merge conflicts are resolved, stage the changes accordingly, commit the changes and push.") + '</p>' + stash.widget.codeBlock({content: 'git commit\ngit push ' + soy.$$escapeHtml(opt_data.forkRemote) + ' HEAD', instructionBlock: true});
};
if (goog.DEBUG) {
  stash.feature.sync.manualMergeInstructions.soyTemplateName = 'stash.feature.sync.manualMergeInstructions';
}
;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:ref-sync-button', location = '/static/feature/sync/button/ref-sync-button.js' */
define("feature/sync/button/ref-sync-button",["jquery","stash/api/util/navbuilder","util/ajax","util/events","model/page-state","feature/sync/dialog/ref-sync-dialog","exports"],function(f,b,h,j,i,d,e){var g=".synchronize-ref";function a(){return b.newBuilder(["rest","sync","latest","projects",i.getProject().getKey(),"repos",i.getRepository().getSlug()]).build()}function c(k){h.rest({url:a(),data:{at:k.getId()}}).done(function(l){var m=l&&l.state==="DIVERGED";f(g).toggleClass("hidden",!m)})}e.onReady=function(){var k=new d();f(g).on("click",function(l){l.preventDefault();k.showFor(i.getRevisionRef())});c(i.getRevisionRef());j.on("stash.layout.branch.revisionRefChanged",c)}});jQuery(document).ready(function(){require("feature/sync/button/ref-sync-button").onReady()});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror-raw', location = '/static/bower/CodeMirror/lib/codemirror.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){module.exports=A()}else{if(typeof define=="function"&&define.amd){return define([],A)}else{this.CodeMirror=A()}}})(function(){var CN=/gecko\/\d/i.test(navigator.userAgent);var Ee=/MSIE \d/.test(navigator.userAgent);var Bh=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);var De=Ee||Bh;var K=De&&(Ee?document.documentMode||6:Bh[1]);var Cx=/WebKit\//.test(navigator.userAgent);var Dh=Cx&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var C9=/Chrome\//.test(navigator.userAgent);var Dw=/Opera\//.test(navigator.userAgent);var AZ=/Apple Computer/.test(navigator.vendor);var A7=/KHTML\//.test(navigator.userAgent);var C4=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var FP=/PhantomJS/.test(navigator.userAgent);var Ev=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var EA=Ev||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var B5=Ev||/Mac/.test(navigator.platform);var Al=/win/i.test(navigator.platform);var Au=Dw&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(Au){Au=Number(Au[1])}if(Au&&Au>=15){Dw=false;Cx=true}var Bo=B5&&(Dh||Dw&&(Au==null||Au<12.11));var Fy=CN||(De&&K>=9);var F1=false,A3=false;function i(F6,F7){if(!(this instanceof i)){return new i(F6,F7)}this.options=F7=F7?Aj(F7):{};Aj(Ex,F7,false);CC(F7);var GB=F7.value;if(typeof GB=="string"){GB=new AR(GB,F7.mode)}this.doc=GB;var GA=this.display=new Ec(F6,GB);GA.wrapper.CodeMirror=this;D6(this);Cl(this);if(F7.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(F7.autofocus&&!EA){ET(this)}Aa(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,draggingText:false,highlight:new F5(),keySeq:null};if(De&&K<11){setTimeout(CU(FJ,this,true),20)}Fk(this);BF();Cf(this);this.curOp.forceUpdate=true;D5(this,GB);if((F7.autofocus&&!EA)||Di()==GA.input){setTimeout(CU(CZ,this),20)}else{Ar(this)}for(var F9 in BB){if(BB.hasOwnProperty(F9)){BB[F9](this,F7[F9],CA)}}Dz(this);for(var F8=0;F8<A4.length;++F8){A4[F8](this)}AL(this);if(Cx&&F7.lineWrapping&&getComputedStyle(GA.lineDiv).textRendering=="optimizelegibility"){GA.lineDiv.style.textRendering="auto"}}function Ec(F6,F8){var F9=this;var F7=F9.input=Fr("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");if(Cx){F7.style.width="1000px"}else{F7.setAttribute("wrap","off")}if(Ev){F7.style.border="1px solid black"}F7.setAttribute("autocorrect","off");F7.setAttribute("autocapitalize","off");F7.setAttribute("spellcheck","false");F9.inputDiv=Fr("div",[F7],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");F9.scrollbarFiller=Fr("div",null,"CodeMirror-scrollbar-filler");F9.scrollbarFiller.setAttribute("not-content","true");F9.gutterFiller=Fr("div",null,"CodeMirror-gutter-filler");F9.gutterFiller.setAttribute("not-content","true");F9.lineDiv=Fr("div",null,"CodeMirror-code");F9.selectionDiv=Fr("div",null,null,"position: relative; z-index: 1");F9.cursorDiv=Fr("div",null,"CodeMirror-cursors");F9.measure=Fr("div",null,"CodeMirror-measure");F9.lineMeasure=Fr("div",null,"CodeMirror-measure");F9.lineSpace=Fr("div",[F9.measure,F9.lineMeasure,F9.selectionDiv,F9.cursorDiv,F9.lineDiv],null,"position: relative; outline: none");F9.mover=Fr("div",[Fr("div",[F9.lineSpace],"CodeMirror-lines")],null,"position: relative");F9.sizer=Fr("div",[F9.mover],"CodeMirror-sizer");F9.sizerWidth=null;F9.heightForcer=Fr("div",null,null,"position: absolute; height: "+Dd+"px; width: 1px;");F9.gutters=Fr("div",null,"CodeMirror-gutters");F9.lineGutter=null;F9.scroller=Fr("div",[F9.sizer,F9.heightForcer,F9.gutters],"CodeMirror-scroll");F9.scroller.setAttribute("tabIndex","-1");F9.wrapper=Fr("div",[F9.inputDiv,F9.scrollbarFiller,F9.gutterFiller,F9.scroller],"CodeMirror");if(De&&K<8){F9.gutters.style.zIndex=-1;F9.scroller.style.paddingRight=0}if(Ev){F7.style.width="0px"}if(!Cx){F9.scroller.draggable=true}if(A7){F9.inputDiv.style.height="1px";F9.inputDiv.style.position="absolute"}if(F6){if(F6.appendChild){F6.appendChild(F9.wrapper)}else{F6(F9.wrapper)}}F9.viewFrom=F9.viewTo=F8.first;F9.reportedViewFrom=F9.reportedViewTo=F8.first;F9.view=[];F9.renderedView=null;F9.externalMeasured=null;F9.viewOffset=0;F9.lastWrapHeight=F9.lastWrapWidth=0;F9.updateLineNumbers=null;F9.nativeBarWidth=F9.barHeight=F9.barWidth=0;F9.scrollbarsClipped=false;F9.lineNumWidth=F9.lineNumInnerWidth=F9.lineNumChars=null;F9.prevInput="";F9.alignWidgets=false;F9.pollingFast=false;F9.poll=new F5();F9.cachedCharWidth=F9.cachedTextHeight=F9.cachedPaddingH=null;F9.inaccurateSelection=false;F9.maxLine=null;F9.maxLineLength=0;F9.maxLineChanged=false;F9.wheelDX=F9.wheelDY=F9.wheelStartX=F9.wheelStartY=null;F9.shift=false;F9.selForContextMenu=null}function BP(F6){F6.doc.mode=i.getMode(F6.options,F6.doc.modeOption);EF(F6)}function EF(F6){F6.doc.iter(function(F7){if(F7.stateAfter){F7.stateAfter=null}if(F7.styles){F7.styles=null}});F6.doc.frontier=F6.doc.first;D9(F6,100);F6.state.modeGen++;if(F6.curOp){AG(F6)}}function Ea(F6){if(F6.options.lineWrapping){FV(F6.display.wrapper,"CodeMirror-wrap");F6.display.sizer.style.minWidth="";F6.display.sizerWidth=null}else{F(F6.display.wrapper,"CodeMirror-wrap");G(F6)}y(F6);AG(F6);AJ(F6);setTimeout(function(){Es(F6)},100)}function BA(F6){var F8=At(F6.display),F7=F6.options.lineWrapping;var F9=F7&&Math.max(5,F6.display.scroller.clientWidth/DX(F6.display)-3);return function(GB){if(FR(F6.doc,GB)){return 0}var GA=0;if(GB.widgets){for(var GC=0;GC<GB.widgets.length;GC++){if(GB.widgets[GC].height){GA+=GB.widgets[GC].height}}}if(F7){return GA+(Math.ceil(GB.text.length/F9)||1)*F8}else{return GA+F8}}}function y(F6){var F8=F6.doc,F7=BA(F6);F8.iter(function(F9){var GA=F7(F9);if(GA!=F9.height){Fu(F9,GA)}})}function Cl(F6){F6.display.wrapper.className=F6.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+F6.options.theme.replace(/(^|\s)\s*/g," cm-s-");AJ(F6)}function DQ(F6){D6(F6);AG(F6);setTimeout(function(){EY(F6)},20)}function D6(F6){var F7=F6.display.gutters,GB=F6.options.gutters;Dv(F7);for(var F8=0;F8<GB.length;++F8){var F9=GB[F8];var GA=F7.appendChild(Fr("div",null,"CodeMirror-gutter "+F9));if(F9=="CodeMirror-linenumbers"){F6.display.lineGutter=GA;GA.style.width=(F6.display.lineNumWidth||1)+"px"}}F7.style.display=F8?"":"none";C1(F6)}function C1(F6){var F7=F6.display.gutters.offsetWidth;F6.display.sizer.style.marginLeft=F7+"px"}function EH(F8){if(F8.height==0){return 0}var F7=F8.text.length,F6,GA=F8;while(F6=Ei(GA)){var F9=F6.find(0,true);GA=F9.from.line;F7+=F9.from.ch-F9.to.ch}GA=F8;while(F6=EP(GA)){var F9=F6.find(0,true);F7-=GA.text.length-F9.from.ch;GA=F9.to.line;F7+=GA.text.length-F9.to.ch}return F7}function G(F6){var F8=F6.display,F7=F6.doc;F8.maxLine=E9(F7,F7.first);F8.maxLineLength=EH(F8.maxLine);F8.maxLineChanged=true;F7.iter(function(GA){var F9=EH(GA);if(F9>F8.maxLineLength){F8.maxLineLength=F9;F8.maxLine=GA}})}function CC(F6){var F7=DE(F6.gutters,"CodeMirror-linenumbers");if(F7==-1&&F6.lineNumbers){F6.gutters=F6.gutters.concat(["CodeMirror-linenumbers"])}else{if(F7>-1&&!F6.lineNumbers){F6.gutters=F6.gutters.slice(0);F6.gutters.splice(F7,1)}}}function DU(F6){var F9=F6.display,F8=F9.gutters.offsetWidth;var F7=Math.round(F6.doc.height+Bg(F6.display));return{clientHeight:F9.scroller.clientHeight,viewHeight:F9.wrapper.clientHeight,scrollWidth:F9.scroller.scrollWidth,clientWidth:F9.scroller.clientWidth,viewWidth:F9.wrapper.clientWidth,barLeft:F6.options.fixedGutter?F8:0,docHeight:F7,scrollHeight:F7+Cq(F6)+F9.barHeight,nativeBarWidth:F9.nativeBarWidth,gutterWidth:F8}}function DG(F8,F7,F6){this.cm=F6;var F9=this.vert=Fr("div",[Fr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var GA=this.horiz=Fr("div",[Fr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");F8(F9);F8(GA);Bv(F9,"scroll",function(){if(F9.clientHeight){F7(F9.scrollTop,"vertical")}});Bv(GA,"scroll",function(){if(GA.clientWidth){F7(GA.scrollLeft,"horizontal")}});this.checkedOverlay=false;if(De&&K<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}}DG.prototype=Aj({update:function(F9){var GA=F9.scrollWidth>F9.clientWidth+1;var F8=F9.scrollHeight>F9.clientHeight+1;var GB=F9.nativeBarWidth;if(F8){this.vert.style.display="block";this.vert.style.bottom=GA?GB+"px":"0";var F7=F9.viewHeight-(GA?GB:0);this.vert.firstChild.style.height=Math.max(0,F9.scrollHeight-F9.clientHeight+F7)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(GA){this.horiz.style.display="block";this.horiz.style.right=F8?GB+"px":"0";this.horiz.style.left=F9.barLeft+"px";var F6=F9.viewWidth-F9.barLeft-(F8?GB:0);this.horiz.firstChild.style.width=(F9.scrollWidth-F9.clientWidth+F6)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedOverlay&&F9.clientHeight>0){if(GB==0){this.overlayHack()}this.checkedOverlay=true}return{right:F8?GB:0,bottom:GA?GB:0}},setScrollLeft:function(F6){if(this.horiz.scrollLeft!=F6){this.horiz.scrollLeft=F6}},setScrollTop:function(F6){if(this.vert.scrollTop!=F6){this.vert.scrollTop=F6}},overlayHack:function(){var F6=B5&&!C4?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=F6;var F7=this;var F8=function(F9){if(m(F9)!=F7.vert&&m(F9)!=F7.horiz){Cz(F7.cm,EN)(F9)}};Bv(this.vert,"mousedown",F8);Bv(this.horiz,"mousedown",F8)},clear:function(){var F6=this.horiz.parentNode;F6.removeChild(this.horiz);F6.removeChild(this.vert)}},DG.prototype);function Ey(){}Ey.prototype=Aj({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Ey.prototype);i.scrollbarModel={"native":DG,"null":Ey};function Aa(F6){if(F6.display.scrollbars){F6.display.scrollbars.clear();if(F6.display.scrollbars.addClass){F(F6.display.wrapper,F6.display.scrollbars.addClass)}}F6.display.scrollbars=new i.scrollbarModel[F6.options.scrollbarStyle](function(F7){F6.display.wrapper.insertBefore(F7,F6.display.scrollbarFiller);Bv(F7,"mousedown",function(){if(F6.state.focused){setTimeout(CU(ET,F6),0)}});F7.setAttribute("not-content","true")},function(F8,F7){if(F7=="horizontal"){Bc(F6,F8)}else{o(F6,F8)}},F6);if(F6.display.scrollbars.addClass){FV(F6.display.wrapper,F6.display.scrollbars.addClass)}}function Es(F8,GA){if(!GA){GA=DU(F8)}var F7=F8.display.barWidth,F6=F8.display.barHeight;Aq(F8,GA);for(var F9=0;F9<4&&F7!=F8.display.barWidth||F6!=F8.display.barHeight;F9++){if(F7!=F8.display.barWidth&&F8.options.lineWrapping){A5(F8)}Aq(F8,DU(F8));F7=F8.display.barWidth;F6=F8.display.barHeight}}function Aq(F6,F7){var F9=F6.display;var F8=F9.scrollbars.update(F7);F9.sizer.style.paddingRight=(F9.barWidth=F8.right)+"px";F9.sizer.style.paddingBottom=(F9.barHeight=F8.bottom)+"px";if(F8.right&&F8.bottom){F9.scrollbarFiller.style.display="block";F9.scrollbarFiller.style.height=F8.bottom+"px";F9.scrollbarFiller.style.width=F8.right+"px"}else{F9.scrollbarFiller.style.display=""}if(F8.bottom&&F6.options.coverGutterNextToScrollbar&&F6.options.fixedGutter){F9.gutterFiller.style.display="block";F9.gutterFiller.style.height=F8.bottom+"px";F9.gutterFiller.style.width=F7.gutterWidth+"px"}else{F9.gutterFiller.style.display=""}}function B4(F9,GD,F8){var GA=F8&&F8.top!=null?Math.max(0,F8.top):F9.scroller.scrollTop;GA=Math.floor(GA-E2(F9));var F6=F8&&F8.bottom!=null?F8.bottom:GA+F9.wrapper.clientHeight;var GB=Be(GD,GA),GC=Be(GD,F6);if(F8&&F8.ensure){var F7=F8.ensure.from.line,GE=F8.ensure.to.line;if(F7<GB){GB=F7;GC=Be(GD,Bk(E9(GD,F7))+F9.wrapper.clientHeight)}else{if(Math.min(GE,GD.lastLine())>=GC){GB=Be(GD,Bk(E9(GD,GE))-F9.wrapper.clientHeight);GC=GE}}}return{from:GB,to:Math.max(GC,GB+1)}}function EY(GE){var GC=GE.display,GD=GC.view;if(!GC.alignWidgets&&(!GC.gutters.firstChild||!GE.options.fixedGutter)){return }var GA=Dr(GC)-GC.scroller.scrollLeft+GE.doc.scrollLeft;var F6=GC.gutters.offsetWidth,F7=GA+"px";for(var F9=0;F9<GD.length;F9++){if(!GD[F9].hidden){if(GE.options.fixedGutter&&GD[F9].gutter){GD[F9].gutter.style.left=F7}var GB=GD[F9].alignable;if(GB){for(var F8=0;F8<GB.length;F8++){GB[F8].style.left=F7}}}}if(GE.options.fixedGutter){GC.gutters.style.left=(GA+F6)+"px"}}function Dz(F6){if(!F6.options.lineNumbers){return false}var GB=F6.doc,F7=EM(F6.options,GB.first+GB.size-1),GA=F6.display;if(F7.length!=GA.lineNumChars){var GC=GA.measure.appendChild(Fr("div",[Fr("div",F7)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var F8=GC.firstChild.offsetWidth,F9=GC.offsetWidth-F8;GA.lineGutter.style.width="";GA.lineNumInnerWidth=Math.max(F8,GA.lineGutter.offsetWidth-F9);GA.lineNumWidth=GA.lineNumInnerWidth+F9;GA.lineNumChars=GA.lineNumInnerWidth?F7.length:-1;GA.lineGutter.style.width=GA.lineNumWidth+"px";C1(F6);return true}return false}function EM(F6,F7){return String(F6.lineNumberFormatter(F7+F6.firstLineNumber))}function Dr(F6){return F6.scroller.getBoundingClientRect().left-F6.sizer.getBoundingClientRect().left}function Af(F7,F6,F8){var F9=F7.display;this.viewport=F6;this.visible=B4(F9,F7.doc,F6);this.editorIsHidden=!F9.wrapper.offsetWidth;this.wrapperHeight=F9.wrapper.clientHeight;this.wrapperWidth=F9.wrapper.clientWidth;this.oldDisplayWidth=DH(F7);this.force=F8;this.dims=E7(F7)}function k(F6){var F7=F6.display;if(!F7.scrollbarsClipped&&F7.scroller.offsetWidth){F7.nativeBarWidth=F7.scroller.offsetWidth-F7.scroller.clientWidth;F7.heightForcer.style.height=Cq(F6)+"px";F7.sizer.style.marginBottom=-F7.nativeBarWidth+"px";F7.sizer.style.borderRightWidth=Cq(F6)+"px";F7.scrollbarsClipped=true}}function c(GF,F9){var GA=GF.display,GE=GF.doc;if(F9.editorIsHidden){EQ(GF);return false}if(!F9.force&&F9.visible.from>=GA.viewFrom&&F9.visible.to<=GA.viewTo&&(GA.updateLineNumbers==null||GA.updateLineNumbers>=GA.viewTo)&&GA.renderedView==GA.view&&C8(GF)==0){return false}if(Dz(GF)){EQ(GF);F9.dims=E7(GF)}var F8=GE.first+GE.size;var GC=Math.max(F9.visible.from-GF.options.viewportMargin,GE.first);var GD=Math.min(F8,F9.visible.to+GF.options.viewportMargin);if(GA.viewFrom<GC&&GC-GA.viewFrom<20){GC=Math.max(GE.first,GA.viewFrom)}if(GA.viewTo>GD&&GA.viewTo-GD<20){GD=Math.min(F8,GA.viewTo)}if(A3){GC=As(GF.doc,GC);GD=Dx(GF.doc,GD)}var F7=GC!=GA.viewFrom||GD!=GA.viewTo||GA.lastWrapHeight!=F9.wrapperHeight||GA.lastWrapWidth!=F9.wrapperWidth;Co(GF,GC,GD);GA.viewOffset=Bk(E9(GF.doc,GA.viewFrom));GF.display.mover.style.top=GA.viewOffset+"px";var F6=C8(GF);if(!F7&&F6==0&&!F9.force&&GA.renderedView==GA.view&&(GA.updateLineNumbers==null||GA.updateLineNumbers>=GA.viewTo)){return false}var GB=Di();if(F6>4){GA.lineDiv.style.display="none"}CL(GF,GA.updateLineNumbers,F9.dims);if(F6>4){GA.lineDiv.style.display=""}GA.renderedView=GA.view;if(GB&&Di()!=GB&&GB.offsetHeight){GB.focus()}Dv(GA.cursorDiv);Dv(GA.selectionDiv);GA.gutters.style.height=0;if(F7){GA.lastWrapHeight=F9.wrapperHeight;GA.lastWrapWidth=F9.wrapperWidth;D9(GF,400)}GA.updateLineNumbers=null;return true}function CI(F7,GB){var F9=GB.force,F6=GB.viewport;for(var GA=true;;GA=false){if(GA&&F7.options.lineWrapping&&GB.oldDisplayWidth!=DH(F7)){F9=true}else{F9=false;if(F6&&F6.top!=null){F6={top:Math.min(F7.doc.height+Bg(F7.display)-Cs(F7),F6.top)}}GB.visible=B4(F7.display,F7.doc,F6);if(GB.visible.from>=F7.display.viewFrom&&GB.visible.to<=F7.display.viewTo){break}}if(!c(F7,GB)){break}A5(F7);var F8=DU(F7);Ba(F7);DT(F7,F8);Es(F7,F8)}AD(F7,"update",F7);if(F7.display.viewFrom!=F7.display.reportedViewFrom||F7.display.viewTo!=F7.display.reportedViewTo){AD(F7,"viewportChange",F7,F7.display.viewFrom,F7.display.viewTo);F7.display.reportedViewFrom=F7.display.viewFrom;F7.display.reportedViewTo=F7.display.viewTo}}function Dn(F7,F6){var F9=new Af(F7,F6);if(c(F7,F9)){A5(F7);CI(F7,F9);var F8=DU(F7);Ba(F7);DT(F7,F8);Es(F7,F8)}}function DT(F6,F7){F6.display.sizer.style.minHeight=F7.docHeight+"px";var F8=F7.docHeight+F6.display.barHeight;F6.display.heightForcer.style.top=F8+"px";F6.display.gutters.style.height=Math.max(F8+Cq(F6),F7.clientHeight)+"px"}function A5(GD){var GB=GD.display;var F7=GB.lineDiv.offsetTop;for(var F8=0;F8<GB.view.length;F8++){var GE=GB.view[F8],GF;if(GE.hidden){continue}if(De&&K<8){var GA=GE.node.offsetTop+GE.node.offsetHeight;GF=GA-F7;F7=GA}else{var F9=GE.node.getBoundingClientRect();GF=F9.bottom-F9.top}var GC=GE.line.height-GF;if(GF<2){GF=At(GB)}if(GC>0.001||GC<-0.001){Fu(GE.line,GF);B9(GE.line);if(GE.rest){for(var F6=0;F6<GE.rest.length;F6++){B9(GE.rest[F6])}}}}}function B9(F6){if(F6.widgets){for(var F7=0;F7<F6.widgets.length;++F7){F6.widgets[F7].height=F6.widgets[F7].node.offsetHeight}}}function E7(F6){var GB=F6.display,F9={},F8={};var GA=GB.gutters.clientLeft;for(var GC=GB.gutters.firstChild,F7=0;GC;GC=GC.nextSibling,++F7){F9[F6.options.gutters[F7]]=GC.offsetLeft+GC.clientLeft+GA;F8[F6.options.gutters[F7]]=GC.clientWidth}return{fixedPos:Dr(GB),gutterTotalWidth:GB.gutters.offsetWidth,gutterLeft:F9,gutterWidth:F8,wrapperWidth:GB.wrapper.clientWidth}}function CL(GH,F8,GG){var GD=GH.display,GJ=GH.options.lineNumbers;var F6=GD.lineDiv,GI=F6.firstChild;function GC(GL){var GK=GL.nextSibling;if(Cx&&B5&&GH.display.currentWheelTarget==GL){GL.style.display="none"}else{GL.parentNode.removeChild(GL)}return GK}var GE=GD.view,GB=GD.viewFrom;for(var F9=0;F9<GE.length;F9++){var GA=GE[F9];if(GA.hidden){}else{if(!GA.node){var F7=Ac(GH,GA,GB,GG);F6.insertBefore(F7,GI)}else{while(GI!=GA.node){GI=GC(GI)}var GF=GJ&&F8!=null&&F8<=GB&&GA.lineNumber;if(GA.changes){if(DE(GA.changes,"gutter")>-1){GF=false}AA(GH,GA,GB,GG)}if(GF){Dv(GA.lineNumber);GA.lineNumber.appendChild(document.createTextNode(EM(GH.options,GB)))}GI=GA.node.nextSibling}}GB+=GA.size}while(GI){GI=GC(GI)}}function AA(F6,F8,GA,GB){for(var F7=0;F7<F8.changes.length;F7++){var F9=F8.changes[F7];if(F9=="text"){FF(F6,F8)}else{if(F9=="gutter"){DC(F6,F8,GA,GB)}else{if(F9=="class"){Da(F8)}else{if(F9=="widget"){AN(F8,GB)}}}}}F8.changes=null}function Fd(F6){if(F6.node==F6.text){F6.node=Fr("div",null,null,"position: relative");if(F6.text.parentNode){F6.text.parentNode.replaceChild(F6.node,F6.text)}F6.node.appendChild(F6.text);if(De&&K<8){F6.node.style.zIndex=2}}return F6.node}function EO(F7){var F6=F7.bgClass?F7.bgClass+" "+(F7.line.bgClass||""):F7.line.bgClass;if(F6){F6+=" CodeMirror-linebackground"}if(F7.background){if(F6){F7.background.className=F6}else{F7.background.parentNode.removeChild(F7.background);F7.background=null}}else{if(F6){var F8=Fd(F7);F7.background=F8.insertBefore(Fr("div",null,F6),F8.firstChild)}}}function Dp(F6,F7){var F8=F6.display.externalMeasured;if(F8&&F8.line==F7.line){F6.display.externalMeasured=null;F7.measure=F8.measure;return F8.built}return El(F6,F7)}function FF(F6,F9){var F7=F9.text.className;var F8=Dp(F6,F9);if(F9.text==F9.node){F9.node=F8.pre}F9.text.parentNode.replaceChild(F8.pre,F9.text);F9.text=F8.pre;if(F8.bgClass!=F9.bgClass||F8.textClass!=F9.textClass){F9.bgClass=F8.bgClass;F9.textClass=F8.textClass;Da(F9)}else{if(F7){F9.text.className=F7}}}function Da(F7){EO(F7);if(F7.line.wrapClass){Fd(F7).className=F7.line.wrapClass}else{if(F7.node!=F7.text){F7.node.className=""}}var F6=F7.textClass?F7.textClass+" "+(F7.line.textClass||""):F7.line.textClass;F7.text.className=F6||""}function DC(GE,GC,GB,GD){if(GC.gutter){GC.node.removeChild(GC.gutter);GC.gutter=null}var F9=GC.line.gutterMarkers;if(GE.options.lineNumbers||F9){var F7=Fd(GC);var GA=GC.gutter=F7.insertBefore(Fr("div",null,"CodeMirror-gutter-wrapper","left: "+(GE.options.fixedGutter?GD.fixedPos:-GD.gutterTotalWidth)+"px; width: "+GD.gutterTotalWidth+"px"),GC.text);if(GC.line.gutterClass){GA.className+=" "+GC.line.gutterClass}if(GE.options.lineNumbers&&(!F9||!F9["CodeMirror-linenumbers"])){GC.lineNumber=GA.appendChild(Fr("div",EM(GE.options,GB),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+GD.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+GE.display.lineNumInnerWidth+"px"))}if(F9){for(var F8=0;F8<GE.options.gutters.length;++F8){var F6=GE.options.gutters[F8],GF=F9.hasOwnProperty(F6)&&F9[F6];if(GF){GA.appendChild(Fr("div",[GF],"CodeMirror-gutter-elt","left: "+GD.gutterLeft[F6]+"px; width: "+GD.gutterWidth[F6]+"px"))}}}}}function AN(F6,F9){if(F6.alignable){F6.alignable=null}for(var F8=F6.node.firstChild,F7;F8;F8=F7){var F7=F8.nextSibling;if(F8.className=="CodeMirror-linewidget"){F6.node.removeChild(F8)}}FO(F6,F9)}function Ac(F6,F8,F9,GA){var F7=Dp(F6,F8);F8.text=F8.node=F7.pre;if(F7.bgClass){F8.bgClass=F7.bgClass}if(F7.textClass){F8.textClass=F7.textClass}Da(F8);DC(F6,F8,F9,GA);FO(F8,GA);return F8.node}function FO(F7,F8){Fw(F7.line,F7,F8,true);if(F7.rest){for(var F6=0;F6<F7.rest.length;F6++){Fw(F7.rest[F6],F7,F8,false)}}}function Fw(GE,GB,GD,F9){if(!GE.widgets){return }var F6=Fd(GB);for(var F8=0,GC=GE.widgets;F8<GC.length;++F8){var GA=GC[F8],F7=Fr("div",[GA.node],"CodeMirror-linewidget");if(!GA.handleMouseEvents){F7.setAttribute("cm-ignore-events","true")}Bd(GA,F7,GB,GD);if(F9&&GA.above){F6.insertBefore(F7,GB.gutter||GB.text)}else{F6.appendChild(F7)}AD(GA,"redraw")}}function Bd(F9,F8,F6,GA){if(F9.noHScroll){(F6.alignable||(F6.alignable=[])).push(F8);var F7=GA.wrapperWidth;F8.style.left=GA.fixedPos+"px";if(!F9.coverGutter){F7-=GA.gutterTotalWidth;F8.style.paddingLeft=GA.gutterTotalWidth+"px"}F8.style.width=F7+"px"}if(F9.coverGutter){F8.style.zIndex=5;F8.style.position="relative";if(!F9.noHScroll){F8.style.marginLeft=-GA.gutterTotalWidth+"px"}}}var x=i.Pos=function(F6,F7){if(!(this instanceof x)){return new x(F6,F7)}this.line=F6;this.ch=F7};var CD=i.cmpPos=function(F7,F6){return F7.line-F6.line||F7.ch-F6.ch};function CH(F6){return x(F6.line,F6.ch)}function BV(F7,F6){return CD(F7,F6)<0?F6:F7}function AQ(F7,F6){return CD(F7,F6)<0?F7:F6}function Fs(F6,F7){this.ranges=F6;this.primIndex=F7}Fs.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(F6){if(F6==this){return true}if(F6.primIndex!=this.primIndex||F6.ranges.length!=this.ranges.length){return false}for(var F8=0;F8<this.ranges.length;F8++){var F7=this.ranges[F8],F9=F6.ranges[F8];if(CD(F7.anchor,F9.anchor)!=0||CD(F7.head,F9.head)!=0){return false}}return true},deepCopy:function(){for(var F6=[],F7=0;F7<this.ranges.length;F7++){F6[F7]=new Ds(CH(this.ranges[F7].anchor),CH(this.ranges[F7].head))}return new Fs(F6,this.primIndex)},somethingSelected:function(){for(var F6=0;F6<this.ranges.length;F6++){if(!this.ranges[F6].empty()){return true}}return false},contains:function(F9,F6){if(!F6){F6=F9}for(var F8=0;F8<this.ranges.length;F8++){var F7=this.ranges[F8];if(CD(F6,F7.from())>=0&&CD(F9,F7.to())<=0){return F8}}return -1}};function Ds(F6,F7){this.anchor=F6;this.head=F7}Ds.prototype={from:function(){return AQ(this.anchor,this.head)},to:function(){return BV(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function CV(F6,GD){var F8=F6[GD];F6.sort(function(GG,GF){return CD(GG.from(),GF.from())});GD=DE(F6,F8);for(var GA=1;GA<F6.length;GA++){var GE=F6[GA],F7=F6[GA-1];if(CD(F7.to(),GE.from())>=0){var GB=AQ(F7.from(),GE.from()),GC=BV(F7.to(),GE.to());var F9=F7.empty()?GE.from()==GE.head:F7.from()==F7.head;if(GA<=GD){--GD}F6.splice(--GA,2,new Ds(F9?GC:GB,F9?GB:GC))}}return new Fs(F6,GD)}function Em(F6,F7){return new Fs([new Ds(F6,F7||F6)],0)}function C2(F6,F7){return Math.max(F6.first,Math.min(F7,F6.first+F6.size-1))}function Fe(F7,F8){if(F8.line<F7.first){return x(F7.first,0)}var F6=F7.first+F7.size-1;if(F8.line>F6){return x(F6,E9(F7,F6).text.length)}return FN(F8,E9(F7,F8.line).text.length)}function FN(F8,F7){var F6=F8.ch;if(F6==null||F6>F7){return x(F8.line,F7)}else{if(F6<0){return x(F8.line,0)}else{return F8}}}function B7(F7,F6){return F6>=F7.first&&F6<F7.first+F7.size}function Dt(F8,F9){for(var F6=[],F7=0;F7<F9.length;F7++){F6[F7]=Fe(F8,F9[F7])}return F6}function FQ(GB,F7,GA,F6){if(GB.cm&&GB.cm.display.shift||GB.extend){var F9=F7.anchor;if(F6){var F8=CD(GA,F9)<0;if(F8!=(CD(F6,F9)<0)){F9=GA;GA=F6}else{if(F8!=(CD(GA,F6)<0)){GA=F6}}}return new Ds(F9,GA)}else{return new Ds(F6||GA,GA)}}function Fo(F9,F8,F6,F7){Bs(F9,new Fs([FQ(F9,F9.sel.primary(),F8,F6)],0),F7)}function AU(GB,GA,F8){for(var F7=[],F9=0;F9<GB.sel.ranges.length;F9++){F7[F9]=FQ(GB,GB.sel.ranges[F9],GA[F9],null)}var F6=CV(F7,GB.sel.primIndex);Bs(GB,F6,F8)}function E(GA,F9,F7,F8){var F6=GA.sel.ranges.slice(0);F6[F9]=F7;Bs(GA,CV(F6,GA.sel.primIndex),F8)}function g(F9,F7,F8,F6){Bs(F9,Em(F7,F8),F6)}function C(F8,F6){var F7={ranges:F6.ranges,update:function(F9){this.ranges=[];for(var GA=0;GA<F9.length;GA++){this.ranges[GA]=new Ds(Fe(F8,F9[GA].anchor),Fe(F8,F9[GA].head))}}};Ab(F8,"beforeSelectionChange",F8,F7);if(F8.cm){Ab(F8.cm,"beforeSelectionChange",F8.cm,F7)}if(F7.ranges!=F6.ranges){return CV(F7.ranges,F7.ranges.length-1)}else{return F6}}function E1(GA,F9,F7){var F6=GA.history.done,F8=Fc(F6);if(F8&&F8.ranges){F6[F6.length-1]=F9;EJ(GA,F9,F7)}else{Bs(GA,F9,F7)}}function Bs(F8,F7,F6){EJ(F8,F7,F6);F0(F8,F8.sel,F8.cm?F8.cm.curOp.id:NaN,F6)}function EJ(F9,F8,F7){if(FC(F9,"beforeSelectionChange")||F9.cm&&FC(F9.cm,"beforeSelectionChange")){F8=C(F9,F8)}var F6=F7&&F7.bias||(CD(F8.primary().head,F9.sel.primary().head)<0?-1:1);C6(F9,N(F9,F8,F6,true));if(!(F7&&F7.scroll===false)&&F9.cm){Fb(F9.cm)}}function C6(F7,F6){if(F6.equals(F7.sel)){return }F7.sel=F6;if(F7.cm){F7.cm.curOp.updateInput=F7.cm.curOp.selectionChanged=true;w(F7.cm)}AD(F7,"cursorActivity",F7)}function ER(F6){C6(F6,N(F6,F6.sel,null,false),z)}function N(GE,F6,GB,GC){var F8;for(var F9=0;F9<F6.ranges.length;F9++){var GA=F6.ranges[F9];var GD=Bt(GE,GA.anchor,GB,GC);var F7=Bt(GE,GA.head,GB,GC);if(F8||GD!=GA.anchor||F7!=GA.head){if(!F8){F8=F6.ranges.slice(0,F9)}F8[F9]=new Ds(GD,F7)}}return F8?CV(F8,F6.primIndex):F6}function Bt(GF,GE,GB,GC){var GG=false,F8=GE;var F9=GB||1;GF.cantEdit=false;search:for(;;){var GH=E9(GF,F8.line);if(GH.markedSpans){for(var GA=0;GA<GH.markedSpans.length;++GA){var F6=GH.markedSpans[GA],F7=F6.marker;if((F6.from==null||(F7.inclusiveLeft?F6.from<=F8.ch:F6.from<F8.ch))&&(F6.to==null||(F7.inclusiveRight?F6.to>=F8.ch:F6.to>F8.ch))){if(GC){Ab(F7,"beforeCursorEnter");if(F7.explicitlyCleared){if(!GH.markedSpans){break}else{--GA;continue}}}if(!F7.atomic){continue}var GD=F7.find(F9<0?-1:1);if(CD(GD,F8)==0){GD.ch+=F9;if(GD.ch<0){if(GD.line>GF.first){GD=Fe(GF,x(GD.line-1))}else{GD=null}}else{if(GD.ch>GH.text.length){if(GD.line<GF.first+GF.size-1){GD=x(GD.line+1,0)}else{GD=null}}}if(!GD){if(GG){if(!GC){return Bt(GF,GE,GB,true)}GF.cantEdit=true;return x(GF.first,0)}GG=true;GD=GE;F9=-F9}}F8=GD;continue search}}}return F8}}function BJ(GG){var GC=GG.display,GF=GG.doc,GH={};var GE=GH.cursors=document.createDocumentFragment();var F8=GH.selection=document.createDocumentFragment();for(var GA=0;GA<GF.sel.ranges.length;GA++){var GB=GF.sel.ranges[GA];var F9=GB.empty();if(F9||GG.options.showCursorWhenSelecting){a(GG,GB,GE)}if(!F9){Bb(GG,GB,F8)}}if(GG.options.moveInputWithCursor){var GD=Do(GG,GF.sel.primary().head,"div");var F6=GC.wrapper.getBoundingClientRect(),F7=GC.lineDiv.getBoundingClientRect();GH.teTop=Math.max(0,Math.min(GC.wrapper.clientHeight-10,GD.top+F7.top-F6.top));GH.teLeft=Math.max(0,Math.min(GC.wrapper.clientWidth-10,GD.left+F7.left-F6.left))}return GH}function AK(F6,F7){Bp(F6.display.cursorDiv,F7.cursors);Bp(F6.display.selectionDiv,F7.selection);if(F7.teTop!=null){F6.display.inputDiv.style.top=F7.teTop+"px";F6.display.inputDiv.style.left=F7.teLeft+"px"}}function Ba(F6){AK(F6,BJ(F6))}function a(F6,F9,F8){var GB=Do(F6,F9.head,"div",null,null,!F6.options.singleCursorHeightPerLine);var GA=F8.appendChild(Fr("div","\u00a0","CodeMirror-cursor"));GA.style.left=GB.left+"px";GA.style.top=GB.top+"px";GA.style.height=Math.max(0,GB.bottom-GB.top)*F6.options.cursorHeight+"px";if(GB.other){var F7=F8.appendChild(Fr("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));F7.style.display="";F7.style.left=GB.other.left+"px";F7.style.top=GB.other.top+"px";F7.style.height=(GB.other.bottom-GB.other.top)*0.85+"px"}}function Bb(GA,GG,GB){var GJ=GA.display,GN=GA.doc;var F6=document.createDocumentFragment();var GF=Ez(GA.display),F9=GF.left;var GK=Math.max(GJ.sizerWidth,DH(GA)-GJ.sizer.offsetLeft)-GF.right;function GH(GR,GQ,GP,GO){if(GQ<0){GQ=0}GQ=Math.round(GQ);GO=Math.round(GO);F6.appendChild(Fr("div",null,"CodeMirror-selected","position: absolute; left: "+GR+"px; top: "+GQ+"px; width: "+(GP==null?GK-GR:GP)+"px; height: "+(GO-GQ)+"px"))}function F7(GP,GR,GU){var GQ=E9(GN,GP);var GS=GQ.text.length;var GV,GO;function GT(GX,GW){return Cg(GA,x(GP,GX),"div",GQ,GW)}Dy(A(GQ),GR||0,GU==null?GS:GU,function(Gd,Gc,GW){var GZ=GT(Gd,"left"),Ga,Gb,GY;if(Gd==Gc){Ga=GZ;Gb=GY=GZ.left}else{Ga=GT(Gc-1,"right");if(GW=="rtl"){var GX=GZ;GZ=Ga;Ga=GX}Gb=GZ.left;GY=Ga.right}if(GR==null&&Gd==0){Gb=F9}if(Ga.top-GZ.top>3){GH(Gb,GZ.top,null,GZ.bottom);Gb=F9;if(GZ.bottom<Ga.top){GH(Gb,GZ.bottom,null,Ga.top)}}if(GU==null&&Gc==GS){GY=GK}if(!GV||GZ.top<GV.top||GZ.top==GV.top&&GZ.left<GV.left){GV=GZ}if(!GO||Ga.bottom>GO.bottom||Ga.bottom==GO.bottom&&Ga.right>GO.right){GO=Ga}if(Gb<F9+1){Gb=F9}GH(Gb,Ga.top,GY-Gb,Ga.bottom)});return{start:GV,end:GO}}var GM=GG.from(),GL=GG.to();if(GM.line==GL.line){F7(GM.line,GM.ch,GL.ch)}else{var F8=E9(GN,GM.line),GD=E9(GN,GL.line);var GC=Y(F8)==Y(GD);var GE=F7(GM.line,GM.ch,GC?F8.text.length+1:null).end;var GI=F7(GL.line,GC?0:null,GL.ch).start;if(GC){if(GE.top<GI.top-2){GH(GE.right,GE.top,null,GE.bottom);GH(F9,GI.top,GI.left,GI.bottom)}else{GH(GE.right,GE.top,GI.left-GE.right,GE.bottom)}}if(GE.bottom<GI.top){GH(F9,GE.bottom,null,GI.top)}}GB.appendChild(F6)}function O(F6){if(!F6.state.focused){return }var F8=F6.display;clearInterval(F8.blinker);var F7=true;F8.cursorDiv.style.visibility="";if(F6.options.cursorBlinkRate>0){F8.blinker=setInterval(function(){F8.cursorDiv.style.visibility=(F7=!F7)?"":"hidden"},F6.options.cursorBlinkRate)}else{if(F6.options.cursorBlinkRate<0){F8.cursorDiv.style.visibility="hidden"}}}function D9(F6,F7){if(F6.doc.mode.startState&&F6.doc.frontier<F6.display.viewTo){F6.state.highlight.set(F7,CU(Cm,F6))}}function Cm(F6){var GA=F6.doc;if(GA.frontier<GA.first){GA.frontier=GA.first}if(GA.frontier>=F6.display.viewTo){return }var F8=+new Date+F6.options.workTime;var F9=B1(GA.mode,DV(F6,GA.frontier));var F7=[];GA.iter(GA.frontier,Math.min(GA.first+GA.size,F6.display.viewTo+500),function(GB){if(GA.frontier>=F6.display.viewFrom){var GE=GB.styles;var GG=FU(F6,GB,F9,true);GB.styles=GG.styles;var GD=GB.styleClasses,GF=GG.classes;if(GF){GB.styleClasses=GF}else{if(GD){GB.styleClasses=null}}var GH=!GE||GE.length!=GB.styles.length||GD!=GF&&(!GD||!GF||GD.bgClass!=GF.bgClass||GD.textClass!=GF.textClass);for(var GC=0;!GH&&GC<GE.length;++GC){GH=GE[GC]!=GB.styles[GC]}if(GH){F7.push(GA.frontier)}GB.stateAfter=B1(GA.mode,F9)}else{DR(F6,GB.text,F9);GB.stateAfter=GA.frontier%5==0?B1(GA.mode,F9):null}++GA.frontier;if(+new Date>F8){D9(F6,F6.options.workDelay);return true}});if(F7.length){Cj(F6,function(){for(var GB=0;GB<F7.length;GB++){s(F6,F7[GB],"text")}})}}function CX(GC,F6,F9){var F7,GA,GB=GC.doc;var F8=F9?-1:F6-(GC.doc.mode.innerMode?1000:100);for(var GF=F6;GF>F8;--GF){if(GF<=GB.first){return GB.first}var GE=E9(GB,GF-1);if(GE.stateAfter&&(!F9||GF<=GB.frontier)){return GF}var GD=Br(GE.text,null,GC.options.tabSize);if(GA==null||F7>GD){GA=GF-1;F7=GD}}return GA}function DV(F6,GC,F7){var GA=F6.doc,F9=F6.display;if(!GA.mode.startState){return true}var GB=CX(F6,GC,F7),F8=GB>GA.first&&E9(GA,GB-1).stateAfter;if(!F8){F8=By(GA.mode)}else{F8=B1(GA.mode,F8)}GA.iter(GB,GC,function(GD){DR(F6,GD.text,F8);var GE=GB==GC-1||GB%5==0||GB>=F9.viewFrom&&GB<F9.viewTo;GD.stateAfter=GE?B1(GA.mode,F8):null;++GB});if(F7){GA.frontier=GB}return F8}function E2(F6){return F6.lineSpace.offsetTop}function Bg(F6){return F6.mover.offsetHeight-F6.lineSpace.offsetHeight}function Ez(F9){if(F9.cachedPaddingH){return F9.cachedPaddingH}var F8=Bp(F9.measure,Fr("pre","x"));var F6=window.getComputedStyle?window.getComputedStyle(F8):F8.currentStyle;var F7={left:parseInt(F6.paddingLeft),right:parseInt(F6.paddingRight)};if(!isNaN(F7.left)&&!isNaN(F7.right)){F9.cachedPaddingH=F7}return F7}function Cq(F6){return Dd-F6.display.nativeBarWidth}function DH(F6){return F6.display.scroller.clientWidth-Cq(F6)-F6.display.barWidth}function Cs(F6){return F6.display.scroller.clientHeight-Cq(F6)-F6.display.barHeight}function CG(GD,F9,GC){var F8=GD.options.lineWrapping;var GA=F8&&DH(GD);if(!F9.measure.heights||F8&&F9.measure.width!=GA){var GB=F9.measure.heights=[];if(F8){F9.measure.width=GA;var GF=F9.text.firstChild.getClientRects();for(var F6=0;F6<GF.length-1;F6++){var GE=GF[F6],F7=GF[F6+1];if(Math.abs(GE.bottom-F7.bottom)>2){GB.push((GE.bottom+F7.top)/2-GC.top)}}}GB.push(GC.bottom-GC.top)}}function CS(F8,F6,F9){if(F8.line==F6){return{map:F8.measure.map,cache:F8.measure.cache}}for(var F7=0;F7<F8.rest.length;F7++){if(F8.rest[F7]==F6){return{map:F8.measure.maps[F7],cache:F8.measure.caches[F7]}}}for(var F7=0;F7<F8.rest.length;F7++){if(Bl(F8.rest[F7])>F9){return{map:F8.measure.maps[F7],cache:F8.measure.caches[F7],before:true}}}}function Cy(F6,F8){F8=Y(F8);var GA=Bl(F8);var F7=F6.display.externalMeasured=new BT(F6.doc,F8,GA);F7.lineN=GA;var F9=F7.built=El(F6,F7);F7.text=F9.pre;Bp(F6.display.lineMeasure,F9.pre);return F7}function EB(F6,F7,F9,F8){return d(F6,A0(F6,F7),F9,F8)}function E5(F6,F8){if(F8>=F6.display.viewFrom&&F8<F6.display.viewTo){return F6.display.view[DM(F6,F8)]}var F7=F6.display.externalMeasured;if(F7&&F8>=F7.lineN&&F8<F7.lineN+F7.size){return F7}}function A0(F6,F8){var F9=Bl(F8);var F7=E5(F6,F9);if(F7&&!F7.text){F7=null}else{if(F7&&F7.changes){AA(F6,F7,F9,E7(F6))}}if(!F7){F7=Cy(F6,F8)}var GA=CS(F7,F8,F9);return{line:F8,view:F7,rect:null,map:GA.map,cache:GA.cache,before:GA.before,hasHeights:false}}function d(F6,GC,GA,F7,F9){if(GC.before){GA=-1}var F8=GA+(F7||""),GB;if(GC.cache.hasOwnProperty(F8)){GB=GC.cache[F8]}else{if(!GC.rect){GC.rect=GC.view.text.getBoundingClientRect()}if(!GC.hasHeights){CG(F6,GC.view,GC.rect);GC.hasHeights=true}GB=J(F6,GC,GA,F7);if(!GB.bogus){GC.cache[F8]=GB}}return{left:GB.left,right:GB.right,top:F9?GB.rtop:GB.top,bottom:F9?GB.rbottom:GB.bottom}}var EV={left:0,right:0,top:0,bottom:0};function J(GD,GN,GF,GB){var GR=GN.map;var GK,GA,F9,F6;for(var GM=0;GM<GR.length;GM+=3){var GP=GR[GM],GL=GR[GM+1];if(GF<GP){GA=0;F9=1;F6="left"}else{if(GF<GL){GA=GF-GP;F9=GA+1}else{if(GM==GR.length-3||GF==GL&&GR[GM+3]>GF){F9=GL-GP;GA=F9-1;if(GF>=GL){F6="right"}}}}if(GA!=null){GK=GR[GM+2];if(GP==GL&&GB==(GK.insertLeft?"left":"right")){F6=GB}if(GB=="left"&&GA==0){while(GM&&GR[GM-2]==GR[GM-3]&&GR[GM-1].insertLeft){GK=GR[(GM-=3)+2];F6="left"}}if(GB=="right"&&GA==GL-GP){while(GM<GR.length-3&&GR[GM+3]==GR[GM+4]&&!GR[GM+5].insertLeft){GK=GR[(GM+=3)+2];F6="right"}}break}}var F7;if(GK.nodeType==3){for(var GM=0;GM<4;GM++){while(GA&&FK(GN.line.text.charAt(GP+GA))){--GA}while(GP+F9<GL&&FK(GN.line.text.charAt(GP+F9))){++F9}if(De&&K<9&&GA==0&&F9==GL-GP){F7=GK.parentNode.getBoundingClientRect()}else{if(De&&GD.options.lineWrapping){var F8=CK(GK,GA,F9).getClientRects();if(F8.length){F7=F8[GB=="right"?F8.length-1:0]}else{F7=EV}}else{F7=CK(GK,GA,F9).getBoundingClientRect()||EV}}if(F7.left||F7.right||GA==0){break}F9=GA;GA=GA-1;F6="right"}if(De&&K<11){F7=Eh(GD.display.measure,F7)}}else{if(GA>0){F6=GB="right"}var F8;if(GD.options.lineWrapping&&(F8=GK.getClientRects()).length>1){F7=F8[GB=="right"?F8.length-1:0]}else{F7=GK.getBoundingClientRect()}}if(De&&K<9&&!GA&&(!F7||!F7.left&&!F7.right)){var GC=GK.parentNode.getClientRects()[0];if(GC){F7={left:GC.left,right:GC.left+DX(GD.display),top:GC.top,bottom:GC.bottom}}else{F7=EV}}var GI=F7.top-GN.rect.top,GG=F7.bottom-GN.rect.top;var GQ=(GI+GG)/2;var GO=GN.view.measure.heights;for(var GM=0;GM<GO.length-1;GM++){if(GQ<GO[GM]){break}}var GJ=GM?GO[GM-1]:0,GH=GO[GM];var GE={left:(F6=="right"?F7.right:F7.left)-GN.rect.left,right:(F6=="left"?F7.left:F7.right)-GN.rect.left,top:GJ,bottom:GH};if(!F7.left&&!F7.right){GE.bogus=true}if(!GD.options.singleCursorHeightPerLine){GE.rtop=GI;GE.rbottom=GG}return GE}function Eh(F8,F9){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ah(F8)){return F9}var F7=screen.logicalXDPI/screen.deviceXDPI;var F6=screen.logicalYDPI/screen.deviceYDPI;return{left:F9.left*F7,right:F9.right*F7,top:F9.top*F6,bottom:F9.bottom*F6}}function AS(F7){if(F7.measure){F7.measure.cache={};F7.measure.heights=null;if(F7.rest){for(var F6=0;F6<F7.rest.length;F6++){F7.measure.caches[F6]={}}}}}function Ak(F6){F6.display.externalMeasure=null;Dv(F6.display.lineMeasure);for(var F7=0;F7<F6.display.view.length;F7++){AS(F6.display.view[F7])}}function AJ(F6){Ak(F6);F6.display.cachedCharWidth=F6.display.cachedTextHeight=F6.display.cachedPaddingH=null;if(!F6.options.lineWrapping){F6.display.maxLineChanged=true}F6.display.lineNumChars=null}function CT(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function CR(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ek(GC,F9,GB,F7){if(F9.widgets){for(var F8=0;F8<F9.widgets.length;++F8){if(F9.widgets[F8].above){var GE=Cv(F9.widgets[F8]);GB.top+=GE;GB.bottom+=GE}}}if(F7=="line"){return GB}if(!F7){F7="local"}var GA=Bk(F9);if(F7=="local"){GA+=E2(GC.display)}else{GA-=GC.display.viewOffset}if(F7=="page"||F7=="window"){var F6=GC.display.lineSpace.getBoundingClientRect();GA+=F6.top+(F7=="window"?0:CR());var GD=F6.left+(F7=="window"?0:CT());GB.left+=GD;GB.right+=GD}GB.top+=GA;GB.bottom+=GA;return GB}function F3(F7,GA,F8){if(F8=="div"){return GA}var GC=GA.left,GB=GA.top;if(F8=="page"){GC-=CT();GB-=CR()}else{if(F8=="local"||!F8){var F9=F7.display.sizer.getBoundingClientRect();GC+=F9.left;GB+=F9.top}}var F6=F7.display.lineSpace.getBoundingClientRect();return{left:GC-F6.left,top:GB-F6.top}}function Cg(F6,GA,F9,F8,F7){if(!F8){F8=E9(F6.doc,GA.line)}return Ek(F6,F8,EB(F6,F8,GA.ch,F7),F9)}function Do(GF,GE,F8,GC,GH,GD){GC=GC||E9(GF.doc,GE.line);if(!GH){GH=A0(GF,GC)}function GA(GK,GJ){var GI=d(GF,GH,GK,GJ?"right":"left",GD);if(GJ){GI.left=GI.right}else{GI.right=GI.left}return Ek(GF,GC,GI,F8)}function GG(GL,GI){var GJ=GB[GI],GK=GJ.level%2;if(GL==DS(GJ)&&GI&&GJ.level<GB[GI-1].level){GJ=GB[--GI];GL=F2(GJ)-(GJ.level%2?0:1);GK=true}else{if(GL==F2(GJ)&&GI<GB.length-1&&GJ.level<GB[GI+1].level){GJ=GB[++GI];GL=DS(GJ)-GJ.level%2;GK=false}}if(GK&&GL==GJ.to&&GL>GJ.from){return GA(GL-1)}return GA(GL,GK)}var GB=A(GC),F6=GE.ch;if(!GB){return GA(F6)}var F7=Ad(GB,F6);var F9=GG(F6,F7);if(Ew!=null){F9.other=GG(F6,Ew)}return F9}function Db(F6,GA){var F9=0,GA=Fe(F6.doc,GA);if(!F6.options.lineWrapping){F9=DX(F6.display)*GA.ch}var F7=E9(F6.doc,GA.line);var F8=Bk(F7)+E2(F6.display);return{left:F9,right:F9,top:F8,bottom:F8+F7.height}}function Fq(F6,F7,F8,GA){var F9=x(F6,F7);F9.xRel=GA;if(F8){F9.outside=true}return F9}function Fj(GD,GA,F9){var GC=GD.doc;F9+=GD.display.viewOffset;if(F9<0){return Fq(GC.first,0,true,-1)}var F8=Be(GC,F9),GE=GC.first+GC.size-1;if(F8>GE){return Fq(GC.first+GC.size-1,E9(GC,GE).text.length,true,1)}if(GA<0){GA=0}var F7=E9(GC,F8);for(;;){var GF=Cw(GD,F7,F8,GA,F9);var GB=EP(F7);var F6=GB&&GB.find(0,true);if(GB&&(GF.ch>F6.from.ch||GF.ch==F6.from.ch&&GF.xRel>0)){F8=Bl(F7=F6.to.line)}else{return GF}}}function Cw(GG,F8,GJ,GI,GH){var GF=GH-Bk(F8);var GC=false,GP=2*GG.display.wrapper.clientWidth;var GM=A0(GG,F8);function GT(GV){var GW=Do(GG,x(GJ,GV),"line",F8,GM);GC=true;if(GF>GW.bottom){return GW.left-GP}else{if(GF<GW.top){return GW.left+GP}else{GC=false}}return GW.left}var GL=A(F8),GO=F8.text.length;var GQ=Cc(F8),F9=Cp(F8);var GN=GT(GQ),F6=GC,F7=GT(F9),GB=GC;if(GI>F7){return Fq(GJ,F9,GB,1)}for(;;){if(GL?F9==GQ||F9==U(F8,GQ,1):F9-GQ<=1){var GK=GI<GN||GI-GN<=F7-GI?GQ:F9;var GS=GI-(GK==GQ?GN:F7);while(FK(F8.text.charAt(GK))){++GK}var GE=Fq(GJ,GK,GK==GQ?F6:GB,GS<-1?-1:GS>1?1:0);return GE}var GD=Math.ceil(GO/2),GU=GQ+GD;if(GL){GU=GQ;for(var GR=0;GR<GD;++GR){GU=U(F8,GU,1)}}var GA=GT(GU);if(GA>GI){F9=GU;F7=GA;if(GB=GC){F7+=1000}GO=GD}else{GQ=GU;GN=GA;F6=GC;GO-=GD}}}var Ae;function At(F8){if(F8.cachedTextHeight!=null){return F8.cachedTextHeight}if(Ae==null){Ae=Fr("pre");for(var F7=0;F7<49;++F7){Ae.appendChild(document.createTextNode("x"));Ae.appendChild(Fr("br"))}Ae.appendChild(document.createTextNode("x"))}Bp(F8.measure,Ae);var F6=Ae.offsetHeight/50;if(F6>3){F8.cachedTextHeight=F6}Dv(F8.measure);return F6||1}function DX(GA){if(GA.cachedCharWidth!=null){return GA.cachedCharWidth}var F6=Fr("span","xxxxxxxxxx");var F9=Fr("pre",[F6]);Bp(GA.measure,F9);var F8=F6.getBoundingClientRect(),F7=(F8.right-F8.left)/10;if(F7>2){GA.cachedCharWidth=F7}return F7||10}var BN=null;var D2=0;function Cf(F6){F6.curOp={cm:F6,viewChanged:false,startHeight:F6.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++D2};if(BN){BN.ops.push(F6.curOp)}else{F6.curOp.ownsGroup=BN={ops:[F6.curOp],delayedCallbacks:[]}}}function Cr(F9){var F8=F9.delayedCallbacks,F7=0;do{for(;F7<F8.length;F7++){F8[F7]()}for(var F6=0;F6<F9.ops.length;F6++){var GA=F9.ops[F6];if(GA.cursorActivityHandlers){while(GA.cursorActivityCalled<GA.cursorActivityHandlers.length){GA.cursorActivityHandlers[GA.cursorActivityCalled++](GA.cm)}}}}while(F7<F8.length)}function AL(F6){var F9=F6.curOp,F8=F9.ownsGroup;if(!F8){return }try{Cr(F8)}finally{BN=null;for(var F7=0;F7<F8.ops.length;F7++){F8.ops[F7].cm.curOp=null}Ch(F8)}}function Ch(F8){var F7=F8.ops;for(var F6=0;F6<F7.length;F6++){B3(F7[F6])}for(var F6=0;F6<F7.length;F6++){AP(F7[F6])}for(var F6=0;F6<F7.length;F6++){B0(F7[F6])}for(var F6=0;F6<F7.length;F6++){AO(F7[F6])}for(var F6=0;F6<F7.length;F6++){Eu(F7[F6])}}function B3(F8){var F6=F8.cm,F7=F6.display;k(F6);if(F8.updateMaxLine){G(F6)}F8.mustUpdate=F8.viewChanged||F8.forceUpdate||F8.scrollTop!=null||F8.scrollToPos&&(F8.scrollToPos.from.line<F7.viewFrom||F8.scrollToPos.to.line>=F7.viewTo)||F7.maxLineChanged&&F6.options.lineWrapping;F8.update=F8.mustUpdate&&new Af(F6,F8.mustUpdate&&{top:F8.scrollTop,ensure:F8.scrollToPos},F8.forceUpdate)}function AP(F6){F6.updatedDisplay=F6.mustUpdate&&c(F6.cm,F6.update)}function B0(F8){var F6=F8.cm,F7=F6.display;if(F8.updatedDisplay){A5(F6)}F8.barMeasure=DU(F6);if(F7.maxLineChanged&&!F6.options.lineWrapping){F8.adjustWidthTo=EB(F6,F7.maxLine,F7.maxLine.text.length).left+3;F6.display.sizerWidth=F8.adjustWidthTo;F8.barMeasure.scrollWidth=Math.max(F7.scroller.clientWidth,F7.sizer.offsetLeft+F8.adjustWidthTo+Cq(F6)+F6.display.barWidth);F8.maxScrollLeft=Math.max(0,F7.sizer.offsetLeft+F8.adjustWidthTo-DH(F6))}if(F8.updatedDisplay||F8.selectionChanged){F8.newSelectionNodes=BJ(F6)}}function AO(F7){var F6=F7.cm;if(F7.adjustWidthTo!=null){F6.display.sizer.style.minWidth=F7.adjustWidthTo+"px";if(F7.maxScrollLeft<F6.doc.scrollLeft){Bc(F6,Math.min(F6.display.scroller.scrollLeft,F7.maxScrollLeft),true)}F6.display.maxLineChanged=false}if(F7.newSelectionNodes){AK(F6,F7.newSelectionNodes)}if(F7.updatedDisplay){DT(F6,F7.barMeasure)}if(F7.updatedDisplay||F7.startHeight!=F6.doc.height){Es(F6,F7.barMeasure)}if(F7.selectionChanged){O(F6)}if(F6.state.focused&&F7.updateInput){FJ(F6,F7.typing)}}function Eu(GD){var F6=GD.cm,GB=F6.display,GA=F6.doc;if(GD.updatedDisplay){CI(F6,GD.update)}if(GB.wheelStartX!=null&&(GD.scrollTop!=null||GD.scrollLeft!=null||GD.scrollToPos)){GB.wheelStartX=GB.wheelStartY=null}if(GD.scrollTop!=null&&(GB.scroller.scrollTop!=GD.scrollTop||GD.forceScroll)){GA.scrollTop=Math.max(0,Math.min(GB.scroller.scrollHeight-GB.scroller.clientHeight,GD.scrollTop));GB.scrollbars.setScrollTop(GA.scrollTop);GB.scroller.scrollTop=GA.scrollTop}if(GD.scrollLeft!=null&&(GB.scroller.scrollLeft!=GD.scrollLeft||GD.forceScroll)){GA.scrollLeft=Math.max(0,Math.min(GB.scroller.scrollWidth-DH(F6),GD.scrollLeft));GB.scrollbars.setScrollLeft(GA.scrollLeft);GB.scroller.scrollLeft=GA.scrollLeft;EY(F6)}if(GD.scrollToPos){var F9=e(F6,Fe(GA,GD.scrollToPos.from),Fe(GA,GD.scrollToPos.to),GD.scrollToPos.margin);if(GD.scrollToPos.isCursor&&F6.state.focused){D0(F6,F9)}}var F8=GD.maybeHiddenMarkers,GC=GD.maybeUnhiddenMarkers;if(F8){for(var F7=0;F7<F8.length;++F7){if(!F8[F7].lines.length){Ab(F8[F7],"hide")}}}if(GC){for(var F7=0;F7<GC.length;++F7){if(GC[F7].lines.length){Ab(GC[F7],"unhide")}}}if(GB.wrapper.offsetHeight){GA.scrollTop=F6.display.scroller.scrollTop}if(GD.changeObjs){Ab(F6,"changes",F6,GD.changeObjs)}}function Cj(F6,F7){if(F6.curOp){return F7()}Cf(F6);try{return F7()}finally{AL(F6)}}function Cz(F6,F7){return function(){if(F6.curOp){return F7.apply(F6,arguments)}Cf(F6);try{return F7.apply(F6,arguments)}finally{AL(F6)}}}function C5(F6){return function(){if(this.curOp){return F6.apply(this,arguments)}Cf(this);try{return F6.apply(this,arguments)}finally{AL(this)}}}function Cb(F6){return function(){var F7=this.cm;if(!F7||F7.curOp){return F6.apply(this,arguments)}Cf(F7);try{return F6.apply(this,arguments)}finally{AL(F7)}}}function BT(F8,F6,F7){this.line=F6;this.rest=H(F6);this.size=this.rest?Bl(Fc(this.rest))-F7+1:1;this.node=this.text=null;this.hidden=FR(F8,F6)}function Ep(F6,GC,GB){var GA=[],F8;for(var F9=GC;F9<GB;F9=F8){var F7=new BT(F6.doc,E9(F6.doc,F9),F9);F8=F9+F7.size;GA.push(F7)}return GA}function AG(GD,GB,GC,GE){if(GB==null){GB=GD.doc.first}if(GC==null){GC=GD.doc.first+GD.doc.size}if(!GE){GE=0}var F8=GD.display;if(GE&&GC<F8.viewTo&&(F8.updateLineNumbers==null||F8.updateLineNumbers>GB)){F8.updateLineNumbers=GB}GD.curOp.viewChanged=true;if(GB>=F8.viewTo){if(A3&&As(GD.doc,GB)<F8.viewTo){EQ(GD)}}else{if(GC<=F8.viewFrom){if(A3&&Dx(GD.doc,GC+GE)>F8.viewFrom){EQ(GD)}else{F8.viewFrom+=GE;F8.viewTo+=GE}}else{if(GB<=F8.viewFrom&&GC>=F8.viewTo){EQ(GD)}else{if(GB<=F8.viewFrom){var GA=DB(GD,GC,GC+GE,1);if(GA){F8.view=F8.view.slice(GA.index);F8.viewFrom=GA.lineN;F8.viewTo+=GE}else{EQ(GD)}}else{if(GC>=F8.viewTo){var GA=DB(GD,GB,GB,-1);if(GA){F8.view=F8.view.slice(0,GA.index);F8.viewTo=GA.lineN}else{EQ(GD)}}else{var F9=DB(GD,GB,GB,-1);var F7=DB(GD,GC,GC+GE,1);if(F9&&F7){F8.view=F8.view.slice(0,F9.index).concat(Ep(GD,F9.lineN,F7.lineN)).concat(F8.view.slice(F7.index));F8.viewTo+=GE}else{EQ(GD)}}}}}}var F6=F8.externalMeasured;if(F6){if(GC<F6.lineN){F6.lineN+=GE}else{if(GB<F6.lineN+F6.size){F8.externalMeasured=null}}}}function s(F7,F8,GB){F7.curOp.viewChanged=true;var GC=F7.display,GA=F7.display.externalMeasured;if(GA&&F8>=GA.lineN&&F8<GA.lineN+GA.size){GC.externalMeasured=null}if(F8<GC.viewFrom||F8>=GC.viewTo){return }var F9=GC.view[DM(F7,F8)];if(F9.node==null){return }var F6=F9.changes||(F9.changes=[]);if(DE(F6,GB)==-1){F6.push(GB)}}function EQ(F6){F6.display.viewFrom=F6.display.viewTo=F6.doc.first;F6.display.view=[];F6.display.viewOffset=0}function DM(F6,F9){if(F9>=F6.display.viewTo){return null}F9-=F6.display.viewFrom;if(F9<0){return null}var F7=F6.display.view;for(var F8=0;F8<F7.length;F8++){F9-=F7[F8].size;if(F9<0){return F8}}}function DB(GE,F8,GA,F7){var GB=DM(GE,F8),GD,GC=GE.display.view;if(!A3||GA==GE.doc.first+GE.doc.size){return{index:GB,lineN:GA}}for(var F9=0,F6=GE.display.viewFrom;F9<GB;F9++){F6+=GC[F9].size}if(F6!=F8){if(F7>0){if(GB==GC.length-1){return null}GD=(F6+GC[GB].size)-F8;GB++}else{GD=F6-F8}F8+=GD;GA+=GD}while(As(GE.doc,GA)!=GA){if(GB==(F7<0?0:GC.length-1)){return null}GA+=F7*GC[GB-(F7<0?1:0)].size;GB+=F7}return{index:GB,lineN:GA}}function Co(F6,GA,F9){var F8=F6.display,F7=F8.view;if(F7.length==0||GA>=F8.viewTo||F9<=F8.viewFrom){F8.view=Ep(F6,GA,F9);F8.viewFrom=GA}else{if(F8.viewFrom>GA){F8.view=Ep(F6,GA,F8.viewFrom).concat(F8.view)}else{if(F8.viewFrom<GA){F8.view=F8.view.slice(DM(F6,GA))}}F8.viewFrom=GA;if(F8.viewTo<F9){F8.view=F8.view.concat(Ep(F6,F8.viewTo,F9))}else{if(F8.viewTo>F9){F8.view=F8.view.slice(0,DM(F6,F9))}}}F8.viewTo=F9}function C8(F6){var F7=F6.display.view,GA=0;for(var F9=0;F9<F7.length;F9++){var F8=F7[F9];if(!F8.hidden&&(!F8.node||F8.changes)){++GA}}return GA}function BK(F6){if(F6.display.pollingFast){return }F6.display.poll.set(F6.options.pollInterval,function(){CF(F6);if(F6.state.focused){BK(F6)}})}function b(F6){var F7=false;F6.display.pollingFast=true;function F8(){var F9=CF(F6);if(!F9&&!F7){F7=true;F6.display.poll.set(60,F8)}else{F6.display.pollingFast=false;BK(F6)}}F6.display.poll.set(20,F8)}var BI=null;function CF(GA){var GB=GA.display.input,GE=GA.display.prevInput,GP=GA.doc;if(!GA.state.focused||(BQ(GB)&&!GE)||AI(GA)||GA.options.disableInput||GA.state.keySeq){return false}if(GA.state.pasteIncoming&&GA.state.fakedLastChar){GB.value=GB.value.substring(0,GB.value.length-1);GA.state.fakedLastChar=false}var GD=GB.value;if(GD==GE&&!GA.somethingSelected()){return false}if(De&&K>=9&&GA.display.inputHasSelection===GD||B5&&/[\uf700-\uf7ff]/.test(GD)){FJ(GA);return false}var GL=!GA.curOp;if(GL){Cf(GA)}GA.display.shift=false;if(GD.charCodeAt(0)==8203&&GP.sel==GA.display.selForContextMenu&&!GE){GE="\u200b"}var GK=0,GH=Math.min(GE.length,GD.length);while(GK<GH&&GE.charCodeAt(GK)==GD.charCodeAt(GK)){++GK}var F7=GD.slice(GK),GF=Aw(F7);var GO=null;if(GA.state.pasteIncoming&&GP.sel.ranges.length>1){if(BI&&BI.join("\n")==F7){GO=GP.sel.ranges.length%BI.length==0&&Bq(BI,Aw)}else{if(GF.length==GP.sel.ranges.length){GO=Bq(GF,function(GQ){return[GQ]})}}}for(var GM=GP.sel.ranges.length-1;GM>=0;GM--){var GG=GP.sel.ranges[GM];var GI=GG.from(),F6=GG.to();if(GK<GE.length){GI=x(GI.line,GI.ch-(GE.length-GK))}else{if(GA.state.overwrite&&GG.empty()&&!GA.state.pasteIncoming){F6=x(F6.line,Math.min(E9(GP,F6.line).text.length,F6.ch+Fc(GF).length))}}var F9=GA.curOp.updateInput;var GN={from:GI,to:F6,text:GO?GO[GM%GO.length]:GF,origin:GA.state.pasteIncoming?"paste":GA.state.cutIncoming?"cut":"+input"};BC(GA.doc,GN);AD(GA,"inputRead",GA,GN);if(F7&&!GA.state.pasteIncoming&&GA.options.electricChars&&GA.options.smartIndent&&GG.head.ch<100&&(!GM||GP.sel.ranges[GM-1].head.line!=GG.head.line)){var GC=GA.getModeAt(GG.head);var F8=Cu(GN);if(GC.electricChars){for(var GJ=0;GJ<GC.electricChars.length;GJ++){if(F7.indexOf(GC.electricChars.charAt(GJ))>-1){AC(GA,F8.line,"smart");break}}}else{if(GC.electricInput){if(GC.electricInput.test(E9(GP,F8.line).text.slice(0,F8.ch))){AC(GA,F8.line,"smart")}}}}}Fb(GA);GA.curOp.updateInput=F9;GA.curOp.typing=true;if(GD.length>1000||GD.indexOf("\n")>-1){GB.value=GA.display.prevInput=""}else{GA.display.prevInput=GD}if(GL){AL(GA)}GA.state.pasteIncoming=GA.state.cutIncoming=false;return true}function FJ(F6,GA){if(F6.display.contextMenuPending){return }var F7,F9,GC=F6.doc;if(F6.somethingSelected()){F6.display.prevInput="";var F8=GC.sel.primary();F7=C7&&(F8.to().line-F8.from().line>100||(F9=F6.getSelection()).length>1000);var GB=F7?"-":F9||F6.getSelection();F6.display.input.value=GB;if(F6.state.focused){Df(F6.display.input)}if(De&&K>=9){F6.display.inputHasSelection=GB}}else{if(!GA){F6.display.prevInput=F6.display.input.value="";if(De&&K>=9){F6.display.inputHasSelection=null}}}F6.display.inaccurateSelection=F7}function ET(F6){if(F6.options.readOnly!="nocursor"&&(!EA||Di()!=F6.display.input)){F6.display.input.focus()}}function R(F6){if(!F6.state.focused){ET(F6);CZ(F6)}}function AI(F6){return F6.options.readOnly||F6.doc.cantEdit}function Fk(F6){var F8=F6.display;Bv(F8.scroller,"mousedown",Cz(F6,EN));if(De&&K<11){Bv(F8.scroller,"dblclick",Cz(F6,function(GB){if(An(F6,GB)){return }var GC=CM(F6,GB);if(!GC||L(F6,GB)||A6(F6.display,GB)){return }Cd(GB);var GA=F6.findWordAt(GC);Fo(F6.doc,GA.anchor,GA.head)}))}else{Bv(F8.scroller,"dblclick",function(GA){An(F6,GA)||Cd(GA)})}Bv(F8.lineSpace,"selectstart",function(GA){if(!A6(F8,GA)){Cd(GA)}});if(!Fy){Bv(F8.scroller,"contextmenu",function(GA){AW(F6,GA)})}Bv(F8.scroller,"scroll",function(){if(F8.scroller.clientHeight){o(F6,F8.scroller.scrollTop);Bc(F6,F8.scroller.scrollLeft,true);Ab(F6,"scroll",F6)}});Bv(F8.scroller,"mousewheel",function(GA){B(F6,GA)});Bv(F8.scroller,"DOMMouseScroll",function(GA){B(F6,GA)});Bv(F8.wrapper,"scroll",function(){F8.wrapper.scrollTop=F8.wrapper.scrollLeft=0});Bv(F8.input,"keyup",function(GA){BE.call(F6,GA)});Bv(F8.input,"input",function(){if(De&&K>=9&&F6.display.inputHasSelection){F6.display.inputHasSelection=null}CF(F6)});Bv(F8.input,"keydown",Cz(F6,P));Bv(F8.input,"keypress",Cz(F6,CW));Bv(F8.input,"focus",CU(CZ,F6));Bv(F8.input,"blur",CU(Ar,F6));function F7(GA){if(!An(F6,GA)){EL(GA)}}if(F6.options.dragDrop){Bv(F8.scroller,"dragstart",function(GA){r(F6,GA)});Bv(F8.scroller,"dragenter",F7);Bv(F8.scroller,"dragover",F7);Bv(F8.scroller,"drop",Cz(F6,BG))}Bv(F8.scroller,"paste",function(GA){if(A6(F8,GA)){return }F6.state.pasteIncoming=true;ET(F6);b(F6)});Bv(F8.input,"paste",function(){if(Cx&&!F6.state.fakedLastChar&&!(new Date-F6.state.lastMiddleDown<200)){var GB=F8.input.selectionStart,GA=F8.input.selectionEnd;F8.input.value+="$";F8.input.selectionEnd=GA;F8.input.selectionStart=GB;F6.state.fakedLastChar=true}F6.state.pasteIncoming=true;b(F6)});function F9(GE){if(F6.somethingSelected()){BI=F6.getSelections();if(F8.inaccurateSelection){F8.prevInput="";F8.inaccurateSelection=false;F8.input.value=BI.join("\n");Df(F8.input)}}else{var GF=[],GB=[];for(var GC=0;GC<F6.doc.sel.ranges.length;GC++){var GA=F6.doc.sel.ranges[GC].head.line;var GD={anchor:x(GA,0),head:x(GA+1,0)};GB.push(GD);GF.push(F6.getRange(GD.anchor,GD.head))}if(GE.type=="cut"){F6.setSelections(GB,null,z)}else{F8.prevInput="";F8.input.value=GF.join("\n");Df(F8.input)}BI=GF}if(GE.type=="cut"){F6.state.cutIncoming=true}}Bv(F8.input,"cut",F9);Bv(F8.input,"copy",F9);if(A7){Bv(F8.sizer,"mouseup",function(){if(Di()==F8.input){F8.input.blur()}ET(F6)})}}function Ap(F6){var F7=F6.display;if(F7.lastWrapHeight==F7.wrapper.clientHeight&&F7.lastWrapWidth==F7.wrapper.clientWidth){return }F7.cachedCharWidth=F7.cachedTextHeight=F7.cachedPaddingH=null;F7.scrollbarsClipped=false;F6.setSize()}function A6(F7,F6){for(var F8=m(F6);F8!=F7.wrapper;F8=F8.parentNode){if(!F8||(F8.nodeType==1&&F8.getAttribute("cm-ignore-events")=="true")||(F8.parentNode==F7.sizer&&F8!=F7.mover)){return true}}}function CM(GF,GA,F7,F8){var GB=GF.display;if(!F7&&m(GA).getAttribute("not-content")=="true"){return null}var GE,GC,F6=GB.lineSpace.getBoundingClientRect();try{GE=GA.clientX-F6.left;GC=GA.clientY-F6.top}catch(GA){return null}var GD=Fj(GF,GE,GC),GG;if(F8&&GD.xRel==1&&(GG=E9(GF.doc,GD.line).text).length==GD.ch){var F9=Br(GG,GG.length,GF.options.tabSize)-GG.length;GD=x(GD.line,Math.max(0,Math.round((GE-Ez(GF.display).left)/DX(GF.display))-F9))}return GD}function EN(F8){if(An(this,F8)){return }var F6=this,F7=F6.display;F7.shift=F8.shiftKey;if(A6(F7,F8)){if(!Cx){F7.scroller.draggable=false;setTimeout(function(){F7.scroller.draggable=true},100)}return }if(L(F6,F8)){return }var F9=CM(F6,F8);window.focus();switch(Fi(F8)){case 1:if(F9){AV(F6,F8,F9)}else{if(m(F8)==F7.scroller){Cd(F8)}}break;case 2:if(Cx){F6.state.lastMiddleDown=+new Date}if(F9){Fo(F6.doc,F9)}setTimeout(CU(ET,F6),20);Cd(F8);break;case 3:if(Fy){AW(F6,F8)}break}}var DJ,DA;function AV(F7,GC,GD){setTimeout(CU(R,F7),0);var F8=+new Date,GA;if(DA&&DA.time>F8-400&&CD(DA.pos,GD)==0){GA="triple"}else{if(DJ&&DJ.time>F8-400&&CD(DJ.pos,GD)==0){GA="double";DA={time:F8,pos:GD}}else{GA="single";DJ={time:F8,pos:GD}}}var GB=F7.doc.sel,F6=B5?GC.metaKey:GC.ctrlKey,F9;if(F7.options.dragDrop&&Ef&&!AI(F7)&&GA=="single"&&(F9=GB.contains(GD))>-1&&!GB.ranges[F9].empty()){Az(F7,GC,GD,F6)}else{M(F7,GC,GD,GA,F6)}}function Az(F8,GA,GB,F7){var F9=F8.display;var F6=Cz(F8,function(GC){if(Cx){F9.scroller.draggable=false}F8.state.draggingText=false;D7(document,"mouseup",F6);D7(F9.scroller,"drop",F6);if(Math.abs(GA.clientX-GC.clientX)+Math.abs(GA.clientY-GC.clientY)<10){Cd(GC);if(!F7){Fo(F8.doc,GB)}ET(F8);if(De&&K==9){setTimeout(function(){document.body.focus();ET(F8)},20)}}});if(Cx){F9.scroller.draggable=true}F8.state.draggingText=F6;if(F9.scroller.dragDrop){F9.scroller.dragDrop()}Bv(document,"mouseup",F6);Bv(F9.scroller,"drop",F6)}function M(GA,GO,F9,F7,GC){var GL=GA.display,GQ=GA.doc;Cd(GO);var F8,GP,GB=GQ.sel,F6=GB.ranges;if(GC&&!GO.shiftKey){GP=GQ.sel.contains(F9);if(GP>-1){F8=F6[GP]}else{F8=new Ds(F9,F9)}}else{F8=GQ.sel.primary()}if(GO.altKey){F7="rect";if(!GC){F8=new Ds(F9,F9)}F9=CM(GA,GO,true,true);GP=-1}else{if(F7=="double"){var GM=GA.findWordAt(F9);if(GA.display.shift||GQ.extend){F8=FQ(GQ,F8,GM.anchor,GM.head)}else{F8=GM}}else{if(F7=="triple"){var GF=new Ds(x(F9.line,0),Fe(GQ,x(F9.line+1,0)));if(GA.display.shift||GQ.extend){F8=FQ(GQ,F8,GF.anchor,GF.head)}else{F8=GF}}else{F8=FQ(GQ,F8,F9)}}}if(!GC){GP=0;Bs(GQ,new Fs([F8],0),n);GB=GQ.sel}else{if(GP==-1){GP=F6.length;Bs(GQ,CV(F6.concat([F8]),GP),{scroll:false,origin:"*mouse"})}else{if(F6.length>1&&F6[GP].empty()&&F7=="single"){Bs(GQ,CV(F6.slice(0,GP).concat(F6.slice(GP+1)),0));GB=GQ.sel}else{E(GQ,GP,F8,n)}}}var GK=F9;function GJ(Gb){if(CD(GK,Gb)==0){return }GK=Gb;if(F7=="rect"){var GS=[],GY=GA.options.tabSize;var GR=Br(E9(GQ,F9.line).text,F9.ch,GY);var Ge=Br(E9(GQ,Gb.line).text,Gb.ch,GY);var GT=Math.min(GR,Ge),Gc=Math.max(GR,Ge);for(var Gf=Math.min(F9.line,Gb.line),GV=Math.min(GA.lastLine(),Math.max(F9.line,Gb.line));Gf<=GV;Gf++){var Gd=E9(GQ,Gf).text,GU=EK(Gd,GT,GY);if(GT==Gc){GS.push(new Ds(x(Gf,GU),x(Gf,GU)))}else{if(Gd.length>GU){GS.push(new Ds(x(Gf,GU),x(Gf,EK(Gd,Gc,GY))))}}}if(!GS.length){GS.push(new Ds(F9,F9))}Bs(GQ,CV(GB.ranges.slice(0,GP).concat(GS),GP),{origin:"*mouse",scroll:false});GA.scrollIntoView(Gb)}else{var GZ=F8;var GW=GZ.anchor,Ga=Gb;if(F7!="single"){if(F7=="double"){var GX=GA.findWordAt(Gb)}else{var GX=new Ds(x(Gb.line,0),Fe(GQ,x(Gb.line+1,0)))}if(CD(GX.anchor,GW)>0){Ga=GX.head;GW=AQ(GZ.from(),GX.anchor)}else{Ga=GX.anchor;GW=BV(GZ.to(),GX.head)}}var GS=GB.ranges.slice(0);GS[GP]=new Ds(Fe(GQ,GW),Ga);Bs(GQ,CV(GS,GP),n)}}var GH=GL.wrapper.getBoundingClientRect();var GD=0;function GN(GT){var GR=++GD;var GV=CM(GA,GT,true,F7=="rect");if(!GV){return }if(CD(GV,GK)!=0){R(GA);GJ(GV);var GU=B4(GL,GQ);if(GV.line>=GU.to||GV.line<GU.from){setTimeout(Cz(GA,function(){if(GD==GR){GN(GT)}}),150)}}else{var GS=GT.clientY<GH.top?-20:GT.clientY>GH.bottom?20:0;if(GS){setTimeout(Cz(GA,function(){if(GD!=GR){return }GL.scroller.scrollTop+=GS;GN(GT)}),50)}}}function GG(GR){GD=Infinity;Cd(GR);ET(GA);D7(document,"mousemove",GI);D7(document,"mouseup",GE);GQ.history.lastSelOrigin=null}var GI=Cz(GA,function(GR){if(!Fi(GR)){GG(GR)}else{GN(GR)}});var GE=Cz(GA,GG);Bv(document,"mousemove",GI);Bv(document,"mouseup",GE)}function F4(GH,GD,GF,GG,F9){try{var F7=GD.clientX,F6=GD.clientY}catch(GD){return false}if(F7>=Math.floor(GH.display.gutters.getBoundingClientRect().right)){return false}if(GG){Cd(GD)}var GE=GH.display;var GC=GE.lineDiv.getBoundingClientRect();if(F6>GC.bottom||!FC(GH,GF)){return Bj(GD)}F6-=GC.top-GE.viewOffset;for(var GA=0;GA<GH.options.gutters.length;++GA){var GB=GE.gutters.childNodes[GA];if(GB&&GB.getBoundingClientRect().right>=F7){var GI=Be(GH.doc,F6);var F8=GH.options.gutters[GA];F9(GH,GF,GH,GI,F8,GD);return Bj(GD)}}}function L(F6,F7){return F4(F6,F7,"gutterClick",true,AD)}var AF=0;function BG(GC){var GE=this;if(An(GE,GC)||A6(GE.display,GC)){return }Cd(GC);if(De){AF=+new Date}var GD=CM(GE,GC,true),F6=GC.dataTransfer.files;if(!GD||AI(GE)){return }if(F6&&F6.length&&window.FileReader&&window.File){var F8=F6.length,GF=Array(F8),F7=0;var GA=function(GI,GH){var GG=new FileReader;GG.onload=Cz(GE,function(){GF[GH]=GG.result;if(++F7==F8){GD=Fe(GE.doc,GD);var GJ={from:GD,to:GD,text:Aw(GF.join("\n")),origin:"paste"};BC(GE.doc,GJ);E1(GE.doc,Em(GD,Cu(GJ)))}});GG.readAsText(GI)};for(var GB=0;GB<F8;++GB){GA(F6[GB],GB)}}else{if(GE.state.draggingText&&GE.doc.sel.contains(GD)>-1){GE.state.draggingText(GC);setTimeout(CU(ET,GE),20);return }try{var GF=GC.dataTransfer.getData("Text");if(GF){if(GE.state.draggingText&&!(B5?GC.metaKey:GC.ctrlKey)){var F9=GE.listSelections()}EJ(GE.doc,Em(GD,GD));if(F9){for(var GB=0;GB<F9.length;++GB){Ax(GE.doc,"",F9[GB].anchor,F9[GB].head,"drag")}}GE.replaceSelection(GF,"around","paste");ET(GE)}}catch(GC){}}}function r(F6,F8){if(De&&(!F6.state.draggingText||+new Date-AF<100)){EL(F8);return }if(An(F6,F8)||A6(F6.display,F8)){return }F8.dataTransfer.setData("Text",F6.getSelection());if(F8.dataTransfer.setDragImage&&!AZ){var F7=Fr("img",null,null,"position: fixed; left: 0; top: 0;");F7.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(Dw){F7.width=F7.height=1;F6.display.wrapper.appendChild(F7);F7._top=F7.offsetTop}F8.dataTransfer.setDragImage(F7,0,0);if(Dw){F7.parentNode.removeChild(F7)}}}function o(F6,F7){if(Math.abs(F6.doc.scrollTop-F7)<2){return }F6.doc.scrollTop=F7;if(!CN){Dn(F6,{top:F7})}if(F6.display.scroller.scrollTop!=F7){F6.display.scroller.scrollTop=F7}F6.display.scrollbars.setScrollTop(F7);if(CN){Dn(F6)}D9(F6,100)}function Bc(F6,F8,F7){if(F7?F8==F6.doc.scrollLeft:Math.abs(F6.doc.scrollLeft-F8)<2){return }F8=Math.min(F8,F6.display.scroller.scrollWidth-F6.display.scroller.clientWidth);F6.doc.scrollLeft=F8;EY(F6);if(F6.display.scroller.scrollLeft!=F8){F6.display.scroller.scrollLeft=F8}F6.display.scrollbars.setScrollLeft(F8)}var FG=0,CE=null;if(De){CE=-0.53}else{if(CN){CE=15}else{if(C9){CE=-0.7}else{if(AZ){CE=-1/3}}}}var Cn=function(F8){var F7=F8.wheelDeltaX,F6=F8.wheelDeltaY;if(F7==null&&F8.detail&&F8.axis==F8.HORIZONTAL_AXIS){F7=F8.detail}if(F6==null&&F8.detail&&F8.axis==F8.VERTICAL_AXIS){F6=F8.detail}else{if(F6==null){F6=F8.wheelDelta}}return{x:F7,y:F6}};i.wheelEventPixels=function(F6){var F7=Cn(F6);F7.x*=CE;F7.y*=CE;return F7};function B(GE,F8){var GF=Cn(F8),GI=GF.x,GH=GF.y;var GA=GE.display,GD=GA.scroller;if(!(GI&&GD.scrollWidth>GD.clientWidth||GH&&GD.scrollHeight>GD.clientHeight)){return }if(GH&&B5&&Cx){outer:for(var GG=F8.target,GC=GA.view;GG!=GD;GG=GG.parentNode){for(var F7=0;F7<GC.length;F7++){if(GC[F7].node==GG){GE.display.currentWheelTarget=GG;break outer}}}}if(GI&&!CN&&!Dw&&CE!=null){if(GH){o(GE,Math.max(0,Math.min(GD.scrollTop+GH*CE,GD.scrollHeight-GD.clientHeight)))}Bc(GE,Math.max(0,Math.min(GD.scrollLeft+GI*CE,GD.scrollWidth-GD.clientWidth)));Cd(F8);GA.wheelStartX=null;return }if(GH&&CE!=null){var F6=GH*CE;var GB=GE.doc.scrollTop,F9=GB+GA.wrapper.clientHeight;if(F6<0){GB=Math.max(0,GB+F6-50)}else{F9=Math.min(GE.doc.height,F9+F6+50)}Dn(GE,{top:GB,bottom:F9})}if(FG<20){if(GA.wheelStartX==null){GA.wheelStartX=GD.scrollLeft;GA.wheelStartY=GD.scrollTop;GA.wheelDX=GI;GA.wheelDY=GH;setTimeout(function(){if(GA.wheelStartX==null){return }var GJ=GD.scrollLeft-GA.wheelStartX;var GL=GD.scrollTop-GA.wheelStartY;var GK=(GL&&GA.wheelDY&&GL/GA.wheelDY)||(GJ&&GA.wheelDX&&GJ/GA.wheelDX);GA.wheelStartX=GA.wheelStartY=null;if(!GK){return }CE=(CE*FG+GK)/(FG+1);++FG},200)}else{GA.wheelDX+=GI;GA.wheelDY+=GH}}}function Fl(F7,GA,F6){if(typeof GA=="string"){GA=EX[GA];if(!GA){return false}}if(F7.display.pollingFast&&CF(F7)){F7.display.pollingFast=false}var F9=F7.display.shift,F8=false;try{if(AI(F7)){F7.state.suppressEdits=true}if(F6){F7.display.shift=false}F8=GA(F7)!=B8}finally{F7.display.shift=F9;F7.state.suppressEdits=false}return F8}function D4(F7,F8,GA){for(var F9=0;F9<F7.state.keyMaps.length;F9++){var F6=I(F8,F7.state.keyMaps[F9],GA,F7);if(F6){return F6}}return(F7.options.extraKeys&&I(F8,F7.options.extraKeys,GA,F7))||I(F8,F7.options.keyMap,GA,F7)}var Dg=new F5;function A9(F7,F9,GB,GA){var F8=F7.state.keySeq;if(F8){if(EW(F9)){return"handled"}Dg.set(50,function(){if(F7.state.keySeq==F8){F7.state.keySeq=null;FJ(F7)}});F9=F8+" "+F9}var F6=D4(F7,F9,GA);if(F6=="multi"){F7.state.keySeq=F9}if(F6=="handled"){AD(F7,"keyHandled",F7,F9,GB)}if(F6=="handled"||F6=="multi"){Cd(GB);O(F7)}if(F8&&!F6&&/\'$/.test(F9)){Cd(GB);return true}return !!F6}function FD(F6,F8){var F7=FM(F8,true);if(!F7){return false}if(F8.shiftKey&&!F6.state.keySeq){return A9(F6,"Shift-"+F7,F8,function(F9){return Fl(F6,F9,true)})||A9(F6,F7,F8,function(F9){if(typeof F9=="string"?/^go[A-Z]/.test(F9):F9.motion){return Fl(F6,F9)}})}else{return A9(F6,F7,F8,function(F9){return Fl(F6,F9)})}}function ED(F6,F8,F7){return A9(F6,"'"+F7+"'",F8,function(F9){return Fl(F6,F9,true)})}var DI=null;function P(F9){var F6=this;R(F6);if(An(F6,F9)){return }if(De&&K<11&&F9.keyCode==27){F9.returnValue=false}var F7=F9.keyCode;F6.display.shift=F7==16||F9.shiftKey;var F8=FD(F6,F9);if(Dw){DI=F8?F7:null;if(!F8&&F7==88&&!C7&&(B5?F9.metaKey:F9.ctrlKey)){F6.replaceSelection("",null,"cut")}}if(F7==18&&!/\bCodeMirror-crosshair\b/.test(F6.display.lineDiv.className)){AT(F6)}}function AT(F7){var F8=F7.display.lineDiv;FV(F8,"CodeMirror-crosshair");function F6(F9){if(F9.keyCode==18||!F9.altKey){F(F8,"CodeMirror-crosshair");D7(document,"keyup",F6);D7(document,"mouseover",F6)}}Bv(document,"keyup",F6);Bv(document,"mouseover",F6)}function BE(F6){if(F6.keyCode==16){this.doc.sel.shift=false}An(this,F6)}function CW(GA){var F6=this;if(An(F6,GA)||GA.ctrlKey&&!GA.altKey||B5&&GA.metaKey){return }var F9=GA.keyCode,F7=GA.charCode;if(Dw&&F9==DI){DI=null;Cd(GA);return }if(((Dw&&(!GA.which||GA.which<10))||A7)&&FD(F6,GA)){return }var F8=String.fromCharCode(F7==null?F9:F7);if(ED(F6,GA,F8)){return }if(De&&K>=9){F6.display.inputHasSelection=null}b(F6)}function CZ(F6){if(F6.options.readOnly=="nocursor"){return }if(!F6.state.focused){Ab(F6,"focus",F6);F6.state.focused=true;FV(F6.display.wrapper,"CodeMirror-focused");if(!F6.curOp&&F6.display.selForContextMenu!=F6.doc.sel){FJ(F6);if(Cx){setTimeout(CU(FJ,F6,true),0)}}}BK(F6);O(F6)}function Ar(F6){if(F6.state.focused){Ab(F6,"blur",F6);F6.state.focused=false;F(F6.display.wrapper,"CodeMirror-focused")}clearInterval(F6.display.blinker);setTimeout(function(){if(!F6.state.focused){F6.display.shift=false}},150)}function AW(GF,GA){if(An(GF,GA,"contextmenu")){return }var GC=GF.display;if(A6(GC,GA)||DD(GF,GA)){return }var GE=CM(GF,GA),F6=GC.scroller.scrollTop;if(!GE||Dw){return }var F9=GF.options.resetSelectionOnContextMenu;if(F9&&GF.doc.sel.contains(GE)==-1){Cz(GF,Bs)(GF.doc,Em(GE),z)}var GB=GC.input.style.cssText;GC.inputDiv.style.position="absolute";GC.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(GA.clientY-5)+"px; left: "+(GA.clientX-5)+"px; z-index: 1000; background: "+(De?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(Cx){var GG=window.scrollY}ET(GF);if(Cx){window.scrollTo(null,GG)}FJ(GF);if(!GF.somethingSelected()){GC.input.value=GC.prevInput=" "}GC.contextMenuPending=true;GC.selForContextMenu=GF.doc.sel;clearTimeout(GC.detectingSelectAll);function F8(){if(GC.input.selectionStart!=null){var GH=GF.somethingSelected();var GI=GC.input.value="\u200b"+(GH?GC.input.value:"");GC.prevInput=GH?"":"\u200b";GC.input.selectionStart=1;GC.input.selectionEnd=GI.length;GC.selForContextMenu=GF.doc.sel}}function GD(){GC.contextMenuPending=false;GC.inputDiv.style.position="relative";GC.input.style.cssText=GB;if(De&&K<9){GC.scrollbars.setScrollTop(GC.scroller.scrollTop=F6)}BK(GF);if(GC.input.selectionStart!=null){if(!De||(De&&K<9)){F8()}var GH=0,GI=function(){if(GC.selForContextMenu==GF.doc.sel&&GC.input.selectionStart==0){Cz(GF,EX.selectAll)(GF)}else{if(GH++<10){GC.detectingSelectAll=setTimeout(GI,500)}else{FJ(GF)}}};GC.detectingSelectAll=setTimeout(GI,200)}}if(De&&K>=9){F8()}if(Fy){EL(GA);var F7=function(){D7(window,"mouseup",F7);setTimeout(GD,20)};Bv(window,"mouseup",F7)}else{setTimeout(GD,50)}}function DD(F6,F7){if(!FC(F6,"gutterContextMenu")){return false}return F4(F6,F7,"gutterContextMenu",false,Ab)}var Cu=i.changeEnd=function(F6){if(!F6.text){return F6.to}return x(F6.from.line+F6.text.length-1,Fc(F6.text).length+(F6.text.length==1?F6.from.ch:0))};function Bx(F9,F8){if(CD(F9,F8.from)<0){return F9}if(CD(F9,F8.to)<=0){return Cu(F8)}var F6=F9.line+F8.text.length-(F8.to.line-F8.from.line)-1,F7=F9.ch;if(F9.line==F8.to.line){F7+=Cu(F8).ch-F8.to.ch}return x(F6,F7)}function FE(F9,GA){var F7=[];for(var F8=0;F8<F9.sel.ranges.length;F8++){var F6=F9.sel.ranges[F8];F7.push(new Ds(Bx(F6.anchor,GA),Bx(F6.head,GA)))}return CV(F7,F9.sel.primIndex)}function BS(F8,F7,F6){if(F8.line==F7.line){return x(F6.line,F8.ch-F7.ch+F6.ch)}else{return x(F6.line+(F8.line-F7.line),F8.ch)}}function AE(GG,GD,F7){var F8=[];var F6=x(GG.first,0),GH=F6;for(var GA=0;GA<GD.length;GA++){var GC=GD[GA];var GF=BS(GC.from,F6,GH);var GE=BS(Cu(GC),F6,GH);F6=GC.to;GH=GE;if(F7=="around"){var GB=GG.sel.ranges[GA],F9=CD(GB.head,GB.anchor)<0;F8[GA]=new Ds(F9?GE:GF,F9?GF:GE)}else{F8[GA]=new Ds(GF,GF)}}return new Fs(F8,GG.sel.primIndex)}function Dl(F7,F9,F8){var F6={canceled:false,from:F9.from,to:F9.to,text:F9.text,origin:F9.origin,cancel:function(){this.canceled=true}};if(F8){F6.update=function(GD,GC,GB,GA){if(GD){this.from=Fe(F7,GD)}if(GC){this.to=Fe(F7,GC)}if(GB){this.text=GB}if(GA!==undefined){this.origin=GA}}}Ab(F7,"beforeChange",F7,F6);if(F7.cm){Ab(F7.cm,"beforeChange",F7.cm,F6)}if(F6.canceled){return null}return{from:F6.from,to:F6.to,text:F6.text,origin:F6.origin}}function BC(F9,GA,F8){if(F9.cm){if(!F9.cm.curOp){return Cz(F9.cm,BC)(F9,GA,F8)}if(F9.cm.state.suppressEdits){return }}if(FC(F9,"beforeChange")||F9.cm&&FC(F9.cm,"beforeChange")){GA=Dl(F9,GA,true);if(!GA){return }}var F7=F1&&!F8&&Ce(F9,GA.from,GA.to);if(F7){for(var F6=F7.length-1;F6>=0;--F6){l(F9,{from:F7[F6].from,to:F7[F6].to,text:F6?[""]:GA.text})}}else{l(F9,GA)}}function l(F8,F9){if(F9.text.length==1&&F9.text[0]==""&&CD(F9.from,F9.to)==0){return }var F7=FE(F8,F9);Fh(F8,F9,F7,F8.cm?F8.cm.curOp.id:NaN);D8(F8,F9,F7,EE(F8,F9));var F6=[];D1(F8,function(GB,GA){if(!GA&&DE(F6,GB.history)==-1){DY(GB.history,F9);F6.push(GB.history)}D8(GB,F9,null,EE(GB,F9))})}function B6(GH,GF,GJ){if(GH.cm&&GH.cm.state.suppressEdits){return }var GE=GH.history,F8,GA=GH.sel;var F6=GF=="undo"?GE.done:GE.undone,GI=GF=="undo"?GE.undone:GE.done;for(var GB=0;GB<F6.length;GB++){F8=F6[GB];if(GJ?F8.ranges&&!F8.equals(GH.sel):!F8.ranges){break}}if(GB==F6.length){return }GE.lastOrigin=GE.lastSelOrigin=null;for(;;){F8=F6.pop();if(F8.ranges){Ck(F8,GI);if(GJ&&!F8.equals(GH.sel)){Bs(GH,F8,{clearRedo:false});return }GA=F8}else{break}}var GD=[];Ck(GA,GI);GI.push({changes:GD,generation:GE.generation});GE.generation=F8.generation||++GE.maxGeneration;var F9=FC(GH,"beforeChange")||GH.cm&&FC(GH.cm,"beforeChange");for(var GB=F8.changes.length-1;GB>=0;--GB){var GG=F8.changes[GB];GG.origin=GF;if(F9&&!Dl(GH,GG,false)){F6.length=0;return }GD.push(DP(GH,GG));var F7=GB?FE(GH,GG):Fc(F6);D8(GH,GG,F7,D3(GH,GG));if(!GB&&GH.cm){GH.cm.scrollIntoView({from:GG.from,to:Cu(GG)})}var GC=[];D1(GH,function(GL,GK){if(!GK&&DE(GC,GL.history)==-1){DY(GL.history,GG);GC.push(GL.history)}D8(GL,GG,null,D3(GL,GG))})}}function FH(F7,F9){if(F9==0){return }F7.first+=F9;F7.sel=new Fs(Bq(F7.sel.ranges,function(GA){return new Ds(x(GA.anchor.line+F9,GA.anchor.ch),x(GA.head.line+F9,GA.head.ch))}),F7.sel.primIndex);if(F7.cm){AG(F7.cm,F7.first,F7.first-F9,F9);for(var F8=F7.cm.display,F6=F8.viewFrom;F6<F8.viewTo;F6++){s(F7.cm,F6,"gutter")}}}function D8(GA,GB,F9,F7){if(GA.cm&&!GA.cm.curOp){return Cz(GA.cm,D8)(GA,GB,F9,F7)}if(GB.to.line<GA.first){FH(GA,GB.text.length-1-(GB.to.line-GB.from.line));return }if(GB.from.line>GA.lastLine()){return }if(GB.from.line<GA.first){var F6=GB.text.length-1-(GA.first-GB.from.line);FH(GA,F6);GB={from:x(GA.first,0),to:x(GB.to.line+F6,GB.to.ch),text:[Fc(GB.text)],origin:GB.origin}}var F8=GA.lastLine();if(GB.to.line>F8){GB={from:GB.from,to:x(F8,E9(GA,F8).text.length),text:[GB.text[0]],origin:GB.origin}}GB.removed=Ft(GA,GB.from,GB.to);if(!F9){F9=FE(GA,GB)}if(GA.cm){Ag(GA.cm,GB,F7)}else{FT(GA,GB,F7)}EJ(GA,F9,z)}function Ag(GH,GD,GB){var GG=GH.doc,GC=GH.display,GE=GD.from,GF=GD.to;var F6=false,GA=GE.line;if(!GH.options.lineWrapping){GA=Bl(Y(E9(GG,GE.line)));GG.iter(GA,GF.line+1,function(GJ){if(GJ==GC.maxLine){F6=true;return true}})}if(GG.sel.contains(GD.from,GD.to)>-1){w(GH)}FT(GG,GD,GB,BA(GH));if(!GH.options.lineWrapping){GG.iter(GA,GE.line+GD.text.length,function(GK){var GJ=EH(GK);if(GJ>GC.maxLineLength){GC.maxLine=GK;GC.maxLineLength=GJ;GC.maxLineChanged=true;F6=false}});if(F6){GH.curOp.updateMaxLine=true}}GG.frontier=Math.min(GG.frontier,GE.line);D9(GH,400);var GI=GD.text.length-(GF.line-GE.line)-1;if(GD.full){AG(GH)}else{if(GE.line==GF.line&&GD.text.length==1&&!Dm(GH.doc,GD)){s(GH,GE.line,"text")}else{AG(GH,GE.line,GF.line+1,GI)}}var F8=FC(GH,"changes"),F9=FC(GH,"change");if(F9||F8){var F7={from:GE,to:GF,text:GD.text,removed:GD.removed,origin:GD.origin};if(F9){AD(GH,"change",GH,F7)}if(F8){(GH.curOp.changeObjs||(GH.curOp.changeObjs=[])).push(F7)}}GH.display.selForContextMenu=null}function Ax(F9,F8,GB,GA,F6){if(!GA){GA=GB}if(CD(GA,GB)<0){var F7=GA;GA=GB;GB=F7}if(typeof F8=="string"){F8=Aw(F8)}BC(F9,{from:GB,to:GA,text:F8,origin:F6})}function D0(F7,GA){if(An(F7,"scrollCursorIntoView")){return }var GB=F7.display,F8=GB.sizer.getBoundingClientRect(),F6=null;if(GA.top+F8.top<0){F6=true}else{if(GA.bottom+F8.top>(window.innerHeight||document.documentElement.clientHeight)){F6=false}}if(F6!=null&&!FP){var F9=Fr("div","\u200b",null,"position: absolute; top: "+(GA.top-GB.viewOffset-E2(F7.display))+"px; height: "+(GA.bottom-GA.top+Cq(F7)+GB.barHeight)+"px; left: "+GA.left+"px; width: 2px;");F7.display.lineSpace.appendChild(F9);F9.scrollIntoView(F6);F7.display.lineSpace.removeChild(F9)}}function e(GG,GE,GA,F9){if(F9==null){F9=0}for(var GB=0;GB<5;GB++){var GC=false,GF=Do(GG,GE);var F6=!GA||GA==GE?GF:Do(GG,GA);var F8=h(GG,Math.min(GF.left,F6.left),Math.min(GF.top,F6.top)-F9,Math.max(GF.left,F6.left),Math.max(GF.bottom,F6.bottom)+F9);var GD=GG.doc.scrollTop,F7=GG.doc.scrollLeft;if(F8.scrollTop!=null){o(GG,F8.scrollTop);if(Math.abs(GG.doc.scrollTop-GD)>1){GC=true}}if(F8.scrollLeft!=null){Bc(GG,F8.scrollLeft);if(Math.abs(GG.doc.scrollLeft-F7)>1){GC=true}}if(!GC){break}}return GF}function f(F6,F8,GA,F7,F9){var GB=h(F6,F8,GA,F7,F9);if(GB.scrollTop!=null){o(F6,GB.scrollTop)}if(GB.scrollLeft!=null){Bc(F6,GB.scrollLeft)}}function h(GI,F9,GH,F7,GG){var GE=GI.display,GC=At(GI.display);if(GH<0){GH=0}var GA=GI.curOp&&GI.curOp.scrollTop!=null?GI.curOp.scrollTop:GE.scroller.scrollTop;var GK=Cs(GI),GM={};if(GG-GH>GK){GG=GH+GK}var F8=GI.doc.height+Bg(GE);var F6=GH<GC,GD=GG>F8-GC;if(GH<GA){GM.scrollTop=F6?0:GH}else{if(GG>GA+GK){var GF=Math.min(GH,(GD?F8:GG)-GK);if(GF!=GA){GM.scrollTop=GF}}}var GL=GI.curOp&&GI.curOp.scrollLeft!=null?GI.curOp.scrollLeft:GE.scroller.scrollLeft;var GJ=DH(GI)-(GI.options.fixedGutter?GE.gutters.offsetWidth:0);var GB=F7-F9>GJ;if(GB){F7=F9+GJ}if(F9<10){GM.scrollLeft=0}else{if(F9<GL){GM.scrollLeft=Math.max(0,F9-(GB?0:10))}else{if(F7>GJ+GL-3){GM.scrollLeft=F7+(GB?0:10)-GJ}}}return GM}function Ci(F6,F8,F7){if(F8!=null||F7!=null){FX(F6)}if(F8!=null){F6.curOp.scrollLeft=(F6.curOp.scrollLeft==null?F6.doc.scrollLeft:F6.curOp.scrollLeft)+F8}if(F7!=null){F6.curOp.scrollTop=(F6.curOp.scrollTop==null?F6.doc.scrollTop:F6.curOp.scrollTop)+F7}}function Fb(F6){FX(F6);var F7=F6.getCursor(),F9=F7,F8=F7;if(!F6.options.lineWrapping){F9=F7.ch?x(F7.line,F7.ch-1):F7;F8=x(F7.line,F7.ch+1)}F6.curOp.scrollToPos={from:F9,to:F8,margin:F6.options.cursorScrollMargin,isCursor:true}}function FX(F6){var F8=F6.curOp.scrollToPos;if(F8){F6.curOp.scrollToPos=null;var GA=Db(F6,F8.from),F9=Db(F6,F8.to);var F7=h(F6,Math.min(GA.left,F9.left),Math.min(GA.top,F9.top)-F8.margin,Math.max(GA.right,F9.right),Math.max(GA.bottom,F9.bottom)+F8.margin);F6.scrollTo(F7.scrollLeft,F7.scrollTop)}}function AC(GJ,F9,GI,F8){var GH=GJ.doc,F7;if(GI==null){GI="add"}if(GI=="smart"){if(!GH.mode.indent){GI="prev"}else{F7=DV(GJ,F9)}}var GD=GJ.options.tabSize;var GK=E9(GH,F9),GC=Br(GK.text,null,GD);if(GK.stateAfter){GK.stateAfter=null}var F6=GK.text.match(/^\s*/)[0],GF;if(!F8&&!/\S/.test(GK.text)){GF=0;GI="not"}else{if(GI=="smart"){GF=GH.mode.indent(F7,GK.text.slice(F6.length),GK.text);if(GF==B8||GF>150){if(!F8){return }GI="prev"}}}if(GI=="prev"){if(F9>GH.first){GF=Br(E9(GH,F9-1).text,null,GD)}else{GF=0}}else{if(GI=="add"){GF=GC+GJ.options.indentUnit}else{if(GI=="subtract"){GF=GC-GJ.options.indentUnit}else{if(typeof GI=="number"){GF=GC+GI}}}}GF=Math.max(0,GF);var GG="",GE=0;if(GJ.options.indentWithTabs){for(var GA=Math.floor(GF/GD);GA;--GA){GE+=GD;GG+="\t"}}if(GE<GF){GG+=CO(GF-GE)}if(GG!=F6){Ax(GH,GG,x(F9,0),x(F9,F6.length),"+input")}else{for(var GA=0;GA<GH.sel.ranges.length;GA++){var GB=GH.sel.ranges[GA];if(GB.head.line==F9&&GB.head.ch<F6.length){var GE=x(F9,F6.length);E(GH,GA,new Ds(GE,GE));break}}}GK.stateAfter=null}function ES(F9,F8,F6,GB){var GA=F8,F7=F8;if(typeof F8=="number"){F7=E9(F9,C2(F9,F8))}else{GA=Bl(F8)}if(GA==null){return null}if(GB(F7,GA)&&F9.cm){s(F9.cm,GA,F6)}return F7}function Er(F6,GC){var F7=F6.doc.sel.ranges,GA=[];for(var F9=0;F9<F7.length;F9++){var F8=GC(F7[F9]);while(GA.length&&CD(F8.from,Fc(GA).to)<=0){var GB=GA.pop();if(CD(GB.from,F8.from)<0){F8.from=GB.from;break}}GA.push(F8)}Cj(F6,function(){for(var GD=GA.length-1;GD>=0;GD--){Ax(F6.doc,"",GA[GD].from,GA[GD].to,"+delete")}Fb(F6)})}function BU(GO,GA,GI,GH,GC){var GF=GA.line,GG=GA.ch,GN=GI;var F7=E9(GO,GF);var GL=true;function GM(){var GP=GF+GI;if(GP<GO.first||GP>=GO.first+GO.size){return(GL=false)}GF=GP;return F7=E9(GO,GP)}function GK(GQ){var GP=(GC?U:AH)(F7,GG,GI,true);if(GP==null){if(!GQ&&GM()){if(GC){GG=(GI<0?Cp:Cc)(F7)}else{GG=GI<0?F7.text.length:0}}else{return(GL=false)}}else{GG=GP}return true}if(GH=="char"){GK()}else{if(GH=="column"){GK(true)}else{if(GH=="word"||GH=="group"){var GJ=null,GD=GH=="group";var F6=GO.cm&&GO.cm.getHelper(GA,"wordChars");for(var GB=true;;GB=false){if(GI<0&&!GK(!GB)){break}var F8=F7.text.charAt(GG)||"\n";var F9=CY(F8,F6)?"w":GD&&F8=="\n"?"n":!GD||/\s/.test(F8)?null:"p";if(GD&&!GB&&!F9){F9="s"}if(GJ&&GJ!=F9){if(GI<0){GI=1;GK()}break}if(F9){GJ=F9}if(GI>0&&!GK(!GB)){break}}}}}var GE=Bt(GO,x(GF,GG),GN,true);if(!GL){GE.hitSide=true}return GE}function BO(GE,F9,F6,GD){var GC=GE.doc,GB=F9.left,GA;if(GD=="page"){var F8=Math.min(GE.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);GA=F9.top+F6*(F8-(F6<0?1.5:0.5)*At(GE.display))}else{if(GD=="line"){GA=F6>0?F9.bottom+3:F9.top-3}}for(;;){var F7=Fj(GE,GB,GA);if(!F7.outside){break}if(F6<0?GA<=0:GA>=GC.height){F7.hitSide=true;break}GA+=F6*5}return F7}i.prototype={constructor:i,focus:function(){window.focus();ET(this);b(this)},setOption:function(F8,F9){var F7=this.options,F6=F7[F8];if(F7[F8]==F9&&F8!="mode"){return }F7[F8]=F9;if(BB.hasOwnProperty(F8)){Cz(this,BB[F8])(this,F9,F6)}},getOption:function(F6){return this.options[F6]},getDoc:function(){return this.doc},addKeyMap:function(F7,F6){this.state.keyMaps[F6?"push":"unshift"](Fp(F7))},removeKeyMap:function(F7){var F8=this.state.keyMaps;for(var F6=0;F6<F8.length;++F6){if(F8[F6]==F7||F8[F6].name==F7){F8.splice(F6,1);return true}}},addOverlay:C5(function(F6,F7){var F8=F6.token?F6:i.getMode(this.options,F6);if(F8.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:F8,modeSpec:F6,opaque:F7&&F7.opaque});this.state.modeGen++;AG(this)}),removeOverlay:C5(function(F6){var F8=this.state.overlays;for(var F7=0;F7<F8.length;++F7){var F9=F8[F7].modeSpec;if(F9==F6||typeof F6=="string"&&F9.name==F6){F8.splice(F7,1);this.state.modeGen++;AG(this);return }}}),indentLine:C5(function(F8,F6,F7){if(typeof F6!="string"&&typeof F6!="number"){if(F6==null){F6=this.options.smartIndent?"smart":"prev"}else{F6=F6?"add":"subtract"}}if(B7(this.doc,F8)){AC(this,F8,F6,F7)}}),indentSelection:C5(function(GF){var F6=this.doc.sel.ranges,F9=-1;for(var GB=0;GB<F6.length;GB++){var GC=F6[GB];if(!GC.empty()){var GD=GC.from(),GE=GC.to();var F7=Math.max(F9,GD.line);F9=Math.min(this.lastLine(),GE.line-(GE.ch?0:1))+1;for(var GA=F7;GA<F9;++GA){AC(this,GA,GF)}var F8=this.doc.sel.ranges;if(GD.ch==0&&F6.length==F8.length&&F8[GB].from().ch>0){E(this.doc,GB,new Ds(GD,F8[GB].to()),z)}}else{if(GC.head.line>F9){AC(this,GC.head.line,GF,true);F9=GC.head.line;if(GB==this.doc.sel.primIndex){Fb(this)}}}}}),getTokenAt:function(F7,F6){return CP(this,F7,F6)},getLineTokens:function(F7,F6){return CP(this,x(F7),F6,true)},getTokenTypeAt:function(GD){GD=Fe(this.doc,GD);var F9=C3(this,E9(this.doc,GD.line));var GB=0,GC=(F9.length-1)/2,F8=GD.ch;var F7;if(F8==0){F7=F9[2]}else{for(;;){var F6=(GB+GC)>>1;if((F6?F9[F6*2-1]:0)>=F8){GC=F6}else{if(F9[F6*2+1]<F8){GB=F6+1}else{F7=F9[F6*2+2];break}}}}var GA=F7?F7.indexOf("cm-overlay "):-1;return GA<0?F7:GA==0?null:F7.slice(0,GA-1)},getModeAt:function(F7){var F6=this.doc.mode;if(!F6.innerMode){return F6}return i.innerMode(F6,this.getTokenAt(F7).state).mode},getHelper:function(F7,F6){return this.getHelpers(F7,F6)[0]},getHelpers:function(GD,F8){var F9=[];if(!FI.hasOwnProperty(F8)){return FI}var F6=FI[F8],GC=this.getModeAt(GD);if(typeof GC[F8]=="string"){if(F6[GC[F8]]){F9.push(F6[GC[F8]])}}else{if(GC[F8]){for(var F7=0;F7<GC[F8].length;F7++){var GB=F6[GC[F8][F7]];if(GB){F9.push(GB)}}}else{if(GC.helperType&&F6[GC.helperType]){F9.push(F6[GC.helperType])}else{if(F6[GC.name]){F9.push(F6[GC.name])}}}}for(var F7=0;F7<F6._global.length;F7++){var GA=F6._global[F7];if(GA.pred(GC,this)&&DE(F9,GA.val)==-1){F9.push(GA.val)}}return F9},getStateAfter:function(F7,F6){var F8=this.doc;F7=C2(F8,F7==null?F8.first+F8.size-1:F7);return DV(this,F7+1,F6)},cursorCoords:function(F9,F7){var F8,F6=this.doc.sel.primary();if(F9==null){F8=F6.head}else{if(typeof F9=="object"){F8=Fe(this.doc,F9)}else{F8=F9?F6.from():F6.to()}}return Do(this,F8,F7||"page")},charCoords:function(F7,F6){return Cg(this,Fe(this.doc,F7),F6||"page")},coordsChar:function(F6,F7){F6=F3(this,F6,F7||"page");return Fj(this,F6.left,F6.top)},lineAtHeight:function(F6,F7){F6=F3(this,{top:F6,left:0},F7||"page").top;return Be(this.doc,F6+this.display.viewOffset)},heightAtLine:function(F7,GA){var F6=false,F9=this.doc.first+this.doc.size-1;if(F7<this.doc.first){F7=this.doc.first}else{if(F7>F9){F7=F9;F6=true}}var F8=E9(this.doc,F7);return Ek(this,F8,{top:0,left:0},GA||"page").top+(F6?this.doc.height-Bk(F8):0)},defaultTextHeight:function(){return At(this.display)},defaultCharWidth:function(){return DX(this.display)},setGutterMarker:C5(function(F6,F7,F8){return ES(this.doc,F6,"gutter",function(F9){var GA=F9.gutterMarkers||(F9.gutterMarkers={});GA[F7]=F8;if(!F8&&Eo(GA)){F9.gutterMarkers=null}return true})}),clearGutter:C5(function(F8){var F6=this,F9=F6.doc,F7=F9.first;F9.iter(function(GA){if(GA.gutterMarkers&&GA.gutterMarkers[F8]){GA.gutterMarkers[F8]=null;s(F6,F7,"gutter");if(Eo(GA.gutterMarkers)){GA.gutterMarkers=null}}++F7})}),addLineWidget:C5(function(F8,F7,F6){return Bf(this,F8,F7,F6)}),removeLineWidget:function(F6){F6.clear()},lineInfo:function(F6){if(typeof F6=="number"){if(!B7(this.doc,F6)){return null}var F7=F6;F6=E9(this.doc,F6);if(!F6){return null}}else{var F7=Bl(F6);if(F7==null){return null}}return{line:F7,handle:F6,text:F6.text,gutterMarkers:F6.gutterMarkers,textClass:F6.textClass,bgClass:F6.bgClass,wrapClass:F6.wrapClass,widgets:F6.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(GB,F8,GD,F9,GF){var GA=this.display;GB=Do(this,Fe(this.doc,GB));var GC=GB.bottom,F7=GB.left;F8.style.position="absolute";F8.setAttribute("cm-ignore-events","true");GA.sizer.appendChild(F8);if(F9=="over"){GC=GB.top}else{if(F9=="above"||F9=="near"){var F6=Math.max(GA.wrapper.clientHeight,this.doc.height),GE=Math.max(GA.sizer.clientWidth,GA.lineSpace.clientWidth);if((F9=="above"||GB.bottom+F8.offsetHeight>F6)&&GB.top>F8.offsetHeight){GC=GB.top-F8.offsetHeight}else{if(GB.bottom+F8.offsetHeight<=F6){GC=GB.bottom}}if(F7+F8.offsetWidth>GE){F7=GE-F8.offsetWidth}}}F8.style.top=GC+"px";F8.style.left=F8.style.right="";if(GF=="right"){F7=GA.sizer.clientWidth-F8.offsetWidth;F8.style.right="0px"}else{if(GF=="left"){F7=0}else{if(GF=="middle"){F7=(GA.sizer.clientWidth-F8.offsetWidth)/2}}F8.style.left=F7+"px"}if(GD){f(this,F7,GC,F7+F8.offsetWidth,GC+F8.offsetHeight)}},triggerOnKeyDown:C5(P),triggerOnKeyPress:C5(CW),triggerOnKeyUp:BE,execCommand:function(F6){if(EX.hasOwnProperty(F6)){return EX[F6](this)}},findPosH:function(GC,F9,GA,F7){var F6=1;if(F9<0){F6=-1;F9=-F9}for(var F8=0,GB=Fe(this.doc,GC);F8<F9;++F8){GB=BU(this.doc,GB,F6,GA,F7);if(GB.hitSide){break}}return GB},moveH:C5(function(F7,F8){var F6=this;F6.extendSelectionsBy(function(F9){if(F6.display.shift||F6.doc.extend||F9.empty()){return BU(F6.doc,F9.head,F7,F8,F6.options.rtlMoveVisually)}else{return F7<0?F9.from():F9.to()}},Ct)}),deleteH:C5(function(F6,F7){var F8=this.doc.sel,F9=this.doc;if(F8.somethingSelected()){F9.replaceSelection("",null,"+delete")}else{Er(this,function(GB){var GA=BU(F9,GB.head,F6,F7,false);return F6<0?{from:GA,to:GB.head}:{from:GB.head,to:GA}})}}),findPosV:function(GB,F8,GC,GE){var F6=1,GA=GE;if(F8<0){F6=-1;F8=-F8}for(var F7=0,GD=Fe(this.doc,GB);F7<F8;++F7){var F9=Do(this,GD,"div");if(GA==null){GA=F9.left}else{F9.left=GA}GD=BO(this,F9,F6,GC);if(GD.hitSide){break}}return GD},moveV:C5(function(F7,F9){var F6=this,GB=this.doc,GA=[];var GC=!F6.display.shift&&!GB.extend&&GB.sel.somethingSelected();GB.extendSelectionsBy(function(GD){if(GC){return F7<0?GD.from():GD.to()}var GF=Do(F6,GD.head,"div");if(GD.goalColumn!=null){GF.left=GD.goalColumn}GA.push(GF.left);var GE=BO(F6,GF,F7,F9);if(F9=="page"&&GD==GB.sel.primary()){Ci(F6,null,Cg(F6,GE,"div").top-GF.top)}return GE},Ct);if(GA.length){for(var F8=0;F8<GB.sel.ranges.length;F8++){GB.sel.ranges[F8].goalColumn=GA[F8]}}}),findWordAt:function(GD){var GB=this.doc,F9=E9(GB,GD.line).text;var GC=GD.ch,F8=GD.ch;if(F9){var GA=this.getHelper(GD,"wordChars");if((GD.xRel<0||F8==F9.length)&&GC){--GC}else{++F8}var F7=F9.charAt(GC);var F6=CY(F7,GA)?function(GE){return CY(GE,GA)}:/\s/.test(F7)?function(GE){return/\s/.test(GE)}:function(GE){return !/\s/.test(GE)&&!CY(GE)};while(GC>0&&F6(F9.charAt(GC-1))){--GC}while(F8<F9.length&&F6(F9.charAt(F8))){++F8}}return new Ds(x(GD.line,GC),x(GD.line,F8))},toggleOverwrite:function(F6){if(F6!=null&&F6==this.state.overwrite){return }if(this.state.overwrite=!this.state.overwrite){FV(this.display.cursorDiv,"CodeMirror-overwrite")}else{F(this.display.cursorDiv,"CodeMirror-overwrite")}Ab(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return Di()==this.display.input},scrollTo:C5(function(F6,F7){if(F6!=null||F7!=null){FX(this)}if(F6!=null){this.curOp.scrollLeft=F6}if(F7!=null){this.curOp.scrollTop=F7}}),getScrollInfo:function(){var F6=this.display.scroller;return{left:F6.scrollLeft,top:F6.scrollTop,height:F6.scrollHeight-Cq(this)-this.display.barHeight,width:F6.scrollWidth-Cq(this)-this.display.barWidth,clientHeight:Cs(this),clientWidth:DH(this)}},scrollIntoView:C5(function(F7,F8){if(F7==null){F7={from:this.doc.sel.primary().head,to:null};if(F8==null){F8=this.options.cursorScrollMargin}}else{if(typeof F7=="number"){F7={from:x(F7,0),to:null}}else{if(F7.from==null){F7={from:F7,to:null}}}}if(!F7.to){F7.to=F7.from}F7.margin=F8||0;if(F7.from.line!=null){FX(this);this.curOp.scrollToPos=F7}else{var F6=h(this,Math.min(F7.from.left,F7.to.left),Math.min(F7.from.top,F7.to.top)-F7.margin,Math.max(F7.from.right,F7.to.right),Math.max(F7.from.bottom,F7.to.bottom)+F7.margin);this.scrollTo(F6.scrollLeft,F6.scrollTop)}}),setSize:C5(function(F9,F7){var F6=this;function F8(GB){return typeof GB=="number"||/^\d+$/.test(String(GB))?GB+"px":GB}if(F9!=null){F6.display.wrapper.style.width=F8(F9)}if(F7!=null){F6.display.wrapper.style.height=F8(F7)}if(F6.options.lineWrapping){Ak(this)}var GA=F6.display.viewFrom;F6.doc.iter(GA,F6.display.viewTo,function(GB){if(GB.widgets){for(var GC=0;GC<GB.widgets.length;GC++){if(GB.widgets[GC].noHScroll){s(F6,GA,"widget");break}}}++GA});F6.curOp.forceUpdate=true;Ab(F6,"refresh",this)}),operation:function(F6){return Cj(this,F6)},refresh:C5(function(){var F6=this.display.cachedTextHeight;AG(this);this.curOp.forceUpdate=true;AJ(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);C1(this);if(F6==null||Math.abs(F6-At(this.display))>0.5){y(this)}Ab(this,"refresh",this)}),swapDoc:C5(function(F7){var F6=this.doc;F6.cm=null;D5(this,F7);AJ(this);FJ(this);this.scrollTo(F7.scrollLeft,F7.scrollTop);this.curOp.forceScroll=true;AD(this,"swapDoc",this,F6);return F6}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};BW(i);var Ex=i.defaults={};var BB=i.optionHandlers={};function S(F6,F9,F8,F7){i.defaults[F6]=F9;if(F8){BB[F6]=F7?function(GA,GC,GB){if(GB!=CA){F8(GA,GC,GB)}}:F8}}var CA=i.Init={toString:function(){return"CodeMirror.Init"}};S("value","",function(F6,F7){F6.setValue(F7)},true);S("mode",null,function(F6,F7){F6.doc.modeOption=F7;BP(F6)},true);S("indentUnit",2,BP,true);S("indentWithTabs",false);S("smartIndent",true);S("tabSize",4,function(F6){EF(F6);AJ(F6);AG(F6)},true);S("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(F6,F7){F6.options.specialChars=new RegExp(F7.source+(F7.test("\t")?"":"|\t"),"g");F6.refresh()},true);S("specialCharPlaceholder",E6,function(F6){F6.refresh()},true);S("electricChars",true);S("rtlMoveVisually",!Al);S("wholeLineUpdateBefore",true);S("theme","default",function(F6){Cl(F6);DQ(F6)},true);S("keyMap","default",function(F6,GA,F7){var F8=Fp(GA);var F9=F7!=i.Init&&Fp(F7);if(F9&&F9.detach){F9.detach(F6,F8)}if(F8.attach){F8.attach(F6,F9||null)}});S("extraKeys",null);S("lineWrapping",false,Ea,true);S("gutters",[],function(F6){CC(F6.options);DQ(F6)},true);S("fixedGutter",true,function(F6,F7){F6.display.gutters.style.left=F7?Dr(F6.display)+"px":"0";F6.refresh()},true);S("coverGutterNextToScrollbar",false,function(F6){Es(F6)},true);S("scrollbarStyle","native",function(F6){Aa(F6);Es(F6);F6.display.scrollbars.setScrollTop(F6.doc.scrollTop);F6.display.scrollbars.setScrollLeft(F6.doc.scrollLeft)},true);S("lineNumbers",false,function(F6){CC(F6.options);DQ(F6)},true);S("firstLineNumber",1,DQ,true);S("lineNumberFormatter",function(F6){return F6},DQ,true);S("showCursorWhenSelecting",false,Ba,true);S("resetSelectionOnContextMenu",true);S("readOnly",false,function(F6,F7){if(F7=="nocursor"){Ar(F6);F6.display.input.blur();F6.display.disabled=true}else{F6.display.disabled=false;if(!F7){FJ(F6)}}});S("disableInput",false,function(F6,F7){if(!F7){FJ(F6)}},true);S("dragDrop",true);S("cursorBlinkRate",530);S("cursorScrollMargin",0);S("cursorHeight",1,Ba,true);S("singleCursorHeightPerLine",true,Ba,true);S("workTime",100);S("workDelay",100);S("flattenSpans",true,EF,true);S("addModeClass",false,EF,true);S("pollInterval",100);S("undoDepth",200,function(F6,F7){F6.doc.history.undoDepth=F7});S("historyEventDelay",1250);S("viewportMargin",10,function(F6){F6.refresh()},true);S("maxHighlightLength",10000,EF,true);S("moveInputWithCursor",true,function(F6,F7){if(!F7){F6.display.inputDiv.style.top=F6.display.inputDiv.style.left=0}});S("tabindex",null,function(F6,F7){F6.display.input.tabIndex=F7||""});S("autofocus",null);var DN=i.modes={},Ao=i.mimeModes={};i.defineMode=function(F6,F7){if(!i.defaults.mode&&F6!="null"){i.defaults.mode=F6}if(arguments.length>2){F7.dependencies=Array.prototype.slice.call(arguments,2)}DN[F6]=F7};i.defineMIME=function(F7,F6){Ao[F7]=F6};i.resolveMode=function(F6){if(typeof F6=="string"&&Ao.hasOwnProperty(F6)){F6=Ao[F6]}else{if(F6&&typeof F6.name=="string"&&Ao.hasOwnProperty(F6.name)){var F7=Ao[F6.name];if(typeof F7=="string"){F7={name:F7}}F6=CJ(F7,F6);F6.name=F7.name}else{if(typeof F6=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(F6)){return i.resolveMode("application/xml")}}}if(typeof F6=="string"){return{name:F6}}else{return F6||{name:"null"}}};i.getMode=function(F7,F6){var F6=i.resolveMode(F6);var F9=DN[F6.name];if(!F9){return i.getMode(F7,"text/plain")}var GA=F9(F7,F6);if(DK.hasOwnProperty(F6.name)){var F8=DK[F6.name];for(var GB in F8){if(!F8.hasOwnProperty(GB)){continue}if(GA.hasOwnProperty(GB)){GA["_"+GB]=GA[GB]}GA[GB]=F8[GB]}}GA.name=F6.name;if(F6.helperType){GA.helperType=F6.helperType}if(F6.modeProps){for(var GB in F6.modeProps){GA[GB]=F6.modeProps[GB]}}return GA};i.defineMode("null",function(){return{token:function(F6){F6.skipToEnd()}}});i.defineMIME("text/plain","null");var DK=i.modeExtensions={};i.extendMode=function(F8,F7){var F6=DK.hasOwnProperty(F8)?DK[F8]:(DK[F8]={});Aj(F7,F6)};i.defineExtension=function(F6,F7){i.prototype[F6]=F7};i.defineDocExtension=function(F6,F7){AR.prototype[F6]=F7};i.defineOption=S;var A4=[];i.defineInitHook=function(F6){A4.push(F6)};var FI=i.helpers={};i.registerHelper=function(F7,F6,F8){if(!FI.hasOwnProperty(F7)){FI[F7]=i[F7]={_global:[]}}FI[F7][F6]=F8};i.registerGlobalHelper=function(F8,F7,F6,F9){i.registerHelper(F8,F7,F9);FI[F8]._global.push({pred:F6,val:F9})};var B1=i.copyState=function(F9,F6){if(F6===true){return F6}if(F9.copyState){return F9.copyState(F6)}var F8={};for(var GA in F6){var F7=F6[GA];if(F7 instanceof Array){F7=F7.concat([])}F8[GA]=F7}return F8};var By=i.startState=function(F8,F7,F6){return F8.startState?F8.startState(F7,F6):true};i.innerMode=function(F8,F6){while(F8.innerMode){var F7=F8.innerMode(F6);if(!F7||F7.mode==F8){break}F6=F7.state;F8=F7.mode}return F7||{mode:F8,state:F6}};var EX=i.commands={selectAll:function(F6){F6.setSelection(x(F6.firstLine(),0),x(F6.lastLine()),z)},singleSelection:function(F6){F6.setSelection(F6.getCursor("anchor"),F6.getCursor("head"),z)},killLine:function(F6){Er(F6,function(F8){if(F8.empty()){var F7=E9(F6.doc,F8.head.line).text.length;if(F8.head.ch==F7&&F8.head.line<F6.lastLine()){return{from:F8.head,to:x(F8.head.line+1,0)}}else{return{from:F8.head,to:x(F8.head.line,F7)}}}else{return{from:F8.from(),to:F8.to()}}})},deleteLine:function(F6){Er(F6,function(F7){return{from:x(F7.from().line,0),to:Fe(F6.doc,x(F7.to().line+1,0))}})},delLineLeft:function(F6){Er(F6,function(F7){return{from:x(F7.from().line,0),to:F7.from()}})},delWrappedLineLeft:function(F6){Er(F6,function(F7){var F9=F6.charCoords(F7.head,"div").top+5;var F8=F6.coordsChar({left:0,top:F9},"div");return{from:F8,to:F7.from()}})},delWrappedLineRight:function(F6){Er(F6,function(F7){var F9=F6.charCoords(F7.head,"div").top+5;var F8=F6.coordsChar({left:F6.display.lineDiv.offsetWidth+100,top:F9},"div");return{from:F7.from(),to:F8}})},undo:function(F6){F6.undo()},redo:function(F6){F6.redo()},undoSelection:function(F6){F6.undoSelection()},redoSelection:function(F6){F6.redoSelection()},goDocStart:function(F6){F6.extendSelection(x(F6.firstLine(),0))},goDocEnd:function(F6){F6.extendSelection(x(F6.lastLine()))},goLineStart:function(F6){F6.extendSelectionsBy(function(F7){return BR(F6,F7.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(F6){F6.extendSelectionsBy(function(F7){return Dc(F6,F7.head)},{origin:"+move",bias:1})},goLineEnd:function(F6){F6.extendSelectionsBy(function(F7){return Dj(F6,F7.head.line)},{origin:"+move",bias:-1})},goLineRight:function(F6){F6.extendSelectionsBy(function(F7){var F8=F6.charCoords(F7.head,"div").top+5;return F6.coordsChar({left:F6.display.lineDiv.offsetWidth+100,top:F8},"div")},Ct)},goLineLeft:function(F6){F6.extendSelectionsBy(function(F7){var F8=F6.charCoords(F7.head,"div").top+5;return F6.coordsChar({left:0,top:F8},"div")},Ct)},goLineLeftSmart:function(F6){F6.extendSelectionsBy(function(F7){var F8=F6.charCoords(F7.head,"div").top+5;var F9=F6.coordsChar({left:0,top:F8},"div");if(F9.ch<F6.getLine(F9.line).search(/\S/)){return Dc(F6,F7.head)}return F9},Ct)},goLineUp:function(F6){F6.moveV(-1,"line")},goLineDown:function(F6){F6.moveV(1,"line")},goPageUp:function(F6){F6.moveV(-1,"page")},goPageDown:function(F6){F6.moveV(1,"page")},goCharLeft:function(F6){F6.moveH(-1,"char")},goCharRight:function(F6){F6.moveH(1,"char")},goColumnLeft:function(F6){F6.moveH(-1,"column")},goColumnRight:function(F6){F6.moveH(1,"column")},goWordLeft:function(F6){F6.moveH(-1,"word")},goGroupRight:function(F6){F6.moveH(1,"group")},goGroupLeft:function(F6){F6.moveH(-1,"group")},goWordRight:function(F6){F6.moveH(1,"word")},delCharBefore:function(F6){F6.deleteH(-1,"char")},delCharAfter:function(F6){F6.deleteH(1,"char")},delWordBefore:function(F6){F6.deleteH(-1,"word")},delWordAfter:function(F6){F6.deleteH(1,"word")},delGroupBefore:function(F6){F6.deleteH(-1,"group")},delGroupAfter:function(F6){F6.deleteH(1,"group")},indentAuto:function(F6){F6.indentSelection("smart")},indentMore:function(F6){F6.indentSelection("add")},indentLess:function(F6){F6.indentSelection("subtract")},insertTab:function(F6){F6.replaceSelection("\t")},insertSoftTab:function(F6){var F8=[],F7=F6.listSelections(),GB=F6.options.tabSize;for(var GA=0;GA<F7.length;GA++){var GC=F7[GA].from();var F9=Br(F6.getLine(GC.line),GC.ch,GB);F8.push(new Array(GB-F9%GB+1).join(" "))}F6.replaceSelections(F8)},defaultTab:function(F6){if(F6.somethingSelected()){F6.indentSelection("add")}else{F6.execCommand("insertTab")}},transposeChars:function(F6){Cj(F6,function(){var F9=F6.listSelections(),F8=[];for(var GA=0;GA<F9.length;GA++){var GC=F9[GA].head,F7=E9(F6.doc,GC.line).text;if(F7){if(GC.ch==F7.length){GC=new x(GC.line,GC.ch-1)}if(GC.ch>0){GC=new x(GC.line,GC.ch+1);F6.replaceRange(F7.charAt(GC.ch-1)+F7.charAt(GC.ch-2),x(GC.line,GC.ch-2),GC,"+transpose")}else{if(GC.line>F6.doc.first){var GB=E9(F6.doc,GC.line-1).text;if(GB){F6.replaceRange(F7.charAt(0)+"\n"+GB.charAt(GB.length-1),x(GC.line-1,GB.length-1),x(GC.line,1),"+transpose")}}}}F8.push(new Ds(GC,GC))}F6.setSelections(F8)})},newlineAndIndent:function(F6){Cj(F6,function(){var F7=F6.listSelections().length;for(var F9=0;F9<F7;F9++){var F8=F6.listSelections()[F9];F6.replaceRange("\n",F8.anchor,F8.head,"+input");F6.indentLine(F8.from().line+1,null,true);Fb(F6)}})},toggleOverwrite:function(F6){F6.toggleOverwrite()}};var E4=i.keyMap={};E4.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};E4.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};E4.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};E4.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]};E4["default"]=B5?E4.macDefault:E4.pcDefault;function DO(F7){var GD=F7.split(/-(?!$)/),F7=GD[GD.length-1];var GC,GB,F6,GA;for(var F9=0;F9<GD.length-1;F9++){var F8=GD[F9];if(/^(cmd|meta|m)$/i.test(F8)){GA=true}else{if(/^a(lt)?$/i.test(F8)){GC=true}else{if(/^(c|ctrl|control)$/i.test(F8)){GB=true}else{if(/^s(hift)$/i.test(F8)){F6=true}else{throw new Error("Unrecognized modifier name: "+F8)}}}}}if(GC){F7="Alt-"+F7}if(GB){F7="Ctrl-"+F7}if(GA){F7="Cmd-"+F7}if(F6){F7="Shift-"+F7}return F7}i.normalizeKeyMap=function(GD){var F7={};for(var GC in GD){if(GD.hasOwnProperty(GC)){var GE=GD[GC];if(/^(name|fallthrough|(de|at)tach)$/.test(GC)){continue}if(GE=="..."){delete GD[GC];continue}var GF=Bq(GC.split(" "),DO);for(var GB=0;GB<GF.length;GB++){var F9,F8;if(GB==GF.length-1){F8=GC;F9=GE}else{F8=GF.slice(0,GB+1).join(" ");F9="..."}var GA=F7[F8];if(!GA){F7[F8]=F9}else{if(GA!=F9){throw new Error("Inconsistent bindings for "+F8)}}}delete GD[GC]}}for(var F6 in F7){GD[F6]=F7[F6]}return GD};var I=i.lookupKey=function(F9,GC,GB,F8){GC=Fp(GC);var GA=GC.call?GC.call(F9,F8):GC[F9];if(GA===false){return"nothing"}if(GA==="..."){return"multi"}if(GA!=null&&GB(GA)){return"handled"}if(GC.fallthrough){if(Object.prototype.toString.call(GC.fallthrough)!="[object Array]"){return I(F9,GC.fallthrough,GB,F8)}for(var F7=0;F7<GC.fallthrough.length;F7++){var F6=I(F9,GC.fallthrough[F7],GB,F8);if(F6){return F6}}}};var EW=i.isModifierKey=function(F7){var F6=typeof F7=="string"?F7:FA[F7.keyCode];return F6=="Ctrl"||F6=="Alt"||F6=="Shift"||F6=="Mod"};var FM=i.keyName=function(F7,F9){if(Dw&&F7.keyCode==34&&F7["char"]){return false}var F8=FA[F7.keyCode],F6=F8;if(F6==null||F7.altGraphKey){return false}if(F7.altKey&&F8!="Alt"){F6="Alt-"+F6}if((Bo?F7.metaKey:F7.ctrlKey)&&F8!="Ctrl"){F6="Ctrl-"+F6}if((Bo?F7.ctrlKey:F7.metaKey)&&F8!="Cmd"){F6="Cmd-"+F6}if(!F9&&F7.shiftKey&&F8!="Shift"){F6="Shift-"+F6}return F6};function Fp(F6){return typeof F6=="string"?E4[F6]:F6}i.fromTextArea=function(GD,GE){if(!GE){GE={}}GE.value=GD.value;if(!GE.tabindex&&GD.tabindex){GE.tabindex=GD.tabindex}if(!GE.placeholder&&GD.placeholder){GE.placeholder=GD.placeholder}if(GE.autofocus==null){var F6=Di();GE.autofocus=F6==GD||GD.getAttribute("autofocus")!=null&&F6==document.body}function GA(){GD.value=GC.getValue()}if(GD.form){Bv(GD.form,"submit",GA);if(!GE.leaveSubmitMethodAlone){var F7=GD.form,GB=F7.submit;try{var F9=F7.submit=function(){GA();F7.submit=GB;F7.submit();F7.submit=F9}}catch(F8){}}}GD.style.display="none";var GC=i(function(GF){GD.parentNode.insertBefore(GF,GD.nextSibling)},GE);GC.save=GA;GC.getTextArea=function(){return GD};GC.toTextArea=function(){GC.toTextArea=isNaN;GA();GD.parentNode.removeChild(GC.getWrapperElement());GD.style.display="";if(GD.form){D7(GD.form,"submit",GA);if(typeof GD.form.submit=="function"){GD.form.submit=GB}}};return GC};var En=i.StringStream=function(F6,F7){this.pos=this.start=0;this.string=F6;this.tabSize=F7||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};En.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(F6){var F8=this.string.charAt(this.pos);if(typeof F6=="string"){var F7=F8==F6}else{var F7=F8&&(F6.test?F6.test(F8):F6(F8))}if(F7){++this.pos;return F8}},eatWhile:function(F6){var F7=this.pos;while(this.eat(F6)){}return this.pos>F7},eatSpace:function(){var F6=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>F6},skipToEnd:function(){this.pos=this.string.length},skipTo:function(F6){var F7=this.string.indexOf(F6,this.pos);if(F7>-1){this.pos=F7;return true}},backUp:function(F6){this.pos-=F6},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=Br(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?Br(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Br(this.string,null,this.tabSize)-(this.lineStart?Br(this.string,this.lineStart,this.tabSize):0)},match:function(GA,F7,F6){if(typeof GA=="string"){var GB=function(GC){return F6?GC.toLowerCase():GC};var F9=this.string.substr(this.pos,GA.length);if(GB(F9)==GB(GA)){if(F7!==false){this.pos+=GA.length}return true}}else{var F8=this.string.slice(this.pos).match(GA);if(F8&&F8.index>0){return null}if(F8&&F7!==false){this.pos+=F8[0].length}return F8}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(F7,F6){this.lineStart+=F7;try{return F6()}finally{this.lineStart-=F7}}};var q=i.TextMarker=function(F7,F6){this.lines=[];this.type=F6;this.doc=F7};BW(q);q.prototype.clear=function(){if(this.explicitlyCleared){return }var GD=this.doc.cm,F7=GD&&!GD.curOp;if(F7){Cf(GD)}if(FC(this,"clear")){var GE=this.find();if(GE){AD(this,"clear",GE.from,GE.to)}}var F8=null,GB=null;for(var F9=0;F9<this.lines.length;++F9){var GF=this.lines[F9];var GC=E3(GF.markedSpans,this);if(GD&&!this.collapsed){s(GD,Bl(GF),"text")}else{if(GD){if(GC.to!=null){GB=Bl(GF)}if(GC.from!=null){F8=Bl(GF)}}}GF.markedSpans=Eb(GF.markedSpans,GC);if(GC.from==null&&this.collapsed&&!FR(this.doc,GF)&&GD){Fu(GF,At(GD.display))}}if(GD&&this.collapsed&&!GD.options.lineWrapping){for(var F9=0;F9<this.lines.length;++F9){var F6=Y(this.lines[F9]),GA=EH(F6);if(GA>GD.display.maxLineLength){GD.display.maxLine=F6;GD.display.maxLineLength=GA;GD.display.maxLineChanged=true}}}if(F8!=null&&GD&&this.collapsed){AG(GD,F8,GB+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(GD){ER(GD.doc)}}if(GD){AD(GD,"markerCleared",GD,this)}if(F7){AL(GD)}if(this.parent){this.parent.clear()}};q.prototype.find=function(F9,F7){if(F9==null&&this.type=="bookmark"){F9=1}var GC,GB;for(var F8=0;F8<this.lines.length;++F8){var F6=this.lines[F8];var GA=E3(F6.markedSpans,this);if(GA.from!=null){GC=x(F7?F6:Bl(F6),GA.from);if(F9==-1){return GC}}if(GA.to!=null){GB=x(F7?F6:Bl(F6),GA.to);if(F9==1){return GB}}}return GC&&{from:GC,to:GB}};q.prototype.changed=function(){var F8=this.find(-1,true),F7=this,F6=this.doc.cm;if(!F8||!F6){return }Cj(F6,function(){var GA=F8.line,GB=Bl(F8.line);var F9=E5(F6,GB);if(F9){AS(F9);F6.curOp.selectionChanged=F6.curOp.forceUpdate=true}F6.curOp.updateMaxLine=true;if(!FR(F7.doc,GA)&&F7.height!=null){var GD=F7.height;F7.height=null;var GC=Cv(F7)-GD;if(GC){Fu(GA,GA.height+GC)}}})};q.prototype.attachLine=function(F6){if(!this.lines.length&&this.doc.cm){var F7=this.doc.cm.curOp;if(!F7.maybeHiddenMarkers||DE(F7.maybeHiddenMarkers,this)==-1){(F7.maybeUnhiddenMarkers||(F7.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(F6)};q.prototype.detachLine=function(F6){this.lines.splice(DE(this.lines,F6),1);if(!this.lines.length&&this.doc.cm){var F7=this.doc.cm.curOp;(F7.maybeHiddenMarkers||(F7.maybeHiddenMarkers=[])).push(this)}};var A1=0;function EZ(GE,GC,GD,GG,GA){if(GG&&GG.shared){return p(GE,GC,GD,GG,GA)}if(GE.cm&&!GE.cm.curOp){return Cz(GE.cm,EZ)(GE,GC,GD,GG,GA)}var F9=new q(GE,GA),GF=CD(GC,GD);if(GG){Aj(GG,F9,false)}if(GF>0||GF==0&&F9.clearWhenEmpty!==false){return F9}if(F9.replacedWith){F9.collapsed=true;F9.widgetNode=Fr("span",[F9.replacedWith],"CodeMirror-widget");if(!GG.handleMouseEvents){F9.widgetNode.setAttribute("cm-ignore-events","true")}if(GG.insertLeft){F9.widgetNode.insertLeft=true}}if(F9.collapsed){if(Z(GE,GC.line,GC,GD,F9)||GC.line!=GD.line&&Z(GE,GD.line,GC,GD,F9)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}A3=true}if(F9.addToHistory){Fh(GE,{from:GC,to:GD,origin:"markText"},GE.sel,NaN)}var F7=GC.line,GB=GE.cm,F6;GE.iter(F7,GD.line+1,function(GH){if(GB&&F9.collapsed&&!GB.options.lineWrapping&&Y(GH)==GB.display.maxLine){F6=true}if(F9.collapsed&&F7!=GC.line){Fu(GH,0)}CB(GH,new EC(F9,F7==GC.line?GC.ch:null,F7==GD.line?GD.ch:null));++F7});if(F9.collapsed){GE.iter(GC.line,GD.line+1,function(GH){if(FR(GE,GH)){Fu(GH,0)}})}if(F9.clearOnEnter){Bv(F9,"beforeCursorEnter",function(){F9.clear()})}if(F9.readOnly){F1=true;if(GE.history.done.length||GE.history.undone.length){GE.clearHistory()}}if(F9.collapsed){F9.id=++A1;F9.atomic=true}if(GB){if(F6){GB.curOp.updateMaxLine=true}if(F9.collapsed){AG(GB,GC.line,GD.line+1)}else{if(F9.className||F9.title||F9.startStyle||F9.endStyle||F9.css){for(var F8=GC.line;F8<=GD.line;F8++){s(GB,F8,"text")}}}if(F9.atomic){ER(GB.doc)}AD(GB,"markerAdded",GB,F9)}return F9}var X=i.SharedTextMarker=function(F8,F7){this.markers=F8;this.primary=F7;for(var F6=0;F6<F8.length;++F6){F8[F6].parent=this}};BW(X);X.prototype.clear=function(){if(this.explicitlyCleared){return }this.explicitlyCleared=true;for(var F6=0;F6<this.markers.length;++F6){this.markers[F6].clear()}AD(this,"clear")};X.prototype.find=function(F7,F6){return this.primary.find(F7,F6)};function p(GA,GD,GC,F6,F8){F6=Aj(F6);F6.shared=false;var GB=[EZ(GA,GD,GC,F6,F8)],F7=GB[0];var F9=F6.widgetNode;D1(GA,function(GF){if(F9){F6.widgetNode=F9.cloneNode(true)}GB.push(EZ(GF,Fe(GF,GD),Fe(GF,GC),F6,F8));for(var GE=0;GE<GF.linked.length;++GE){if(GF.linked[GE].isParent){return }}F7=Fc(GB)});return new X(GB,F7)}function Ej(F6){return F6.findMarks(x(F6.first,0),F6.clipPos(x(F6.lastLine())),function(F7){return F7.parent})}function DZ(GB,GC){for(var F9=0;F9<GC.length;F9++){var F7=GC[F9],GD=F7.find();var F6=GB.clipPos(GD.from),GA=GB.clipPos(GD.to);if(CD(F6,GA)){var F8=EZ(GB,F6,GA,F7.primary,F7.primary.type);F7.markers.push(F8);F8.parent=F7}}}function EI(F9){for(var F8=0;F8<F9.length;F8++){var F6=F9[F8],GB=[F6.primary.doc];D1(F6.primary.doc,function(GC){GB.push(GC)});for(var F7=0;F7<F6.markers.length;F7++){var GA=F6.markers[F7];if(DE(GB,GA.doc)==-1){GA.parent=null;F6.markers.splice(F7--,1)}}}}function EC(F6,F8,F7){this.marker=F6;this.from=F8;this.to=F7}function E3(F8,F6){if(F8){for(var F7=0;F7<F8.length;++F7){var F9=F8[F7];if(F9.marker==F6){return F9}}}}function Eb(F7,F8){for(var F9,F6=0;F6<F7.length;++F6){if(F7[F6]!=F8){(F9||(F9=[])).push(F7[F6])}}return F9}function CB(F6,F7){F6.markedSpans=F6.markedSpans?F6.markedSpans.concat([F7]):[F7];F7.marker.attachLine(F6)}function Am(F7,F8,GC){if(F7){for(var GA=0,GD;GA<F7.length;++GA){var GE=F7[GA],GB=GE.marker;var F6=GE.from==null||(GB.inclusiveLeft?GE.from<=F8:GE.from<F8);if(F6||GE.from==F8&&GB.type=="bookmark"&&(!GC||!GE.marker.insertLeft)){var F9=GE.to==null||(GB.inclusiveRight?GE.to>=F8:GE.to>F8);(GD||(GD=[])).push(new EC(GB,GE.from,F9?null:GE.to))}}}return GD}function AY(F7,F9,GC){if(F7){for(var GA=0,GD;GA<F7.length;++GA){var GE=F7[GA],GB=GE.marker;var F8=GE.to==null||(GB.inclusiveRight?GE.to>=F9:GE.to>F9);if(F8||GE.from==F9&&GB.type=="bookmark"&&(!GC||GE.marker.insertLeft)){var F6=GE.from==null||(GB.inclusiveLeft?GE.from<=F9:GE.from<F9);(GD||(GD=[])).push(new EC(GB,F6?null:GE.from-F9,GE.to==null?null:GE.to-F9))}}}return GD}function EE(GI,GF){if(GF.full){return null}var GE=B7(GI,GF.from.line)&&E9(GI,GF.from.line).markedSpans;var GL=B7(GI,GF.to.line)&&E9(GI,GF.to.line).markedSpans;if(!GE&&!GL){return null}var F7=GF.from.ch,GA=GF.to.ch,GD=CD(GF.from,GF.to)==0;var GC=Am(GE,F7,GD);var GK=AY(GL,GA,GD);var GJ=GF.text.length==1,F8=Fc(GF.text).length+(GJ?F7:0);if(GC){for(var F9=0;F9<GC.length;++F9){var GH=GC[F9];if(GH.to==null){var GM=E3(GK,GH.marker);if(!GM){GH.to=F7}else{if(GJ){GH.to=GM.to==null?null:GM.to+F8}}}}}if(GK){for(var F9=0;F9<GK.length;++F9){var GH=GK[F9];if(GH.to!=null){GH.to+=F8}if(GH.from==null){var GM=E3(GC,GH.marker);if(!GM){GH.from=F8;if(GJ){(GC||(GC=[])).push(GH)}}}else{GH.from+=F8;if(GJ){(GC||(GC=[])).push(GH)}}}}if(GC){GC=Q(GC)}if(GK&&GK!=GC){GK=Q(GK)}var GB=[GC];if(!GJ){var GG=GF.text.length-2,F6;if(GG>0&&GC){for(var F9=0;F9<GC.length;++F9){if(GC[F9].to==null){(F6||(F6=[])).push(new EC(GC[F9].marker,null,null))}}}for(var F9=0;F9<GG;++F9){GB.push(F6)}GB.push(GK)}return GB}function Q(F7){for(var F6=0;F6<F7.length;++F6){var F8=F7[F6];if(F8.from!=null&&F8.from==F8.to&&F8.marker.clearWhenEmpty!==false){F7.splice(F6--,1)}}if(!F7.length){return null}return F7}function D3(GE,GC){var F6=B2(GE,GC);var GF=EE(GE,GC);if(!F6){return GF}if(!GF){return F6}for(var F9=0;F9<F6.length;++F9){var GA=F6[F9],GB=GF[F9];if(GA&&GB){spans:for(var F8=0;F8<GB.length;++F8){var GD=GB[F8];for(var F7=0;F7<GA.length;++F7){if(GA[F7].marker==GD.marker){continue spans}}GA.push(GD)}}else{if(GB){F6[F9]=GB}}}return F6}function Ce(GI,GG,GH){var GA=null;GI.iter(GG.line,GH.line+1,function(GJ){if(GJ.markedSpans){for(var GK=0;GK<GJ.markedSpans.length;++GK){var GL=GJ.markedSpans[GK].marker;if(GL.readOnly&&(!GA||DE(GA,GL)==-1)){(GA||(GA=[])).push(GL)}}}});if(!GA){return null}var GB=[{from:GG,to:GH}];for(var GC=0;GC<GA.length;++GC){var GD=GA[GC],F8=GD.find(0);for(var F9=0;F9<GB.length;++F9){var F7=GB[F9];if(CD(F7.to,F8.from)<0||CD(F7.from,F8.to)>0){continue}var GF=[F9,1],F6=CD(F7.from,F8.from),GE=CD(F7.to,F8.to);if(F6<0||!GD.inclusiveLeft&&!F6){GF.push({from:F7.from,to:F8.from})}if(GE>0||!GD.inclusiveRight&&!GE){GF.push({from:F8.to,to:F7.to})}GB.splice.apply(GB,GF);F9+=GF.length-1}}return GB}function Fx(F6){var F8=F6.markedSpans;if(!F8){return }for(var F7=0;F7<F8.length;++F7){F8[F7].marker.detachLine(F6)}F6.markedSpans=null}function C0(F6,F8){if(!F8){return }for(var F7=0;F7<F8.length;++F7){F8[F7].marker.attachLine(F6)}F6.markedSpans=F8}function V(F6){return F6.inclusiveLeft?-1:0}function Bu(F6){return F6.inclusiveRight?1:0}function Dk(F9,F7){var GB=F9.lines.length-F7.lines.length;if(GB!=0){return GB}var F8=F9.find(),GC=F7.find();var F6=CD(F8.from,GC.from)||V(F9)-V(F7);if(F6){return -F6}var GA=CD(F8.to,GC.to)||Bu(F9)-Bu(F7);if(GA){return GA}return F7.id-F9.id}function A2(F7,GB){var F6=A3&&F7.markedSpans,GA;if(F6){for(var F9,F8=0;F8<F6.length;++F8){F9=F6[F8];if(F9.marker.collapsed&&(GB?F9.from:F9.to)==null&&(!GA||Dk(GA,F9.marker)<0)){GA=F9.marker}}}return GA}function Ei(F6){return A2(F6,true)}function EP(F6){return A2(F6,false)}function Z(GE,F8,GC,GD,GA){var GH=E9(GE,F8);var F6=A3&&GH.markedSpans;if(F6){for(var F9=0;F9<F6.length;++F9){var F7=F6[F9];if(!F7.marker.collapsed){continue}var GG=F7.marker.find(0);var GF=CD(GG.from,GC)||V(F7.marker)-V(GA);var GB=CD(GG.to,GD)||Bu(F7.marker)-Bu(GA);if(GF>=0&&GB<=0||GF<=0&&GB>=0){continue}if(GF<=0&&(CD(GG.to,GC)>0||(F7.marker.inclusiveRight&&GA.inclusiveLeft))||GF>=0&&(CD(GG.from,GD)<0||(F7.marker.inclusiveLeft&&GA.inclusiveRight))){return true}}}}function Y(F7){var F6;while(F6=Ei(F7)){F7=F6.find(-1,true).line}return F7}function H(F8){var F6,F7;while(F6=EP(F8)){F8=F6.find(1,true).line;(F7||(F7=[])).push(F8)}return F7}function As(F9,F7){var F6=E9(F9,F7),F8=Y(F6);if(F6==F8){return F7}return Bl(F8)}function Dx(F9,F8){if(F8>F9.lastLine()){return F8}var F7=E9(F9,F8),F6;if(!FR(F9,F7)){return F8}while(F6=EP(F7)){F7=F6.find(1,true).line}return Bl(F7)+1}function FR(GA,F7){var F6=A3&&F7.markedSpans;if(F6){for(var F9,F8=0;F8<F6.length;++F8){F9=F6[F8];if(!F9.marker.collapsed){continue}if(F9.from==null){return true}if(F9.marker.widgetNode){continue}if(F9.from==0&&F9.marker.inclusiveLeft&&u(GA,F7,F9)){return true}}}}function u(GB,F7,F9){if(F9.to==null){var F6=F9.marker.find(1,true);return u(GB,F6.line,E3(F6.line.markedSpans,F9.marker))}if(F9.marker.inclusiveRight&&F9.to==F7.text.length){return true}for(var GA,F8=0;F8<F7.markedSpans.length;++F8){GA=F7.markedSpans[F8];if(GA.marker.collapsed&&!GA.marker.widgetNode&&GA.from==F9.to&&(GA.to==null||GA.to!=F9.from)&&(GA.marker.inclusiveLeft||F9.marker.inclusiveRight)&&u(GB,F7,GA)){return true}}}var DW=i.LineWidget=function(F6,F9,F7){if(F7){for(var F8 in F7){if(F7.hasOwnProperty(F8)){this[F8]=F7[F8]}}}this.cm=F6;this.node=F9};BW(DW);function Du(F6,F7,F8){if(Bk(F7)<((F6.curOp&&F6.curOp.scrollTop)||F6.doc.scrollTop)){Ci(F6,null,F8)}}DW.prototype.clear=function(){var F7=this.cm,F9=this.line.widgets,F8=this.line,GB=Bl(F8);if(GB==null||!F9){return }for(var GA=0;GA<F9.length;++GA){if(F9[GA]==this){F9.splice(GA--,1)}}if(!F9.length){F8.widgets=null}var F6=Cv(this);Cj(F7,function(){Du(F7,F8,-F6);s(F7,GB,"widget");Fu(F8,Math.max(0,F8.height-F6))})};DW.prototype.changed=function(){var F7=this.height,F6=this.cm,F8=this.line;this.height=null;var F9=Cv(this)-F7;if(!F9){return }Cj(F6,function(){F6.curOp.forceUpdate=true;Du(F6,F8,F9);Fu(F8,F8.height+F9)})};function Cv(F7){if(F7.height!=null){return F7.height}if(!Fz(document.body,F7.node)){var F6="position: relative;";if(F7.coverGutter){F6+="margin-left: -"+F7.cm.display.gutters.offsetWidth+"px;"}if(F7.noHScroll){F6+="width: "+F7.cm.display.wrapper.clientWidth+"px;"}Bp(F7.cm.display.measure,Fr("div",[F7.node],null,F6))}return F7.height=F7.node.offsetHeight}function Bf(F6,GA,F8,F7){var F9=new DW(F6,F8,F7);if(F9.noHScroll){F6.display.alignWidgets=true}ES(F6.doc,GA,"widget",function(GC){var GD=GC.widgets||(GC.widgets=[]);if(F9.insertAt==null){GD.push(F9)}else{GD.splice(Math.min(GD.length-1,Math.max(0,F9.insertAt)),0,F9)}F9.line=GC;if(!FR(F6.doc,GC)){var GB=Bk(GC)<F6.doc.scrollTop;Fu(GC,GC.height+Cv(F9));if(GB){Ci(F6,null,F9.height)}F6.curOp.forceUpdate=true}return true});return F9}var Fv=i.Line=function(F8,F7,F6){this.text=F8;C0(this,F7);this.height=F6?F6(this):1};BW(Fv);Fv.prototype.lineNo=function(){return Bl(this)};function EG(F7,GA,F8,F6){F7.text=GA;if(F7.stateAfter){F7.stateAfter=null}if(F7.styles){F7.styles=null}if(F7.order!=null){F7.order=null}Fx(F7);C0(F7,F8);var F9=F6?F6(F7):1;if(F9!=F7.height){Fu(F7,F9)}}function BZ(F6){F6.parent=null;Fx(F6)}function DF(F8,F7){if(F8){for(;;){var F6=F8.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!F6){break}F8=F8.slice(0,F6.index)+F8.slice(F6.index+F6[0].length);var F9=F6[1]?"bgClass":"textClass";if(F7[F9]==null){F7[F9]=F6[2]}else{if(!(new RegExp("(?:^|s)"+F6[2]+"(?:$|s)")).test(F7[F9])){F7[F9]+=" "+F6[2]}}}}return F8}function FL(F8,F7){if(F8.blankLine){return F8.blankLine(F7)}if(!F8.innerMode){return }var F6=i.innerMode(F8,F7);if(F6.mode.blankLine){return F6.mode.blankLine(F6.state)}}function EU(GB,GA,F9,F6){for(var F7=0;F7<10;F7++){if(F6){F6[0]=i.innerMode(GB,F9).mode}var F8=GB.token(GA,F9);if(GA.pos>GA.start){return F8}}throw new Error("Mode "+GB.name+" failed to advance stream.")}function CP(GF,GD,GA,F9){function F6(GI){return{start:GG.start,end:GG.pos,string:GG.current(),type:F8||null,state:GI?B1(GE.mode,F7):F7}}var GE=GF.doc,GB=GE.mode,F8;GD=Fe(GE,GD);var GH=E9(GE,GD.line),F7=DV(GF,GD.line,GA);var GG=new En(GH.text,GF.options.tabSize),GC;if(F9){GC=[]}while((F9||GG.pos<GD.ch)&&!GG.eol()){GG.start=GG.pos;F8=EU(GB,GG,F7);if(F9){GC.push(F6(true))}}return F9?GC:F6()}function W(GG,GI,GB,F7,GC,F9,GA){var F8=GB.flattenSpans;if(F8==null){F8=GG.options.flattenSpans}var GE=0,GD=null;var GH=new En(GI,GG.options.tabSize),F6;var GK=GG.options.addModeClass&&[null];if(GI==""){DF(FL(GB,F7),F9)}while(!GH.eol()){if(GH.pos>GG.options.maxHighlightLength){F8=false;if(GA){DR(GG,GI,F7,GH.pos)}GH.pos=GI.length;F6=null}else{F6=DF(EU(GB,GH,F7,GK),F9)}if(GK){var GJ=GK[0].name;if(GJ){F6="m-"+(F6?GJ+" "+F6:GJ)}}if(!F8||GD!=F6){while(GE<GH.start){GE=Math.min(GH.start,GE+50000);GC(GE,GD)}GD=F6}GH.start=GH.pos}while(GE<GH.pos){var GF=Math.min(GH.pos,GE+50000);GC(GF,GD);GE=GF}}function FU(GD,GF,F6,GA){var GE=[GD.state.modeGen],F9={};W(GD,GF.text,GD.doc.mode,F6,function(GG,GH){GE.push(GG,GH)},F9,GA);for(var F7=0;F7<GD.state.overlays.length;++F7){var GB=GD.state.overlays[F7],GC=1,F8=0;W(GD,GF.text,GB.mode,true,function(GG,GI){var GK=GC;while(F8<GG){var GH=GE[GC];if(GH>GG){GE.splice(GC,1,GG,GE[GC+1],GH)}GC+=2;F8=Math.min(GG,GH)}if(!GI){return }if(GB.opaque){GE.splice(GK,GC-GK,GG,"cm-overlay "+GI);GC=GK+2}else{for(;GK<GC;GK+=2){var GJ=GE[GK+1];GE[GK+1]=(GJ?GJ+" ":"")+"cm-overlay "+GI}}},F9)}return{styles:GE,classes:F9.bgClass||F9.textClass?F9:null}}function C3(F7,F8,F9){if(!F8.styles||F8.styles[0]!=F7.state.modeGen){var F6=FU(F7,F8,F8.stateAfter=DV(F7,Bl(F8)));F8.styles=F6.styles;if(F6.classes){F8.styleClasses=F6.classes}else{if(F8.styleClasses){F8.styleClasses=null}}if(F9===F7.doc.frontier){F7.doc.frontier++}}return F8.styles}function DR(F6,GB,F8,F7){var GA=F6.doc.mode;var F9=new En(GB,F6.options.tabSize);F9.start=F9.pos=F7||0;if(GB==""){FL(GA,F8)}while(!F9.eol()&&F9.pos<=F6.options.maxHighlightLength){EU(GA,F9,F8);F9.start=F9.pos}}var Dq={},Bz={};function Eq(F8,F7){if(!F8||/^\s*$/.test(F8)){return null}var F6=F7.addModeClass?Bz:Dq;return F6[F8]||(F6[F8]=F8.replace(/\S+/g,"cm-$&"))}function El(F7,GB){var GC=Fr("span",null,null,Cx?"padding-right: .1px":null);var F9={pre:Fr("pre",[GC]),content:GC,col:0,pos:0,cm:F7};GB.measure={};for(var GA=0;GA<=(GB.rest?GB.rest.length:0);GA++){var F8=GA?GB.rest[GA-1]:GB.line,F6;F9.pos=0;F9.addToken=T;if((De||Cx)&&F7.getOption("lineWrapping")){F9.addToken=Fa(F9.addToken)}if(Bm(F7.display.measure)&&(F6=A(F8))){F9.addToken=v(F9.addToken,F6)}F9.map=[];var GD=GB!=F7.display.externalMeasured&&Bl(F8);BM(F8,F9,C3(F7,F8,GD));if(F8.styleClasses){if(F8.styleClasses.bgClass){F9.bgClass=Fm(F8.styleClasses.bgClass,F9.bgClass||"")}if(F8.styleClasses.textClass){F9.textClass=Fm(F8.styleClasses.textClass,F9.textClass||"")}}if(F9.map.length==0){F9.map.push(0,0,F9.content.appendChild(BL(F7.display.measure)))}if(GA==0){GB.measure.map=F9.map;GB.measure.cache={}}else{(GB.measure.maps||(GB.measure.maps=[])).push(F9.map);(GB.measure.caches||(GB.measure.caches=[])).push({})}}if(Cx&&/\bcm-tab\b/.test(F9.content.lastChild.className)){F9.content.className="cm-tab-wrap-hack"}Ab(F7,"renderLine",F7,GB.line,F9.pre);if(F9.pre.className){F9.textClass=Fm(F9.pre.className,F9.textClass||"")}return F9}function E6(F7){var F6=Fr("span","\u2022","cm-invalidchar");F6.title="\\u"+F7.charCodeAt(0).toString(16);return F6}function T(GH,GC,GL,GJ,GF,GN,GB){if(!GC){return }var F6=GH.cm.options.specialChars,F7=false;if(!F6.test(GC)){GH.col+=GC.length;var GK=document.createTextNode(GC);GH.map.push(GH.pos,GH.pos+GC.length,GK);if(De&&K<9){F7=true}GH.pos+=GC.length}else{var GK=document.createDocumentFragment(),F9=0;while(true){F6.lastIndex=F9;var GI=F6.exec(GC);var GM=GI?GI.index-F9:GC.length-F9;if(GM){var GE=document.createTextNode(GC.slice(F9,F9+GM));if(De&&K<9){GK.appendChild(Fr("span",[GE]))}else{GK.appendChild(GE)}GH.map.push(GH.pos,GH.pos+GM,GE);GH.col+=GM;GH.pos+=GM}if(!GI){break}F9+=GM+1;if(GI[0]=="\t"){var GG=GH.cm.options.tabSize,GD=GG-GH.col%GG;var GE=GK.appendChild(Fr("span",CO(GD),"cm-tab"));GH.col+=GD}else{var GE=GH.cm.options.specialCharPlaceholder(GI[0]);if(De&&K<9){GK.appendChild(Fr("span",[GE]))}else{GK.appendChild(GE)}GH.col+=1}GH.map.push(GH.pos,GH.pos+1,GE);GH.pos++}}if(GL||GJ||GF||F7||GB){var F8=GL||"";if(GJ){F8+=GJ}if(GF){F8+=GF}var GA=Fr("span",[GK],F8,GB);if(GN){GA.title=GN}return GH.content.appendChild(GA)}GH.content.appendChild(GK)}function Fa(F6){function F7(F8){var F9=" ";for(var GA=0;GA<F8.length-2;++GA){F9+=GA%2?" ":"\u00a0"}F9+=" ";return F9}return function(F9,GD,GA,F8,GC,GB){F6(F9,GD.replace(/ {3,}/g,F7),GA,F8,GC,GB)}}function v(F7,F6){return function(GE,GG,F8,GC,GH,GF){F8=F8?F8+" cm-force-border":"cm-force-border";var F9=GE.pos,GB=F9+GG.length;for(;;){for(var GD=0;GD<F6.length;GD++){var GA=F6[GD];if(GA.to>F9&&GA.from<=F9){break}}if(GA.to>=GB){return F7(GE,GG,F8,GC,GH,GF)}F7(GE,GG.slice(0,GA.to-F9),F8,GC,null,GF);GC=null;GG=GG.slice(GA.to-F9);F9=GA.to}}}function AB(F7,F9,F6,F8){var GA=!F8&&F6.widgetNode;if(GA){F7.map.push(F7.pos,F7.pos+F9,GA);F7.content.appendChild(GA)}F7.pos+=F9}function BM(GF,GM,GE){var GB=GF.markedSpans,GD=GF.text,GK=0;if(!GB){for(var GP=1;GP<GE.length;GP+=2){GM.addToken(GM,GD.slice(GK,GK=GE[GP]),Eq(GE[GP+1],GM.cm.options))}return }var GQ=GD.length,GA=0,GP=1,GI="",GR,GG;var GT=0,F6,GS,GJ,GU,F8;for(;;){if(GT==GA){F6=GS=GJ=GU=GG="";F8=null;GT=Infinity;var GC=[];for(var GN=0;GN<GB.length;++GN){var GO=GB[GN],GL=GO.marker;if(GO.from<=GA&&(GO.to==null||GO.to>GA)){if(GO.to!=null&&GT>GO.to){GT=GO.to;GS=""}if(GL.className){F6+=" "+GL.className}if(GL.css){GG=GL.css}if(GL.startStyle&&GO.from==GA){GJ+=" "+GL.startStyle}if(GL.endStyle&&GO.to==GT){GS+=" "+GL.endStyle}if(GL.title&&!GU){GU=GL.title}if(GL.collapsed&&(!F8||Dk(F8.marker,GL)<0)){F8=GO}}else{if(GO.from>GA&&GT>GO.from){GT=GO.from}}if(GL.type=="bookmark"&&GO.from==GA&&GL.widgetNode){GC.push(GL)}}if(F8&&(F8.from||0)==GA){AB(GM,(F8.to==null?GQ+1:F8.to)-GA,F8.marker,F8.from==null);if(F8.to==null){return }}if(!F8&&GC.length){for(var GN=0;GN<GC.length;++GN){AB(GM,0,GC[GN])}}}if(GA>=GQ){break}var GH=Math.min(GQ,GT);while(true){if(GI){var F7=GA+GI.length;if(!F8){var F9=F7>GH?GI.slice(0,GH-GA):GI;GM.addToken(GM,F9,GR?GR+F6:F6,GJ,GA+F9.length==GT?GS:"",GU,GG)}if(F7>=GH){GI=GI.slice(GH-GA);GA=GH;break}GA=F7;GJ=""}GI=GD.slice(GK,GK=GE[GP++]);GR=Eq(GE[GP++],GM.cm.options)}}}function Dm(F6,F7){return F7.from.ch==0&&F7.to.ch==0&&Fc(F7.text)==""&&(!F6.cm||F6.cm.options.wholeLineUpdateBefore)}function FT(GJ,GE,F7,GA){function GK(GM){return F7?F7[GM]:null}function F8(GM,GO,GN){EG(GM,GO,GN,GA);AD(GM,"change",GM,GE)}function F6(GP,GN){for(var GO=GP,GM=[];GO<GN;++GO){GM.push(new Fv(GL[GO],GK(GO),GA))}return GM}var GI=GE.from,GH=GE.to,GL=GE.text;var GF=E9(GJ,GI.line),GG=E9(GJ,GH.line);var GD=Fc(GL),F9=GK(GL.length-1),GC=GH.line-GI.line;if(GE.full){GJ.insert(0,F6(0,GL.length));GJ.remove(GL.length,GJ.size-GL.length)}else{if(Dm(GJ,GE)){var GB=F6(0,GL.length-1);F8(GG,GG.text,F9);if(GC){GJ.remove(GI.line,GC)}if(GB.length){GJ.insert(GI.line,GB)}}else{if(GF==GG){if(GL.length==1){F8(GF,GF.text.slice(0,GI.ch)+GD+GF.text.slice(GH.ch),F9)}else{var GB=F6(1,GL.length-1);GB.push(new Fv(GD+GF.text.slice(GH.ch),F9,GA));F8(GF,GF.text.slice(0,GI.ch)+GL[0],GK(0));GJ.insert(GI.line+1,GB)}}else{if(GL.length==1){F8(GF,GF.text.slice(0,GI.ch)+GL[0]+GG.text.slice(GH.ch),GK(0));GJ.remove(GI.line+1,GC)}else{F8(GF,GF.text.slice(0,GI.ch)+GL[0],GK(0));F8(GG,GD+GG.text.slice(GH.ch),F9);var GB=F6(1,GL.length-1);if(GC>1){GJ.remove(GI.line+1,GC-1)}GJ.insert(GI.line+1,GB)}}}}AD(GJ,"change",GJ,GE)}function Et(F7){this.lines=F7;this.parent=null;for(var F8=0,F6=0;F8<F7.length;++F8){F7[F8].parent=this;F6+=F7[F8].height}this.height=F6}Et.prototype={chunkSize:function(){return this.lines.length},removeInner:function(F6,GA){for(var F8=F6,F9=F6+GA;F8<F9;++F8){var F7=this.lines[F8];this.height-=F7.height;BZ(F7);AD(F7,"delete")}this.lines.splice(F6,GA)},collapse:function(F6){F6.push.apply(F6,this.lines)},insertInner:function(F7,F8,F6){this.height+=F6;this.lines=this.lines.slice(0,F7).concat(F8).concat(this.lines.slice(F7));for(var F9=0;F9<F8.length;++F9){F8[F9].parent=this}},iterN:function(F6,F9,F8){for(var F7=F6+F9;F6<F7;++F6){if(F8(this.lines[F6])){return true}}}};function FS(F9){this.children=F9;var F8=0,F6=0;for(var F7=0;F7<F9.length;++F7){var GA=F9[F7];F8+=GA.chunkSize();F6+=GA.height;GA.parent=this}this.size=F8;this.height=F6;this.parent=null}FS.prototype={chunkSize:function(){return this.size},removeInner:function(F6,GD){this.size-=GD;for(var F8=0;F8<this.children.length;++F8){var GC=this.children[F8],GA=GC.chunkSize();if(F6<GA){var F9=Math.min(GD,GA-F6),GB=GC.height;GC.removeInner(F6,F9);this.height-=GB-GC.height;if(GA==F9){this.children.splice(F8--,1);GC.parent=null}if((GD-=F9)==0){break}F6=0}else{F6-=GA}}if(this.size-GD<25&&(this.children.length>1||!(this.children[0] instanceof Et))){var F7=[];this.collapse(F7);this.children=[new Et(F7)];this.children[0].parent=this}},collapse:function(F6){for(var F7=0;F7<this.children.length;++F7){this.children[F7].collapse(F6)}},insertInner:function(F7,F8,F6){this.size+=F8.length;this.height+=F6;for(var GB=0;GB<this.children.length;++GB){var GD=this.children[GB],GC=GD.chunkSize();if(F7<=GC){GD.insertInner(F7,F8,F6);if(GD.lines&&GD.lines.length>50){while(GD.lines.length>50){var GA=GD.lines.splice(GD.lines.length-25,25);var F9=new Et(GA);GD.height-=F9.height;this.children.splice(GB+1,0,F9);F9.parent=this}this.maybeSpill()}break}F7-=GC}},maybeSpill:function(){if(this.children.length<=10){return }var F9=this;do{var F7=F9.children.splice(F9.children.length-5,5);var F8=new FS(F7);if(!F9.parent){var GA=new FS(F9.children);GA.parent=F9;F9.children=[GA,F8];F9=GA}else{F9.size-=F8.size;F9.height-=F8.height;var F6=DE(F9.parent.children,F9);F9.parent.children.splice(F6+1,0,F8)}F8.parent=F9.parent}while(F9.children.length>10);F9.parent.maybeSpill()},iterN:function(F6,GC,GB){for(var F7=0;F7<this.children.length;++F7){var GA=this.children[F7],F9=GA.chunkSize();if(F6<F9){var F8=Math.min(GC,F9-F6);if(GA.iterN(F6,F8,GB)){return true}if((GC-=F8)==0){break}F6=0}else{F6-=F9}}}};var CQ=0;var AR=i.Doc=function(F8,F7,F6){if(!(this instanceof AR)){return new AR(F8,F7,F6)}if(F6==null){F6=0}FS.call(this,[new Et([new Fv("",null)])]);this.first=F6;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=F6;var F9=x(F6,0);this.sel=Em(F9);this.history=new Fn(null);this.id=++CQ;this.modeOption=F7;if(typeof F8=="string"){F8=Aw(F8)}FT(this,{from:F9,to:F9,text:F8});Bs(this,Em(F9),z)};AR.prototype=CJ(FS.prototype,{constructor:AR,iter:function(F8,F7,F6){if(F6){this.iterN(F8-this.first,F7-F8,F6)}else{this.iterN(this.first,this.first+this.size,F8)}},insert:function(F7,F8){var F6=0;for(var F9=0;F9<F8.length;++F9){F6+=F8[F9].height}this.insertInner(F7-this.first,F8,F6)},remove:function(F6,F7){this.removeInner(F6-this.first,F7)},getValue:function(F7){var F6=Ay(this,this.first,this.first+this.size);if(F7===false){return F6}return F6.join(F7||"\n")},setValue:Cb(function(F7){var F8=x(this.first,0),F6=this.first+this.size-1;BC(this,{from:F8,to:x(F6,E9(this,F6).text.length),text:Aw(F7),origin:"setValue",full:true},true);Bs(this,Em(F8))}),replaceRange:function(F7,F9,F8,F6){F9=Fe(this,F9);F8=F8?Fe(this,F8):F9;Ax(this,F7,F9,F8,F6)},getRange:function(F9,F8,F7){var F6=Ft(this,Fe(this,F9),Fe(this,F8));if(F7===false){return F6}return F6.join(F7||"\n")},getLine:function(F7){var F6=this.getLineHandle(F7);return F6&&F6.text},getLineHandle:function(F6){if(B7(this,F6)){return E9(this,F6)}},getLineNumber:function(F6){return Bl(F6)},getLineHandleVisualStart:function(F6){if(typeof F6=="number"){F6=E9(this,F6)}return Y(F6)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(F6){return Fe(this,F6)},getCursor:function(F8){var F6=this.sel.primary(),F7;if(F8==null||F8=="head"){F7=F6.head}else{if(F8=="anchor"){F7=F6.anchor}else{if(F8=="end"||F8=="to"||F8===false){F7=F6.to()}else{F7=F6.from()}}}return F7},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Cb(function(F6,F8,F7){g(this,Fe(this,typeof F6=="number"?x(F6,F8||0):F6),null,F7)}),setSelection:Cb(function(F7,F8,F6){g(this,Fe(this,F7),Fe(this,F8||F7),F6)}),extendSelection:Cb(function(F8,F6,F7){Fo(this,Fe(this,F8),F6&&Fe(this,F6),F7)}),extendSelections:Cb(function(F7,F6){AU(this,Dt(this,F7,F6))}),extendSelectionsBy:Cb(function(F7,F6){AU(this,Bq(this.sel.ranges,F7),F6)}),setSelections:Cb(function(F6,GA,F8){if(!F6.length){return }for(var F9=0,F7=[];F9<F6.length;F9++){F7[F9]=new Ds(Fe(this,F6[F9].anchor),Fe(this,F6[F9].head))}if(GA==null){GA=Math.min(F6.length-1,this.sel.primIndex)}Bs(this,CV(F7,GA),F8)}),addSelection:Cb(function(F8,F9,F7){var F6=this.sel.ranges.slice(0);F6.push(new Ds(Fe(this,F8),Fe(this,F9||F8)));Bs(this,CV(F6,F6.length-1),F7)}),getSelection:function(GA){var F7=this.sel.ranges,F6;for(var F8=0;F8<F7.length;F8++){var F9=Ft(this,F7[F8].from(),F7[F8].to());F6=F6?F6.concat(F9):F9}if(GA===false){return F6}else{return F6.join(GA||"\n")}},getSelections:function(GA){var F9=[],F6=this.sel.ranges;for(var F7=0;F7<F6.length;F7++){var F8=Ft(this,F6[F7].from(),F6[F7].to());if(GA!==false){F8=F8.join(GA||"\n")}F9[F7]=F8}return F9},replaceSelection:function(F8,GA,F6){var F9=[];for(var F7=0;F7<this.sel.ranges.length;F7++){F9[F7]=F8}this.replaceSelections(F9,GA,F6||"+input")},replaceSelections:Cb(function(GB,GD,F8){var GA=[],GC=this.sel;for(var F9=0;F9<GC.ranges.length;F9++){var F7=GC.ranges[F9];GA[F9]={from:F7.from(),to:F7.to(),text:Aw(GB[F9]),origin:F8}}var F6=GD&&GD!="end"&&AE(this,GA,GD);for(var F9=GA.length-1;F9>=0;F9--){BC(this,GA[F9])}if(F6){E1(this,F6)}else{if(this.cm){Fb(this.cm)}}}),undo:Cb(function(){B6(this,"undo")}),redo:Cb(function(){B6(this,"redo")}),undoSelection:Cb(function(){B6(this,"undo",true)}),redoSelection:Cb(function(){B6(this,"redo",true)}),setExtending:function(F6){this.extend=F6},getExtending:function(){return this.extend},historySize:function(){var F9=this.history,F6=0,F8=0;for(var F7=0;F7<F9.done.length;F7++){if(!F9.done[F7].ranges){++F6}}for(var F7=0;F7<F9.undone.length;F7++){if(!F9.undone[F7].ranges){++F8}}return{undo:F6,redo:F8}},clearHistory:function(){this.history=new Fn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(F6){if(F6){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(F6){return this.history.generation==(F6||this.cleanGeneration)},getHistory:function(){return{done:Bn(this.history.done),undone:Bn(this.history.undone)}},setHistory:function(F7){var F6=this.history=new Fn(this.history.maxGeneration);F6.done=Bn(F7.done.slice(0),null,true);F6.undone=Bn(F7.undone.slice(0),null,true)},addLineClass:Cb(function(F8,F7,F6){return ES(this,F8,F7=="gutter"?"gutter":"class",function(F9){var GA=F7=="text"?"textClass":F7=="background"?"bgClass":F7=="gutter"?"gutterClass":"wrapClass";if(!F9[GA]){F9[GA]=F6}else{if(t(F6).test(F9[GA])){return false}else{F9[GA]+=" "+F6}}return true})}),removeLineClass:Cb(function(F8,F7,F6){return ES(this,F8,F7=="gutter"?"gutter":"class",function(GA){var GD=F7=="text"?"textClass":F7=="background"?"bgClass":F7=="gutter"?"gutterClass":"wrapClass";var GC=GA[GD];if(!GC){return false}else{if(F6==null){GA[GD]=null}else{var GB=GC.match(t(F6));if(!GB){return false}var F9=GB.index+GB[0].length;GA[GD]=GC.slice(0,GB.index)+(!GB.index||F9==GC.length?"":" ")+GC.slice(F9)||null}}return true})}),markText:function(F8,F7,F6){return EZ(this,Fe(this,F8),Fe(this,F7),F6,"range")},setBookmark:function(F8,F6){var F7={replacedWith:F6&&(F6.nodeType==null?F6.widget:F6),insertLeft:F6&&F6.insertLeft,clearWhenEmpty:false,shared:F6&&F6.shared};F8=Fe(this,F8);return EZ(this,F8,F8,F7,"bookmark")},findMarksAt:function(GA){GA=Fe(this,GA);var F9=[],F7=E9(this,GA.line).markedSpans;if(F7){for(var F6=0;F6<F7.length;++F6){var F8=F7[F6];if((F8.from==null||F8.from<=GA.ch)&&(F8.to==null||F8.to>=GA.ch)){F9.push(F8.marker.parent||F8.marker)}}}return F9},findMarks:function(GA,F9,F6){GA=Fe(this,GA);F9=Fe(this,F9);var F7=[],F8=GA.line;this.iter(GA.line,F9.line+1,function(GB){var GD=GB.markedSpans;if(GD){for(var GC=0;GC<GD.length;GC++){var GE=GD[GC];if(!(F8==GA.line&&GA.ch>GE.to||GE.from==null&&F8!=GA.line||F8==F9.line&&GE.from>F9.ch)&&(!F6||F6(GE.marker))){F7.push(GE.marker.parent||GE.marker)}}}++F8});return F7},getAllMarks:function(){var F6=[];this.iter(function(F8){var F7=F8.markedSpans;if(F7){for(var F9=0;F9<F7.length;++F9){if(F7[F9].from!=null){F6.push(F7[F9].marker)}}}});return F6},posFromIndex:function(F7){var F6,F8=this.first;this.iter(function(F9){var GA=F9.text.length+1;if(GA>F7){F6=F7;return true}F7-=GA;++F8});return Fe(this,x(F8,F6))},indexFromPos:function(F7){F7=Fe(this,F7);var F6=F7.ch;if(F7.line<this.first||F7.ch<0){return 0}this.iter(this.first,F7.line,function(F8){F6+=F8.text.length+1});return F6},copy:function(F6){var F7=new AR(Ay(this,this.first,this.first+this.size),this.modeOption,this.first);F7.scrollTop=this.scrollTop;F7.scrollLeft=this.scrollLeft;F7.sel=this.sel;F7.extend=false;if(F6){F7.history.undoDepth=this.history.undoDepth;F7.setHistory(this.getHistory())}return F7},linkedDoc:function(F6){if(!F6){F6={}}var F9=this.first,F8=this.first+this.size;if(F6.from!=null&&F6.from>F9){F9=F6.from}if(F6.to!=null&&F6.to<F8){F8=F6.to}var F7=new AR(Ay(this,F9,F8),F6.mode||this.modeOption,F9);if(F6.sharedHist){F7.history=this.history}(this.linked||(this.linked=[])).push({doc:F7,sharedHist:F6.sharedHist});F7.linked=[{doc:this,isParent:true,sharedHist:F6.sharedHist}];DZ(F7,Ej(this));return F7},unlinkDoc:function(F7){if(F7 instanceof i){F7=F7.doc}if(this.linked){for(var F8=0;F8<this.linked.length;++F8){var F9=this.linked[F8];if(F9.doc!=F7){continue}this.linked.splice(F8,1);F7.unlinkDoc(this);EI(Ej(this));break}}if(F7.history==this.history){var F6=[F7.id];D1(F7,function(GA){F6.push(GA.id)},true);F7.history=new Fn(null);F7.history.done=Bn(this.history.done,F6);F7.history.undone=Bn(this.history.undone,F6)}},iterLinkedDocs:function(F6){D1(this,F6)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});AR.prototype.eachLine=AR.prototype.iter;var D="iter insert remove copy getEditor".split(" ");for(var Bi in AR.prototype){if(AR.prototype.hasOwnProperty(Bi)&&DE(D,Bi)<0){i.prototype[Bi]=(function(F6){return function(){return F6.apply(this.doc,arguments)}})(AR.prototype[Bi])}}BW(AR);function D1(F9,F8,F7){function F6(GF,GD,GB){if(GF.linked){for(var GC=0;GC<GF.linked.length;++GC){var GA=GF.linked[GC];if(GA.doc==GD){continue}var GE=GB&&GA.sharedHist;if(F7&&!GE){continue}F8(GA.doc,GE);F6(GA.doc,GF,GE)}}}F6(F9,null,true)}function D5(F6,F7){if(F7.cm){throw new Error("This document is already in use.")}F6.doc=F7;F7.cm=F6;y(F6);BP(F6);if(!F6.options.lineWrapping){G(F6)}F6.options.mode=F7.modeOption;AG(F6)}function E9(F9,GB){GB-=F9.first;if(GB<0||GB>=F9.size){throw new Error("There is no line "+(GB+F9.first)+" in the document.")}for(var F6=F9;!F6.lines;){for(var F7=0;;++F7){var GA=F6.children[F7],F8=GA.chunkSize();if(GB<F8){F6=GA;break}GB-=F8}}return F6.lines[GB]}function Ft(F8,GA,F6){var F7=[],F9=GA.line;F8.iter(GA.line,F6.line+1,function(GB){var GC=GB.text;if(F9==F6.line){GC=GC.slice(0,F6.ch)}if(F9==GA.line){GC=GC.slice(GA.ch)}F7.push(GC);++F9});return F7}function Ay(F7,F9,F8){var F6=[];F7.iter(F9,F8,function(GA){F6.push(GA.text)});return F6}function Fu(F7,F6){var F8=F6-F7.height;if(F8){for(var F9=F7;F9;F9=F9.parent){F9.height+=F8}}}function Bl(F6){if(F6.parent==null){return null}var GA=F6.parent,F9=DE(GA.lines,F6);for(var F7=GA.parent;F7;GA=F7,F7=F7.parent){for(var F8=0;;++F8){if(F7.children[F8]==GA){break}F9+=F7.children[F8].chunkSize()}}return F9+GA.first}function Be(F8,GB){var GD=F8.first;outer:do{for(var F9=0;F9<F8.children.length;++F9){var GC=F8.children[F9],GA=GC.height;if(GB<GA){F8=GC;continue outer}GB-=GA;GD+=GC.chunkSize()}return GD}while(!F8.lines);for(var F9=0;F9<F8.lines.length;++F9){var F7=F8.lines[F9],F6=F7.height;if(GB<F6){break}GB-=F6}return GD+F9}function Bk(F8){F8=Y(F8);var GA=0,F7=F8.parent;for(var F9=0;F9<F7.lines.length;++F9){var F6=F7.lines[F9];if(F6==F8){break}else{GA+=F6.height}}for(var GB=F7.parent;GB;F7=GB,GB=F7.parent){for(var F9=0;F9<GB.children.length;++F9){var GC=GB.children[F9];if(GC==F7){break}else{GA+=GC.height}}}return GA}function A(F7){var F6=F7.order;if(F6==null){F6=F7.order=BD(F7.text)}return F6}function Fn(F6){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=F6||1}function DP(F6,F8){var F7={from:CH(F8.from),to:Cu(F8),text:Ft(F6,F8.from,F8.to)};Bw(F6,F7,F8.from.line,F8.to.line+1);D1(F6,function(F9){Bw(F9,F7,F8.from.line,F8.to.line+1)},true);return F7}function FW(F7){while(F7.length){var F6=Fc(F7);if(F6.ranges){F7.pop()}else{break}}}function Eg(F7,F6){if(F6){FW(F7.done);return Fc(F7.done)}else{if(F7.done.length&&!Fc(F7.done).ranges){return Fc(F7.done)}else{if(F7.done.length>1&&!F7.done[F7.done.length-2].ranges){F7.done.pop();return Fc(F7.done)}}}}function Fh(GC,GA,F6,F9){var F8=GC.history;F8.undone.length=0;var F7=+new Date,GD;if((F8.lastOp==F9||F8.lastOrigin==GA.origin&&GA.origin&&((GA.origin.charAt(0)=="+"&&GC.cm&&F8.lastModTime>F7-GC.cm.options.historyEventDelay)||GA.origin.charAt(0)=="*"))&&(GD=Eg(F8,F8.lastOp==F9))){var GE=Fc(GD.changes);if(CD(GA.from,GA.to)==0&&CD(GA.from,GE.to)==0){GE.to=Cu(GA)}else{GD.changes.push(DP(GC,GA))}}else{var GB=Fc(F8.done);if(!GB||!GB.ranges){Ck(GC.sel,F8.done)}GD={changes:[DP(GC,GA)],generation:F8.generation};F8.done.push(GD);while(F8.done.length>F8.undoDepth){F8.done.shift();if(!F8.done[0].ranges){F8.done.shift()}}}F8.done.push(F6);F8.generation=++F8.maxGeneration;F8.lastModTime=F8.lastSelTime=F7;F8.lastOp=F8.lastSelOp=F9;F8.lastOrigin=F8.lastSelOrigin=GA.origin;if(!GE){Ab(GC,"historyAdded")}}function BY(GA,F6,F8,F9){var F7=F6.charAt(0);return F7=="*"||F7=="+"&&F8.ranges.length==F9.ranges.length&&F8.somethingSelected()==F9.somethingSelected()&&new Date-GA.history.lastSelTime<=(GA.cm?GA.cm.options.historyEventDelay:500)}function F0(GB,F9,F6,F8){var GA=GB.history,F7=F8&&F8.origin;if(F6==GA.lastSelOp||(F7&&GA.lastSelOrigin==F7&&(GA.lastModTime==GA.lastSelTime&&GA.lastOrigin==F7||BY(GB,F7,Fc(GA.done),F9)))){GA.done[GA.done.length-1]=F9}else{Ck(F9,GA.done)}GA.lastSelTime=+new Date;GA.lastSelOrigin=F7;GA.lastSelOp=F6;if(F8&&F8.clearRedo!==false){FW(GA.undone)}}function Ck(F7,F6){var F8=Fc(F6);if(!(F8&&F8.ranges&&F8.equals(F7))){F6.push(F7)}}function Bw(F7,GB,GA,F9){var F6=GB["spans_"+F7.id],F8=0;F7.iter(Math.max(F7.first,GA),Math.min(F7.first+F7.size,F9),function(GC){if(GC.markedSpans){(F6||(F6=GB["spans_"+F7.id]={}))[F8]=GC.markedSpans}++F8})}function BH(F8){if(!F8){return null}for(var F7=0,F6;F7<F8.length;++F7){if(F8[F7].marker.explicitlyCleared){if(!F6){F6=F8.slice(0,F7)}}else{if(F6){F6.push(F8[F7])}}}return !F6?F8:F6.length?F6:null}function B2(F9,GA){var F8=GA["spans_"+F9.id];if(!F8){return null}for(var F7=0,F6=[];F7<GA.text.length;++F7){F6.push(BH(F8[F7]))}return F6}function Bn(GH,F9,GG){for(var GC=0,F7=[];GC<GH.length;++GC){var F8=GH[GC];if(F8.ranges){F7.push(GG?Fs.prototype.deepCopy.call(F8):F8);continue}var GE=F8.changes,GF=[];F7.push({changes:GF});for(var GB=0;GB<GE.length;++GB){var GD=GE[GB],GA;GF.push({from:GD.from,to:GD.to,text:GD.text});if(F9){for(var F6 in GD){if(GA=F6.match(/^spans_(\d+)$/)){if(DE(F9,Number(GA[1]))>-1){Fc(GF)[F6]=GD[F6];delete GD[F6]}}}}}}return F7}function j(F9,F8,F7,F6){if(F7<F9.line){F9.line+=F6}else{if(F8<F9.line){F9.line=F8;F9.ch=0}}}function FB(F9,GB,GC,GD){for(var F8=0;F8<F9.length;++F8){var F6=F9[F8],GA=true;if(F6.ranges){if(!F6.copied){F6=F9[F8]=F6.deepCopy();F6.copied=true}for(var F7=0;F7<F6.ranges.length;F7++){j(F6.ranges[F7].anchor,GB,GC,GD);j(F6.ranges[F7].head,GB,GC,GD)}continue}for(var F7=0;F7<F6.changes.length;++F7){var GE=F6.changes[F7];if(GC<GE.from.line){GE.from=x(GE.from.line+GD,GE.from.ch);GE.to=x(GE.to.line+GD,GE.to.ch)}else{if(GB<=GE.to.line){GA=false;break}}}if(!GA){F9.splice(0,F8+1);F8=0}}}function DY(F7,GA){var F9=GA.from.line,F8=GA.to.line,F6=GA.text.length-(F8-F9)-1;FB(F7.done,F9,F8,F6);FB(F7.undone,F9,F8,F6)}var Cd=i.e_preventDefault=function(F6){if(F6.preventDefault){F6.preventDefault()}else{F6.returnValue=false}};var DL=i.e_stopPropagation=function(F6){if(F6.stopPropagation){F6.stopPropagation()}else{F6.cancelBubble=true}};function Bj(F6){return F6.defaultPrevented!=null?F6.defaultPrevented:F6.returnValue==false}var EL=i.e_stop=function(F6){Cd(F6);DL(F6)};function m(F6){return F6.target||F6.srcElement}function Fi(F7){var F6=F7.which;if(F6==null){if(F7.button&1){F6=1}else{if(F7.button&2){F6=3}else{if(F7.button&4){F6=2}}}}if(B5&&F7.ctrlKey&&F6==1){F6=3}return F6}var Bv=i.on=function(F9,F7,F8){if(F9.addEventListener){F9.addEventListener(F7,F8,false)}else{if(F9.attachEvent){F9.attachEvent("on"+F7,F8)}else{var GA=F9._handlers||(F9._handlers={});var F6=GA[F7]||(GA[F7]=[]);F6.push(F8)}}};var D7=i.off=function(GA,F8,F9){if(GA.removeEventListener){GA.removeEventListener(F8,F9,false)}else{if(GA.detachEvent){GA.detachEvent("on"+F8,F9)}else{var F6=GA._handlers&&GA._handlers[F8];if(!F6){return }for(var F7=0;F7<F6.length;++F7){if(F6[F7]==F9){F6.splice(F7,1);break}}}}};var Ab=i.signal=function(GA,F9){var F6=GA._handlers&&GA._handlers[F9];if(!F6){return }var F7=Array.prototype.slice.call(arguments,2);for(var F8=0;F8<F6.length;++F8){F6[F8].apply(null,F7)}};var BX=null;function AD(GC,GA){var F6=GC._handlers&&GC._handlers[GA];if(!F6){return }var F8=Array.prototype.slice.call(arguments,2),GB;if(BN){GB=BN.delayedCallbacks}else{if(BX){GB=BX}else{GB=BX=[];setTimeout(Ai,0)}}function F7(GD){return function(){GD.apply(null,F8)}}for(var F9=0;F9<F6.length;++F9){GB.push(F7(F6[F9]))}}function Ai(){var F6=BX;BX=null;for(var F7=0;F7<F6.length;++F7){F6[F7]()}}function An(F6,F8,F7){if(typeof F8=="string"){F8={type:F8,preventDefault:function(){this.defaultPrevented=true}}}Ab(F6,F7||F8.type,F6,F8);return Bj(F8)||F8.codemirrorIgnore}function w(F7){var F6=F7._handlers&&F7._handlers.cursorActivity;if(!F6){return }var F9=F7.curOp.cursorActivityHandlers||(F7.curOp.cursorActivityHandlers=[]);for(var F8=0;F8<F6.length;++F8){if(DE(F9,F6[F8])==-1){F9.push(F6[F8])}}}function FC(F8,F7){var F6=F8._handlers&&F8._handlers[F7];return F6&&F6.length>0}function BW(F6){F6.prototype.on=function(F7,F8){Bv(this,F7,F8)};F6.prototype.off=function(F7,F8){D7(this,F7,F8)}}var Dd=30;var B8=i.Pass={toString:function(){return"CodeMirror.Pass"}};var z={scroll:false},n={origin:"*mouse"},Ct={origin:"+move"};function F5(){this.id=null}F5.prototype.set=function(F6,F7){clearTimeout(this.id);this.id=setTimeout(F7,F6)};var Br=i.countColumn=function(F9,F7,GB,GC,F8){if(F7==null){F7=F9.search(/[^\s\u00a0]/);if(F7==-1){F7=F9.length}}for(var GA=GC||0,GD=F8||0;;){var F6=F9.indexOf("\t",GA);if(F6<0||F6>=F7){return GD+(F7-GA)}GD+=F6-GA;GD+=GB-(GD%GB);GA=F6+1}};function EK(GA,F9,GB){for(var GC=0,F8=0;;){var F7=GA.indexOf("\t",GC);if(F7==-1){F7=GA.length}var F6=F7-GC;if(F7==GA.length||F8+F6>=F9){return GC+Math.min(F6,F9-F8)}F8+=F7-GC;F8+=GB-(F8%GB);GC=F7+1;if(F8>=F9){return GC}}}var Av=[""];function CO(F6){while(Av.length<=F6){Av.push(Fc(Av)+" ")}return Av[F6]}function Fc(F6){return F6[F6.length-1]}var Df=function(F6){F6.select()};if(Ev){Df=function(F6){F6.selectionStart=0;F6.selectionEnd=F6.value.length}}else{if(De){Df=function(F7){try{F7.select()}catch(F6){}}}}function DE(F8,F6){for(var F7=0;F7<F8.length;++F7){if(F8[F7]==F6){return F7}}return -1}function Bq(F9,F8){var F6=[];for(var F7=0;F7<F9.length;F7++){F6[F7]=F8(F9[F7],F7)}return F6}function CJ(F9,F6){var F8;if(Object.create){F8=Object.create(F9)}else{var F7=function(){};F7.prototype=F9;F8=new F7()}if(F6){Aj(F6,F8)}return F8}function Aj(F8,F7,F6){if(!F7){F7={}}for(var F9 in F8){if(F8.hasOwnProperty(F9)&&(F6!==false||!F7.hasOwnProperty(F9))){F7[F9]=F8[F9]}}return F7}function CU(F7){var F6=Array.prototype.slice.call(arguments,1);return function(){return F7.apply(null,F6)}}var A8=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;var FY=i.isWordChar=function(F6){return/\w/.test(F6)||F6>"\x80"&&(F6.toUpperCase()!=F6.toLowerCase()||A8.test(F6))};function CY(F6,F7){if(!F7){return FY(F6)}if(F7.source.indexOf("\\w")>-1&&FY(F6)){return true}return F7.test(F6)}function Eo(F6){for(var F7 in F6){if(F6.hasOwnProperty(F7)&&F6[F7]){return false}}return true}var Ed=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function FK(F6){return F6.charCodeAt(0)>=768&&Ed.test(F6)}function Fr(F6,GA,F9,F8){var GB=document.createElement(F6);if(F9){GB.className=F9}if(F8){GB.style.cssText=F8}if(typeof GA=="string"){GB.appendChild(document.createTextNode(GA))}else{if(GA){for(var F7=0;F7<GA.length;++F7){GB.appendChild(GA[F7])}}}return GB}var CK;if(document.createRange){CK=function(F8,F9,F6){var F7=document.createRange();F7.setEnd(F8,F6);F7.setStart(F8,F9);return F7}}else{CK=function(F8,GA,F6){var F7=document.body.createTextRange();try{F7.moveToElementText(F8.parentNode)}catch(F9){return F7}F7.collapse(true);F7.moveEnd("character",F6);F7.moveStart("character",GA);return F7}}function Dv(F7){for(var F6=F7.childNodes.length;F6>0;--F6){F7.removeChild(F7.firstChild)}return F7}function Bp(F6,F7){return Dv(F6).appendChild(F7)}function Fz(F6,F7){if(F6.contains){return F6.contains(F7)}while(F7=F7.parentNode){if(F7==F6){return true}}}function Di(){return document.activeElement}if(De&&K<11){Di=function(){try{return document.activeElement}catch(F6){return document.body}}}function t(F6){return new RegExp("(^|\\s)"+F6+"(?:$|\\s)\\s*")}var F=i.rmClass=function(F8,F6){var F9=F8.className;var F7=t(F6).exec(F9);if(F7){var GA=F9.slice(F7.index+F7[0].length);F8.className=F9.slice(0,F7.index)+(GA?F7[1]+GA:"")}};var FV=i.addClass=function(F7,F6){var F8=F7.className;if(!t(F6).test(F8)){F7.className+=(F8?" ":"")+F6}};function Fm(F8,F6){var F7=F8.split(" ");for(var F9=0;F9<F7.length;F9++){if(F7[F9]&&!t(F7[F9]).test(F6)){F6+=" "+F7[F9]}}return F6}function AX(F9){if(!document.body.getElementsByClassName){return }var F8=document.body.getElementsByClassName("CodeMirror");for(var F7=0;F7<F8.length;F7++){var F6=F8[F7].CodeMirror;if(F6){F9(F6)}}}var Ca=false;function BF(){if(Ca){return }FZ();Ca=true}function FZ(){var F6;Bv(window,"resize",function(){if(F6==null){F6=setTimeout(function(){F6=null;AX(Ap)},100)}});Bv(window,"blur",function(){AX(Ar)})}var Ef=function(){if(De&&K<9){return false}var F6=Fr("div");return"draggable" in F6||"dragDrop" in F6}();var Fg;function BL(F6){if(Fg==null){var F7=Fr("span","\u200b");Bp(F6,Fr("span",[F7,document.createTextNode("x")]));if(F6.firstChild.offsetHeight!=0){Fg=F7.offsetWidth<=1&&F7.offsetHeight>2&&!(De&&K<8)}}if(Fg){return Fr("span","\u200b")}else{return Fr("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var Ff;function Bm(F9){if(Ff!=null){return Ff}var F6=Bp(F9,document.createTextNode("A\u062eA"));var F8=CK(F6,0,1).getBoundingClientRect();if(!F8||F8.left==F8.right){return false}var F7=CK(F6,1,2).getBoundingClientRect();return Ff=(F7.right-F8.right<3)}var Aw=i.splitLines="\n\nb".split(/\n/).length!=3?function(GB){var GC=0,F6=[],GA=GB.length;while(GC<=GA){var F9=GB.indexOf("\n",GC);if(F9==-1){F9=GB.length}var F8=GB.slice(GC,GB.charAt(F9-1)=="\r"?F9-1:F9);var F7=F8.indexOf("\r");if(F7!=-1){F6.push(F8.slice(0,F7));GC+=F7+1}else{F6.push(F8);GC=F9+1}}return F6}:function(F6){return F6.split(/\r\n?|\n/)};var BQ=window.getSelection?function(F7){try{return F7.selectionStart!=F7.selectionEnd}catch(F6){return false}}:function(F8){try{var F6=F8.ownerDocument.selection.createRange()}catch(F7){}if(!F6||F6.parentElement()!=F8){return false}return F6.compareEndPoints("StartToEnd",F6)!=0};var C7=(function(){var F6=Fr("div");if("oncopy" in F6){return true}F6.setAttribute("oncopy","return;");return typeof F6.oncopy=="function"})();var E0=null;function Ah(F7){if(E0!=null){return E0}var F8=Bp(F7,Fr("span","x"));var F9=F8.getBoundingClientRect();var F6=CK(F8,0,1).getBoundingClientRect();return E0=Math.abs(F9.left-F6.left)>1}var FA={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};i.keyNames=FA;(function(){for(var F6=0;F6<10;F6++){FA[F6+48]=FA[F6+96]=String(F6)}for(var F6=65;F6<=90;F6++){FA[F6]=String.fromCharCode(F6)}for(var F6=1;F6<=12;F6++){FA[F6+111]=FA[F6+63235]="F"+F6}})();function Dy(F6,GC,GB,GA){if(!F6){return GA(GC,GB,"ltr")}var F9=false;for(var F8=0;F8<F6.length;++F8){var F7=F6[F8];if(F7.from<GB&&F7.to>GC||GC==GB&&F7.to==GC){GA(Math.max(F7.from,GC),Math.min(F7.to,GB),F7.level==1?"rtl":"ltr");F9=true}}if(!F9){GA(GC,GB,"ltr")}}function DS(F6){return F6.level%2?F6.to:F6.from}function F2(F6){return F6.level%2?F6.from:F6.to}function Cc(F7){var F6=A(F7);return F6?DS(F6[0]):0}function Cp(F7){var F6=A(F7);if(!F6){return F7.text.length}return F2(Fc(F6))}function BR(F7,GA){var F8=E9(F7.doc,GA);var GB=Y(F8);if(GB!=F8){GA=Bl(GB)}var F6=A(GB);var F9=!F6?0:F6[0].level%2?Cp(GB):Cc(GB);return x(GA,F9)}function Dj(F8,GB){var F7,F9=E9(F8.doc,GB);while(F7=EP(F9)){F9=F7.find(1,true).line;GB=null}var F6=A(F9);var GA=!F6?F9.text.length:F6[0].level%2?Cc(F9):Cp(F9);return x(GB==null?Bl(F9):GB,GA)}function Dc(F7,GC){var GB=BR(F7,GC.line);var F8=E9(F7.doc,GB.line);var F6=A(F8);if(!F6||F6[0].level==0){var GA=Math.max(0,F8.text.search(/\S/));var F9=GC.line==GB.line&&GC.ch<=GA&&GC.ch;return x(GB.line,F9?0:GA)}return GB}function AM(F7,F8,F6){var F9=F7[0].level;if(F8==F9){return true}if(F6==F9){return false}return F8<F6}var Ew;function Ad(F6,GA){Ew=null;for(var F7=0,F8;F7<F6.length;++F7){var F9=F6[F7];if(F9.from<GA&&F9.to>GA){return F7}if((F9.from==GA||F9.to==GA)){if(F8==null){F8=F7}else{if(AM(F6,F9.level,F6[F8].level)){if(F9.from!=F9.to){Ew=F8}return F7}else{if(F9.from!=F9.to){Ew=F7}return F8}}}}return F8}function E8(F6,F9,F7,F8){if(!F8){return F9+F7}do{F9+=F7}while(F9>0&&FK(F6.text.charAt(F9)));return F9}function U(F6,GD,F8,F9){var GA=A(F6);if(!GA){return AH(F6,GD,F8,F9)}var GC=Ad(GA,GD),F7=GA[GC];var GB=E8(F6,GD,F7.level%2?-F8:F8,F9);for(;;){if(GB>F7.from&&GB<F7.to){return GB}if(GB==F7.from||GB==F7.to){if(Ad(GA,GB)==GC){return GB}F7=GA[GC+=F8];return(F8>0)==F7.level%2?F7.to:F7.from}else{F7=GA[GC+=F8];if(!F7){return null}if((F8>0)==F7.level%2){GB=E8(F6,F7.to,-1,F9)}else{GB=E8(F6,F7.from,1,F9)}}}}function AH(F6,GA,F7,F8){var F9=GA+F7;if(F8){while(F9>0&&FK(F6.text.charAt(F9))){F9+=F7}}return F9<0||F9>F6.text.length?null:F9}var BD=(function(){var GC="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var GA="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function F9(GG){if(GG<=247){return GC.charAt(GG)}else{if(1424<=GG&&GG<=1524){return"R"}else{if(1536<=GG&&GG<=1773){return GA.charAt(GG-1536)}else{if(1774<=GG&&GG<=2220){return"r"}else{if(8192<=GG&&GG<=8203){return"w"}else{if(GG==8204){return"b"}else{return"L"}}}}}}}var F6=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var GF=/[stwN]/,F8=/[LRr]/,F7=/[Lb1n]/,GB=/[1n]/;var GE="L";function GD(GI,GH,GG){this.level=GI;this.from=GH;this.to=GG}return function(GQ){if(!F6.test(GQ)){return false}var GW=GQ.length,GM=[];for(var GV=0,GI;GV<GW;++GV){GM.push(GI=F9(GQ.charCodeAt(GV)))}for(var GV=0,GP=GE;GV<GW;++GV){var GI=GM[GV];if(GI=="m"){GM[GV]=GP}else{GP=GI}}for(var GV=0,GG=GE;GV<GW;++GV){var GI=GM[GV];if(GI=="1"&&GG=="r"){GM[GV]="n"}else{if(F8.test(GI)){GG=GI;if(GI=="r"){GM[GV]="R"}}}}for(var GV=1,GP=GM[0];GV<GW-1;++GV){var GI=GM[GV];if(GI=="+"&&GP=="1"&&GM[GV+1]=="1"){GM[GV]="1"}else{if(GI==","&&GP==GM[GV+1]&&(GP=="1"||GP=="n")){GM[GV]=GP}}GP=GI}for(var GV=0;GV<GW;++GV){var GI=GM[GV];if(GI==","){GM[GV]="N"}else{if(GI=="%"){for(var GJ=GV+1;GJ<GW&&GM[GJ]=="%";++GJ){}var GX=(GV&&GM[GV-1]=="!")||(GJ<GW&&GM[GJ]=="1")?"1":"N";for(var GT=GV;GT<GJ;++GT){GM[GT]=GX}GV=GJ-1}}}for(var GV=0,GG=GE;GV<GW;++GV){var GI=GM[GV];if(GG=="L"&&GI=="1"){GM[GV]="L"}else{if(F8.test(GI)){GG=GI}}}for(var GV=0;GV<GW;++GV){if(GF.test(GM[GV])){for(var GJ=GV+1;GJ<GW&&GF.test(GM[GJ]);++GJ){}var GN=(GV?GM[GV-1]:GE)=="L";var GH=(GJ<GW?GM[GJ]:GE)=="L";var GX=GN||GH?"L":"R";for(var GT=GV;GT<GJ;++GT){GM[GT]=GX}GV=GJ-1}}var GU=[],GR;for(var GV=0;GV<GW;){if(F7.test(GM[GV])){var GK=GV;for(++GV;GV<GW&&F7.test(GM[GV]);++GV){}GU.push(new GD(0,GK,GV))}else{var GL=GV,GO=GU.length;for(++GV;GV<GW&&GM[GV]!="L";++GV){}for(var GT=GL;GT<GV;){if(GB.test(GM[GT])){if(GL<GT){GU.splice(GO,0,new GD(1,GL,GT))}var GS=GT;for(++GT;GT<GV&&GB.test(GM[GT]);++GT){}GU.splice(GO,0,new GD(2,GS,GT));GL=GT}else{++GT}}if(GL<GV){GU.splice(GO,0,new GD(1,GL,GV))}}}if(GU[0].level==1&&(GR=GQ.match(/^\s+/))){GU[0].from=GR[0].length;GU.unshift(new GD(0,0,GR[0].length))}if(Fc(GU).level==1&&(GR=GQ.match(/\s+$/))){Fc(GU).to-=GR[0].length;GU.push(new GD(0,GW-GR[0].length,GW))}if(GU[0].level!=Fc(GU).level){GU.push(new GD(GU[0].level,GW,GW))}return GU}})();i.version="4.12.0";return i});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror-raw', location = '/static/bower/CodeMirror/addon/selection/mark-selection.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(B){B.defineOption("styleSelectedText",false,function(K,N,L){var M=L&&L!=B.Init;if(N&&!M){K.state.markedSelection=[];K.state.markedSelectionStyle=typeof N=="string"?N:"CodeMirror-selectedtext";F(K);K.on("cursorActivity",G);K.on("change",H)}else{if(!N&&M){K.off("cursorActivity",G);K.off("change",H);D(K);K.state.markedSelection=K.state.markedSelectionStyle=null}}});function G(K){K.operation(function(){C(K)})}function H(K){if(K.state.markedSelection.length){K.operation(function(){D(K)})}}var A=8;var J=B.Pos;var I=B.cmpPos;function E(T,R,S,O){if(I(R,S)==0){return }var P=T.state.markedSelection;var U=T.state.markedSelectionStyle;for(var V=R.line;;){var K=V==R.line?R:J(V,0);var L=V+A,Q=L>=S.line;var N=Q?S:J(L,0);var M=T.markText(K,N,{className:U});if(O==null){P.push(M)}else{P.splice(O++,0,M)}if(Q){break}V=L}}function D(K){var M=K.state.markedSelection;for(var L=0;L<M.length;++L){M[L].clear()}M.length=0}function F(K){D(K);var L=K.listSelections();for(var M=0;M<L.length;M++){E(K,L[M].from(),L[M].to())}}function C(K){if(!K.somethingSelected()){return D(K)}if(K.listSelections().length>1){return F(K)}var P=K.getCursor("start"),O=K.getCursor("end");var N=K.state.markedSelection;if(!N.length){return E(K,P,O)}var M=N[0].find(),L=N[N.length-1].find();if(!M||!L||O.line-P.line<A||I(P,L.to)>=0||I(O,M.from)<=0){return F(K)}while(I(P,M.from)>0){N.shift().clear();M=N[0].find()}if(I(P,M.from)<0){if(M.to.line-P.line<A){N.shift().clear();E(K,P,M.to,0)}else{E(K,P,M.from,0)}}while(I(O,L.to)<0){N.pop().clear();L=N[N.length-1].find()}if(I(O,L.to)>0){if(O.line-L.from.line<A){N.pop().clear();E(K,L.from,O)}else{E(K,L.to,O)}}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror-raw', location = '/static/bower/CodeMirror/addon/search/searchcursor.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){var B=A.Pos;function C(K,I,L,G){this.atOccurrence=false;this.doc=K;if(G==null&&typeof I=="string"){G=false}L=L?K.clipPos(L):B(0,0);this.pos={from:L,to:L};if(typeof I!="string"){if(!I.global){I=new RegExp(I.source,I.ignoreCase?"ig":"g")}this.matches=function(P,T){if(P){I.lastIndex=0;var M=K.getLine(T.line).slice(0,T.ch),R=0,O,S;for(;;){I.lastIndex=R;var Q=I.exec(M);if(!Q){break}O=Q;S=O.index;R=O.index+(O[0].length||1);if(R==M.length){break}}var N=(O&&O[0].length)||0;if(!N){if(S==0&&M.length==0){O=undefined}else{if(S!=K.getLine(T.line).length){N++}}}}else{I.lastIndex=T.ch;var M=K.getLine(T.line),O=I.exec(M);var N=(O&&O[0].length)||0;var S=O&&O.index;if(S+N!=M.length&&!N){N=1}}if(O&&N){return{from:B(T.line,S),to:B(T.line,S+N),match:O}}}}else{var E=I;if(G){I=I.toLowerCase()}var F=G?function(M){return M.toLowerCase()}:function(M){return M};var J=I.split("\n");if(J.length==1){if(!I.length){this.matches=function(){}}else{this.matches=function(O,Q){if(O){var P=K.getLine(Q.line).slice(0,Q.ch),M=F(P);var N=M.lastIndexOf(I);if(N>-1){N=D(P,M,N);return{from:B(Q.line,N),to:B(Q.line,N+E.length)}}}else{var P=K.getLine(Q.line).slice(Q.ch),M=F(P);var N=M.indexOf(I);if(N>-1){N=D(P,M,N)+Q.ch;return{from:B(Q.line,N),to:B(Q.line,N+E.length)}}}}}}else{var H=E.split("\n");this.matches=function(N,P){var T=J.length-1;if(N){if(P.line-(J.length-1)<K.firstLine()){return }if(F(K.getLine(P.line).slice(0,H[T].length))!=J[J.length-1]){return }var S=B(P.line,H[T].length);for(var O=P.line-1,M=T-1;M>=1;--M,--O){if(J[M]!=F(K.getLine(O))){return }}var U=K.getLine(O),Q=U.length-H[0].length;if(F(U.slice(Q))!=J[0]){return }return{from:B(O,Q),to:S}}else{if(P.line+(J.length-1)>K.lastLine()){return }var U=K.getLine(P.line),Q=U.length-H[0].length;if(F(U.slice(Q))!=J[0]){return }var R=B(P.line,Q);for(var O=P.line+1,M=1;M<T;++M,++O){if(J[M]!=F(K.getLine(O))){return }}if(F(K.getLine(O).slice(0,H[T].length))!=J[T]){return }return{from:R,to:B(O,H[T].length)}}}}}}C.prototype={findNext:function(){return this.find(false)},findPrevious:function(){return this.find(true)},find:function(F){var E=this,I=this.doc.clipPos(F?this.pos.from:this.pos.to);function G(J){var K=B(J,0);E.pos={from:K,to:K};E.atOccurrence=false;return false}for(;;){if(this.pos=this.matches(F,I)){this.atOccurrence=true;return this.pos.match||true}if(F){if(!I.line){return G(0)}I=B(I.line-1,this.doc.getLine(I.line-1).length)}else{var H=this.doc.lineCount();if(I.line==H-1){return G(H)}I=B(I.line+1,0)}}},from:function(){if(this.atOccurrence){return this.pos.from}},to:function(){if(this.atOccurrence){return this.pos.to}},replace:function(F){if(!this.atOccurrence){return }var E=A.splitLines(F);this.doc.replaceRange(E,this.pos.from,this.pos.to);this.pos.to=B(this.pos.from.line+E.length-1,E[E.length-1].length+(E.length==1?this.pos.from.ch:0))}};function D(I,G,H){if(I.length==G.length){return H}for(var F=Math.min(H,I.length);;){var E=I.slice(0,F).toLowerCase().length;if(E<H){++F}else{if(E>H){--F}else{return F}}}}A.defineExtension("getSearchCursor",function(F,G,E){return new C(this.doc,F,G,E)});A.defineDocExtension("getSearchCursor",function(F,G,E){return new C(this,F,G,E)});A.defineExtension("selectMatches",function(H,G){var E=[],F;var I=this.getSearchCursor(H,this.getCursor("from"),G);while(F=I.findNext()){if(A.cmpPos(I.to(),this.getCursor("to"))>0){break}E.push({anchor:I.from(),head:I.to()})}if(E.length){this.setSelections(E,0)}})});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror-raw', location = '/static/bower/CodeMirror/addon/search/match-highlighter.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){var I=2;var B="matchhighlight";var C=100;var K=false;function H(L){if(typeof L=="object"){this.minChars=L.minChars;this.style=L.style;this.showToken=L.showToken;this.delay=L.delay;this.wordsOnly=L.wordsOnly}if(this.style==null){this.style=B}if(this.minChars==null){this.minChars=I}if(this.delay==null){this.delay=C}if(this.wordsOnly==null){this.wordsOnly=K}this.overlay=this.timeout=null}A.defineOption("highlightSelectionMatches",false,function(L,O,M){if(M&&M!=A.Init){var N=L.state.matchHighlighter.overlay;if(N){L.removeOverlay(N)}clearTimeout(L.state.matchHighlighter.timeout);L.state.matchHighlighter=null;L.off("cursorActivity",G)}if(O){L.state.matchHighlighter=new H(O);E(L);L.on("cursorActivity",G)}});function G(L){var M=L.state.matchHighlighter;clearTimeout(M.timeout);M.timeout=setTimeout(function(){E(L)},M.delay)}function E(L){L.operation(function(){var M=L.state.matchHighlighter;if(M.overlay){L.removeOverlay(M.overlay);M.overlay=null}if(!L.somethingSelected()&&M.showToken){var T=M.showToken===true?/[\w$]/:M.showToken;var S=L.getCursor(),U=L.getLine(S.line),N=S.ch,O=N;while(N&&T.test(U.charAt(N-1))){--N}while(O<U.length&&T.test(U.charAt(O))){++O}if(N<O){L.addOverlay(M.overlay=D(U.slice(N,O),T,M.style))}return }var Q=L.getCursor("from"),R=L.getCursor("to");if(Q.line!=R.line){return }if(M.wordsOnly&&!F(L,Q,R)){return }var P=L.getRange(Q,R).replace(/^\s+|\s+$/g,"");if(P.length>=M.minChars){L.addOverlay(M.overlay=D(P,false,M.style))}})}function F(L,Q,P){var N=L.getRange(Q,P);if(N.match(/^\w+$/)!==null){if(Q.ch>0){var O={line:Q.line,ch:Q.ch-1};var M=L.getRange(O,Q);if(M.match(/\W/)===null){return false}}if(P.ch<L.getLine(Q.line).length){var O={line:P.line,ch:P.ch+1};var M=L.getRange(P,O);if(M.match(/\W/)===null){return false}}return true}else{return false}}function J(M,L){return(!M.start||!L.test(M.string.charAt(M.start-1)))&&(M.pos==M.string.length||!L.test(M.string.charAt(M.pos)))}function D(N,M,L){return{token:function(O){if(O.match(N)&&(!M||J(O,M))){return L}O.next();O.skipTo(N.charAt(0))||O.skipToEnd()}}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror-raw', location = '/static/bower/CodeMirror/addon/dialog/dialog.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(B){function C(D,H,E){var G=D.getWrapperElement();var F;F=G.appendChild(document.createElement("div"));if(E){F.className="CodeMirror-dialog CodeMirror-dialog-bottom"}else{F.className="CodeMirror-dialog CodeMirror-dialog-top"}if(typeof H=="string"){F.innerHTML=H}else{F.appendChild(H)}return F}function A(D,E){if(D.state.currentNotificationClose){D.state.currentNotificationClose()}D.state.currentNotificationClose=E}B.defineExtension("openDialog",function(I,J,L){if(!L){L={}}A(this,null);var F=C(this,I,L.bottom);var E=false,G=this;function K(M){if(typeof M=="string"){H.value=M}else{if(E){return }E=true;F.parentNode.removeChild(F);G.focus();if(L.onClose){L.onClose(F)}}}var H=F.getElementsByTagName("input")[0],D;if(H){if(L.value){H.value=L.value;H.select()}if(L.onInput){B.on(H,"input",function(M){L.onInput(M,H.value,K)})}if(L.onKeyUp){B.on(H,"keyup",function(M){L.onKeyUp(M,H.value,K)})}B.on(H,"keydown",function(M){if(L&&L.onKeyDown&&L.onKeyDown(M,H.value,K)){return }if(M.keyCode==27||(L.closeOnEnter!==false&&M.keyCode==13)){H.blur();B.e_stop(M);K()}if(M.keyCode==13){J(H.value,M)}});if(L.closeOnBlur!==false){B.on(H,"blur",K)}H.focus()}else{if(D=F.getElementsByTagName("button")[0]){B.on(D,"click",function(){K();G.focus()});if(L.closeOnBlur!==false){B.on(D,"blur",K)}D.focus()}}return K});B.defineExtension("openConfirm",function(L,G,N){A(this,null);var H=C(this,L,N&&N.bottom);var I=H.getElementsByTagName("button");var F=false,J=this,D=1;function M(){if(F){return }F=true;H.parentNode.removeChild(H);J.focus()}I[0].focus();for(var E=0;E<I.length;++E){var K=I[E];(function(O){B.on(K,"click",function(P){B.e_preventDefault(P);M();if(O){O(J)}})})(G[E]);B.on(K,"blur",function(){--D;setTimeout(function(){if(D<=0){M()}},200)});B.on(K,"focus",function(){++D})}});B.defineExtension("openNotification",function(G,E){A(this,J);var F=C(this,G,E&&E.bottom);var D=false,H;var I=E&&typeof E.duration!=="undefined"?E.duration:5000;function J(){if(D){return }D=true;clearTimeout(H);F.parentNode.removeChild(F)}B.on(F,"click",function(K){B.e_preventDefault(K);J()});if(I){H=setTimeout(J,I)}return J})});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror-mode-meta', location = '/static/bower/CodeMirror/mode/meta.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj"]},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"kotlin",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["py","pyw"]},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"]},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"SmartyMixed",mime:"text/x-smarty",mode:"smartymixed"},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"MariaDB",mime:"text/x-mariadb",mode:"sql"},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]}];for(var B=0;B<A.modeInfo.length;B++){var C=A.modeInfo[B];if(C.mimes){C.mime=C.mimes[0]}}A.findModeByMIME=function(F){F=F.toLowerCase();for(var E=0;E<A.modeInfo.length;E++){var G=A.modeInfo[E];if(G.mime==F){return G}if(G.mimes){for(var D=0;D<G.mimes.length;D++){if(G.mimes[D]==F){return G}}}}};A.findModeByExtension=function(F){for(var E=0;E<A.modeInfo.length;E++){var G=A.modeInfo[E];if(G.ext){for(var D=0;D<G.ext.length;D++){if(G.ext[D]==F){return G}}}}};A.findModeByFileName=function(E){for(var F=0;F<A.modeInfo.length;F++){var H=A.modeInfo[F];if(H.file&&H.file.test(E)){return H}}var D=E.lastIndexOf(".");var G=D>-1&&E.substring(D+1,E.length);if(G){return A.findModeByExtension(G)}};A.findModeByName=function(E){E=E.toLowerCase();for(var F=0;F<A.modeInfo.length;F++){var G=A.modeInfo[F];if(G.name.toLowerCase()==E){return G}if(G.alias){for(var D=0;D<G.alias.length;D++){if(G.alias[D].toLowerCase()==E){return G}}}}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror', location = '/static/lib/CodeMirror/codemirror-AMD.js' */
define("codemirror",function(){return CodeMirror});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:codemirror', location = '/static/bower/CodeMirror/addon/runmode/runmode.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.runMode=function(K,H,O,Q){var J=A.getMode(A.defaults,H);var D=/MSIE \d/.test(navigator.userAgent);var G=D&&(document.documentMode==null||document.documentMode<9);if(O.nodeType==1){var L=(Q&&Q.tabSize)||A.defaults.tabSize;var F=O,E=0;F.innerHTML="";O=function(X,U){if(X=="\n"){F.appendChild(document.createTextNode(G?"\r":X));E=0;return }var V="";for(var Y=0;;){var R=X.indexOf("\t",Y);if(R==-1){V+=X.slice(Y);E+=X.length-Y;break}else{E+=R-Y;V+=X.slice(Y,R);var T=L-E%L;E+=T;for(var S=0;S<T;++S){V+=" "}Y=R+1}}if(U){var W=F.appendChild(document.createElement("span"));W.className="cm-"+U.replace(/ +/g," cm-");W.appendChild(document.createTextNode(V))}else{F.appendChild(document.createTextNode(V))}}}var P=A.splitLines(K),C=(Q&&Q.state)||A.startState(J);for(var I=0,M=P.length;I<M;++I){if(I){O("\n")}var N=new A.StringStream(P[I]);if(!N.string&&J.blankLine){J.blankLine(C)}while(!N.eol()){var B=J.token(N,C);O(N.current(),B,I,N.start,C);N.start=N.pos}}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:determine-language', location = '/static/util/determine-language.js' */
define("util/determine-language",["codemirror","jquery","lodash","exports"],function(O,G,Q,R){document.documentElement.className+=" cm-s-stash-default";var N={bash:"text/x-sh",clojure:"text/x-clojure",coffeescript:"text/x-coffeescript",cpp:"text/x-c++src",cs:"text/x-csharp",css:"text/css",d:"text/x-d",diff:"text/x-diff",dos:"text/x-sh",erlang:"text/x-erlang",go:"text/x-go",haskell:"text/x-haskell",html:"text/html",ini:"text/x-toml",java:"text/x-java",javascript:"text/javascript",json:"application/json",less:"text/x-less",lisp:"text/x-common-lisp",lua:"text/x-lua",markdown:"text/x-markdown",objectivec:"text/x-csrc",perl:"text/x-perl",php:"application/x-httpd-php",python:"text/x-python",ruby:"text/x-ruby",scala:"text/x-scala",sql:"text/x-sql",tex:"text/x-stex",vbscript:"text/vbscript",xml:"application/xml"};var C=WRM.data.claim("com.atlassian.stash.stash-web-plugin:determine-language.syntax-highlighters")||{};var J={};var I={};Q.forEach(C,function(S,T){if(T.indexOf("/")===-1){console&&console.warn&&console.warn("DEPRECATED - Using HighlightJS mapping ("+T+") has been has been deprecated since 3.5 and will be removed in 4.0. See https://confluence.atlassian.com/display/STASHKB/Syntax+highlight+changes")}Q.forEach(S.e,function(U){J[U]=T});Q.forEach(S.x,function(U){I[U]=T})});var K={};var L={};function B(S){return Q.has(J,S)?J[S]:null}function D(S){return Q.has(I,S)?I[S]:null}function H(S){var T=S;if(S.indexOf("/")===-1){T=N[S]}return O.findModeByMIME(T)}function E(S){var U=/^#!(?:\/(?:usr\/)?(?:local\/)?bin\/([^\s]+))(?:\s+([^\s]+))?/;var T=U.exec(S);if(T){var V=T[1];if(V==="env"){V=T[2]}return V}return null}function A(T,S){return K.hasOwnProperty(T)?K[T]:S&&L.hasOwnProperty(S)?L[S]:null}function M(U){var S=U.path;var T=S.lastIndexOf(".");var Y=T===-1?S:S.substring(T+1);var X=U.firstLine.length>1?E(U.firstLine):null;var W=A(Y,X);var V;if(!W){V=B(Y)||(X!=null?D(X):null);if(V){W=H(V)}else{W=O.findModeByFileName(S)}W=W||O.findModeByMIME("text/plain");W.builtIn=true}if(U.legacy){return V||"text"}return W}function P(U,T,S){if(T){T.forEach(function(V){K[V]=U})}if(S){S.forEach(function(V){L[V]=U})}}function F(T){var S=O.findModeByName(T)||O.findModeByExtension(T);if(!S){return G.Deferred().resolve(O.findModeByMIME("text/plain"))}if(typeof O.mimeModes[S.mime]==="undefined"){return WRM.require("wr!com.atlassian.stash.stash-highlight-plugin:"+S.mode).then(function(){return S})}return G.Deferred().resolve(S)}R.fromFileInfo=M;R.registerCodeMirrorMode=P;R.getCodeMirrorModeForName=F});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:stash-codemirror', location = '/static/feature/file-content/stash-codemirror/search.js' */
define("feature/file-content/stash-codemirror/search",["codemirror","jquery","util/navigator"],function(E,G,M){function A(Q,P){if(typeof Q==="string"){Q=new RegExp("^"+Q.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),P?"i":"")}else{Q=new RegExp("^(?:"+Q.source+")",Q.ignoreCase?"i":"")}return{token:function(R){if(R.match(Q)){return"searching"}while(!R.eol()){R.next();if(R.match(Q,false)){break}}}}}function K(){this.cursor=null;this.dialogEl=null;this.overlay=null;this.query=null}function F(P){return P.state.search||(P.state.search=new K())}function N(P){return typeof P==="string"&&P===P.toLowerCase()}function L(P,Q,R){return P.getSearchCursor(Q,R,N(Q))}function D(Q){var P=Q.match(/^\/(.*)\/([a-z]*)$/);return P?new RegExp(P[1],P[2].indexOf("i")===-1?"":"i"):Q}function B(P,Q){P.operation(function(){P.removeOverlay(Q.overlay);Q.overlay=A(Q.query,N(Q.query));P.addOverlay(Q.overlay)})}function O(P,Q){P.operation(function(){P.removeOverlay(Q.overlay);Q.overlay=null})}function I(P,R,Q){R=R&&R.trim();if(!R||R.length===0){return }P.operation(function(){var S=F(P);if(R!==S.query){S.query=D(R);S.cursor=null;B(P,S)}else{if(!S.overlay){B(P,S)}}H(P,Q)})}function J(P,Q){var S=F(P);if(S.dialogEl){var V=S.dialogEl.getElementsByClassName("search-query")[0];V.focus();I(P,V.value,Q);return }var R=G(stash.feature.fileContent.codemirror.searchQuery());R.find(".search-button").on("click",function(W){H(P,G(W.target).closest(".aui-button").data("rev"))}).tooltip();var T=R.find("input")[0];T.onkeydown=function(Z){S.query=undefined;var W=M.isMac();var X=String.fromCharCode(Z.keyCode);var Y=((W&&Z.metaKey&&!Z.ctrlKey)||(!W&&!Z.metaKey&&Z.ctrlKey));if(X==="F"&&Y&&!Z.shiftKey&&!Z.altKey){Z.preventDefault()}else{if(X==="G"&&Y&&!Z.shiftKey&&!Z.altKey){Z.preventDefault();I(P,T.value)}else{if(X==="G"&&Y&&Z.shiftKey&&!Z.altKey){Z.preventDefault();I(P,T.value,true)}}}};S.dialogEl=R[0];var U={value:P.getSelection()||S.query,closeOnEnter:false,closeOnBlur:false,onClose:function(){O(P,S);S.dialogEl=S.cursor=null}};P.openDialog(S.dialogEl,function(W,X){X.preventDefault();I(P,W)},U);I(P,U.value,Q)}function H(P,Q){P.operation(function(){var U=F(P);if(!U.query||!U.dialogEl){J(P,Q);return }if(!U.cursor){if(Q){P.execCommand("goCharLeft")}U.cursor=L(P,U.query,P.getCursor())}if(!U.cursor.find(Q)){U.cursor=L(P,U.query,Q?E.Pos(P.lastLine()):E.Pos(P.firstLine(),0));if(!U.cursor.find(Q)){return }}P.setSelection(U.cursor.from(),U.cursor.to());var V={from:U.cursor.from(),to:U.cursor.to()};var S=P.getOption("scrollLineIntoViewFunc");if(S){S(V);var R=P.charCoords(V.from,"local");var T=P.getScrollInfo();if(T.left>R.left||T.left+T.clientWidth<R.left){P.scrollTo(Math.max(0,R.left-20),null)}}else{P.scrollIntoView(V,100)}})}function C(P,R){var Q=F(P);if(R.length===0){O(P,Q)}else{Q.query=D(R);B(P,Q)}}E.defineOption("scrollLineIntoViewFunc",null);E.commands.find=J;E.commands.findNext=H;E.commands.findPrev=function(P){return H(P,true)};E.commands.highlight=C});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:stash-codemirror', location = '/static/feature/file-content/stash-codemirror/codemirror-search.soy' */
// This file was automatically generated from codemirror-search.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.fileContent.codemirror.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.fileContent == 'undefined') { stash.feature.fileContent = {}; }
if (typeof stash.feature.fileContent.codemirror == 'undefined') { stash.feature.fileContent.codemirror = {}; }


stash.feature.fileContent.codemirror.searchQuery = function(opt_data, opt_ignored) {
  return '<div class="codemirror-search-query">' + soy.$$escapeHtml("Search:") + '<div class="search-box"><input class="search-query" type="text" style="width: 10em"/></div>' + aui.buttons.buttons({content: '' + aui.buttons.button({text: '', iconType: 'aui', iconClass: 'aui-icon-small aui-iconfont-up', extraClasses: ['search-button'], extraAttributes: {type: 'button', 'data-rev': 'true', title: "Previous match"}}) + aui.buttons.button({text: '', iconType: 'aui', iconClass: 'aui-icon-small aui-iconfont-down', extraClasses: ['search-button'], extraAttributes: {type: 'button', title: "Next match"}})}) + '</div>';
};
if (goog.DEBUG) {
  stash.feature.fileContent.codemirror.searchQuery.soyTemplateName = 'stash.feature.fileContent.codemirror.searchQuery';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:stash-codemirror', location = '/static/feature/file-content/stash-codemirror/stash-codemirror.js' */
define("feature/file-content/stash-codemirror",["aui","codemirror","jquery","lodash","util/function","feature/file-content/stash-codemirror/stash-scrollbar"],function(L,D,E,M,J){function H(O){O.on("keydown",function(P,Q){if(Q.which>=37&&Q.which<=40&&!Q.shiftKey&&!P.somethingSelected()){P.getInputField().blur()}})}function K(P){var O=false;var Q=J.lazyDelay(function(){var R;if(!O){R=P.lineAtHeight(P.getScrollInfo().top+P.heightAtLine(0));P.setSelection({line:R+1,ch:0})}O=false},10);P.on("contextmenu",function(){O=true});P.on("blur",function(R){if(R.somethingSelected()){Q()}O=false})}function B(O){O.on("keydown",F);O.on("keypress",F)}var I={};I[L.keyCode.TAB]=true;function G(P){var O=P.which||P.keyCode;return !!I[O]}var A=["which","keyCode","shiftKey","ctrlKey","metaKey"];function F(P,Q){var O=M.extend(jQuery.Event(Q.type),M.pick(Q,A));E(document).trigger(O);Q.codemirrorIgnore=G(Q)}function N(R){var Q={};var O=Array.prototype.slice.call(arguments,1);var P=J.spread(function(T,S){Q[T]=S!==undefined?M.compose(J.constant(S),R[T].bind(R)):R[T].bind(R)});O.forEach(J.unary(P));return Q}function C(R,O){var P=new D(R,E.extend({mode:"text/plain",readOnly:true,lineNumbers:false,wholeLineUpdateBefore:false,scrollbarStyle:"stash",cursorBlinkRate:0,styleSelectedText:true,theme:"stash-default"},{viewportMargin:O&&O.autoResizing?Infinity:undefined},O));E(P.getWrapperElement()).find(".CodeMirror-lines, .CodeMirror-code").attr("data-skate-ignore","true");if(O&&O.autoResizing){R.className+=" codemirror-auto-resizing-container"}H(P);B(P);K(P);var Q=N(P,["addLineClass",this],"addLineWidget","charCoords","execCommand","getDoc","getInputField","getLine","getLineHandle","getLineNumber","getOption","getScrollInfo","getWrapperElement","heightAtLine","lastLine","lineAtHeight",["markText",this],["off",this],["on",this],["refresh",this],["removeLineClass",this],"replaceRange",["scrollIntoView",this],["scrollTo",this],["setGutterMarker",this],["setOption",this],["setSelection",this],["setValue",this]);E.extend(this,Q);this.operation=function(S){P.operation(J.unary(M.partial(S,this)));return this};this._highlight=function(S){D.commands.highlight(P,S)};this._insert=function(Z,T,V){var X=0===T;var U=T-1;var S=P.getOption("wholeLineUpdateBefore");P.setOption("wholeLineUpdateBefore",X);var Y=P.getDoc();var W={line:U,ch:X?0:P.getLine(U).length};Y.replaceRange(X?Z+"\n":"\n"+Z,W);if(V){Y.setSelection({line:U,ch:0})}P.setOption("wholeLineUpdateBefore",S)};return this}return C});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:stash-codemirror', location = '/static/feature/file-content/stash-codemirror/stash-scrollbar.js' */
define("feature/file-content/stash-codemirror/stash-scrollbar",["codemirror","jquery"],function(A,B){function C(F,E,D){this.cm=D;var G=B("<div>").css("height","100%").css("min-height","1px");var H=this.horiz=B("<div>").addClass("CodeMirror-hscrollbar").css("min-height","18px").append(G)[0];F(H);A.on(H,"scroll",function(){if(H.clientWidth){E(H.scrollLeft,"horizontal")}})}C.prototype={update:function(D){var E=D.scrollWidth>D.clientWidth+1;var F=D.nativeBarWidth;if(E){this.horiz.style.display="block";this.horiz.style.right="0";this.horiz.style.left=D.barLeft+"px";this.horiz.firstChild.style.width=(D.scrollWidth-D.clientWidth+(D.barWidth||this.horiz.clientWidth))+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}return{right:0,bottom:E?F:0}},setScrollLeft:function(D){if(this.horiz.scrollLeft!==D){this.horiz.scrollLeft=D}},setScrollTop:function(D){},clear:function(){var D=this.horiz.parentNode;D.removeChild(this.horiz);D.removeChild(this.vert)}};A.scrollbarModel.stash=C});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:clike', location = '/static/bower/CodeMirror/mode/clike/clike.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(B){B.defineMode("clike",function(a,M){var U=a.indentUnit,S=M.statementIndentUnit||U,V=M.dontAlignCalls,O=M.keywords||{},b=M.builtin||{},W=M.blockKeywords||{},K=M.atoms||{},J=M.hooks||{},R=M.multiLineStrings,P=M.indentStatements!==false;var Q=/[+\-*&%=<>!?|\/]/;var Y;function c(h,f){var e=h.next();if(J[e]){var d=J[e](h,f);if(d!==false){return d}}if(e=='"'||e=="'"){f.tokenize=N(e);return f.tokenize(h,f)}if(/[\[\]{}\(\),;\:\.]/.test(e)){Y=e;return null}if(/\d/.test(e)){h.eatWhile(/[\w\.]/);return"number"}if(e=="/"){if(h.eat("*")){f.tokenize=T;return T(h,f)}if(h.eat("/")){h.skipToEnd();return"comment"}}if(Q.test(e)){h.eatWhile(Q);return"operator"}h.eatWhile(/[\w\$_\xa1-\uffff]/);var g=h.current();if(O.propertyIsEnumerable(g)){if(W.propertyIsEnumerable(g)){Y="newstatement"}return"keyword"}if(b.propertyIsEnumerable(g)){if(W.propertyIsEnumerable(g)){Y="newstatement"}return"builtin"}if(K.propertyIsEnumerable(g)){return"atom"}return"variable"}function N(d){return function(i,g){var h=false,f,e=false;while((f=i.next())!=null){if(f==d&&!h){e=true;break}h=!h&&f=="\\"}if(e||!(h||R)){g.tokenize=null}return"string"}}function T(g,f){var d=false,e;while(e=g.next()){if(e=="/"&&d){f.tokenize=null;break}d=(e=="*")}return"comment"}function X(h,e,d,g,f){this.indented=h;this.column=e;this.type=d;this.align=g;this.prev=f}function L(g,e,f){var d=g.indented;if(g.context&&g.context.type=="statement"){d=g.context.indented}return g.context=new X(d,e,f,null,g.context)}function Z(e){var d=e.context.type;if(d==")"||d=="]"||d=="}"){e.indented=e.context.indented}return e.context=e.context.prev}return{startState:function(d){return{tokenize:null,context:new X((d||0)-U,0,"top",false),indented:0,startOfLine:true}},token:function(g,f){var d=f.context;if(g.sol()){if(d.align==null){d.align=false}f.indented=g.indentation();f.startOfLine=true}if(g.eatSpace()){return null}Y=null;var e=(f.tokenize||c)(g,f);if(e=="comment"||e=="meta"){return e}if(d.align==null){d.align=true}if((Y==";"||Y==":"||Y==",")&&d.type=="statement"){Z(f)}else{if(Y=="{"){L(f,g.column(),"}")}else{if(Y=="["){L(f,g.column(),"]")}else{if(Y=="("){L(f,g.column(),")")}else{if(Y=="}"){while(d.type=="statement"){d=Z(f)}if(d.type=="}"){d=Z(f)}while(d.type=="statement"){d=Z(f)}}else{if(Y==d.type){Z(f)}else{if(P&&(((d.type=="}"||d.type=="top")&&Y!=";")||(d.type=="statement"&&Y=="newstatement"))){L(f,g.column(),"statement")}}}}}}}f.startOfLine=false;return e},indent:function(h,e){if(h.tokenize!=c&&h.tokenize!=null){return B.Pass}var d=h.context,g=e&&e.charAt(0);if(d.type=="statement"&&g=="}"){d=d.prev}var f=g==d.type;if(d.type=="statement"){return d.indented+(g=="{"?0:S)}else{if(d.align&&(!V||d.type!=")")){return d.column+(f?0:1)}else{if(d.type==")"&&!f){return d.indented+S}else{return d.indented+(f?0:U)}}}},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});function F(M){var K={},L=M.split(" ");for(var J=0;J<L.length;++J){K[L[J]]=true}return K}var I="auto if break int case long char register continue return default short do sizeof double static else struct entry switch extern typedef float union for unsigned goto while enum void const signed volatile";function C(K,J){if(!J.startOfLine){return false}for(;;){if(K.skipTo("\\")){K.next();if(K.eol()){J.tokenize=C;break}}else{K.skipToEnd();J.tokenize=null;break}}return"meta"}function H(L,K){L.backUp(1);if(L.match(/(R|u8R|uR|UR|LR)/)){var J=L.match(/"([^\s\\()]{0,16})\(/);if(!J){return false}K.cpp11RawStringDelim=J[1];K.tokenize=E;return E(L,K)}if(L.match(/(u8|u|U|L)/)){if(L.match(/["']/,false)){return"string"}return false}L.next();return false}function G(L,K){var J;while((J=L.next())!=null){if(J=='"'&&!L.eat('"')){K.tokenize=null;break}}return"string"}function E(M,K){var L=K.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");var J=M.match(new RegExp(".*?\\)"+L+'"'));if(J){K.tokenize=null}else{M.skipToEnd()}return"string"}function A(J,N){if(typeof J=="string"){J=[J]}var M=[];function L(O){if(O){for(var P in O){if(O.hasOwnProperty(P)){M.push(P)}}}}L(N.keywords);L(N.builtin);L(N.atoms);if(M.length){N.helperType=J[0];B.registerHelper("hintWords",J[0],M)}for(var K=0;K<J.length;++K){B.defineMIME(J[K],N)}}A(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:F(I),blockKeywords:F("case do else for if switch while struct"),atoms:F("null"),hooks:{"#":C},modeProps:{fold:["brace","include"]}});A(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:F(I+" asm dynamic_cast namespace reinterpret_cast try bool explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),blockKeywords:F("catch class do else finally for if struct switch try while"),atoms:F("true false null"),hooks:{"#":C,u:H,U:H,L:H,R:H},modeProps:{fold:["brace","include"]}});A("text/x-java",{name:"clike",keywords:F("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:F("catch class do else finally for if switch try while"),atoms:F("true false null"),hooks:{"@":function(J){J.eatWhile(/[\w\$_]/);return"meta"}},modeProps:{fold:["brace","import"]}});A("text/x-csharp",{name:"clike",keywords:F("abstract as 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"),blockKeywords:F("catch class do else finally for foreach if struct switch try while"),builtin:F("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:F("true false null"),hooks:{"@":function(K,J){if(K.eat('"')){J.tokenize=G;return G(K,J)}K.eatWhile(/[\w\$_]/);return"meta"}}});function D(L,J){var K=false;while(!L.eol()){if(!K&&L.match('"""')){J.tokenize=null;break}K=L.next()!="\\"&&!K}return"string"}A("text/x-scala",{name:"clike",keywords:F("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq 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:true,blockKeywords:F("catch class do else finally for forSome if match switch try while"),atoms:F("true false null"),indentStatements:false,hooks:{"@":function(J){J.eatWhile(/[\w\$_]/);return"meta"},'"':function(K,J){if(!K.match('""')){return false}J.tokenize=D;return J.tokenize(K,J)}}});A(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:F("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:F("for while do if else struct"),builtin:F("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:F("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"),hooks:{"#":C},modeProps:{fold:["brace","include"]}});A("text/x-nesc",{name:"clike",keywords:F(I+"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"),blockKeywords:F("case do else for if switch while struct"),atoms:F("null"),hooks:{"#":C},modeProps:{fold:["brace","include"]}});A("text/x-objectivec",{name:"clike",keywords:F(I+"inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),atoms:F("YES NO NULL NILL ON OFF"),hooks:{"@":function(J){J.eatWhile(/[\w\$]/);return"keyword"},"#":C},modeProps:{fold:"brace"}})});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:commonlisp', location = '/static/bower/CodeMirror/mode/commonlisp/commonlisp.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("commonlisp",function(C){var H=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/;var K=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;var G=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;var D=/[^\s'`,@()\[\]";]/;var I;function F(M){var L;while(L=M.next()){if(L=="\\"){M.next()}else{if(!D.test(L)){M.backUp(1);break}}}return M.current()}function B(O,N){if(O.eatSpace()){I="ws";return null}if(O.match(G)){return"number"}var M=O.next();if(M=="\\"){M=O.next()}if(M=='"'){return(N.tokenize=E)(O,N)}else{if(M=="("){I="open";return"bracket"}else{if(M==")"||M=="]"){I="close";return"bracket"}else{if(M==";"){O.skipToEnd();I="ws";return"comment"}else{if(/['`,@]/.test(M)){return null}else{if(M=="|"){if(O.skipTo("|")){O.next();return"symbol"}else{O.skipToEnd();return"error"}}else{if(M=="#"){var M=O.next();if(M=="["){I="open";return"bracket"}else{if(/[+\-=\.']/.test(M)){return null}else{if(/\d/.test(M)&&O.match(/^\d*#/)){return null}else{if(M=="|"){return(N.tokenize=J)(O,N)}else{if(M==":"){F(O);return"meta"}else{return"error"}}}}}}else{var L=F(O);if(L=="."){return null}I="symbol";if(L=="nil"||L=="t"||L.charAt(0)==":"){return"atom"}if(N.lastType=="open"&&(H.test(L)||K.test(L))){return"keyword"}if(L.charAt(0)=="&"){return"variable-2"}return"variable"}}}}}}}}function E(O,M){var N=false,L;while(L=O.next()){if(L=='"'&&!N){M.tokenize=B;break}N=!N&&L=="\\"}return"string"}function J(O,N){var L,M;while(L=O.next()){if(L=="#"&&M=="|"){N.tokenize=B;break}M=L}I="ws";return"comment"}return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:B}},token:function(N,M){if(N.sol()&&typeof M.ctx.indentTo!="number"){M.ctx.indentTo=M.ctx.start+1}I=null;var L=M.tokenize(N,M);if(I!="ws"){if(M.ctx.indentTo==null){if(I=="symbol"&&K.test(N.current())){M.ctx.indentTo=M.ctx.start+C.indentUnit}else{M.ctx.indentTo="next"}}else{if(M.ctx.indentTo=="next"){M.ctx.indentTo=N.column()}}M.lastType=I}if(I=="open"){M.ctx={prev:M.ctx,start:N.column(),indentTo:null}}else{if(I=="close"){M.ctx=M.ctx.prev||M.ctx}}return L},indent:function(N,L){var M=N.ctx.indentTo;return typeof M=="number"?M:N.ctx.start+1},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}});A.defineMIME("text/x-common-lisp","commonlisp")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:css', location = '/static/bower/CodeMirror/mode/css/css.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(N){N.defineMode("css",function(o,c){if(!c.propertyKeywords){c=N.resolveMode("text/css")}var i=o.indentUnit,U=c.tokenHooks,n=c.mediaTypes||{},e=c.mediaFeatures||{},b=c.propertyKeywords||{},V=c.nonStandardPropertyKeywords||{},h=c.colorKeywords||{},k=c.valueKeywords||{},X=c.fontProperties||{},f=c.allowNested;var W,g;function p(s,t){W=t;return s}function r(v,u){var t=v.next();if(U[t]){var s=U[t](v,u);if(s!==false){return s}}if(t=="@"){v.eatWhile(/[\w\\\-]/);return p("def",v.current())}else{if(t=="="||(t=="~"||t=="|")&&v.eat("=")){return p(null,"compare")}else{if(t=='"'||t=="'"){u.tokenize=d(t);return u.tokenize(v,u)}else{if(t=="#"){v.eatWhile(/[\w\\\-]/);return p("atom","hash")}else{if(t=="!"){v.match(/^\s*\w*/);return p("keyword","important")}else{if(/\d/.test(t)||t=="."&&v.eat(/\d/)){v.eatWhile(/[\w.%]/);return p("number","unit")}else{if(t==="-"){if(/[\d.]/.test(v.peek())){v.eatWhile(/[\w.%]/);return p("number","unit")}else{if(v.match(/^\w+-/)){return p("meta","meta")}}}else{if(/[,+>*\/]/.test(t)){return p(null,"select-op")}else{if(t=="."&&v.match(/^-?[_a-z][_a-z0-9-]*/i)){return p("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(t)){return p(null,t)}else{if(t=="u"&&v.match("rl(")){v.backUp(1);u.tokenize=q;return p("property","word")}else{if(/[\w\\\-]/.test(t)){v.eatWhile(/[\w\\\-]/);return p("property","word")}else{return p(null,null)}}}}}}}}}}}}}function d(s){return function(w,u){var v=false,t;while((t=w.next())!=null){if(t==s&&!v){if(s==")"){w.backUp(1)}break}v=!v&&t=="\\"}if(t==s||!v&&s!=")"){u.tokenize=null}return p("string","string")}}function q(t,s){t.next();if(!t.match(/\s*[\"\')]/,false)){s.tokenize=d(")")}else{s.tokenize=null}return p(null,"(")}function j(t,s,u){this.type=t;this.indent=s;this.prev=u}function Z(t,u,s){t.context=new j(s,u.indentation()+i,t.context);return s}function l(s){s.context=s.context.prev;return s.context.type}function T(s,u,t){return Y[t.context.type](s,u,t)}function m(t,v,u,w){for(var s=w||1;s>0;s--){u.context=u.context.prev}return T(t,v,u)}function a(t){var s=t.current().toLowerCase();if(k.hasOwnProperty(s)){g="atom"}else{if(h.hasOwnProperty(s)){g="keyword"}else{g="variable"}}}var Y={};Y.top=function(s,u,t){if(s=="{"){return Z(t,u,"block")}else{if(s=="}"&&t.context.prev){return l(t)}else{if(s=="@media"){return Z(t,u,"media")}else{if(s=="@font-face"){return"font_face_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(s)){return"keyframes"}else{if(s&&s.charAt(0)=="@"){return Z(t,u,"at")}else{if(s=="hash"){g="builtin"}else{if(s=="word"){g="tag"}else{if(s=="variable-definition"){return"maybeprop"}else{if(s=="interpolation"){return Z(t,u,"interpolation")}else{if(s==":"){return"pseudo"}else{if(f&&s=="("){return Z(t,u,"parens")}}}}}}}}}}}}return t.context.type};Y.block=function(s,v,t){if(s=="word"){var u=v.current().toLowerCase();if(b.hasOwnProperty(u)){g="property";return"maybeprop"}else{if(V.hasOwnProperty(u)){g="string-2";return"maybeprop"}else{if(f){g=v.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{g+=" error";return"maybeprop"}}}}else{if(s=="meta"){return"block"}else{if(!f&&(s=="hash"||s=="qualifier")){g="error";return"block"}else{return Y.top(s,v,t)}}}};Y.maybeprop=function(s,u,t){if(s==":"){return Z(t,u,"prop")}return T(s,u,t)};Y.prop=function(s,u,t){if(s==";"){return l(t)}if(s=="{"&&f){return Z(t,u,"propBlock")}if(s=="}"||s=="{"){return m(s,u,t)}if(s=="("){return Z(t,u,"parens")}if(s=="hash"&&!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(u.current())){g+=" error"}else{if(s=="word"){a(u)}else{if(s=="interpolation"){return Z(t,u,"interpolation")}}}return"prop"};Y.propBlock=function(t,s,u){if(t=="}"){return l(u)}if(t=="word"){g="property";return"maybeprop"}return u.context.type};Y.parens=function(s,u,t){if(s=="{"||s=="}"){return m(s,u,t)}if(s==")"){return l(t)}if(s=="("){return Z(t,u,"parens")}if(s=="word"){a(u)}return"parens"};Y.pseudo=function(s,u,t){if(s=="word"){g="variable-3";return t.context.type}return T(s,u,t)};Y.media=function(s,v,t){if(s=="("){return Z(t,v,"media_parens")}if(s=="}"){return m(s,v,t)}if(s=="{"){return l(t)&&Z(t,v,f?"block":"top")}if(s=="word"){var u=v.current().toLowerCase();if(u=="only"||u=="not"||u=="and"){g="keyword"}else{if(n.hasOwnProperty(u)){g="attribute"}else{if(e.hasOwnProperty(u)){g="property"}else{g="error"}}}}return t.context.type};Y.media_parens=function(s,u,t){if(s==")"){return l(t)}if(s=="{"||s=="}"){return m(s,u,t,2)}return Y.media(s,u,t)};Y.font_face_before=function(s,u,t){if(s=="{"){return Z(t,u,"font_face")}return T(s,u,t)};Y.font_face=function(s,u,t){if(s=="}"){return l(t)}if(s=="word"){if(!X.hasOwnProperty(u.current().toLowerCase())){g="error"}else{g="property"}return"maybeprop"}return"font_face"};Y.keyframes=function(s,u,t){if(s=="word"){g="variable";return"keyframes"}if(s=="{"){return Z(t,u,"top")}return T(s,u,t)};Y.at=function(s,u,t){if(s==";"){return l(t)}if(s=="{"||s=="}"){return m(s,u,t)}if(s=="word"){g="tag"}else{if(s=="hash"){g="builtin"}}return"at"};Y.interpolation=function(s,u,t){if(s=="}"){return l(t)}if(s=="{"||s==";"){return m(s,u,t)}if(s!="variable"){g="error"}return"interpolation"};return{startState:function(s){return{tokenize:null,state:"top",context:new j("top",s||0,null)}},token:function(u,t){if(!t.tokenize&&u.eatSpace()){return null}var s=(t.tokenize||r)(u,t);if(s&&typeof s=="object"){W=s[1];s=s[0]}g=s;t.state=Y[t.state](W,u,t);return g},indent:function(w,u){var t=w.context,v=u&&u.charAt(0);var s=t.indent;if(t.type=="prop"&&(v=="}"||v==")")){t=t.prev}if(t.prev&&(v=="}"&&(t.type=="block"||t.type=="top"||t.type=="interpolation"||t.type=="font_face")||v==")"&&(t.type=="parens"||t.type=="media_parens")||v=="{"&&(t.type=="at"||t.type=="media"))){s=t.indent-i;t=t.prev}return s},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function F(V){var U={};for(var T=0;T<V.length;++T){U[V[T]]=true}return U}var A=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],Q=F(A);var S=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],I=F(S);var C=["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-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","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-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","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","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","marker-offset","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","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","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],H=F(C);var L=["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"],D=F(L);var B=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],K=F(B);var J=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","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","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","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","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","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","malayalam","match","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","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","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","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","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],O=F(J);var P=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E=F(P);var M=A.concat(S).concat(C).concat(L).concat(B).concat(J);N.registerHelper("hintWords","css",M);function R(W,V){var T=false,U;while((U=W.next())!=null){if(T&&U=="/"){V.tokenize=null;break}T=(U=="*")}return["comment","comment"]}function G(U,T){if(U.skipTo("-->")){U.match("-->");T.tokenize=null}else{U.skipToEnd()}return["comment","comment"]}N.defineMIME("text/css",{mediaTypes:Q,mediaFeatures:I,propertyKeywords:H,nonStandardPropertyKeywords:D,colorKeywords:K,valueKeywords:O,fontProperties:E,tokenHooks:{"<":function(U,T){if(!U.match("!--")){return false}T.tokenize=G;return G(U,T)},"/":function(U,T){if(!U.eat("*")){return false}T.tokenize=R;return R(U,T)}},name:"css"});N.defineMIME("text/x-scss",{mediaTypes:Q,mediaFeatures:I,propertyKeywords:H,nonStandardPropertyKeywords:D,colorKeywords:K,valueKeywords:O,fontProperties:E,allowNested:true,tokenHooks:{"/":function(U,T){if(U.eat("/")){U.skipToEnd();return["comment","comment"]}else{if(U.eat("*")){T.tokenize=R;return R(U,T)}else{return["operator","operator"]}}},":":function(T){if(T.match(/\s*\{/)){return[null,"{"]}return false},"$":function(T){T.match(/^[\w-]+/);if(T.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(T){if(!T.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});N.defineMIME("text/x-less",{mediaTypes:Q,mediaFeatures:I,propertyKeywords:H,nonStandardPropertyKeywords:D,colorKeywords:K,valueKeywords:O,fontProperties:E,allowNested:true,tokenHooks:{"/":function(U,T){if(U.eat("/")){U.skipToEnd();return["comment","comment"]}else{if(U.eat("*")){T.tokenize=R;return R(U,T)}else{return["operator","operator"]}}},"@":function(T){if(T.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}T.eatWhile(/[\w\\\-]/);if(T.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:javascript', location = '/static/bower/CodeMirror/mode/javascript/javascript.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("javascript",function(y,AI){var K=y.indentUnit;var Z=AI.statementIndent;var AY=AI.jsonld;var Y=AI.json||AY;var G=AI.typescript;var AS=AI.wordCharacters||/[\w$\xa1-\uffff]/;var AQ=function(){function Ao(Aq){return{type:Aq,style:"keyword"}}var Aj=Ao("keyword a"),Ah=Ao("keyword b"),Ag=Ao("keyword c");var Ai=Ao("operator"),Am={type:"atom",style:"atom"};var Ak={"if":Ao("if"),"while":Aj,"with":Aj,"else":Ah,"do":Ah,"try":Ah,"finally":Ah,"return":Ag,"break":Ag,"continue":Ag,"new":Ag,"delete":Ag,"throw":Ag,"debugger":Ag,"var":Ao("var"),"const":Ao("var"),let:Ao("var"),"function":Ao("function"),"catch":Ao("catch"),"for":Ao("for"),"switch":Ao("switch"),"case":Ao("case"),"default":Ao("default"),"in":Ai,"typeof":Ai,"instanceof":Ai,"true":Am,"false":Am,"null":Am,"undefined":Am,"NaN":Am,"Infinity":Am,"this":Ao("this"),module:Ao("module"),"class":Ao("class"),"super":Ao("atom"),yield:Ag,"export":Ao("export"),"import":Ao("import"),"extends":Ag};if(G){var Ap={type:"variable",style:"variable-3"};var Al={"interface":Ao("interface"),"extends":Ao("extends"),constructor:Ao("constructor"),"public":Ao("public"),"private":Ao("private"),"protected":Ao("protected"),"static":Ao("static"),string:Ap,number:Ap,bool:Ap,any:Ap};for(var An in Al){Ak[An]=Al[An]}}return Ak}();var o=/[+\-*&%=<>!?|~^]/;var AP=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function e(Aj){var Ah=false,Ag,Ai=false;while((Ag=Aj.next())!=null){if(!Ah){if(Ag=="/"&&!Ai){return }if(Ag=="["){Ai=true}else{if(Ai&&Ag=="]"){Ai=false}}}Ah=!Ah&&Ag=="\\"}}var r,f;function k(Ai,Ah,Ag){r=Ai;f=Ag;return Ah}function t(Ak,Ai){var Ag=Ak.next();if(Ag=='"'||Ag=="'"){Ai.tokenize=q(Ag);return Ai.tokenize(Ak,Ai)}else{if(Ag=="."&&Ak.match(/^\d+(?:[eE][+\-]?\d+)?/)){return k("number","number")}else{if(Ag=="."&&Ak.match("..")){return k("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(Ag)){return k(Ag)}else{if(Ag=="="&&Ak.eat(">")){return k("=>","operator")}else{if(Ag=="0"&&Ak.eat(/x/i)){Ak.eatWhile(/[\da-f]/i);return k("number","number")}else{if(/\d/.test(Ag)){Ak.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return k("number","number")}else{if(Ag=="/"){if(Ak.eat("*")){Ai.tokenize=AX;return AX(Ak,Ai)}else{if(Ak.eat("/")){Ak.skipToEnd();return k("comment","comment")}else{if(Ai.lastType=="operator"||Ai.lastType=="keyword c"||Ai.lastType=="sof"||/^[\[{}\(,;:]$/.test(Ai.lastType)){e(Ak);Ak.eatWhile(/[gimy]/);return k("regexp","string-2")}else{Ak.eatWhile(o);return k("operator","operator",Ak.current())}}}}else{if(Ag=="`"){Ai.tokenize=AZ;return AZ(Ak,Ai)}else{if(Ag=="#"){Ak.skipToEnd();return k("error","error")}else{if(o.test(Ag)){Ak.eatWhile(o);return k("operator","operator",Ak.current())}else{if(AS.test(Ag)){Ak.eatWhile(AS);var Aj=Ak.current(),Ah=AQ.propertyIsEnumerable(Aj)&&AQ[Aj];return(Ah&&Ai.lastType!=".")?k(Ah.type,Ah.style,Aj):k("variable","variable",Aj)}}}}}}}}}}}}}function q(Ag){return function(Ak,Ai){var Aj=false,Ah;if(AY&&Ak.peek()=="@"&&Ak.match(AP)){Ai.tokenize=t;return k("jsonld-keyword","meta")}while((Ah=Ak.next())!=null){if(Ah==Ag&&!Aj){break}Aj=!Aj&&Ah=="\\"}if(!Aj){Ai.tokenize=t}return k("string","string")}}function AX(Aj,Ai){var Ag=false,Ah;while(Ah=Aj.next()){if(Ah=="/"&&Ag){Ai.tokenize=t;break}Ag=(Ah=="*")}return k("comment","comment")}function AZ(Aj,Ah){var Ai=false,Ag;while((Ag=Aj.next())!=null){if(!Ai&&(Ag=="`"||Ag=="$"&&Aj.eat("{"))){Ah.tokenize=t;break}Ai=!Ai&&Ag=="\\"}return k("quasi","string-2",Aj.current())}var L="([{}])";function AU(Am,Aj){if(Aj.fatArrowAt){Aj.fatArrowAt=null}var Ai=Am.string.indexOf("=>",Am.start);if(Ai<0){return }var Al=0,Ah=false;for(var An=Ai-1;An>=0;--An){var Ag=Am.string.charAt(An);var Ak=L.indexOf(Ag);if(Ak>=0&&Ak<3){if(!Al){++An;break}if(--Al==0){break}}else{if(Ak>=3&&Ak<6){++Al}else{if(AS.test(Ag)){Ah=true}else{if(/["'\/]/.test(Ag)){return }else{if(Ah&&!Al){++An;break}}}}}}if(Ah&&!Al){Aj.fatArrowAt=An}}var B={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function i(Al,Ah,Ag,Ak,Ai,Aj){this.indented=Al;this.column=Ah;this.type=Ag;this.prev=Ai;this.info=Aj;if(Ak!=null){this.align=Ak}}function R(Aj,Ai){for(var Ah=Aj.localVars;Ah;Ah=Ah.next){if(Ah.name==Ai){return true}}for(var Ag=Aj.context;Ag;Ag=Ag.prev){for(var Ah=Ag.vars;Ah;Ah=Ah.next){if(Ah.name==Ai){return true}}}}function F(Ak,Ah,Ag,Aj,Al){var Am=Ak.cc;c.state=Ak;c.stream=Al;c.marked=null,c.cc=Am;c.style=Ah;if(!Ak.lexical.hasOwnProperty("align")){Ak.lexical.align=true}while(true){var Ai=Am.length?Am.pop():Y?AM:Ae;if(Ai(Ag,Aj)){while(Am.length&&Am[Am.length-1].lex){Am.pop()()}if(c.marked){return c.marked}if(Ag=="variable"&&R(Ak,Aj)){return"variable-2"}return Ah}}}var c={state:null,column:null,marked:null,cc:null};function z(){for(var Ag=arguments.length-1;Ag>=0;Ag--){c.cc.push(arguments[Ag])}}function AD(){z.apply(null,arguments);return true}function AT(Ah){function Ag(Ak){for(var Aj=Ak;Aj;Aj=Aj.next){if(Aj.name==Ah){return true}}return false}var Ai=c.state;if(Ai.context){c.marked="def";if(Ag(Ai.localVars)){return }Ai.localVars={name:Ah,next:Ai.localVars}}else{if(Ag(Ai.globalVars)){return }if(AI.globalVars){Ai.globalVars={name:Ah,next:Ai.globalVars}}}}var P={name:"this",next:{name:"arguments"}};function V(){c.state.context={prev:c.state.context,vars:c.state.localVars};c.state.localVars=P}function W(){c.state.localVars=c.state.context.vars;c.state.context=c.state.context.prev}function Ac(Ah,Ai){var Ag=function(){var Al=c.state,Aj=Al.indented;if(Al.lexical.type=="stat"){Aj=Al.lexical.indented}else{for(var Ak=Al.lexical;Ak&&Ak.type==")"&&Ak.align;Ak=Ak.prev){Aj=Ak.indented}}Al.lexical=new i(Aj,c.stream.column(),Ah,null,Al.lexical,Ai)};Ag.lex=true;return Ag}function H(){var Ag=c.state;if(Ag.lexical.prev){if(Ag.lexical.type==")"){Ag.indented=Ag.lexical.indented}Ag.lexical=Ag.lexical.prev}}H.lex=true;function Q(Ag){function Ah(Ai){if(Ai==Ag){return AD()}else{if(Ag==";"){return z()}else{return AD(Ah)}}}return Ah}function Ae(Ag,Ah){if(Ag=="var"){return AD(Ac("vardef",Ah.length),D,Q(";"),H)}if(Ag=="keyword a"){return AD(Ac("form"),AM,Ae,H)}if(Ag=="keyword b"){return AD(Ac("form"),Ae,H)}if(Ag=="{"){return AD(Ac("}"),X,H)}if(Ag==";"){return AD()}if(Ag=="if"){if(c.state.lexical.info=="else"&&c.state.cc[c.state.cc.length-1]==H){c.state.cc.pop()()}return AD(Ac("form"),AM,Ae,H,E)}if(Ag=="function"){return AD(l)}if(Ag=="for"){return AD(Ac("form"),T,Ae,H)}if(Ag=="variable"){return AD(Ac("stat"),Af)}if(Ag=="switch"){return AD(Ac("form"),AM,Ac("}","switch"),Q("{"),X,H,H)}if(Ag=="case"){return AD(AM,Q(":"))}if(Ag=="default"){return AD(Q(":"))}if(Ag=="catch"){return AD(Ac("form"),V,Q("("),AE,Q(")"),Ae,H,W)}if(Ag=="module"){return AD(Ac("form"),V,g,W,H)}if(Ag=="class"){return AD(Ac("form"),u,H)}if(Ag=="export"){return AD(Ac("form"),Ad,H)}if(Ag=="import"){return AD(Ac("form"),AF,H)}return z(Ac("stat"),AM,Q(";"),H)}function AM(Ag){return x(Ag,false)}function Ab(Ag){return x(Ag,true)}function x(Ah,Aj){if(c.state.fatArrowAt==c.stream.start){var Ag=Aj?m:v;if(Ah=="("){return AD(V,Ac(")"),AR(I,")"),H,Q("=>"),Ag,W)}else{if(Ah=="variable"){return z(V,I,Q("=>"),Ag,W)}}}var Ai=Aj?J:AA;if(B.hasOwnProperty(Ah)){return AD(Ai)}if(Ah=="function"){return AD(l,Ai)}if(Ah=="keyword c"){return AD(Aj?AJ:AH)}if(Ah=="("){return AD(Ac(")"),AH,AW,Q(")"),H,Ai)}if(Ah=="operator"||Ah=="spread"){return AD(Aj?Ab:AM)}if(Ah=="["){return AD(Ac("]"),M,H,Ai)}if(Ah=="{"){return AV(S,"}",null,Ai)}if(Ah=="quasi"){return z(p,Ai)}return AD()}function AH(Ag){if(Ag.match(/[;\}\)\],]/)){return z()}return z(AM)}function AJ(Ag){if(Ag.match(/[;\}\)\],]/)){return z()}return z(Ab)}function AA(Ag,Ah){if(Ag==","){return AD(AM)}return J(Ag,Ah,false)}function J(Ag,Ai,Ak){var Ah=Ak==false?AA:J;var Aj=Ak==false?AM:Ab;if(Ag=="=>"){return AD(V,Ak?m:v,W)}if(Ag=="operator"){if(/\+\+|--/.test(Ai)){return AD(Ah)}if(Ai=="?"){return AD(AM,Q(":"),Aj)}return AD(Aj)}if(Ag=="quasi"){return z(p,Ah)}if(Ag==";"){return }if(Ag=="("){return AV(Ab,")","call",Ah)}if(Ag=="."){return AD(AK,Ah)}if(Ag=="["){return AD(Ac("]"),AH,Q("]"),H,Ah)}}function p(Ag,Ah){if(Ag!="quasi"){return z()}if(Ah.slice(Ah.length-2)!="${"){return AD(p)}return AD(AM,O)}function O(Ag){if(Ag=="}"){c.marked="string-2";c.state.tokenize=AZ;return AD(p)}}function v(Ag){AU(c.stream,c.state);return z(Ag=="{"?Ae:AM)}function m(Ag){AU(c.stream,c.state);return z(Ag=="{"?Ae:Ab)}function Af(Ag){if(Ag==":"){return AD(H,Ae)}return z(AA,Q(";"),H)}function AK(Ag){if(Ag=="variable"){c.marked="property";return AD()}}function S(Ag,Ah){if(Ag=="variable"||c.style=="keyword"){c.marked="property";if(Ah=="get"||Ah=="set"){return AD(h)}return AD(j)}else{if(Ag=="number"||Ag=="string"){c.marked=AY?"property":(c.style+" property");return AD(j)}else{if(Ag=="jsonld-keyword"){return AD(j)}else{if(Ag=="["){return AD(AM,Q("]"),j)}}}}}function h(Ag){if(Ag!="variable"){return z(j)}c.marked="property";return AD(l)}function j(Ag){if(Ag==":"){return AD(Ab)}if(Ag=="("){return z(l)}}function AR(Ai,Ag){function Ah(Ak){if(Ak==","){var Aj=c.state.lexical;if(Aj.info=="call"){Aj.pos=(Aj.pos||0)+1}return AD(Ai,Ah)}if(Ak==Ag){return AD()}return AD(Q(Ag))}return function(Aj){if(Aj==Ag){return AD()}return z(Ai,Ah)}}function AV(Aj,Ag,Ai){for(var Ah=3;Ah<arguments.length;Ah++){c.cc.push(arguments[Ah])}return AD(Ac(Ag,Ai),AR(Aj,Ag),H)}function X(Ag){if(Ag=="}"){return AD()}return z(Ae,X)}function s(Ag){if(G&&Ag==":"){return AD(AC)}}function AC(Ag){if(Ag=="variable"){c.marked="variable-3";return AD()}}function D(){return z(I,s,AB,w)}function I(Ag,Ah){if(Ag=="variable"){AT(Ah);return AD()}if(Ag=="["){return AV(I,"]")}if(Ag=="{"){return AV(Aa,"}")}}function Aa(Ag,Ah){if(Ag=="variable"&&!c.stream.match(/^\s*:/,false)){AT(Ah);return AD(AB)}if(Ag=="variable"){c.marked="property"}return AD(Q(":"),I,AB)}function AB(Ag,Ah){if(Ah=="="){return AD(Ab)}}function w(Ag){if(Ag==","){return AD(D)}}function E(Ag,Ah){if(Ag=="keyword b"&&Ah=="else"){return AD(Ac("form","else"),Ae,H)}}function T(Ag){if(Ag=="("){return AD(Ac(")"),d,Q(")"),H)}}function d(Ag){if(Ag=="var"){return AD(D,Q(";"),b)}if(Ag==";"){return AD(b)}if(Ag=="variable"){return AD(U)}return z(AM,Q(";"),b)}function U(Ag,Ah){if(Ah=="in"||Ah=="of"){c.marked="keyword";return AD(AM)}return AD(AA,b)}function b(Ag,Ah){if(Ag==";"){return AD(a)}if(Ah=="in"||Ah=="of"){c.marked="keyword";return AD(AM)}return z(AM,Q(";"),a)}function a(Ag){if(Ag!=")"){AD(AM)}}function l(Ag,Ah){if(Ah=="*"){c.marked="keyword";return AD(l)}if(Ag=="variable"){AT(Ah);return AD(l)}if(Ag=="("){return AD(V,Ac(")"),AR(AE,")"),H,Ae,W)}}function AE(Ag){if(Ag=="spread"){return AD(AE)}return z(I,s)}function u(Ag,Ah){if(Ag=="variable"){AT(Ah);return AD(n)}}function n(Ag,Ah){if(Ah=="extends"){return AD(AM,n)}if(Ag=="{"){return AD(Ac("}"),N,H)}}function N(Ag,Ah){if(Ag=="variable"||c.style=="keyword"){c.marked="property";if(Ah=="get"||Ah=="set"){return AD(C,l,N)}return AD(l,N)}if(Ah=="*"){c.marked="keyword";return AD(N)}if(Ag==";"){return AD(N)}if(Ag=="}"){return AD()}}function C(Ag){if(Ag!="variable"){return z()}c.marked="property";return AD()}function g(Ag,Ah){if(Ag=="string"){return AD(Ae)}if(Ag=="variable"){AT(Ah);return AD(AG)}}function Ad(Ag,Ah){if(Ah=="*"){c.marked="keyword";return AD(AG,Q(";"))}if(Ah=="default"){c.marked="keyword";return AD(AM,Q(";"))}return z(Ae)}function AF(Ag){if(Ag=="string"){return AD()}return z(AO,AG)}function AO(Ag,Ah){if(Ag=="{"){return AV(AO,"}")}if(Ag=="variable"){AT(Ah)}return AD()}function AG(Ag,Ah){if(Ah=="from"){c.marked="keyword";return AD(AM)}}function M(Ag){if(Ag=="]"){return AD()}return z(Ab,AL)}function AL(Ag){if(Ag=="for"){return z(AW,Q("]"))}if(Ag==","){return AD(AR(AJ,"]"))}return z(AR(Ab,"]"))}function AW(Ag){if(Ag=="for"){return AD(T,AW)}if(Ag=="if"){return AD(AM,AW)}}function AN(Ah,Ag){return Ah.lastType=="operator"||Ah.lastType==","||o.test(Ag.charAt(0))||/[,.]/.test(Ag.charAt(0))}return{startState:function(Ah){var Ag={tokenize:t,lastType:"sof",cc:[],lexical:new i((Ah||0)-K,0,"block",false),localVars:AI.localVars,context:AI.localVars&&{vars:AI.localVars},indented:0};if(AI.globalVars&&typeof AI.globalVars=="object"){Ag.globalVars=AI.globalVars}return Ag},token:function(Ai,Ah){if(Ai.sol()){if(!Ah.lexical.hasOwnProperty("align")){Ah.lexical.align=false}Ah.indented=Ai.indentation();AU(Ai,Ah)}if(Ah.tokenize!=AX&&Ai.eatSpace()){return null}var Ag=Ah.tokenize(Ai,Ah);if(r=="comment"){return Ag}Ah.lastType=r=="operator"&&(f=="++"||f=="--")?"incdec":r;return F(Ah,Ag,r,f,Ai)},indent:function(Am,Ag){if(Am.tokenize==AX){return A.Pass}if(Am.tokenize!=t){return 0}var Al=Ag&&Ag.charAt(0),Aj=Am.lexical;if(!/^\s*else\b/.test(Ag)){for(var Ai=Am.cc.length-1;Ai>=0;--Ai){var An=Am.cc[Ai];if(An==H){Aj=Aj.prev}else{if(An!=E){break}}}}if(Aj.type=="stat"&&Al=="}"){Aj=Aj.prev}if(Z&&Aj.type==")"&&Aj.prev.type=="stat"){Aj=Aj.prev}var Ak=Aj.type,Ah=Al==Ak;if(Ak=="vardef"){return Aj.indented+(Am.lastType=="operator"||Am.lastType==","?Aj.info+1:0)}else{if(Ak=="form"&&Al=="{"){return Aj.indented}else{if(Ak=="form"){return Aj.indented+K}else{if(Ak=="stat"){return Aj.indented+(AN(Am,Ag)?Z||K:0)}else{if(Aj.info=="switch"&&!Ah&&AI.doubleIndentSwitch!=false){return Aj.indented+(/^(?:case|default)\b/.test(Ag)?K:2*K)}else{if(Aj.align){return Aj.column+(Ah?0:1)}else{return Aj.indented+(Ah?0:K)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Y?null:"/*",blockCommentEnd:Y?null:"*/",lineComment:Y?null:"//",fold:"brace",helperType:Y?"json":"javascript",jsonldMode:AY,jsonMode:Y}});A.registerHelper("wordChars","javascript",/[\w$]/);A.defineMIME("text/javascript","javascript");A.defineMIME("text/ecmascript","javascript");A.defineMIME("application/javascript","javascript");A.defineMIME("application/x-javascript","javascript");A.defineMIME("application/ecmascript","javascript");A.defineMIME("application/json",{name:"javascript",json:true});A.defineMIME("application/x-json",{name:"javascript",json:true});A.defineMIME("application/ld+json",{name:"javascript",jsonld:true});A.defineMIME("text/typescript",{name:"javascript",typescript:true});A.defineMIME("application/typescript",{name:"javascript",typescript:true})});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:xml', location = '/static/bower/CodeMirror/mode/xml/xml.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("xml",function(Y,K){var P=Y.indentUnit;var X=K.multilineTagIndentFactor||1;var D=K.multilineTagIndentPastTag;if(D==null){D=true}var W=K.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};var C=K.alignCDATA;var F,G;function N(f,e){function c(g){e.tokenize=g;return g(f,e)}var d=f.next();if(d=="<"){if(f.eat("!")){if(f.eat("[")){if(f.match("CDATA[")){return c(V("atom","]]>"))}else{return null}}else{if(f.match("--")){return c(V("comment","-->"))}else{if(f.match("DOCTYPE",true,true)){f.eatWhile(/[\w\._\-]/);return c(Z(1))}else{return null}}}}else{if(f.eat("?")){f.eatWhile(/[\w\._\-]/);e.tokenize=V("meta","?>");return"meta"}else{F=f.eat("/")?"closeTag":"openTag";e.tokenize=M;return"tag bracket"}}}else{if(d=="&"){var b;if(f.eat("#")){if(f.eat("x")){b=f.eatWhile(/[a-fA-F\d]/)&&f.eat(";")}else{b=f.eatWhile(/[\d]/)&&f.eat(";")}}else{b=f.eatWhile(/[\w\.\-:]/)&&f.eat(";")}return b?"atom":"error"}else{f.eatWhile(/[^&<]/);return null}}}function M(e,d){var c=e.next();if(c==">"||(c=="/"&&e.eat(">"))){d.tokenize=N;F=c==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(c=="="){F="equals";return null}else{if(c=="<"){d.tokenize=N;d.state=L;d.tagName=d.tagStart=null;var b=d.tokenize(e,d);return b?b+" tag error":"tag error"}else{if(/[\'\"]/.test(c)){d.tokenize=J(c);d.stringStartCol=e.column();return d.tokenize(e,d)}else{e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function J(b){var c=function(e,d){while(!e.eol()){if(e.next()==b){d.tokenize=M;break}}return"string"};c.isInAttribute=true;return c}function V(c,b){return function(e,d){while(!e.eol()){if(e.match(b)){d.tokenize=N;break}e.next()}return c}}function Z(b){return function(e,d){var c;while((c=e.next())!=null){if(c=="<"){d.tokenize=Z(b+1);return d.tokenize(e,d)}else{if(c==">"){if(b==1){d.tokenize=N;break}else{d.tokenize=Z(b-1);return d.tokenize(e,d)}}}}return"meta"}}function R(c,b,d){this.prev=c.context;this.tagName=b;this.indent=c.indented;this.startOfLine=d;if(W.doNotIndent.hasOwnProperty(b)||(c.context&&c.context.noIndent)){this.noIndent=true}}function U(b){if(b.context){b.context=b.context.prev}}function Q(d,c){var b;while(true){if(!d.context){return }b=d.context.tagName;if(!W.contextGrabbers.hasOwnProperty(b)||!W.contextGrabbers[b].hasOwnProperty(c)){return }U(d)}}function L(b,d,c){if(b=="openTag"){c.tagStart=d.column();return B}else{if(b=="closeTag"){return T}else{return L}}}function B(b,d,c){if(b=="word"){c.tagName=d.current();G="tag";return E}else{G="error";return B}}function T(c,e,d){if(c=="word"){var b=e.current();if(d.context&&d.context.tagName!=b&&W.implicitlyClosed.hasOwnProperty(d.context.tagName)){U(d)}if(d.context&&d.context.tagName==b){G="tag";return S}else{G="tag error";return a}}else{G="error";return a}}function S(c,b,d){if(c!="endTag"){G="error";return S}U(d);return L}function a(b,d,c){G="error";return S(b,d,c)}function E(e,c,f){if(e=="word"){G="attribute";return I}else{if(e=="endTag"||e=="selfcloseTag"){var d=f.tagName,b=f.tagStart;f.tagName=f.tagStart=null;if(e=="selfcloseTag"||W.autoSelfClosers.hasOwnProperty(d)){Q(f,d)}else{Q(f,d);f.context=new R(f,d,b==f.indented)}return L}}G="error";return E}function I(b,d,c){if(b=="equals"){return O}if(!W.allowMissing){G="error"}return E(b,d,c)}function O(b,d,c){if(b=="string"){return H}if(b=="word"&&W.allowUnquoted){G="string";return E}G="error";return E(b,d,c)}function H(b,d,c){if(b=="string"){return H}return E(b,d,c)}return{startState:function(){return{tokenize:N,state:L,indented:0,tagName:null,tagStart:null,context:null}},token:function(d,c){if(!c.tagName&&d.sol()){c.indented=d.indentation()}if(d.eatSpace()){return null}F=null;var b=c.tokenize(d,c);if((b||F)&&b!="comment"){G=null;c.state=c.state(F||b,d,c);if(G){b=G=="error"?b+" error":G}}return b},indent:function(g,c,f){var e=g.context;if(g.tokenize.isInAttribute){if(g.tagStart==g.indented){return g.stringStartCol+1}else{return g.indented+P}}if(e&&e.noIndent){return A.Pass}if(g.tokenize!=M&&g.tokenize!=N){return f?f.match(/^(\s*)/)[0].length:0}if(g.tagName){if(D){return g.tagStart+g.tagName.length+2}else{return g.tagStart+P*X}}if(C&&/<!\[CDATA\[/.test(c)){return 0}var b=c&&/^<(\/)?([\w_:\.-]*)/.exec(c);if(b&&b[1]){while(e){if(e.tagName==b[2]){e=e.prev;break}else{if(W.implicitlyClosed.hasOwnProperty(e.tagName)){e=e.prev}else{break}}}}else{if(b){while(e){var d=W.contextGrabbers[e.tagName];if(d&&d.hasOwnProperty(b[2])){e=e.prev}else{break}}}}while(e&&!e.startOfLine){e=e.prev}if(e){return e.indent+P}else{return 0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:K.htmlMode?"html":"xml",helperType:K.htmlMode?"html":"xml"}});A.defineMIME("text/xml","xml");A.defineMIME("application/xml","xml");if(!A.mimeModes.hasOwnProperty("text/html")){A.defineMIME("text/html",{name:"xml",htmlMode:true})}});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:htmlmixed', location = '/static/bower/CodeMirror/mode/htmlmixed/htmlmixed.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("htmlmixed",function(C,D){var B=A.getMode(C,{name:"xml",htmlMode:true,multilineTagIndentFactor:D.multilineTagIndentFactor,multilineTagIndentPastTag:D.multilineTagIndentPastTag});var M=A.getMode(C,"css");var K=[],J=D&&D.scriptTypes;K.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:A.getMode(C,"javascript")});if(J){for(var E=0;E<J.length;++E){var I=J[E];K.push({matches:I.matches,mode:I.mode&&A.getMode(C,I.mode)})}}K.push({matches:/./,mode:A.getMode(C,"text/plain")});function F(S,Q){var O=Q.htmlState.tagName;if(O){O=O.toLowerCase()}var P=B.token(S,Q.htmlState);if(O=="script"&&/\btag\b/.test(P)&&S.current()==">"){var T=S.string.slice(Math.max(0,S.pos-100),S.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);T=T?T[1]:"";if(T&&/[\"\']/.test(T.charAt(0))){T=T.slice(1,T.length-1)}for(var N=0;N<K.length;++N){var R=K[N];if(typeof R.matches=="string"?T==R.matches:R.matches.test(T)){if(R.mode){Q.token=L;Q.localMode=R.mode;Q.localState=R.mode.startState&&R.mode.startState(B.indent(Q.htmlState,""))}break}}}else{if(O=="style"&&/\btag\b/.test(P)&&S.current()==">"){Q.token=G;Q.localMode=M;Q.localState=M.startState(B.indent(Q.htmlState,""))}}return P}function H(S,O,P){var R=S.current();var Q=R.search(O),N;if(Q>-1){S.backUp(R.length-Q)}else{if(N=R.match(/<\/?$/)){S.backUp(R.length);if(!S.match(O,false)){S.match(R)}}}return P}function L(O,N){if(O.match(/^<\/\s*script\s*>/i,false)){N.token=F;N.localState=N.localMode=null;return null}return H(O,/<\/\s*script\s*>/,N.localMode.token(O,N.localState))}function G(O,N){if(O.match(/^<\/\s*style\s*>/i,false)){N.token=F;N.localState=N.localMode=null;return null}return H(O,/<\/\s*style\s*>/,M.token(O,N.localState))}return{startState:function(){var N=B.startState();return{token:F,localMode:null,localState:null,htmlState:N}},copyState:function(O){if(O.localState){var N=A.copyState(O.localMode,O.localState)}return{token:O.token,localMode:O.localMode,localState:N,htmlState:A.copyState(B,O.htmlState)}},token:function(O,N){return N.token(O,N)},indent:function(O,N){if(!O.localMode||/^\s*<\//.test(N)){return B.indent(O.htmlState,N)}else{if(O.localMode.indent){return O.localMode.indent(O.localState,N)}else{return A.Pass}}},innerMode:function(N){return{state:N.localState||N.htmlState,mode:N.localMode||B}}}},"xml","javascript","css");A.defineMIME("text/html","htmlmixed")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:markdown', location = '/static/bower/CodeMirror/mode/markdown/markdown.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"),require("../xml/xml"),require("../meta"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../meta"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("markdown",function(Y,Z){var P=A.modes.hasOwnProperty("xml");var J=A.getMode(Y,P?{name:"xml",htmlMode:true}:"text/plain");function f(x){if(A.findModeByName){var y=A.findModeByName(x);if(y){x=y.mime||y.mimes[0]}}var z=A.getMode(Y,x);return z.name=="null"?null:z}if(Z.highlightFormatting===undefined){Z.highlightFormatting=false}if(Z.maxBlockquoteDepth===undefined){Z.maxBlockquoteDepth=0}if(Z.underscoresBreakWords===undefined){Z.underscoresBreakWords=true}if(Z.fencedCodeBlocks===undefined){Z.fencedCodeBlocks=false}if(Z.taskLists===undefined){Z.taskLists=false}if(Z.strikethrough===undefined){Z.strikethrough=false}var K=0;var I="header",G="comment",R="quote",q="variable-2",n="variable-3",m="keyword",p="hr",H="tag",U="formatting",Q="link",M="link",g="link",e="string",r="em",a="strong",N="strikethrough";var B=/^([*\-=_])(?:\s*\1){2,}\s*$/,E=/^[*\-+]\s+/,c=/^[0-9]+\.\s+/,T=/^\[(x| )\](?=\s)/,t=/^#+/,w=/^(?:\={1,}|-{1,})$/,b=/^[^#!\[\]*_\\<>` "'(~]+/;function u(z,y,x){y.f=y.inline=x;return x(z,y)}function d(z,y,x){y.f=y.block=x;return x(z,y)}function C(x){x.linkTitle=false;x.em=false;x.strong=false;x.strikethrough=false;x.quote=0;if(!P&&x.f==S){x.f=s;x.block=j}x.trailingSpace=0;x.trailingSpaceNewLine=false;x.thisLineHasContent=false;return null}function j(AC,AB){var AA=AC.sol();var y=(AB.list!==false);if(AB.list!==false&&AB.indentationDiff>=0){if(AB.indentationDiff<4){AB.indentation-=AB.indentationDiff}AB.list=null}else{if(AB.list!==false&&AB.indentation>0){AB.list=null;AB.listDepth=Math.floor(AB.indentation/4)}else{if(AB.list!==false){AB.list=false;AB.listDepth=0}}}var x=null;if(AB.indentationDiff>=4){AB.indentation-=4;AC.skipToEnd();return G}else{if(AC.eatSpace()){return null}else{if(x=AC.match(t)){AB.header=x[0].length<=6?x[0].length:6;if(Z.highlightFormatting){AB.formatting="header"}AB.f=AB.inline;return W(AB)}else{if(AB.prevLineHasContent&&(x=AC.match(w))){AB.header=x[0].charAt(0)=="="?1:2;if(Z.highlightFormatting){AB.formatting="header"}AB.f=AB.inline;return W(AB)}else{if(AC.eat(">")){AB.indentation++;AB.quote=AA?1:AB.quote+1;if(Z.highlightFormatting){AB.formatting="quote"}AC.eatSpace();return W(AB)}else{if(AC.peek()==="["){return u(AC,AB,D)}else{if(AC.match(B,true)){return p}else{if((!AB.prevLineHasContent||y)&&(AC.match(E,false)||AC.match(c,false))){var z=null;if(AC.match(E,true)){z="ul"}else{AC.match(c,true);z="ol"}AB.indentation+=4;AB.list=true;AB.listDepth++;if(Z.taskLists&&AC.match(T,false)){AB.taskList=true}AB.f=AB.inline;if(Z.highlightFormatting){AB.formatting=["list","list-"+z]}return W(AB)}else{if(Z.fencedCodeBlocks&&AC.match(/^```[ \t]*([\w+#]*)/,true)){AB.localMode=f(RegExp.$1);if(AB.localMode){AB.localState=AB.localMode.startState()}AB.f=AB.block=i;if(Z.highlightFormatting){AB.formatting="code-block"}AB.code=true;return W(AB)}}}}}}}}}return u(AC,AB,AB.inline)}function S(z,y){var x=J.token(z,y.htmlState);if((P&&y.htmlState.tagStart===null&&!y.htmlState.context)||(y.md_inside&&z.current().indexOf(">")>-1)){y.f=s;y.block=j;y.htmlState=null}return x}function i(y,x){if(y.sol()&&y.match("```",false)){x.localMode=x.localState=null;x.f=x.block=o;return null}else{if(x.localMode){return x.localMode.token(y,x.localState)}else{y.skipToEnd();return G}}}function o(z,y){z.match("```");y.block=j;y.f=s;if(Z.highlightFormatting){y.formatting="code-block"}y.code=true;var x=W(y);y.code=false;return x}function W(AA){var z=[];if(AA.formatting){z.push(U);if(typeof AA.formatting==="string"){AA.formatting=[AA.formatting]}for(var x=0;x<AA.formatting.length;x++){z.push(U+"-"+AA.formatting[x]);if(AA.formatting[x]==="header"){z.push(U+"-"+AA.formatting[x]+"-"+AA.header)}if(AA.formatting[x]==="quote"){if(!Z.maxBlockquoteDepth||Z.maxBlockquoteDepth>=AA.quote){z.push(U+"-"+AA.formatting[x]+"-"+AA.quote)}else{z.push("error")}}}}if(AA.taskOpen){z.push("meta");return z.length?z.join(" "):null}if(AA.taskClosed){z.push("property");return z.length?z.join(" "):null}if(AA.linkHref){z.push(e);return z.length?z.join(" "):null}if(AA.strong){z.push(a)}if(AA.em){z.push(r)}if(AA.strikethrough){z.push(N)}if(AA.linkText){z.push(g)}if(AA.code){z.push(G)}if(AA.header){z.push(I);z.push(I+"-"+AA.header)}if(AA.quote){z.push(R);if(!Z.maxBlockquoteDepth||Z.maxBlockquoteDepth>=AA.quote){z.push(R+"-"+AA.quote)}else{z.push(R+"-"+Z.maxBlockquoteDepth)}}if(AA.list!==false){var y=(AA.listDepth-1)%3;if(!y){z.push(q)}else{if(y===1){z.push(n)}else{z.push(m)}}}if(AA.trailingSpaceNewLine){z.push("trailing-space-new-line")}else{if(AA.trailingSpace){z.push("trailing-space-"+(AA.trailingSpace%2?"a":"b"))}}return z.length?z.join(" "):null}function O(y,x){if(y.match(b,true)){return W(x)}return undefined}function s(AM,y){var z=y.text(AM,y);if(typeof z!=="undefined"){return z}if(y.list){y.list=null;return W(y)}if(y.taskList){var AC=AM.match(T,true)[1]!=="x";if(AC){y.taskOpen=true}else{y.taskClosed=true}if(Z.highlightFormatting){y.formatting="task"}y.taskList=false;return W(y)}y.taskOpen=false;y.taskClosed=false;if(y.header&&AM.match(/^#+$/,true)){if(Z.highlightFormatting){y.formatting="header"}return W(y)}var AE=AM.sol();var x=AM.next();if(x==="\\"){AM.next();if(Z.highlightFormatting){var AF=W(y);return AF?AF+" formatting-escape":"formatting-escape"}}if(y.linkTitle){y.linkTitle=false;var AI=x;if(x==="("){AI=")"}AI=(AI+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var AH="^\\s*(?:[^"+AI+"\\\\]+|\\\\\\\\|\\\\.)"+AI;if(AM.match(new RegExp(AH),true)){return e}}if(x==="`"){var AK=y.formatting;if(Z.highlightFormatting){y.formatting="code"}var AN=W(y);var AG=AM.pos;AM.eatWhile("`");var AA=1+AM.pos-AG;if(!y.code){K=AA;y.code=true;return W(y)}else{if(AA===K){y.code=false;return AN}y.formatting=AK;return W(y)}}else{if(y.code){return W(y)}}if(x==="!"&&AM.match(/\[[^\]]*\] ?(?:\(|\[)/,false)){AM.match(/\[[^\]]*\]/);y.inline=y.f=X;return H}if(x==="["&&AM.match(/.*\](\(.*\)| ?\[.*\])/,false)){y.linkText=true;if(Z.highlightFormatting){y.formatting="link"}return W(y)}if(x==="]"&&y.linkText&&AM.match(/\(.*\)| ?\[.*\]/,false)){if(Z.highlightFormatting){y.formatting="link"}var AF=W(y);y.linkText=false;y.inline=y.f=X;return AF}if(x==="<"&&AM.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,false)){y.f=y.inline=l;if(Z.highlightFormatting){y.formatting="link"}var AF=W(y);if(AF){AF+=" "}else{AF=""}return AF+Q}if(x==="<"&&AM.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,false)){y.f=y.inline=l;if(Z.highlightFormatting){y.formatting="link"}var AF=W(y);if(AF){AF+=" "}else{AF=""}return AF+M}if(x==="<"&&AM.match(/^\w/,false)){if(AM.string.indexOf(">")!=-1){var AD=AM.string.substring(1,AM.string.indexOf(">"));if(/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(AD)){y.md_inside=true}}AM.backUp(1);y.htmlState=A.startState(J);return d(AM,y,S)}if(x==="<"&&AM.match(/^\/\w*?>/)){y.md_inside=false;return"tag"}var AB=false;if(!Z.underscoresBreakWords){if(x==="_"&&AM.peek()!=="_"&&AM.match(/(\w)/,false)){var AJ=AM.pos-2;if(AJ>=0){var AL=AM.string.charAt(AJ);if(AL!=="_"&&AL.match(/(\w)/,false)){AB=true}}}}if(x==="*"||(x==="_"&&!AB)){if(AE&&AM.peek()===" "){}else{if(y.strong===x&&AM.eat(x)){if(Z.highlightFormatting){y.formatting="strong"}var AN=W(y);y.strong=false;return AN}else{if(!y.strong&&AM.eat(x)){y.strong=x;if(Z.highlightFormatting){y.formatting="strong"}return W(y)}else{if(y.em===x){if(Z.highlightFormatting){y.formatting="em"}var AN=W(y);y.em=false;return AN}else{if(!y.em){y.em=x;if(Z.highlightFormatting){y.formatting="em"}return W(y)}}}}}}else{if(x===" "){if(AM.eat("*")||AM.eat("_")){if(AM.peek()===" "){return W(y)}else{AM.backUp(1)}}}}if(Z.strikethrough){if(x==="~"&&AM.eatWhile(x)){if(y.strikethrough){if(Z.highlightFormatting){y.formatting="strikethrough"}var AN=W(y);y.strikethrough=false;return AN}else{if(AM.match(/^[^\s]/,false)){y.strikethrough=true;if(Z.highlightFormatting){y.formatting="strikethrough"}return W(y)}}}else{if(x===" "){if(AM.match(/^~~/,true)){if(AM.peek()===" "){return W(y)}else{AM.backUp(2)}}}}}if(x===" "){if(AM.match(/ +$/,false)){y.trailingSpace++}else{if(y.trailingSpace){y.trailingSpaceNewLine=true}}}return W(y)}function l(AA,z){var y=AA.next();if(y===">"){z.f=z.inline=s;if(Z.highlightFormatting){z.formatting="link"}var x=W(z);if(x){x+=" "}else{x=""}return x+Q}AA.match(/^[^>]+/,true);return Q}function X(z,y){if(z.eatSpace()){return null}var x=z.next();if(x==="("||x==="["){y.f=y.inline=k(x==="("?")":"]");if(Z.highlightFormatting){y.formatting="link-string"}y.linkHref=true;return W(y)}return"error"}function k(x){return function(AB,AA){var z=AB.next();if(z===x){AA.f=AA.inline=s;if(Z.highlightFormatting){AA.formatting="link-string"}var y=W(AA);AA.linkHref=false;return y}if(AB.match(V(x),true)){AB.backUp(1)}AA.linkHref=true;return W(AA)}}function D(y,x){if(y.match(/^[^\]]*\]:/,false)){x.f=h;y.next();if(Z.highlightFormatting){x.formatting="link"}x.linkText=true;return W(x)}return u(y,x,s)}function h(z,y){if(z.match(/^\]:/,true)){y.f=y.inline=F;if(Z.highlightFormatting){y.formatting="link"}var x=W(y);y.linkText=false;return x}z.match(/^[^\]]+/,true);return g}function F(y,x){if(y.eatSpace()){return null}y.match(/^[^\s]+/,true);if(y.peek()===undefined){x.linkTitle=true}else{y.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,true)}x.f=x.inline=s;return e}var v=[];function V(x){if(!v[x]){x=(x+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");v[x]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+x+")")}return v[x]}var L={startState:function(){return{f:j,prevLineHasContent:false,thisLineHasContent:false,block:j,htmlState:null,indentation:0,inline:s,text:O,formatting:false,linkText:false,linkHref:false,linkTitle:false,em:false,strong:false,header:0,taskList:false,list:false,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:false,strikethrough:false}},copyState:function(x){return{f:x.f,prevLineHasContent:x.prevLineHasContent,thisLineHasContent:x.thisLineHasContent,block:x.block,htmlState:x.htmlState&&A.copyState(J,x.htmlState),indentation:x.indentation,localMode:x.localMode,localState:x.localMode?A.copyState(x.localMode,x.localState):null,inline:x.inline,text:x.text,formatting:false,linkTitle:x.linkTitle,em:x.em,strong:x.strong,strikethrough:x.strikethrough,header:x.header,taskList:x.taskList,list:x.list,listDepth:x.listDepth,quote:x.quote,trailingSpace:x.trailingSpace,trailingSpaceNewLine:x.trailingSpaceNewLine,md_inside:x.md_inside}},token:function(AB,AA){AA.formatting=false;if(AB.sol()){var x=!!AA.header;AA.header=0;if(AB.match(/^\s*$/,true)||x){AA.prevLineHasContent=false;C(AA);return x?this.token(AB,AA):null}else{AA.prevLineHasContent=AA.thisLineHasContent;AA.thisLineHasContent=true}AA.taskList=false;AA.code=false;AA.trailingSpace=0;AA.trailingSpaceNewLine=false;AA.f=AA.block;var y=AB.match(/^\s*/,true)[0].replace(/\t/g,"    ").length;var AC=Math.floor((y-AA.indentation)/4)*4;if(AC>4){AC=4}var z=AA.indentation+AC;AA.indentationDiff=z-AA.indentation;AA.indentation=z;if(y>0){return null}}return AA.f(AB,AA)},innerMode:function(x){if(x.block==S){return{state:x.htmlState,mode:J}}if(x.localState){return{state:x.localState,mode:x.localMode}}return{state:x,mode:L}},blankLine:C,getType:W,fold:"markdown"};return L},"xml");A.defineMIME("text/x-markdown","markdown")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:perl', location = '/static/bower/CodeMirror/mode/perl/perl.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("perl",function(){var F={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,"$ARG":5,"$_":5,"@ARG":5,"@_":5,"$LIST_SEPARATOR":5,'$"':5,"$PROCESS_ID":5,"$PID":5,"$$":5,"$REAL_GROUP_ID":5,"$GID":5,"$(":5,"$EFFECTIVE_GROUP_ID":5,"$EGID":5,"$)":5,"$PROGRAM_NAME":5,"$0":5,"$SUBSCRIPT_SEPARATOR":5,"$SUBSEP":5,"$;":5,"$REAL_USER_ID":5,"$UID":5,"$<":5,"$EFFECTIVE_USER_ID":5,"$EUID":5,"$>":5,"$a":5,"$b":5,"$COMPILING":5,"$^C":5,"$DEBUGGING":5,"$^D":5,"${^ENCODING}":5,"$ENV":5,"%ENV":5,"$SYSTEM_FD_MAX":5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,"$INPLACE_EDIT":5,"$^I":5,"$^M":5,"$OSNAME":5,"$^O":5,"${^OPEN}":5,"$PERLDB":5,"$^P":5,"$SIG":5,"%SIG":5,"$BASETIME":5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,"$PERL_VERSION":5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,"$EXECUTABLE_NAME":5,"$^X":5,"$1":5,"$MATCH":5,"$&":5,"${^MATCH}":5,"$PREMATCH":5,"$`":5,"${^PREMATCH}":5,"$POSTMATCH":5,"$'":5,"${^POSTMATCH}":5,"$LAST_PAREN_MATCH":5,"$+":5,"$LAST_SUBMATCH_RESULT":5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,"$LAST_REGEXP_CODE_RESULT":5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,"$ARGV":5,"@ARGV":5,ARGV:5,ARGVOUT:5,"$OUTPUT_FIELD_SEPARATOR":5,"$OFS":5,"$,":5,"$INPUT_LINE_NUMBER":5,"$NR":5,"$.":5,"$INPUT_RECORD_SEPARATOR":5,"$RS":5,"$/":5,"$OUTPUT_RECORD_SEPARATOR":5,"$ORS":5,"$\\":5,"$OUTPUT_AUTOFLUSH":5,"$|":5,"$ACCUMULATOR":5,"$^A":5,"$FORMAT_FORMFEED":5,"$^L":5,"$FORMAT_PAGE_NUMBER":5,"$%":5,"$FORMAT_LINES_LEFT":5,"$-":5,"$FORMAT_LINE_BREAK_CHARACTERS":5,"$:":5,"$FORMAT_LINES_PER_PAGE":5,"$=":5,"$FORMAT_TOP_NAME":5,"$^":5,"$FORMAT_NAME":5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,"$EXTENDED_OS_ERROR":5,"$^E":5,"$EXCEPTIONS_BEING_CAUGHT":5,"$^S":5,"$WARNING":5,"$^W":5,"${^WARNING_BITS}":5,"$OS_ERROR":5,"$ERRNO":5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,"$CHILD_ERROR":5,"$?":5,"$EVAL_ERROR":5,"$@":5,"$OFMT":5,"$#":5,"$*":5,"$ARRAY_BASE":5,"$[":5,"$OLD_PERL_VERSION":5,"$]":5,"if":[1,1],elsif:[1,1],"else":[1,1],"while":[1,1],unless:[1,1],"for":[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,"break":1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,"continue":[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,"default":1,defined:1,"delete":1,die:1,"do":1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,"eval":1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,"goto":1,grep:1,hex:1,"import":1,index:1,"int":1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,"new":1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,"package":1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,"return":1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null};var J="string-2";var H=/[goseximacplud]/;function G(P,O,M,N,L){O.chain=null;O.style=null;O.tail=null;O.tokenize=function(T,R){var S=false,U,Q=0;while(U=T.next()){if(U===M[Q]&&!S){if(M[++Q]!==undefined){R.chain=M[Q];R.style=N;R.tail=L}else{if(L){T.eatWhile(L)}}R.tokenize=K;return N}S=!S&&U=="\\"}return N};return O.tokenize(P,O)}function I(N,M,L){M.tokenize=function(P,O){if(P.string==L){O.tokenize=K}P.skipToEnd();return"string"};return M.tokenize(N,M)}function K(P,N){if(P.eatSpace()){return null}if(N.chain){return G(P,N,N.chain,N.style,N.tail)}if(P.match(/^\-?[\d\.]/,false)){if(P.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/)){return"number"}}if(P.match(/^<<(?=\w)/)){P.eatWhile(/\w/);return I(P,N,P.current().substr(2))}if(P.sol()&&P.match(/^\=item(?!\w)/)){return I(P,N,"=cut")}var M=P.next();if(M=='"'||M=="'"){if(C(P,3)=="<<"+M){var O=P.pos;P.eatWhile(/\w/);var R=P.current().substr(1);if(R&&P.eat(M)){return I(P,N,R)}P.pos=O}return G(P,N,[M],"string")}if(M=="q"){var Q=B(P,-2);if(!(Q&&/\w/.test(Q))){Q=B(P,0);if(Q=="x"){Q=B(P,1);if(Q=="("){D(P,2);return G(P,N,[")"],J,H)}if(Q=="["){D(P,2);return G(P,N,["]"],J,H)}if(Q=="{"){D(P,2);return G(P,N,["}"],J,H)}if(Q=="<"){D(P,2);return G(P,N,[">"],J,H)}if(/[\^'"!~\/]/.test(Q)){D(P,1);return G(P,N,[P.eat(Q)],J,H)}}else{if(Q=="q"){Q=B(P,1);if(Q=="("){D(P,2);return G(P,N,[")"],"string")}if(Q=="["){D(P,2);return G(P,N,["]"],"string")}if(Q=="{"){D(P,2);return G(P,N,["}"],"string")}if(Q=="<"){D(P,2);return G(P,N,[">"],"string")}if(/[\^'"!~\/]/.test(Q)){D(P,1);return G(P,N,[P.eat(Q)],"string")}}else{if(Q=="w"){Q=B(P,1);if(Q=="("){D(P,2);return G(P,N,[")"],"bracket")}if(Q=="["){D(P,2);return G(P,N,["]"],"bracket")}if(Q=="{"){D(P,2);return G(P,N,["}"],"bracket")}if(Q=="<"){D(P,2);return G(P,N,[">"],"bracket")}if(/[\^'"!~\/]/.test(Q)){D(P,1);return G(P,N,[P.eat(Q)],"bracket")}}else{if(Q=="r"){Q=B(P,1);if(Q=="("){D(P,2);return G(P,N,[")"],J,H)}if(Q=="["){D(P,2);return G(P,N,["]"],J,H)}if(Q=="{"){D(P,2);return G(P,N,["}"],J,H)}if(Q=="<"){D(P,2);return G(P,N,[">"],J,H)}if(/[\^'"!~\/]/.test(Q)){D(P,1);return G(P,N,[P.eat(Q)],J,H)}}else{if(/[\^'"!~\/(\[{<]/.test(Q)){if(Q=="("){D(P,1);return G(P,N,[")"],"string")}if(Q=="["){D(P,1);return G(P,N,["]"],"string")}if(Q=="{"){D(P,1);return G(P,N,["}"],"string")}if(Q=="<"){D(P,1);return G(P,N,[">"],"string")}if(/[\^'"!~\/]/.test(Q)){return G(P,N,[P.eat(Q)],"string")}}}}}}}}if(M=="m"){var Q=B(P,-2);if(!(Q&&/\w/.test(Q))){Q=P.eat(/[(\[{<\^'"!~\/]/);if(Q){if(/[\^'"!~\/]/.test(Q)){return G(P,N,[Q],J,H)}if(Q=="("){return G(P,N,[")"],J,H)}if(Q=="["){return G(P,N,["]"],J,H)}if(Q=="{"){return G(P,N,["}"],J,H)}if(Q=="<"){return G(P,N,[">"],J,H)}}}}if(M=="s"){var Q=/[\/>\]})\w]/.test(B(P,-2));if(!Q){Q=P.eat(/[(\[{<\^'"!~\/]/);if(Q){if(Q=="["){return G(P,N,["]","]"],J,H)}if(Q=="{"){return G(P,N,["}","}"],J,H)}if(Q=="<"){return G(P,N,[">",">"],J,H)}if(Q=="("){return G(P,N,[")",")"],J,H)}return G(P,N,[Q,Q],J,H)}}}if(M=="y"){var Q=/[\/>\]})\w]/.test(B(P,-2));if(!Q){Q=P.eat(/[(\[{<\^'"!~\/]/);if(Q){if(Q=="["){return G(P,N,["]","]"],J,H)}if(Q=="{"){return G(P,N,["}","}"],J,H)}if(Q=="<"){return G(P,N,[">",">"],J,H)}if(Q=="("){return G(P,N,[")",")"],J,H)}return G(P,N,[Q,Q],J,H)}}}if(M=="t"){var Q=/[\/>\]})\w]/.test(B(P,-2));if(!Q){Q=P.eat("r");if(Q){Q=P.eat(/[(\[{<\^'"!~\/]/);if(Q){if(Q=="["){return G(P,N,["]","]"],J,H)}if(Q=="{"){return G(P,N,["}","}"],J,H)}if(Q=="<"){return G(P,N,[">",">"],J,H)}if(Q=="("){return G(P,N,[")",")"],J,H)}return G(P,N,[Q,Q],J,H)}}}}if(M=="`"){return G(P,N,[M],"variable-2")}if(M=="/"){if(!/~\s*$/.test(C(P))){return"operator"}else{return G(P,N,[M],J,H)}}if(M=="$"){var O=P.pos;if(P.eatWhile(/\d/)||P.eat("{")&&P.eatWhile(/\d/)&&P.eat("}")){return"variable-2"}else{P.pos=O}}if(/[$@%]/.test(M)){var O=P.pos;if(P.eat("^")&&P.eat(/[A-Z]/)||!/[@$%&]/.test(B(P,-2))&&P.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var Q=P.current();if(F[Q]){return"variable-2"}}P.pos=O}if(/[$@%&]/.test(M)){if(P.eatWhile(/[\w$\[\]]/)||P.eat("{")&&P.eatWhile(/[\w$\[\]]/)&&P.eat("}")){var Q=P.current();if(F[Q]){return"variable-2"}else{return"variable"}}}if(M=="#"){if(B(P,-2)!="$"){P.skipToEnd();return"comment"}}if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(M)){var O=P.pos;P.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);if(F[P.current()]){return"operator"}else{P.pos=O}}if(M=="_"){if(P.pos==1){if(E(P,6)=="_END__"){return G(P,N,["\0"],"comment")}else{if(E(P,7)=="_DATA__"){return G(P,N,["\0"],"variable-2")}else{if(E(P,7)=="_C__"){return G(P,N,["\0"],"string")}}}}}if(/\w/.test(M)){var O=P.pos;if(B(P,-2)=="{"&&(B(P,0)=="}"||P.eatWhile(/\w/)&&B(P,0)=="}")){return"string"}else{P.pos=O}}if(/[A-Z]/.test(M)){var L=B(P,-2);var O=P.pos;P.eatWhile(/[A-Z_]/);if(/[\da-z]/.test(B(P,0))){P.pos=O}else{var Q=F[P.current()];if(!Q){return"meta"}if(Q[1]){Q=Q[0]}if(L!=":"){if(Q==1){return"keyword"}else{if(Q==2){return"def"}else{if(Q==3){return"atom"}else{if(Q==4){return"operator"}else{if(Q==5){return"variable-2"}else{return"meta"}}}}}}else{return"meta"}}}if(/[a-zA-Z_]/.test(M)){var L=B(P,-2);P.eatWhile(/\w/);var Q=F[P.current()];if(!Q){return"meta"}if(Q[1]){Q=Q[0]}if(L!=":"){if(Q==1){return"keyword"}else{if(Q==2){return"def"}else{if(Q==3){return"atom"}else{if(Q==4){return"operator"}else{if(Q==5){return"variable-2"}else{return"meta"}}}}}}else{return"meta"}}return null}return{startState:function(){return{tokenize:K,chain:null,style:null,tail:null}},token:function(M,L){return(L.tokenize||K)(M,L)},lineComment:"#"}});A.registerHelper("wordChars","perl",/[\w$]/);A.defineMIME("text/x-perl","perl");function B(F,G){return F.string.charAt(F.pos+(G||0))}function C(G,H){if(H){var F=G.pos-H;return G.string.substr((F>=0?F:0),H)}else{return G.string.substr(0,G.pos-1)}}function E(G,I){var H=G.string.length;var F=H-G.pos+1;return G.string.substr(G.pos,(I&&I<H?I:F))}function D(G,I){var F=G.pos+I;var H;if(F<=0){G.pos=0}else{if(F>=(H=G.string.length-1)){G.pos=H}else{G.pos=F}}}});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:php', location = '/static/bower/CodeMirror/mode/php/php.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],A)}else{A(CodeMirror)}}})(function(C){function E(M){var K={},L=M.split(" ");for(var J=0;J<L.length;++J){K[L[J]]=true}return K}function D(K,J){if(K.length==0){return G(J)}return function(O,N){var M=K[0];for(var L=0;L<M.length;L++){if(O.match(M[L][0])){N.tokenize=D(K.slice(1),J);return M[L][1]}}N.tokenize=G(J);return"string"}}function G(J){return function(L,K){return A(L,K,J)}}function A(M,K,J){if(M.match("${",false)||M.match("{$",false)){K.tokenize=null;return"string"}if(M.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(M.match("[",false)){K.tokenize=D([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],J)}if(M.match(/\-\>\w/,false)){K.tokenize=D([[["->",null]],[[/[\w]+/,"variable"]]],J)}return"variable-2"}var L=false;while(!M.eol()&&(L||(!M.match("{$",false)&&!M.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,false)))){if(!L&&M.match(J)){K.tokenize=null;K.tokStack.pop();K.tokStack.pop();break}L=M.next()=="\\"&&!L}return"string"}var H="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally";var I="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";var B="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";C.registerHelper("hintWords","php",[H,I,B].join(" ").split(" "));C.registerHelper("wordChars","php",/[\w$]/);var F={name:"clike",helperType:"php",keywords:E(H),blockKeywords:E("catch do else elseif for foreach if switch try while finally"),atoms:E(I),builtin:E(B),multiLineStrings:true,hooks:{"$":function(J){J.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(L,J){if(L.match(/<</)){L.eatWhile(/[\w\.]/);var K=L.current().slice(3);if(K){(J.tokStack||(J.tokStack=[])).push(K,0);J.tokenize=G(K);return"string"}}return false},"#":function(J){while(!J.eol()&&!J.match("?>",false)){J.next()}return"comment"},"/":function(J){if(J.eat("/")){while(!J.eol()&&!J.match("?>",false)){J.next()}return"comment"}return false},'"':function(J,K){(K.tokStack||(K.tokStack=[])).push('"',0);K.tokenize=G('"');return"string"},"{":function(J,K){if(K.tokStack&&K.tokStack.length){K.tokStack[K.tokStack.length-1]++}return false},"}":function(J,K){if(K.tokStack&&K.tokStack.length>0&&!--K.tokStack[K.tokStack.length-1]){K.tokenize=G(K.tokStack[K.tokStack.length-2])}return false}}};C.defineMode("php",function(L,M){var N=C.getMode(L,"text/html");var J=C.getMode(L,F);function K(U,S){var R=S.curMode==J;if(U.sol()&&S.pending&&S.pending!='"'&&S.pending!="'"){S.pending=null}if(!R){if(U.match(/^<\?\w*/)){S.curMode=J;S.curState=S.php;return"meta"}if(S.pending=='"'||S.pending=="'"){while(!U.eol()&&U.next()!=S.pending){}var Q="string"}else{if(S.pending&&U.pos<S.pending.end){U.pos=S.pending.end;var Q=S.pending.style}else{var Q=N.token(U,S.curState)}}if(S.pending){S.pending=null}var T=U.current(),P=T.search(/<\?/),O;if(P!=-1){if(Q=="string"&&(O=T.match(/[\'\"]$/))&&!/\?>/.test(T)){S.pending=O[0]}else{S.pending={end:U.pos,style:Q}}U.backUp(T.length-P)}return Q}else{if(R&&S.php.tokenize==null&&U.match("?>")){S.curMode=N;S.curState=S.html;return"meta"}else{return J.token(U,S.curState)}}}return{startState:function(){var O=C.startState(N),P=C.startState(J);return{html:O,php:P,curMode:M.startOpen?J:N,curState:M.startOpen?P:O,pending:null}},copyState:function(R){var P=R.html,Q=C.copyState(N,P),T=R.php,O=C.copyState(J,T),S;if(R.curMode==N){S=Q}else{S=O}return{html:Q,php:O,curMode:R.curMode,curState:S,pending:R.pending}},token:K,indent:function(P,O){if((P.curMode!=J&&/^\s*<\//.test(O))||(P.curMode==J&&/^\?>/.test(O))){return N.indent(P.html,O)}return P.curMode.indent(P.curState,O)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(O){return{state:O.curState,mode:O.curMode}}}},"htmlmixed","clike");C.defineMIME("application/x-httpd-php","php");C.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});C.defineMIME("text/x-php",F)});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:python', location = '/static/bower/CodeMirror/mode/python/python.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(C){function E(J){return new RegExp("^(("+J.join(")|(")+"))\\b")}var H=E(["and","or","not","is"]);var I=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"];var D=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];var B={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]};var A={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};C.registerHelper("hintWords","python",I.concat(D));function G(J){return J.scopes[J.scopes.length-1]}C.defineMode("python",function(S,b){var K="error";var W=b.singleDelimiters||new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]");var J=b.doubleOperators||new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");var Q=b.doubleDelimiters||new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))");var c=b.tripleDelimiters||new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))");if(b.version&&parseInt(b.version,10)==3){var V=b.singleOperators||new RegExp("^[\\+\\-\\*/%&|\\^~<>!@]");var P=b.identifiers||new RegExp("^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*")}else{var V=b.singleOperators||new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");var P=b.identifiers||new RegExp("^[_A-Za-z][_A-Za-z0-9]*")}var L=b.hangingIndent||S.indentUnit;var a=I,X=D;if(b.extra_keywords!=undefined){a=a.concat(b.extra_keywords)}if(b.extra_builtins!=undefined){X=X.concat(b.extra_builtins)}if(b.version&&parseInt(b.version,10)==3){a=a.concat(A.keywords);X=X.concat(A.builtins);var T=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}else{a=a.concat(B.keywords);X=X.concat(B.builtins);var T=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var R=E(a);var M=E(X);function e(j,i){if(j.sol()&&G(i).type=="py"){var f=G(i).offset;if(j.eatSpace()){var g=j.indentation();if(g>f){U(j,i,"py")}else{if(g<f&&N(j,i)){i.errorToken=true}}return null}else{var h=Y(j,i);if(f>0&&N(j,i)){h+=" "+K}return h}}return Y(j,i)}function Y(j,i){if(j.eatSpace()){return null}var h=j.peek();if(h=="#"){j.skipToEnd();return"comment"}if(j.match(/^[0-9\.]/,false)){var g=false;if(j.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)){g=true}if(j.match(/^\d+\.\d*/)){g=true}if(j.match(/^\.\d+/)){g=true}if(g){j.eat(/J/i);return"number"}var f=false;if(j.match(/^0x[0-9a-f]+/i)){f=true}if(j.match(/^0b[01]+/i)){f=true}if(j.match(/^0o[0-7]+/i)){f=true}if(j.match(/^[1-9]\d*(e[\+\-]?\d+)?/)){j.eat(/J/i);f=true}if(j.match(/^0(?![\dx])/i)){f=true}if(f){j.eat(/L/i);return"number"}}if(j.match(T)){i.tokenize=Z(j.current());return i.tokenize(j,i)}if(j.match(c)||j.match(Q)){return null}if(j.match(J)||j.match(V)||j.match(H)){return"operator"}if(j.match(W)){return null}if(j.match(R)){return"keyword"}if(j.match(M)){return"builtin"}if(j.match(/^(self|cls)\b/)){return"variable-2"}if(j.match(P)){if(i.lastToken=="def"||i.lastToken=="class"){return"def"}return"variable"}j.next();return K}function Z(f){while("rub".indexOf(f.charAt(0).toLowerCase())>=0){f=f.substr(1)}var h=f.length==1;var g="string";function i(k,j){while(!k.eol()){k.eatWhile(/[^'"\\]/);if(k.eat("\\")){k.next();if(h&&k.eol()){return g}}else{if(k.match(f)){j.tokenize=e;return g}else{k.eat(/['"]/)}}}if(h){if(b.singleLineStringErrors){return K}else{j.tokenize=e}}return g}i.isString=true;return i}function U(i,g,f){var h=0,j=null;if(f=="py"){while(G(g).type!="py"){g.scopes.pop()}}h=G(g).offset+(f=="py"?S.indentUnit:L);if(f!="py"&&!i.match(/^(\s|#.*)*$/,false)){j=i.column()+1}g.scopes.push({offset:h,type:f,align:j})}function N(g,f){var h=g.indentation();while(G(f).offset>h){if(G(f).type!="py"){return true}f.scopes.pop()}return G(f).offset!=h}function d(j,h){var g=h.tokenize(j,h);var i=j.current();if(i=="."){g=j.match(P,false)?null:K;if(g==null&&h.lastStyle=="meta"){g="meta"}return g}if(i=="@"){if(b.version&&parseInt(b.version,10)==3){return j.match(P,false)?"meta":"operator"}else{return j.match(P,false)?"meta":K}}if((g=="variable"||g=="builtin")&&h.lastStyle=="meta"){g="meta"}if(i=="pass"||i=="return"){h.dedent+=1}if(i=="lambda"){h.lambda=true}if(i==":"&&!h.lambda&&G(h).type=="py"){U(j,h,"py")}var f=i.length==1?"[({".indexOf(i):-1;if(f!=-1){U(j,h,"])}".slice(f,f+1))}f="])}".indexOf(i);if(f!=-1){if(G(h).type==i){h.scopes.pop()}else{return K}}if(h.dedent>0&&j.eol()&&G(h).type=="py"){if(h.scopes.length>1){h.scopes.pop()}h.dedent-=1}return g}var O={startState:function(f){return{tokenize:e,scopes:[{offset:f||0,type:"py",align:null}],lastStyle:null,lastToken:null,lambda:false,dedent:0}},token:function(j,g){var i=g.errorToken;if(i){g.errorToken=false}var f=d(j,g);g.lastStyle=f;var h=j.current();if(h&&f){g.lastToken=h}if(j.eol()&&g.lambda){g.lambda=false}return i?f+" "+K:f},indent:function(i,f){if(i.tokenize!=e){return i.tokenize.isString?C.Pass:0}var h=G(i);var g=f&&f.charAt(0)==h.type;if(h.align!=null){return h.align-(g?1:0)}else{if(g&&i.scopes.length>1){return i.scopes[i.scopes.length-2].offset}else{return h.offset}}},lineComment:"#",fold:"indent"};return O});C.defineMIME("text/x-python","python");var F=function(J){return J.split(" ")};C.defineMIME("text/x-cython",{name:"python",extra_keywords:F("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")})});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:ruby', location = '/static/bower/CodeMirror/mode/ruby/ruby.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("ruby",function(F){function B(S){var R={};for(var P=0,Q=S.length;P<Q;++P){R[S[P]]=true}return R}var K=B(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]);var J=B(["def","class","case","for","while","module","then","catch","loop","proc","begin"]);var E=B(["end","until"]);var D={"[":"]","{":"}","(":")"};var M;function C(P,R,Q){Q.tokenize.push(P);return P(R,Q)}function G(a,R){M=null;if(a.sol()&&a.match("=begin")&&a.eol()){R.tokenize.push(L);return"comment"}if(a.eatSpace()){return null}var P=a.next(),U;if(P=="`"||P=="'"||P=='"'){return C(N(P,"string",P=='"'||P=="`"),a,R)}else{if(P=="/"){var X=a.current().length;if(a.skipTo("/")){var V=a.current().length;a.backUp(a.current().length-X);var T=0;while(a.current().length<V){var Z=a.next();if(Z=="("){T+=1}else{if(Z==")"){T-=1}}if(T<0){break}}a.backUp(a.current().length-X);if(T==0){return C(N(P,"string-2",true),a,R)}}return"operator"}else{if(P=="%"){var Q="string",W=true;if(a.eat("s")){Q="atom"}else{if(a.eat(/[WQ]/)){Q="string"}else{if(a.eat(/[r]/)){Q="string-2"}else{if(a.eat(/[wxq]/)){Q="string";W=false}}}}var S=a.eat(/[^\w\s=]/);if(!S){return"operator"}if(D.propertyIsEnumerable(S)){S=D[S]}return C(N(S,Q,W,true),a,R)}else{if(P=="#"){a.skipToEnd();return"comment"}else{if(P=="<"&&(U=a.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))){return C(I(U[1]),a,R)}else{if(P=="0"){if(a.eat("x")){a.eatWhile(/[\da-fA-F]/)}else{if(a.eat("b")){a.eatWhile(/[01]/)}else{a.eatWhile(/[0-7]/)}}return"number"}else{if(/\d/.test(P)){a.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/);return"number"}else{if(P=="?"){while(a.match(/^\\[CM]-/)){}if(a.eat("\\")){a.eatWhile(/\w/)}else{a.next()}return"string"}else{if(P==":"){if(a.eat("'")){return C(N("'","atom",false),a,R)}if(a.eat('"')){return C(N('"',"atom",true),a,R)}if(a.eat(/[\<\>]/)){a.eat(/[\<\>]/);return"atom"}if(a.eat(/[\+\-\*\/\&\|\:\!]/)){return"atom"}if(a.eat(/[a-zA-Z$@_\xa1-\uffff]/)){a.eatWhile(/[\w$\xa1-\uffff]/);a.eat(/[\?\!\=]/);return"atom"}return"operator"}else{if(P=="@"&&a.match(/^@?[a-zA-Z_\xa1-\uffff]/)){a.eat("@");a.eatWhile(/[\w\xa1-\uffff]/);return"variable-2"}else{if(P=="$"){if(a.eat(/[a-zA-Z_]/)){a.eatWhile(/[\w]/)}else{if(a.eat(/\d/)){a.eat(/\d/)}else{a.next()}}return"variable-3"}else{if(/[a-zA-Z_\xa1-\uffff]/.test(P)){a.eatWhile(/[\w\xa1-\uffff]/);a.eat(/[\?\!]/);if(a.eat(":")){return"atom"}return"ident"}else{if(P=="|"&&(R.varList||R.lastTok=="{"||R.lastTok=="do")){M="|";return null}else{if(/[\(\)\[\]{}\\;]/.test(P)){M=P;return null}else{if(P=="-"&&a.eat(">")){return"arrow"}else{if(/[=+\-\/*:\.^%<>~|]/.test(P)){var Y=a.eatWhile(/[=+\-\/*:\.^%<>~|]/);if(P=="."&&!Y){M="."}return"operator"}else{return null}}}}}}}}}}}}}}}}}function O(P){if(!P){P=1}return function(R,Q){if(R.peek()=="}"){if(P==1){Q.tokenize.pop();return Q.tokenize[Q.tokenize.length-1](R,Q)}else{Q.tokenize[Q.tokenize.length-1]=O(P-1)}}else{if(R.peek()=="{"){Q.tokenize[Q.tokenize.length-1]=O(P+1)}}return G(R,Q)}}function H(){var P=false;return function(R,Q){if(P){Q.tokenize.pop();return Q.tokenize[Q.tokenize.length-1](R,Q)}P=true;return G(R,Q)}}function N(P,Q,S,R){return function(W,U){var V=false,T;if(U.context.type==="read-quoted-paused"){U.context=U.context.prev;W.eat("}")}while((T=W.next())!=null){if(T==P&&(R||!V)){U.tokenize.pop();break}if(S&&T=="#"&&!V){if(W.eat("{")){if(P=="}"){U.context={prev:U.context,type:"read-quoted-paused"}}U.tokenize.push(O());break}else{if(/[@\$]/.test(W.peek())){U.tokenize.push(H());break}}}V=!V&&T=="\\"}return Q}}function I(P){return function(R,Q){if(R.match(P)){Q.tokenize.pop()}else{R.skipToEnd()}return"string"}}function L(Q,P){if(Q.sol()&&Q.match("=end")&&Q.eol()){P.tokenize.pop()}Q.skipToEnd();return"comment"}return{startState:function(){return{tokenize:[G],indented:0,context:{type:"top",indented:-F.indentUnit},continuedLine:false,lastTok:null,varList:false}},token:function(U,R){if(U.sol()){R.indented=U.indentation()}var Q=R.tokenize[R.tokenize.length-1](U,R),T;var P=M;if(Q=="ident"){var S=U.current();Q=R.lastTok=="."?"property":K.propertyIsEnumerable(U.current())?"keyword":/^[A-Z]/.test(S)?"tag":(R.lastTok=="def"||R.lastTok=="class"||R.varList)?"def":"variable";if(Q=="keyword"){P=S;if(J.propertyIsEnumerable(S)){T="indent"}else{if(E.propertyIsEnumerable(S)){T="dedent"}else{if((S=="if"||S=="unless")&&U.column()==U.indentation()){T="indent"}else{if(S=="do"&&R.context.indented<R.indented){T="indent"}}}}}}if(M||(Q&&Q!="comment")){R.lastTok=P}if(M=="|"){R.varList=!R.varList}if(T=="indent"||/[\(\[\{]/.test(M)){R.context={prev:R.context,type:M||Q,indented:R.indented}}else{if((T=="dedent"||/[\)\]\}]/.test(M))&&R.context.prev){R.context=R.context.prev}}if(U.eol()){R.continuedLine=(M=="\\"||Q=="operator")}return Q},indent:function(T,P){if(T.tokenize[T.tokenize.length-1]!=G){return 0}var S=P&&P.charAt(0);var R=T.context;var Q=R.type==D[S]||R.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(P);return R.indented+(Q?0:F.indentUnit)+(T.continuedLine?F.indentUnit:0)},electricChars:"}de",lineComment:"#"}});A.defineMIME("text/x-ruby","ruby")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:sass', location = '/static/bower/CodeMirror/mode/sass/sass.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("sass",function(F){function P(Q){return new RegExp("^"+Q.join("|"))}var K=["true","false","null","auto"];var B=new RegExp("^"+K.join("|"));var I=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"];var N=P(I);var O=/^::?[a-zA-Z_][\w\-]*/;function M(S,R){var Q=S.peek();if(Q===")"){S.next();R.tokenizer=G;return"operator"}else{if(Q==="("){S.next();S.eatSpace();return"operator"}else{if(Q==="'"||Q==='"'){R.tokenizer=H(S.next());return"string"}else{R.tokenizer=H(")",false);return"string"}}}}function L(Q,R){return function(T,S){if(T.sol()&&T.indentation()<=Q){S.tokenizer=G;return G(T,S)}if(R&&T.skipTo("*/")){T.next();T.next();S.tokenizer=G}else{T.skipToEnd()}return"comment"}}function H(Q,S){if(S==null){S=true}function R(X,U){var W=X.next();var T=X.peek();var Y=X.string.charAt(X.pos-2);var V=((W!=="\\"&&T===Q)||(W===Q&&Y!=="\\"));if(V){if(W!==Q&&S){X.next()}U.tokenizer=G;return"string"}else{if(W==="#"&&T==="{"){U.tokenizer=D(R);X.next();return"operator"}else{return"string"}}}return R}function D(Q){return function(S,R){if(S.peek()==="}"){S.next();R.tokenizer=Q;return"operator"}else{return G(S,R)}}}function E(R){if(R.indentCount==0){R.indentCount++;var S=R.scopes[0].offset;var Q=S+F.indentUnit;R.scopes.unshift({offset:Q})}}function J(Q){if(Q.scopes.length==1){return }Q.scopes.shift()}function G(S,R){var Q=S.peek();if(S.match("/*")){R.tokenizer=L(S.indentation(),true);return R.tokenizer(S,R)}if(S.match("//")){R.tokenizer=L(S.indentation(),false);return R.tokenizer(S,R)}if(S.match("#{")){R.tokenizer=D(G);return"operator"}if(Q==='"'||Q==="'"){S.next();R.tokenizer=H(Q);return"string"}if(!R.cursorHalf){if(Q==="."){S.next();if(S.match(/^[\w-]+/)){E(R);return"atom"}else{if(S.peek()==="#"){E(R);return"atom"}}}if(Q==="#"){S.next();if(S.match(/^[\w-]+/)){E(R);return"atom"}if(S.peek()==="#"){E(R);return"atom"}}if(Q==="$"){S.next();S.eatWhile(/[\w-]/);return"variable-2"}if(S.match(/^-?[0-9\.]+/)){return"number"}if(S.match(/^(px|em|in)\b/)){return"unit"}if(S.match(B)){return"keyword"}if(S.match(/^url/)&&S.peek()==="("){R.tokenizer=M;return"atom"}if(Q==="="){if(S.match(/^=[\w-]+/)){E(R);return"meta"}}if(Q==="+"){if(S.match(/^\+[\w-]+/)){return"variable-3"}}if(Q==="@"){if(S.match(/@extend/)){if(!S.match(/\s*[\w]/)){J(R)}}}if(S.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)){E(R);return"meta"}if(Q==="@"){S.next();S.eatWhile(/[\w-]/);return"meta"}if(S.eatWhile(/[\w-]/)){if(S.match(/ *: *[\w-\+\$#!\("']/,false)){return"propery"}else{if(S.match(/ *:/,false)){E(R);R.cursorHalf=1;return"atom"}else{if(S.match(/ *,/,false)){return"atom"}else{E(R);return"atom"}}}}if(Q===":"){if(S.match(O)){return"keyword"}S.next();R.cursorHalf=1;return"operator"}}else{if(Q==="#"){S.next();if(S.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){if(!S.peek()){R.cursorHalf=0}return"number"}}if(S.match(/^-?[0-9\.]+/)){if(!S.peek()){R.cursorHalf=0}return"number"}if(S.match(/^(px|em|in)\b/)){if(!S.peek()){R.cursorHalf=0}return"unit"}if(S.match(B)){if(!S.peek()){R.cursorHalf=0}return"keyword"}if(S.match(/^url/)&&S.peek()==="("){R.tokenizer=M;if(!S.peek()){R.cursorHalf=0}return"atom"}if(Q==="$"){S.next();S.eatWhile(/[\w-]/);if(!S.peek()){R.cursorHalf=0}return"variable-3"}if(Q==="!"){S.next();if(!S.peek()){R.cursorHalf=0}return S.match(/^[\w]+/)?"keyword":"operator"}if(S.match(N)){if(!S.peek()){R.cursorHalf=0}return"operator"}if(S.eatWhile(/[\w-]/)){if(!S.peek()){R.cursorHalf=0}return"attribute"}if(!S.peek()){R.cursorHalf=0;return null}}if(S.match(N)){return"operator"}S.next();return null}function C(X,R){if(X.sol()){R.indentCount=0}var S=R.tokenizer(X,R);var W=X.current();if(W==="@return"||W==="}"){J(R)}if(S!==null){var T=X.pos-W.length;var V=T+(F.indentUnit*R.indentCount);var Q=[];for(var U=0;U<R.scopes.length;U++){var Y=R.scopes[U];if(Y.offset<=V){Q.push(Y)}}R.scopes=Q}return S}return{startState:function(){return{tokenizer:G,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(S,R){var Q=C(S,R);R.lastToken={style:Q,content:S.current()};return Q},indent:function(Q){return Q.scopes[0].offset}}});A.defineMIME("text/x-sass","sass")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:shell', location = '/static/bower/CodeMirror/mode/shell/shell.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("shell",function(){var E={};function G(K,H){var J=H.split(" ");for(var I=0;I<J.length;I++){E[J[I]]=K}}G("atom","true false");G("keyword","if then do else elif while until for in esac fi fin fil done exit set unset export function");G("builtin","ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo tee telnet top touch vi vim wall wc wget who write yes zsh");function F(L,J){if(L.eatSpace()){return null}var I=L.sol();var H=L.next();if(H==="\\"){L.next();return null}if(H==="'"||H==='"'||H==="`"){J.tokens.unshift(C(H));return D(L,J)}if(H==="#"){if(I&&L.eat("!")){L.skipToEnd();return"meta"}L.skipToEnd();return"comment"}if(H==="$"){J.tokens.unshift(B);return D(L,J)}if(H==="+"||H==="="){return"operator"}if(H==="-"){L.eat("-");L.eatWhile(/\w/);return"attribute"}if(/\d/.test(H)){L.eatWhile(/\d/);if(L.eol()||!/\w/.test(L.peek())){return"number"}}L.eatWhile(/[\w-]/);var K=L.current();if(L.peek()==="="&&/\w+/.test(K)){return"def"}return E.hasOwnProperty(K)?E[K]:null}function C(H){return function(M,K){var J,I=false,L=false;while((J=M.next())!=null){if(J===H&&!L){I=true;break}if(J==="$"&&!L&&H!=="'"){L=true;M.backUp(1);K.tokens.unshift(B);break}L=!L&&J==="\\"}if(I||!L){K.tokens.shift()}return(H==="`"||H===")"?"quote":"string")}}var B=function(K,I){if(I.tokens.length>1){K.eat("$")}var H=K.next(),J=/\w/;if(H==="{"){J=/[^}]/}if(H==="("){I.tokens[0]=C(")");return D(K,I)}if(!/\d/.test(H)){K.eatWhile(J);K.eat("}")}I.tokens.shift();return"def"};function D(I,H){return(H.tokens[0]||F)(I,H)}return{startState:function(){return{tokens:[]}},token:function(I,H){return D(I,H)},lineComment:"#",fold:"brace"}});A.defineMIME("text/x-sh","shell")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:sql', location = '/static/bower/CodeMirror/mode/sql/sql.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("sql",function(C,F){var D=F.client||{},I=F.atoms||{"false":true,"true":true,"null":true},M=F.builtin||{},G=F.keywords||{},H=F.operatorChars||/^[*+\-%<>!=&|~^]/,N=F.support||{},P=F.hooks||{},B=F.dateSQL||{date:true,time:true,timestamp:true};function E(U,S){var R=U.next();if(P[R]){var Q=P[R](U,S);if(Q!==false){return Q}}if(N.hexNumber==true&&((R=="0"&&U.match(/^[xX][0-9a-fA-F]+/))||(R=="x"||R=="X")&&U.match(/^'[0-9a-fA-F]+'/))){return"number"}else{if(N.binaryNumber==true&&(((R=="b"||R=="B")&&U.match(/^'[01]+'/))||(R=="0"&&U.match(/^b[01]+/)))){return"number"}else{if(R.charCodeAt(0)>47&&R.charCodeAt(0)<58){U.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/);N.decimallessFloat==true&&U.eat(".");return"number"}else{if(R=="?"&&(U.eatSpace()||U.eol()||U.eat(";"))){return"variable-3"}else{if(R=="'"||(R=='"'&&N.doubleQuote)){S.tokenize=O(R);return S.tokenize(U,S)}else{if((((N.nCharCast==true&&(R=="n"||R=="N"))||(N.charsetCast==true&&R=="_"&&U.match(/[a-z][a-z0-9]*/i)))&&(U.peek()=="'"||U.peek()=='"'))){return"keyword"}else{if(/^[\(\),\;\[\]]/.test(R)){return null}else{if(N.commentSlashSlash&&R=="/"&&U.eat("/")){U.skipToEnd();return"comment"}else{if((N.commentHash&&R=="#")||(R=="-"&&U.eat("-")&&(!N.commentSpaceRequired||U.eat(" ")))){U.skipToEnd();return"comment"}else{if(R=="/"&&U.eat("*")){S.tokenize=K;return S.tokenize(U,S)}else{if(R=="."){if(N.zerolessFloat==true&&U.match(/^(?:\d+(?:e[+-]?\d+)?)/i)){return"number"}if(N.ODBCdotTable==true&&U.match(/^[a-zA-Z_]+/)){return"variable-2"}}else{if(H.test(R)){U.eatWhile(H);return null}else{if(R=="{"&&(U.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||U.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))){return"number"}else{U.eatWhile(/^[_\w\d]/);var T=U.current().toLowerCase();if(B.hasOwnProperty(T)&&(U.match(/^( )+'[^']*'/)||U.match(/^( )+"[^"]*"/))){return"number"}if(I.hasOwnProperty(T)){return"atom"}if(M.hasOwnProperty(T)){return"builtin"}if(G.hasOwnProperty(T)){return"keyword"}if(D.hasOwnProperty(T)){return"string-2"}return null}}}}}}}}}}}}}}function O(Q){return function(U,S){var T=false,R;while((R=U.next())!=null){if(R==Q&&!T){S.tokenize=E;break}T=!T&&R=="\\"}return"string"}}function K(R,Q){while(true){if(R.skipTo("*")){R.next();if(R.eat("/")){Q.tokenize=E;break}}else{R.skipToEnd();break}}return"comment"}function J(S,R,Q){R.context={prev:R.context,indent:S.indentation(),col:S.column(),type:Q}}function L(Q){Q.indent=Q.context.indent;Q.context=Q.context.prev}return{startState:function(){return{tokenize:E,context:null}},token:function(T,S){if(T.sol()){if(S.context&&S.context.align==null){S.context.align=false}}if(T.eatSpace()){return null}var R=S.tokenize(T,S);if(R=="comment"){return R}if(S.context&&S.context.align==null){S.context.align=true}var Q=T.current();if(Q=="("){J(T,S,")")}else{if(Q=="["){J(T,S,"]")}else{if(S.context&&S.context.type==Q){L(S)}}}return R},indent:function(T,R){var Q=T.context;if(!Q){return 0}var S=R.charAt(0)==Q.type;if(Q.align){return Q.col+(S?0:1)}else{return Q.indent+(S?0:C.indentUnit)}},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:N.commentSlashSlash?"//":N.commentHash?"#":null}});(function(){function C(H){var G;while((G=H.next())!=null){if(G=="`"&&!H.eat("`")){return"variable-2"}}H.backUp(H.current().length-1);return H.eatWhile(/\w/)?"variable-2":null}function B(G){if(G.eat("@")){G.match(/^session\./);G.match(/^local\./);G.match(/^global\./)}if(G.eat("'")){G.match(/^.*'/);return"variable-2"}else{if(G.eat('"')){G.match(/^.*"/);return"variable-2"}else{if(G.eat("`")){G.match(/^.*`/);return"variable-2"}else{if(G.match(/^[0-9a-zA-Z$\.\_]+/)){return"variable-2"}}}}return null}function D(G){if(G.eat("N")){return"atom"}return G.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var E="alter and as asc between by count create delete desc distinct drop from having in insert into is join like not on or order select set table union update values where ";function F(J){var H={},I=J.split(" ");for(var G=0;G<I.length;++G){H[I[G]]=true}return H}A.defineMIME("text/x-sql",{name:"sql",keywords:F(E+"begin"),builtin:F("bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"),atoms:F("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:F("date time timestamp"),support:F("ODBCdotTable doubleQuote binaryNumber hexNumber")});A.defineMIME("text/x-mssql",{name:"sql",client:F("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:F(E+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered"),builtin:F("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:F("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:F("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":B}});A.defineMIME("text/x-mysql",{name:"sql",client:F("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:F(E+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group groupby_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:F("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:F("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:F("date time timestamp"),support:F("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":B,"`":C,"\\":D}});A.defineMIME("text/x-mariadb",{name:"sql",client:F("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:F(E+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:F("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:F("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:F("date time timestamp"),support:F("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":B,"`":C,"\\":D}});A.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:F("use select from using consistency where limit first reversed first and in insert into values using consistency ttl update set delete truncate begin batch apply create keyspace with columnfamily primary key index on drop alter type add any one quorum all local_quorum each_quorum"),builtin:F("ascii bigint blob boolean counter decimal double float int text timestamp uuid varchar varint"),atoms:F("false true"),operatorChars:/^[<>=]/,dateSQL:{},support:F("commentSlashSlash decimallessFloat"),hooks:{}});A.defineMIME("text/x-plsql",{name:"sql",client:F("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:F("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:F("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*+\-%<>!=~]/,dateSQL:F("date time timestamp"),support:F("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")});A.defineMIME("text/x-hive",{name:"sql",keywords:F("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with"),builtin:F("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype"),atoms:F("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:F("date timestamp"),support:F("ODBCdotTable doubleQuote binaryNumber hexNumber")})}())});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:vbscript', location = '/static/bower/CodeMirror/mode/vbscript/vbscript.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("vbscript",function(h,N){var T="error";function F(s){return new RegExp("^(("+s.join(")|(")+"))\\b","i")}var p=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]");var O=new RegExp("^((<>)|(<=)|(>=))");var L=new RegExp("^[\\.,]");var d=new RegExp("^[\\(\\)]");var i=new RegExp("^[A-Za-z][_A-Za-z0-9]*");var g=["class","sub","select","while","if","function","property","with","for"];var V=["else","elseif","case"];var D=["next","loop","wend"];var E=F(["and","or","not","xor","is","mod","eqv","imp"]);var J=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"];var X=["true","false","nothing","empty","null"];var m=["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"];var l=["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"];var j=["WScript","err","debug","RegExp"];var r=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"];var U=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"];var f=["server","response","request","session","application"];var I=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"];var G=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"];var S=U.concat(r);j=j.concat(l);if(h.isASP){j=j.concat(f);S=S.concat(G,I)}var C=F(J);var P=F(X);var Q=F(m);var n=F(j);var B=F(S);var o='"';var R=F(g);var Z=F(V);var a=F(D);var k=F(["end"]);var b=F(["do"]);var q=F(["on error resume next","exit"]);var W=F(["rem"]);function K(s,t){t.currentIndent++}function H(s,t){t.currentIndent--}function Y(w,v){if(w.eatSpace()){return"space"}var u=w.peek();if(u==="'"){w.skipToEnd();return"comment"}if(w.match(W)){w.skipToEnd();return"comment"}if(w.match(/^((&H)|(&O))?[0-9\.]/i,false)&&!w.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,false)){var t=false;if(w.match(/^\d*\.\d+/i)){t=true}else{if(w.match(/^\d+\.\d*/)){t=true}else{if(w.match(/^\.\d+/)){t=true}}}if(t){w.eat(/J/i);return"number"}var s=false;if(w.match(/^&H[0-9a-f]+/i)){s=true}else{if(w.match(/^&O[0-7]+/i)){s=true}else{if(w.match(/^[1-9]\d*F?/)){w.eat(/J/i);s=true}else{if(w.match(/^0(?![\dx])/i)){s=true}}}}if(s){w.eat(/L/i);return"number"}}if(w.match(o)){v.tokenize=e(w.current());return v.tokenize(w,v)}if(w.match(O)||w.match(p)||w.match(E)){return"operator"}if(w.match(L)){return null}if(w.match(d)){return"bracket"}if(w.match(q)){v.doInCurrentLine=true;return"keyword"}if(w.match(b)){K(w,v);v.doInCurrentLine=true;return"keyword"}if(w.match(R)){if(!v.doInCurrentLine){K(w,v)}else{v.doInCurrentLine=false}return"keyword"}if(w.match(Z)){return"keyword"}if(w.match(k)){H(w,v);H(w,v);return"keyword"}if(w.match(a)){if(!v.doInCurrentLine){H(w,v)}else{v.doInCurrentLine=false}return"keyword"}if(w.match(C)){return"keyword"}if(w.match(P)){return"atom"}if(w.match(B)){return"variable-2"}if(w.match(Q)){return"builtin"}if(w.match(n)){return"variable-2"}if(w.match(i)){return"variable"}w.next();return T}function e(s){var u=s.length==1;var t="string";return function(w,v){while(!w.eol()){w.eatWhile(/[^'"]/);if(w.match(s)){v.tokenize=Y;return t}else{w.eat(/['"]/)}}if(u){if(N.singleLineStringErrors){return T}else{v.tokenize=Y}}return t}}function M(v,t){var s=t.tokenize(v,t);var u=v.current();if(u==="."){s=t.tokenize(v,t);u=v.current();if(s&&(s.substr(0,8)==="variable"||s==="builtin"||s==="keyword")){if(s==="builtin"||s==="keyword"){s="variable"}if(S.indexOf(u.substr(1))>-1){s="variable-2"}return s}else{return T}}return s}var c={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:Y,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:false,ignoreKeyword:false}},token:function(u,t){if(u.sol()){t.currentIndent+=t.nextLineIndent;t.nextLineIndent=0;t.doInCurrentLine=0}var s=M(u,t);t.lastToken={style:s,content:u.current()};if(s==="space"){s=null}return s},indent:function(u,s){var t=s.replace(/^\s+|\s+$/g,"");if(t.match(a)||t.match(k)||t.match(Z)){return h.indentUnit*(u.currentIndent-1)}if(u.currentIndent<0){return 0}return u.currentIndent*h.indentUnit}};return c});A.defineMIME("text/vbscript","vbscript")});;
;/* module-key = 'com.atlassian.stash.stash-highlight-plugin:yaml', location = '/static/bower/CodeMirror/mode/yaml/yaml.js' */
(function(A){if(typeof exports=="object"&&typeof module=="object"){A(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],A)}else{A(CodeMirror)}}})(function(A){A.defineMode("yaml",function(){var B=["true","false","on","off","yes","no"];var C=new RegExp("\\b(("+B.join(")|(")+"))$","i");return{token:function(G,F){var E=G.peek();var D=F.escaped;F.escaped=false;if(E=="#"&&(G.pos==0||/\s/.test(G.string.charAt(G.pos-1)))){G.skipToEnd();return"comment"}if(G.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/)){return"string"}if(F.literal&&G.indentation()>F.keyCol){G.skipToEnd();return"string"}else{if(F.literal){F.literal=false}}if(G.sol()){F.keyCol=0;F.pair=false;F.pairStart=false;if(G.match(/---/)){return"def"}if(G.match(/\.\.\./)){return"def"}if(G.match(/\s*-\s+/)){return"meta"}}if(G.match(/^(\{|\}|\[|\])/)){if(E=="{"){F.inlinePairs++}else{if(E=="}"){F.inlinePairs--}else{if(E=="["){F.inlineList++}else{F.inlineList--}}}return"meta"}if(F.inlineList>0&&!D&&E==","){G.next();return"meta"}if(F.inlinePairs>0&&!D&&E==","){F.keyCol=0;F.pair=false;F.pairStart=false;G.next();return"meta"}if(F.pairStart){if(G.match(/^\s*(\||\>)\s*/)){F.literal=true;return"meta"}if(G.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)){return"variable-2"}if(F.inlinePairs==0&&G.match(/^\s*-?[0-9\.\,]+\s?$/)){return"number"}if(F.inlinePairs>0&&G.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)){return"number"}if(G.match(C)){return"keyword"}}if(!F.pair&&G.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)){F.pair=true;F.keyCol=G.indentation();return"atom"}if(F.pair&&G.match(/^:\s*/)){F.pairStart=true;return"meta"}F.pairStart=false;F.escaped=(E=="\\");G.next();return null},startState:function(){return{pair:false,pairStart:false,keyCol:0,inlinePairs:0,inlineList:0,literal:false,escaped:false}}}});A.defineMIME("text/x-yaml","yaml")});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:syntax-highlight', location = '/static/util/syntax-highlight.js' */
define("util/syntax-highlight",["codemirror","jquery","util/determine-language","exports"],function(C,F,E,B){function D(I){var H=F(I);if(!H.length){return }var K=H.attr("data-language");E.getCodeMirrorModeForName(K).then(G).fail(J);function G(L){C.runMode(H.text(),L.mime||{name:K},H[0])}function J(L){console.warn(L||(K+" could not be loaded for syntax highlighting."))}}function A(G){F(G).find("pre > code[data-language]").each(function(){D(this)})}B.codeblock=D;B.container=A});;
;/* module-key = 'com.atlassian.stash.stash-readme-plugin:stash-readme-common-resources', location = '/static/feature/readme/common/common.js' */
define("feature/readme/common",["jquery","lib/jsuri","stash/api/util/navbuilder","util/text","model/page-state","exports"],function(e,c,g,f,d,b){function a(i,j,k){return i+(i.indexOf("?")!==-1?"&":"?")+encodeURIComponent(j)+"="+encodeURIComponent(k)}b.createUrl=function h(j,i,l){var k=e.extend({},{blob:l,at:i});return g.newBuilder(["rest","readme","latest","projects",d.getProject().getKey(),"repos",d.getRepository().getSlug(),"markup"].concat(j)).withParams(k).build()};b.updateLinks=function(j,i){function k(m,l,n){j.find(m).each(function(){e(this).attr(l,b._appendAtIfRelative(e(this).attr(l),d.getRevisionRef().getId(),i,n))})}k("a","href");k("img","src",function(l){return(new c(l).getQueryParamValues("raw").length===0)?a(l,"raw",""):l});return j};b._appendAtIfRelative=function(k,i,j,l){if(k&&!new c(k).protocol()){if(j&&!f.endsWith(j,"/")&&k.indexOf("/")!==0){k=j+"/"+k}if(!d.getRevisionRef().isDefault()){k=a(k,"at",i)}k=l?l(k):k}return k};b.DATA=e.Deferred();_PageDataPlugin.ready("com.atlassian.stash.stash-readme-plugin:readme-provider","stash.layout.repository",function(i){b.DATA.resolve(i)})});;
;/* module-key = 'com.atlassian.stash.stash-readme-plugin:stash-readme-files-resources', location = '/static/feature/readme/files/readme.soy' */
// This file was automatically generated from readme.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.readme.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.readme == 'undefined') { stash.feature.readme = {}; }


stash.feature.readme.readme = function(opt_data, opt_ignored) {
  return '<div class="filebrowser-readme-header"><span class="readme-icon aui-icon aui-icon-small aui-iconfont-devtools-file"></span><span class="filebrowser-readme-title"></span></div><div class="filebrowser-readme-content markup-content markup"></div>';
};
if (goog.DEBUG) {
  stash.feature.readme.readme.soyTemplateName = 'stash.feature.readme.readme';
}
;
;/* module-key = 'com.atlassian.stash.stash-readme-plugin:stash-readme-files-resources', location = '/static/feature/readme/files/readme.js' */
define("feature/readme/main",["aui","jquery","lodash","util/ajax","util/events","util/syntax-highlight","model/path","feature/readme/common","exports"],function(l,e,n,k,o,a,c,i,d){var m;var h={abort:e.noop};function j(q,s){var r=n.filter(q,function(u){var t=u.name.toUpperCase();return(t===s.name||t.indexOf(s.name+".")===0)&&u.type==="FILE"});var p=n.groupBy(r,function(t){return new c(t.name).getExtension()});return n.chain(s.extensions).map(function(t){return p[t]}).map(function(t){return t&&t[0]}).find(function(t){return !!t}).value()}var f=h;function g(p){i.DATA.then(n.bind(j,null,p.files)).done(function(s){if(!s){return}var q=m.find(".filebrowser-readme-content").empty();m.find(".filebrowser-readme-title").text(s.name);var t=function(){b();return false};var r=function(u){m.show();q.html(i.updateLinks(e(u),window.location.pathname));a.container(q)};f=k.rest({url:i.createUrl(p.path.getComponents().concat(s.name),p.revision,s.contentId),dataType:"html",statusCode:{"400":t,"413":function(){r("File content too large to display");return false},"415":t,"500":t}}).done(function(u){if(e.trim(u)){r(u)}else{b()}})})}function b(){f.abort();m.hide()}d.onReady=function(p){var q;m=e(p).html(stash.feature.readme.readme());b();o.on("stash.page.filebrowser.revisionRefChanged",b);o.on("stash.page.filebrowser.urlChanged",b);o.on("stash.feature.filetable.showSpinner",b);o.on("stash.feature.filebrowser.filesChanged",function(r){q=r;g(r)});o.on("stash.feature.filetable.showFind",b);o.on("stash.feature.filetable.hideFind",function(){if(q){g(q)}})}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:user-link', location = '/static/widget/user/user-link.soy' */
// This file was automatically generated from user-link.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.userLink = function(opt_data, opt_ignored) {
  var output = '';
  var displayName__soy3 = opt_data.user.displayName || opt_data.user.name;
  output += (opt_data.href || opt_data.user.type == 'NORMAL' && opt_data.user.slug && !!(require('model/page-state').getCurrentUser())) ? '<a href="' + soy.$$escapeHtml(opt_data.href ? opt_data.href : require('stash/api/util/navbuilder').user(opt_data.user.slug).build()) + '" ' + ((opt_data.extraClasses) ? 'class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + ((! opt_data.skipTitle) ? 'title="' + soy.$$escapeHtml(displayName__soy3) + '"' : '') + '>' + soy.$$escapeHtml(soy.$$truncate(displayName__soy3, 100, true)) + '</a>' : '<span' + ((opt_data.extraClasses) ? ' class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + ((! opt_data.skipTitle) ? ' title="' + soy.$$escapeHtml(displayName__soy3) + '"' : '') + '>' + soy.$$escapeHtml(soy.$$truncate(displayName__soy3, 100, true)) + '</span>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.userLink.soyTemplateName = 'stash.widget.userLink';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:avatar', location = '/static/widget/avatar/avatar.soy' */
// This file was automatically generated from avatar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.avatar = function(opt_data, opt_ignored) {
  return '' + aui.avatar.avatar({size: opt_data.size, avatarImageUrl: require('stash/api/util/navbuilder')._avatarUrl(opt_data.person, ({XSMALL:32,SMALL:48,MEDIUM:64,LARGE:96,XLARGE:128,XXLARGE:192,XXXLARGE:256})[opt_data.size.toUpperCase()]).build(), accessibilityText: opt_data.person.displayName || opt_data.person.name, title: opt_data.tooltip, badgeContent: opt_data.badgeContent, extraClasses: 'user-avatar' + (opt_data.hideBadge ? ' badge-hidden' : '') + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : ''), imageClasses: opt_data.imageClasses, extraAttributes: {'data-username': opt_data.person.name}, id: opt_data.id});
};
if (goog.DEBUG) {
  stash.widget.avatar.soyTemplateName = 'stash.widget.avatar';
}


stash.widget.avatarWithName = function(opt_data, opt_ignored) {
  var output = '';
  var personName__soy14 = opt_data.person.displayName || opt_data.person.name;
  output += '<div class="avatar-with-name' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '" title="' + soy.$$escapeHtml(personName__soy14) + '">' + stash.widget.avatar({size: opt_data.size, person: opt_data.person, imageClasses: opt_data.imageClasses, extraClasses: opt_data.avatarClasses, badgeContent: opt_data.badgeContent, hideBadge: opt_data.hideBadge, id: opt_data.id}) + ((opt_data.link) ? stash.widget.userLink({user: opt_data.person, href: opt_data.href, extraClasses: opt_data.linkExtraClasses, skipTitle: true}) : soy.$$escapeHtml(personName__soy14)) + '</div>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.avatarWithName.soyTemplateName = 'stash.widget.avatarWithName';
}


stash.widget.avatarWithNameAndEmail = function(opt_data, opt_ignored) {
  return stash.widget.avatarWithName(opt_data) + '<span class="email-address" title="' + soy.$$escapeHtml(opt_data.person.emailAddress) + '">' + soy.$$escapeHtml(opt_data.person.emailAddress) + '</span>';
};
if (goog.DEBUG) {
  stash.widget.avatarWithNameAndEmail.soyTemplateName = 'stash.widget.avatarWithNameAndEmail';
}


stash.widget.avatarSizeInPx = function(opt_data, opt_ignored) {
  return '' + soy.$$escapeHtml(({XSMALL:32,SMALL:48,MEDIUM:64,LARGE:96,XLARGE:128,XXLARGE:192,XXXLARGE:256})[opt_data.size.toUpperCase()]) + ((opt_data.showPx) ? 'px' : '');
};
if (goog.DEBUG) {
  stash.widget.avatarSizeInPx.soyTemplateName = 'stash.widget.avatarSizeInPx';
}


stash.widget.avatarWithBadge = function(opt_data, opt_ignored) {
  return '' + stash.widget.avatar({size: opt_data.size, person: opt_data.person, tooltip: opt_data.tooltip, imageClasses: opt_data.imageClasses, extraClasses: opt_data.extraClasses, id: opt_data.id, hideBadge: opt_data.hideBadge, badgeContent: '<span class="badge' + soy.$$escapeHtml(opt_data.badgeClasses ? ' ' + opt_data.badgeClasses : '') + '">' + soy.$$escapeHtml(opt_data.badgeText) + '</span>'});
};
if (goog.DEBUG) {
  stash.widget.avatarWithBadge.soyTemplateName = 'stash.widget.avatarWithBadge';
}


stash.widget.avatarWithNameAndBadge = function(opt_data, opt_ignored) {
  return '' + stash.widget.avatarWithName({size: opt_data.size, person: opt_data.person, extraClasses: opt_data.extraClasses, avatarClasses: opt_data.avatarClasses, imageClasses: opt_data.imageClasses, id: opt_data.id, hideBadge: opt_data.hideBadge, badgeContent: '<span class="badge' + soy.$$escapeHtml(opt_data.badgeClasses ? ' ' + opt_data.badgeClasses : '') + '">' + soy.$$escapeHtml(opt_data.badgeText) + '</span>'});
};
if (goog.DEBUG) {
  stash.widget.avatarWithNameAndBadge.soyTemplateName = 'stash.widget.avatarWithNameAndBadge';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:avatar', location = '/static/widget/avatar/group-avatar.soy' */
// This file was automatically generated from group-avatar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.groupAvatar = function(opt_data, opt_ignored) {
  return '<span class="aui-avatar aui-avatar-' + soy.$$escapeHtml(opt_data.size) + ' group-avatar' + soy.$$escapeHtml(opt_data.extraClasses ? ' ' + opt_data.extraClasses : '') + '" data-groupname="' + soy.$$escapeHtml(opt_data.name) + '"></span>';
};
if (goog.DEBUG) {
  stash.widget.groupAvatar.soyTemplateName = 'stash.widget.groupAvatar';
}


stash.widget.groupAvatarWithName = function(opt_data, opt_ignored) {
  return '<span title="' + soy.$$escapeHtml(opt_data.name) + '"' + ((opt_data.extraClasses) ? ' class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + '><span class="aui-avatar aui-avatar-' + soy.$$escapeHtml(opt_data.size) + ' group-avatar' + soy.$$escapeHtml(opt_data.avatarClasses ? ' ' + opt_data.avatarClasses : '') + '" data-groupname="' + soy.$$escapeHtml(opt_data.name) + '"></span>' + soy.$$escapeHtml(opt_data.name) + '</span>';
};
if (goog.DEBUG) {
  stash.widget.groupAvatarWithName.soyTemplateName = 'stash.widget.groupAvatarWithName';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:client-storage', location = '/static/util/client-storage.js' */
define("util/client-storage",["jquery","lodash","util/feature-detect","model/page-state","exports"],function(F,Y,P,M,Z){var U={SESSION:"session",LOCAL:"local"};var O="_flash.";var L="_",R="lastCleanup",I="hasCheckedCleanUp",T=1000*60*60*24*30;var W={};Z._resetDummy=function(){W={}};function A(b,a){if(Y.isString(b)){b=[b]}if(!Y.isArray(b)){throw new Error("keyBuilder requires an array of components")}if(a){b.push(a);switch(a){case"pull-request":b.push(M.getPullRequest()&&M.getPullRequest().getId());case"repo":b.push(M.getRepository()&&M.getRepository().getSlug());case"project":b.push(M.getProject()&&M.getProject().getKey());case"user":b.push(M.getCurrentUser()&&M.getCurrentUser().getName());break}}return b.join(L)}function Q(b,c){var e,d;if(P.localStorage()){e=window[(c||U.LOCAL)+"Storage"].getItem(b)}else{e=Y.has(W,b)?W[b]:null}try{d=JSON.parse(e)}catch(a){d=e}return d}function K(a,b){var c=Q(a,b);return F.isPlainObject(c)&&Y.has(c,"data")?c.data:c}function N(a){return K(a,U.SESSION)}function H(a){var b=K(O+a,U.SESSION);G(a);return b}function D(a,c,b){if(P.localStorage()){window[(b||U.LOCAL)+"Storage"].setItem(a,JSON.stringify(c))}else{W[a]=JSON.stringify(c)}}function C(a,e,d,b){var c=Y.extend({},d,{timestamp:new Date().getTime(),data:e});D(a,c,b);if(!b||b===U.LOCAL){Y.defer(J)}}function B(a,c,b){C.call(this,a,c,b,U.SESSION)}function S(a,c,b){C.call(this,O+a,c,b,U.SESSION)}function V(a,b){if(P.localStorage()){window[(b||U.LOCAL)+"Storage"].removeItem(a)}else{delete W[a]}}function E(a){V(a,U.SESSION)}function G(a){V(O+a,U.SESSION)}function J(){if(!!Q(I,U.SESSION)){return }var a=Q(R);if(!a||new Date().getTime()-a>T){X()}D(I,true,U.SESSION)}function X(){var a=new Date().getTime();Y.each(Y.keys(localStorage),function(b){if(b!==R){var c=Q(b);if(c&&c.timestamp&&!c.noCleanup&&(a-c.timestamp>T)){V(b)}}});D(R,new Date().getTime())}Z.LOCAL=U.LOCAL;Z.SESSION=U.SESSION;Z.buildKey=A;Z.getItem=K;Z.getFlashItem=H;Z.getSessionItem=N;Z.setItem=C;Z.setFlashItem=S;Z.setSessionItem=B;Z.removeItem=V;Z.removeFlashItem=G;Z.removeSessionItem=E});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:keyboard-shortcuts', location = '/static/widget/keyboard-shortcuts/keyboard-shortcuts.js' */
define("widget/keyboard-shortcuts",["aui","jquery","lodash","util/events","util/navigator","exports"],function(H,D,J,K,F,B){var L=/^[cC]trl$/i,I="\u2318";var A={};function G(){if(!(this instanceof G)){return new G()}this._dialog=new H.Dialog({width:830,height:580,id:"keyboard-shortcut-dialog",closeOnOutsideClick:true});this._enabledContexts=[]}G.prototype._setRegistry=function(M){this._registry=M};G.prototype._initContent=function(){this._dialog.addHeader("Keyboard shortcuts");this._dialog.addPanel("",stash.widget.keyboardShortcutsContent({contextNames:J.keys(A),contexts:J.values(A)}));this._dialog.addCancel("Close",function(M){M.hide()})};G.prototype._bind=function(M){this._$trigger=M;var N=this;this._$trigger.on("click",function(O){N._show();O.preventDefault()})};G.prototype.enableContext=function(M){if(D.inArray(M,this._enabledContexts)!==-1){return }this._registry.enableContext(M);this._enabledContexts.push(M)};G.prototype.resetContexts=function(){H.trigger("remove-bindings.keyboardshortcuts");this._enabledContexts=[];H.trigger("add-bindings.keyboardshortcuts")};G.prototype._show=function(){if(!this._hasShown){this._initContent();this._hasShown=true}this._dialog.show();this._dialog.updateHeight();this._dialog.getCurrentPanel().body.find(".keyboard-shortcut-help").focus()};G.prototype.addCustomShortcut=function(N,P,O,Q){var M=C({keys:P,context:N,displayContext:Q,description:O},{convertOSModifier:false})};G.convertOSModifier=function(M){return F.isMac()?M.replace(L,I):M};function C(M,N){M=D.extend({},M);M.keys=J.map(M.keys,function(O){return J.map(O,function(P){if(J.all(["key","modifiers"],J.partial(J.has,P))){return P}var Q=(P.length>1)?P.split("+"):P;if(!J.isArray(Q)||Q.length===1){return P}return{key:Q.pop(),modifiers:N&&N.convertOSModifier===false?Q:J.map(Q,G.convertOSModifier)}})});if(!M.displayContext){M.displayContext=G._contextDisplayInfo[M.context]?G._contextDisplayInfo[M.context].displayName:M.context.replace(/\b[a-z]/g,function(O){return O.toUpperCase()})}if(!A[M.displayContext]){A[M.displayContext]=[]}A[M.displayContext].push(M)}G.internalizeShortcuts=function(M){J.each(M,C)};G._contextDisplayInfo={repository:{displayName:"Within A Repository"},"branch-compare":{displayName:"Branch compare"},"branch-list":{displayName:"Branch list"},changeset:{displayName:"Changeset"},commits:{displayName:"Commit List"},"diff-tree":{displayName:"Changeset"},"diff-view":{displayName:"Diff View"},filebrowser:{displayName:"Directory Browsing"},global:{displayName:"Global"},"pull-request":{displayName:"Within A Pull Request"},"pull-request-list":{displayName:"Pull Request List"},"pull-request-overview":{displayName:"Within A Pull Request"},sourceview:{displayName:"Source View"}};var E=new G();B.onReady=function(){E._bind(D(".keyboard-shortcut-link"));var M=D.Deferred();D(document).ready(function(){setTimeout(function(){M.resolve()},0)});H.bind("register-contexts.keyboardshortcuts",function(O,N){E._setRegistry(N.shortcutRegistry);E.enableContext("global");M.done(function(){K.trigger("stash.widget.keyboard-shortcuts.register-contexts",E,E)})});H.bind("shortcuts-loaded.keyboardshortcuts",function(O,N){G.internalizeShortcuts(N.shortcuts)});H.params["keyboardshortcut-hash"]="bundled";H.trigger("initialize.keyboardshortcuts")};B.addTooltip=function(N,P){var M=J(P.split("+")).chain().map(G.convertOSModifier).map(function(Q){if(Q==="shift"){return "Shift"}else{if(Q==="ctrl"){return G.convertOSModifier("Ctrl")}else{return Q}}}).value().join(" + ");var O=N.attr("title");N.attr("title",O+H.format(" (Type \u0027\u0027{0}\u0027\u0027)",M));return{remove:function(){N.attr("title",O)}}};B.showDialog=function(){if(E){E._show()}};B.resetContexts=function(){E.resetContexts()}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:keyboard-shortcuts', location = '/static/widget/keyboard-shortcuts/keyboard-shortcuts.soy' */
// This file was automatically generated from keyboard-shortcuts.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.keyboardShortcutsContent = function(opt_data, opt_ignored) {
  var param6 = '';
  var contextNameList7 = opt_data.contextNames;
  var contextNameListLen7 = contextNameList7.length;
  for (var contextNameIndex7 = 0; contextNameIndex7 < contextNameListLen7; contextNameIndex7++) {
    var contextNameData7 = contextNameList7[contextNameIndex7];
    param6 += (contextNameIndex7 % 2 == 0) ? stash.widget.keyboardShortContext({contextName: contextNameData7, contextShortcuts: opt_data.contexts[contextNameIndex7]}) : '';
  }
  var param5 = '' + aui.group.item({content: param6});
  var param15 = '';
  var contextNameList16 = opt_data.contextNames;
  var contextNameListLen16 = contextNameList16.length;
  for (var contextNameIndex16 = 0; contextNameIndex16 < contextNameListLen16; contextNameIndex16++) {
    var contextNameData16 = contextNameList16[contextNameIndex16];
    param15 += (contextNameIndex16 % 2 == 1) ? stash.widget.keyboardShortContext({contextName: contextNameData16, contextShortcuts: opt_data.contexts[contextNameIndex16]}) : '';
  }
  param5 += aui.group.item({content: param15});
  var output = '' + aui.group.group({extraClasses: 'keyboard-shortcut-help', extraAttributes: {tabindex: '-1'}, content: param5});
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutsContent.soyTemplateName = 'stash.widget.keyboardShortcutsContent';
}


stash.widget.keyboardShortContext = function(opt_data, opt_ignored) {
  var output = '<div class="keyboard-shortcut-context"><h3>' + soy.$$escapeHtml(opt_data.contextName) + '</h3><dl>';
  var shortcutList29 = opt_data.contextShortcuts;
  var shortcutListLen29 = shortcutList29.length;
  for (var shortcutIndex29 = 0; shortcutIndex29 < shortcutListLen29; shortcutIndex29++) {
    var shortcutData29 = shortcutList29[shortcutIndex29];
    output += (! shortcutData29.hidden) ? stash.widget.keyboardShortcutItem({shortcut: shortcutData29}) : '';
  }
  output += '</dl></div>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortContext.soyTemplateName = 'stash.widget.keyboardShortContext';
}


stash.widget.keyboardShortcutItem = function(opt_data, opt_ignored) {
  var output = '<dt>' + soy.$$escapeHtml(opt_data.shortcut.description) + '</dt>';
  var optionList40 = opt_data.shortcut.keys;
  var optionListLen40 = optionList40.length;
  for (var optionIndex40 = 0; optionIndex40 < optionListLen40; optionIndex40++) {
    var optionData40 = optionList40[optionIndex40];
    output += ((! (optionIndex40 == 0) && ! (optionIndex40 == optionListLen40 - 1)) ? '<dd class=\'separator\'>' + soy.$$escapeHtml(",") + '</dd>' : '') + ((! (optionIndex40 == 0) && optionIndex40 == optionListLen40 - 1) ? '<dd class=\'separator\'>' + soy.$$escapeHtml(" or") + '</dd>' : '') + '<dd>' + stash.widget.keyboardShortcutOption({sequence: optionData40}) + '</dd>';
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutItem.soyTemplateName = 'stash.widget.keyboardShortcutItem';
}


stash.widget.keyboardShortcutOption = function(opt_data, opt_ignored) {
  var output = '';
  var keypressList57 = opt_data.sequence;
  var keypressListLen57 = keypressList57.length;
  for (var keypressIndex57 = 0; keypressIndex57 < keypressListLen57; keypressIndex57++) {
    var keypressData57 = keypressList57[keypressIndex57];
    output += ((! (keypressIndex57 == 0)) ? ' ' + soy.$$escapeHtml("then") + ' ' : '') + ((keypressData57.modifiers) ? stash.widget.keyboardShortcutModifier({keypress: keypressData57}) : stash.widget.keyboardShortcutKey({key: keypressData57}));
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutOption.soyTemplateName = 'stash.widget.keyboardShortcutOption';
}


stash.widget.keyboardShortcutModifier = function(opt_data, opt_ignored) {
  var output = '';
  var modifierList72 = opt_data.keypress.modifiers;
  var modifierListLen72 = modifierList72.length;
  for (var modifierIndex72 = 0; modifierIndex72 < modifierListLen72; modifierIndex72++) {
    var modifierData72 = modifierList72[modifierIndex72];
    output += stash.widget.keyboardShortcutKey({key: modifierData72});
  }
  output += stash.widget.keyboardShortcutKey({key: opt_data.keypress.key});
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutModifier.soyTemplateName = 'stash.widget.keyboardShortcutModifier';
}


stash.widget.keyboardShortcutKey = function(opt_data, opt_ignored) {
  return '<kbd>' + soy.$$escapeHtml(opt_data.key) + '</kbd>';
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutKey.soyTemplateName = 'stash.widget.keyboardShortcutKey';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:jquery-mousewheel', location = '/static/bower/jquery-mousewheel/jquery.mousewheel.js' */
/* Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.1.1
 *
 * Requires: 1.2.2+
 */
(function(A){if(typeof define==="function"&&define.amd){define(["jquery"],A)}else{A(jQuery)}}(function(E){var D=["wheel","mousewheel","DOMMouseScroll"];var G="onwheel" in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];var F,A;if(E.event.fixHooks){for(var B=D.length;B;){E.event.fixHooks[D[--B]]=E.event.mouseHooks}}E.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var H=G.length;H;){this.addEventListener(G[--H],C,false)}}else{this.onmousewheel=C}},teardown:function(){if(this.removeEventListener){for(var H=G.length;H;){this.removeEventListener(G[--H],C,false)}}else{this.onmousewheel=null}}};E.fn.extend({mousewheel:function(H){return H?this.bind("mousewheel",H):this.trigger("mousewheel")},unmousewheel:function(H){return this.unbind("mousewheel",H)}});function C(H){var I=H||window.event,N=[].slice.call(arguments,1),P=0,K=0,J=0,M=0,L=0,O;H=E.event.fix(I);H.type="mousewheel";if(I.wheelDelta){P=I.wheelDelta}if(I.detail){P=I.detail*-1}if(I.deltaY){J=I.deltaY*-1;P=J}if(I.deltaX){K=I.deltaX;P=K*-1}if(I.wheelDeltaY!==undefined){J=I.wheelDeltaY}if(I.wheelDeltaX!==undefined){K=I.wheelDeltaX*-1}M=Math.abs(P);if(!F||M<F){F=M}L=Math.max(Math.abs(J),Math.abs(K));if(!A||L<A){A=L}O=P>0?"floor":"ceil";P=Math[O](P/F);K=Math[O](K/A);J=Math[O](J/A);N.unshift(H,P,K,J);return(E.event.dispatch||E.event.handle).apply(this,N)}}));;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:promise-util', location = '/static/util/promise.js' */
define("util/promise",["jquery","lodash","exports"],function(H,O,F){var B={PENDING:"pending",REJECTED:"rejected",RESOLVED:"resolved"};function E(R){R&&R.abort&&R.abort()}function K(){var R=Array.prototype.slice.call(arguments);var S=H.when.apply(H,R);S.abort=function(){O.forEach(R,E)};return S}function M(){console.log("Promise does not have an abort function")}function C(){var R=H.when.apply(H,arguments);R.abort=O.invoke.bind(O,arguments,"abort");return P(R)}function P(a,T,S){var R;var Z=a;var V=H.Callbacks();var W={};function X(){if(W.state()==="pending"){if(!R){E(Z)}R=true}V.fire()}function Y(b,c){return function(){if(R){return new H.Deferred()[b+"With"](this,arguments)}Z=c.apply(this,arguments);return Z}}var U=a.then(T?Y("resolve",T):null,S?Y("reject",S):null);W.abort=X;W.thenAbortable=function(b,d){var c=P(W,b,d);V.add(c.abort);return c};return U.promise(W)}function G(S,R){return function(){var X=H.Deferred();var T=this;var U=Array.prototype.slice.call(arguments);var Y;var W=function(){return setTimeout(function(){var Z=S.apply(T,U);Z.done(X.resolve).fail(X.reject);Y=Z.abort?O.bind(Z.abort,Z):M},R)};var V=W();Y=function(){clearTimeout(V);X.reject(X,"abort","abort")};return X.promise({abort:function(){Y()},reset:function(){if(X.state()==="pending"){clearTimeout(V);U=Array.prototype.slice.call(arguments);V=W()}}})}}function I(){return H.when.apply(H,O.map(arguments,A)).then(L,L)}function A(R){return R.then(Q(false),Q(true))}function Q(R){return function(){return H.Deferred().resolve({rejectedSelf:R&&this,self:this,args:Array.prototype.slice.call(arguments)})}}function L(){var U=O.chain(arguments).pluck("rejectedSelf").find(O.identity).value();var T=(U?"reject":"resolve")+"With";var R=U||arguments[0].self;var S=O.pluck(arguments,"args");return H.Deferred()[T](R,S)}function N(R,V,S,U){var T=H(R).spin(S||"small",U||{});return V.always(function(){T.remove()})}function D(R,W,S){S=S||"small";var V;var T=H(R);function U(){var X=Array.prototype.slice.call(arguments);if(!X.length){return }T.spin(S).addClass("spinning");V=I.apply(null,O.compact(X.concat(V)));V.always(function(){if(V.state()!==B.PENDING){T.spinStop().removeClass("spinning")}})}W&&U(W);return{add:U}}function J(V){var T=H.Deferred(),R={timeout:10000,interval:100,name:"",predicate:H.noop};V=H.extend(R,V);var S=new Date().getTime()+(V.timeout);var U=setInterval(function(){var W=V.predicate();if(W){clearInterval(U);T.resolve(W)}else{if(new Date().getTime()>S){clearInterval(U);T.reject("Predicate '"+V.name+"' was false after "+V.timeout+"ms")}}},V.interval);return T.promise()}F.state=B;F.delay=G;F.reduce=K;F.settle=I;F.spinner=N;F.rollingSpinner=D;F.thenAbortable=P;F.whenAbortable=C;F.waitFor=J});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:searchable-selector', location = '/static/widget/searchable-selector/searchable-selector.soy' */
// This file was automatically generated from searchable-selector.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.searchableSelector = function(opt_data, opt_ignored) {
  var output = '<div class="searchable-selector ' + ((opt_data.extraClasses) ? soy.$$escapeHtml(opt_data.extraClasses) : '') + '" id="' + soy.$$escapeHtml(opt_data.id) + '">' + ((opt_data.searchable) ? '<header><label class="assistive" for="' + soy.$$escapeHtml(opt_data.id) + '-search-input">' + soy.$$escapeHtml(opt_data.searchPlaceholder ? opt_data.searchPlaceholder : "Search") + '</label><input id="' + soy.$$escapeHtml(opt_data.id) + '-search-input" type="text" name="filter" class="filter" placeholder="' + soy.$$escapeHtml(opt_data.searchPlaceholder ? opt_data.searchPlaceholder : "Search") + '"/></header>' : '');
  if (opt_data.tabs && opt_data.tabs.length > 1) {
    output += '<div class="aui-tabs horizontal-tabs"><ul class="tabs-menu">';
    var tabList24 = opt_data.tabs;
    var tabListLen24 = tabList24.length;
    for (var tabIndex24 = 0; tabIndex24 < tabListLen24; tabIndex24++) {
      var tabData24 = tabList24[tabIndex24];
      output += aui.tabMenuItem({url: '#' + soy.$$escapeHtml(opt_data.id) + '-tab-pane-' + soy.$$escapeHtml(tabIndex24), text: tabData24.label, isActive: tabIndex24 == 0, extraAttributes: {'data-tab-id': tabIndex24}});
    }
    output += '</ul>';
    var tabList36 = opt_data.tabs;
    var tabListLen36 = tabList36.length;
    for (var tabIndex36 = 0; tabIndex36 < tabListLen36; tabIndex36++) {
      var tabData36 = tabList36[tabIndex36];
      output += aui.tabPane({content: '<ul class="results-list"></ul><div class="spinner"></div>', id: opt_data.id + '-tab-pane-' + tabIndex36, isActive: tabIndex36 == 0, extraClasses: 'results', extraAttributes: {'data-tab-id': tabIndex36}});
    }
    output += '</div>';
  } else {
    output += '<div class="results"><ul class="results-list"></ul><div class="spinner"></div></div>';
  }
  output += '</div>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.searchableSelector.soyTemplateName = 'stash.widget.searchableSelector';
}


stash.widget.searchableSelectorResults = function(opt_data, opt_ignored) {
  var output = '';
  var resultList50 = opt_data.values;
  var resultListLen50 = resultList50.length;
  for (var resultIndex50 = 0; resultIndex50 < resultListLen50; resultIndex50++) {
    var resultData50 = resultList50[resultIndex50];
    output += '<li class="result ' + ((opt_data.isPreload) ? 'preload' : '') + '"><a href="' + soy.$$escapeHtml(resultData50.url ? resultData50.url : '#') + '" tabindex="-1" data-id="' + soy.$$escapeHtml(resultData50.id) + '" data-item="' + soy.$$escapeHtml(JSON.stringify(resultData50).replace(/\//g, '\\/')) + '">' + soy.$$escapeHtml(resultData50.name) + '</a></li>';
  }
  output += (opt_data.isLastPage) ? (opt_data.size > 0) ? '<li class="no-results">' + soy.$$escapeHtml(opt_data.noMoreResultsText ? opt_data.noMoreResultsText : "No more results") + '</li>' : '<li class="no-results">' + soy.$$escapeHtml(opt_data.noResultsText ? opt_data.noResultsText : "No results") + '</li>' : '';
  return output;
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorResults.soyTemplateName = 'stash.widget.searchableSelectorResults';
}


stash.widget.searchableSelectorTrigger = function(opt_data, opt_ignored) {
  return '' + stash.widget.searchableSelectorTriggerGeneric({id: opt_data.id, content: '' + stash.widget.searchableSelectorTriggerContent(opt_data), autofocus: opt_data.autofocus, extraClasses: opt_data.extraClasses, extraAttributes: opt_data.extraAttributes});
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTrigger.soyTemplateName = 'stash.widget.searchableSelectorTrigger';
}


stash.widget.searchableSelectorTriggerGeneric = function(opt_data, opt_ignored) {
  return '<button ' + ((opt_data.id) ? 'id="' + soy.$$escapeHtml(opt_data.id) + '" ' : '') + 'type="button" class="aui-button searchable-selector-trigger' + aui.renderExtraClasses(opt_data) + '"' + ((opt_data.autofocus) ? ' autofocus' : '') + aui.renderExtraAttributes(opt_data) + '>' + soy.$$filterNoAutoescape(opt_data.content) + '</button>';
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTriggerGeneric.soyTemplateName = 'stash.widget.searchableSelectorTriggerGeneric';
}


stash.widget.searchableSelectorTriggerWithField = function(opt_data, opt_ignored) {
  return '' + stash.widget.searchableSelectorTrigger(opt_data) + widget.aui.form.input({id: opt_data.fieldId ? opt_data.fieldId : opt_data.id + '-field', name: opt_data.fieldName ? opt_data.fieldName : opt_data.id + '-field', initialValue: opt_data.item ? opt_data.item.id : null, type: 'hidden'});
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTriggerWithField.soyTemplateName = 'stash.widget.searchableSelectorTriggerWithField';
}


stash.widget.searchableSelectorTriggerContent = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + ((opt_data.item) ? '<span class="name" data-id="' + soy.$$escapeHtml(opt_data.item.id) + '" data-item="' + soy.$$escapeHtml(JSON.stringify(opt_data.item).replace(/\//g, '\\/')) + '">' + soy.$$escapeHtml(opt_data.item.name) + '</span>' : '<span class="placeholder">' + soy.$$escapeHtml(opt_data.text ? opt_data.text : "Select item") + '</span>');
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTriggerContent.soyTemplateName = 'stash.widget.searchableSelectorTriggerContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:searchable-selector', location = '/static/widget/searchable-selector/searchable-selector.js' */
define("widget/searchable-selector",["aui","jquery","lodash","util/ajax","util/dom-event","util/events","util/navigator","util/promise","widget/keyboard-controller","widget/paged-scrollable"],function(M,D,N,L,H,O,J,B,G,K){var C=G.TabKeyboardController;var E=G.ListKeyboardController;var I=0;function F(Q,P){return this.init.apply(this,arguments)}F.prototype.defaults={id:null,extraClasses:null,namespace:"searchable-selector",url:null,tabs:null,searchable:true,searchPlaceholder:null,queryParamKey:"filter",queryParamsBuilder:null,pageSize:20,statusCodeHandlers:{},followLinks:false,hideDialogOnSelect:true,itemSelectedEvent:"stash.widget.searchableSelector.itemSelected",context:null,field:null,itemDataKey:"item",template:stash.widget.searchableSelector,resultsTemplate:stash.widget.searchableSelectorResults,noResultsText:null,noMoreResultsText:null,triggerContentTemplate:stash.widget.searchableSelectorTriggerContent,triggerPlaceholder:null,preloadData:null,alwaysShowPreload:false,dataTransform:null,postOptionsInit:null,clearResultsOnSearch:true,popUpOffsetX:0,popUpOffsetY:-1,width:350};F.constructDataPageFromPreloadArray=function(P){if(!N.isArray(P)){return null}return{values:P,isLastPage:false,size:P.length,start:0,limit:P.length}};F.prototype.tabOptionKeys=["label","url","resultsTemplate","noResultsText","noMoreResultsText","dataTransform","queryParamKey","preloadData","searchPlaceholder"];F.prototype.init=function(R,Q){var P=this;this.instanceId=I++;this.$trigger=D(R);this.setOptions(Q);this.scrollables=[];this.scrollableDataStores=[];if(!this._getOptionVal("id")){this.options.id=this._getOptionVal("namespace")+"-"+this.instanceId}if(this.options.tabs&&this.options.tabs.length){this.tabs=N.map(this.options.tabs,function(V){return D.extend(true,{},N.pick(P.options,P.tabOptionKeys),V)})}var U=this._getOption("postOptionsInit");if(N.isFunction(U)){U.call(this)}var T;this.blockShortcutPropagation=T=function(V){var W=(this===document);if(V.keyCode===M.keyCode.ESCAPE){V[W?"stopImmediatePropagation":"stopPropagation"]();P.dialog.hide()}else{if(!W){V.stopPropagation()}}};var S=P._getOptionVal("externalSearchField");this.dialog=M.InlineDialog(this.$trigger,this._getOptionVal("id"),function(W,V,X){if(!W.data("initialised")){P._initialiseDialogContent(W)}X();if(!S){N.defer(N.bind(P.setFocus,P))}},{offsetX:this._getOptionVal("popUpOffsetX"),offsetY:this._getOptionVal("popUpOffsetY"),noBind:!!S,width:this._getOptionVal("width"),hideCallback:function(){if(P.$content.is(document.activeElement)||D.contains(P.$content[0],document.activeElement)){P.$trigger.focus()}D(document).add(P.dialog).off("keydown keypress",T)},initCallback:function(){D(document).add(P.dialog).on("keydown keypress",T)}});if(this._getOptionVal("searchable")&&S){this.$searchField=D(S);this._initialiseSearchOnInput()}if(this.$trigger.find(".name").length){this._selectedItem=this._getItemFromTrigger()}M.bind("hide.dialog",function(W,V){if(P.$trigger.closest(V.dialog.popup.element).length){P.dialog.hide()}});return this};F.prototype.getSelectedItem=function(){return this._selectedItem};F.prototype.setSelectedItem=function(P){if(D.isPlainObject(P)&&P.id!=null){if(!this._selectedItem||this._selectedItem.id!==P.id){this._itemSelected(P)}}};F.prototype.clearSelection=function(){this._selectedItem=null;if(this._getOptionVal("field")){D(this._getOptionVal("field")).val("")}this.resetTrigger()};F.prototype._getItemFromTrigger=function(){var P=this.$trigger.find(".name");return D.extend({},this._buildObjectFromElementDataAttributes(P),{name:P.text()})};F.prototype._buildObjectFromElementDataAttributes=function(P){return D(P).data(this._getOptionVal("itemDataKey"))};F.prototype._initialiseDialogContent=function(Q){var P=this;var R=this._getOptionVal("searchable");var S=this._getOptionVal("externalSearchField");Q.append(this._getOption("template")({id:this._getOptionVal("id"),tabs:this.tabs,searchable:!S&&R,searchPlaceholder:this._getOptionVal("searchPlaceholder"),extraClasses:this._getOptionVal("extraClasses")}));Q.closest(".aui-inline-dialog").addClass("searchable-selector-dialog");if(R&&!S){this.$searchField=Q.find("input.filter");this._initialiseSearchOnInput()}if(this.tabs){var T=Q.find("ul.tabs-menu a");T.on("tabSelect",function(V,U){P.currentTabId=U.tab.parent().data("tab-id");if(P._getOptionVal("searchable")||P._getDataStoreForScrollable().length===0){P._populateScrollable()}P._resultsKeyboardController.setListElement(P._getCurrentScrollable().$scrollElement.find("ul.results-list"));if(R){P.$searchField.focus()}P._updateSearchPlaceholder()});T.on("click",function(U){if(D(this).parent().hasClass("active-tab")){U.stopPropagation();U.preventDefault()}});T.on("keydown",function(V){if(V.keyCode===M.keyCode.ENTER){var U=D(this);if(U.parent("li").hasClass("active-tab")){V.preventDefault()}else{U.click()}}});M.tabs.setup()}Q.find(".results").each(function(){P.scrollables.push(P._createScrollable(D(this)));P.scrollableDataStores.push([])});Q.on("click",".result a",function(U){P.selectItem(U,D(this))});this._initialiseKeyboardNavigation(Q);this._populateScrollable();this.$content=Q;Q.data("initialised",true)};F.prototype._initialiseSearchOnInput=function(){var Q=this;var R=this._getSearchTerm();var S=this._getOptionVal("externalSearchField");var T=B.delay(N.bind(this._handleSearchInput,this),350);var P=N.bind(function(){if(R!==(R=this._getSearchTerm())){if(!this._pendingSearch){this._pendingSearch=T(R);this._pendingSearch.always(function(){Q._pendingSearch=null})}else{this._pendingSearch.reset(R)}}},this);this.$searchField.on("keydown.searchable-selector input.searchable-selector",N.bind(function(U){if(S){if(U.which===M.keyCode.ESCAPE){this._pendingSearch&&this._pendingSearch.abort()}else{if(U.which===M.keyCode.DOWN&&this._shouldSearch(R)){this.dialog.show()}else{if(U.which===M.keyCode.ENTER&&!this.dialog.is(":visible")){this._pendingSearch&&this._pendingSearch.done(function(){var V=Q._getCurrentScrollable().$scrollElement.find("ul.results-list li.result:first");Q._clickItem(V)})}}}}N.defer(P)},this))};F.prototype._handleSearchInput=function(P){var Q=this._getOptionVal("externalSearchField");if(Q){if(this._shouldSearch(P)){if(!this.dialog.is(":visible")){this.dialog.show()}return this._populateScrollable()}else{this.dialog.hide();return D.Deferred().reject().promise()}}else{return this._populateScrollable()}};F.prototype._initialiseKeyboardNavigation=function(R){var S=this;var Q;var T=false;var P=function(V){var W=S.dialog.is(":visible");if(S._getOptionVal("externalSearchField")&&!W){return }if(T&&!W){S.$trigger.click()}else{S._clickItem(V)}};if(this._resultsKeyboardController){this._resultsKeyboardController.destroy()}if(this.$searchField){Q=this.$searchField}else{if(this.tabs){Q=R.find("ul.tabs-menu")}else{Q=this.$trigger;T=true}}var U=S._getCurrentScrollable().$scrollElement.find("ul.results-list");this._resultsKeyboardController=new E(Q,U,{wrapAround:false,focusedClass:"focused",itemSelector:"li.result",requestMore:function(){var V=S._getCurrentScrollable().loadAfter();return V&&V.then(function(W){return W.isLastPage})},onSelect:function(V){if(S._pendingSearch){S._pendingSearch.done(function(){var W=U.find("li.result:first");if(W.length){P(W)}})}else{P(V)}},focusIntoView:true,adjacentItems:S._getOptionVal("adjacentItems")});if(this._tabKeyboardController){this._tabKeyboardController.destroy()}if(J.isMozilla()||J.isWebkit()){R.addClass("override-focus-style")}this._tabKeyboardController=new C(R)};F.prototype._clickItem=function(P){P.children("a").each(function(){this.click()})};F.prototype.setFocus=function(){if(this.$searchField){this.$searchField.focus()}else{if(this.tabs){this.$content.find("ul.tabs-menu a").first().focus()}else{this.$trigger.focus()}}};F.prototype._createScrollable=function(P){var Q=new K(P,{pageSize:this._getOptionVal("pageSize"),bufferPixels:0,preventOverscroll:true});Q.requestData=N.bind(this.getResults,this,Q);Q.attachNewContent=N.bind(this.addResultsToList,this,Q,false);return Q};F.prototype._populateScrollable=function(Q){Q=Q||this._getCurrentScrollable();this._emptyScrollable(Q);var P=this._getPreloadData();var S=0;if(P){S=this.addResultsToList(Q,true,P)}var R=Q.init();if(S>0){return D.Deferred().resolve().promise()}else{return R}};F.prototype._getPreloadData=function(){var Q=this._getOptionVal("preloadData");var R=this._getSearchTerm();if(Q&&(this._getOptionVal("alwaysShowPreload")||R==="")){var P=this._getOption("dataTransform");if(N.isFunction(P)){Q=P.call(this,Q,R)}}else{Q=null}return Q};F.prototype._emptyScrollable=function(P){P=P||this._getCurrentScrollable();P.reset();this._getDataStoreForScrollable(P).length=0;if(this._getOptionVal("clearResultsOnSearch")){P.$scrollElement.children("ul.results-list").empty()}};F.prototype._getCurrentScrollable=function(){return this.scrollables[this.tabs&&this.currentTabId?this.currentTabId:0]};F.prototype._getDataStoreForScrollable=function(Q){if(!Q){return this.scrollableDataStores[this.tabs&&this.currentTabId?this.currentTabId:0]}var P=N.indexOf(this.scrollables,Q);if(P!==-1){return this.scrollableDataStores[P]}else{return null}};F.prototype._getSearchTerm=function(){return(this.$searchField)?this.$searchField.val():""};F.prototype._updateSearchPlaceholder=function(){if(this.$searchField){this.$searchField.attr("placeholder",this._getOptionVal("searchPlaceholder"))}};F.prototype._getOptionVal=function(P){return this._getOption(P,true)};F.prototype._getOption=function(P,R){var Q;if(this.tabs&&N.contains(this.tabOptionKeys,P)){Q=this.tabs[this.currentTabId||0][P]}else{Q=this.options[P]}return(R)?A(Q,this):Q};F.prototype.setOptions=function(P){this.options=D.extend(true,{},this.defaults,P)};F.prototype.getResults=function(U,W,P){var Q=this;if(this.currentXHR&&this.currentXHR.abort){this.currentXHR.abort()}var T=this._getOption("queryParamsBuilder")||this._defaultQueryParamsBuilder;var S=T.call(this,this._getSearchTerm(),W,P);if(S===null){return D.Deferred().reject().promise()}var V=U.$scrollElement.children("ul.results-list");this._showSpinner(U);V.scrollTop(V[0].scrollHeight);var R=this.currentXHR=L.rest({url:this._getOptionVal("url"),data:S,statusCode:this._getOptionVal("statusCodeHandlers")});R.always(function(){Q._hideSpinner(U);Q.currentXHR=null});return R};F.prototype._showSpinner=function(P){P.$scrollElement.children(".spinner").show().spin()};F.prototype._hideSpinner=function(P){P.$scrollElement.children(".spinner").spinStop().hide()};F.prototype._shouldSearch=function(P){var Q=this._getOption("queryParamsBuilder")||this._defaultQueryParamsBuilder;return Q.call(this,P,0,this._getOptionVal("pageSize"))!=null};F.prototype._defaultQueryParamsBuilder=function(Q,S,P){var R={start:S,limit:P};if(this._getOptionVal("searchable")){R[this._getOptionVal("queryParamKey")]=Q}return R};F.prototype.addResultsToList=function(V,Q,T){var X=this._getOption("dataTransform");var W;if(N.isFunction(X)){T=X.call(this,T,this._getSearchTerm())}if(!Q&&(W=this._getPreloadData())){T=this.dedupeData(T,W)}T=D.extend({},T,{isPreload:Q,noResultsText:this._getOptionVal("noResultsText"),noMoreResultsText:this._getOptionVal("noMoreResultsText")});var U=D(this._getOption("resultsTemplate")(T));var S=this._getDataStoreForScrollable(V);S.push.apply(S,T.values);var R=V.$scrollElement.children("ul.results-list");var P=T.start===0&&!(W&&W.size>0)&&(!Q||T.size>0);if(P){R.empty()}R.append(U).attr("data-last-updated",new Date().getTime());if(P&&T.size>0){this._resultsKeyboardController.moveToNext()}return T.size};F.prototype.dedupeData=function(Q,P){if(Q&&Q.values&&P&&P.values){Q=D.extend(true,{},Q);Q.values=N.reject(Q.values,function(R){return N.find(P.values,function(S){return R.id===S.id})})}return Q};F.prototype.selectItem=function(R,Q){var S=Q.data("id");var P=N.find(this._getDataStoreForScrollable(),function(T){return T.id===S});if(Q.attr("href")!=="#"&&(this._getOptionVal("followLinks")||!H.openInSameTab)){}else{R.preventDefault()}if(!this._selectedItem||this._selectedItem.id!==P.id){this._itemSelected(P)}if(this._getOptionVal("hideDialogOnSelect")){this.dialog.hide()}};F.prototype._itemSelected=function(P){this._selectedItem=P;if(this._getOptionVal("field")){D(this._getOptionVal("field")).val(P.id)}this.updateTrigger({item:P});O.trigger(this._getOptionVal("itemSelectedEvent"),this,P,this._getOptionVal("context"))};F.prototype.updateTrigger=function(P){if(!this._getOptionVal("externalSearchField")){this.$trigger.html(this._getOption("triggerContentTemplate")(P||{}))}};F.prototype.resetTrigger=function(){this.updateTrigger({text:this._getOptionVal("triggerPlaceholder")})};F.prototype.destroy=function(){if(this.blockShortcutPropagation){D(document).add(this.dialog).off("keydown keypress",this.blockShortcutPropagation)}if(this._getOptionVal("externalSearchField")){this.$searchField.off(".searchable-selector")}if(this.dialog){this.dialog.hide();this.dialog.remove();this.dialog=null}if(this._resultsKeyboardController){this._resultsKeyboardController.destroy();this._resultsKeyboardController=null}if(this._tabKeyboardController){this._tabKeyboardController.destroy();this._tabKeyboardController=null}this.$trigger=null;this.scrollables=null;this.scrollableDataStores=null;this.tabs=null;this._initialiseDialogContent=D.noop};function A(Q,P){return N.isFunction(Q)?Q.call(P):Q}return F});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-item', location = '/static/feature/repository/repository-item/repository-item.soy' */
// This file was automatically generated from repository-item.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.repositoryItem = function(opt_data, opt_ignored) {
  return '<span class="repository-item" title="' + soy.$$escapeHtml(opt_data.repository.project.name) + ' / ' + soy.$$escapeHtml(opt_data.repository.name) + '" data-id="' + soy.$$escapeHtml(opt_data.repository.id) + '" data-repository="' + soy.$$escapeHtml(JSON.stringify(opt_data.repository).replace(/\//g, '\\/')) + '">' + stash.feature.repository.repositoryItemContent({avatarTagName: 'span', repository: opt_data.repository}) + '</span>';
};
if (goog.DEBUG) {
  stash.feature.repository.repositoryItem.soyTemplateName = 'stash.feature.repository.repositoryItem';
}


stash.feature.repository.repositoryItemContent = function(opt_data, opt_ignored) {
  return stash.feature.project.avatar({size: 'xsmall', project: opt_data.repository.project, tagName: opt_data.avatarTagName}) + '<span class="project-and-repository"><span class="project-name">' + ((opt_data.projectNameContent) ? soy.$$filterNoAutoescape(opt_data.projectNameContent) : soy.$$escapeHtml(opt_data.repository.project.name)) + '</span><span class="separator">/</span><span class="name">' + ((opt_data.repositoryNameContent) ? soy.$$filterNoAutoescape(opt_data.repositoryNameContent) : soy.$$escapeHtml(opt_data.repository.name)) + '</span></span>';
};
if (goog.DEBUG) {
  stash.feature.repository.repositoryItemContent.soyTemplateName = 'stash.feature.repository.repositoryItemContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:internal-highlight-text-util', location = '/static/bower/atlassian-highlight-text/lib/internal/util/highlight-text.js' */
define("internal/util/highlight-text",["internal/util/regexp"],function(D){var C=/[&"'<>`]/g;var E=function(G){var F={"<":"&lt;",">":"&gt;","&":"&amp;","'":"&#39;","`":"&#96;"};if(F.hasOwnProperty(G)){return F[G]}return"&quot;"};var A=function(F){return F.replace(C,E)};var B=function(F){return D.escape(A(F))};return{highlight:function(K,H,G){if(!H||H.length===0){return A(K)}var J=(typeof H==="string")?B(H):H.map(B).join("|");var F=(G==null)?"gi":G;var I=new RegExp(J,F);return A(K).replace(I,"<mark>$&</mark>")}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:highlight-text-util', location = '/static/util/highlight-text.js' */
define("util/highlight-text",["internal/util/highlight-text"],function(A){return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-menu-items', location = '/static/feature/repository/menu-items/repository-menu-items.soy' */
// This file was automatically generated from repository-menu-items.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.menuItems = function(opt_data, opt_ignored) {
  var output = '';
  var repoList3 = opt_data.repos;
  var repoListLen3 = repoList3.length;
  for (var repoIndex3 = 0; repoIndex3 < repoListLen3; repoIndex3++) {
    var repoData3 = repoList3[repoIndex3];
    output += '<li class="repository-item repository-menu-item' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '"><a data-proj-key="' + soy.$$escapeHtml(repoData3.project.key) + '" data-repo-slug="' + soy.$$escapeHtml(repoData3.slug) + '" data-repo-id="' + soy.$$escapeHtml(repoData3.id) + '" href="' + soy.$$escapeHtml(require('stash/api/util/navbuilder').project(repoData3.project.key).repo(repoData3.slug).browse().build()) + '" title="' + soy.$$escapeHtml(AJS.format("Go to repository \x22{0}\x22 in project \x22{1}\x22",repoData3.name,repoData3.project.name)) + '">' + stash.feature.repository.repositoryItemContent({repository: repoData3, projectNameContent: require('util/highlight-text').highlight(repoData3.project.name, opt_data.projectHighlightText, 'i'), repositoryNameContent: require('util/highlight-text').highlight(repoData3.name, opt_data.repositoryHighlightText, 'i')}) + '</a></li>';
  }
  return output;
};
if (goog.DEBUG) {
  stash.feature.repository.menuItems.soyTemplateName = 'stash.feature.repository.menuItems';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/bower/xregexp/src/xregexp.js' */
/*
 * XRegExp 3.0.0-pre
 * <http://xregexp.com/>
 * Steven Levithan � 2007-2012 MIT License
 */
var XRegExp=(function(I){var L="xregexp",U,J={astral:false,natives:false},a={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},F={},S={},B={},R=[],C="default",O="class",g={"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,"class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/},f=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,b=a.exec.call(/()??/,"")[1]===I,N=RegExp.prototype.sticky!==I,e={g:true,i:true,m:true,y:N},Z={}.toString,T;function d(j,h,i){var k;if(i){if(j.__proto__){j.__proto__=U.prototype}else{for(k in U.prototype){j[k]=U.prototype[k]}}}j[L]={captureNames:h};return j}function M(h){return a.replace.call(h,/([\s\S])(?=[\s\S]*\1)/g,"")}function Y(j,i){if(!U.isRegExp(j)){throw new TypeError("Type RegExp expected")}var h=a.exec.call(/\/([a-z]*)$/i,String(j))[1];i=i||{};if(i.add){h=M(h+i.add)}if(i.remove){h=a.replace.call(h,new RegExp("["+i.remove+"]+","g"),"")}j=d(new RegExp(j.source,h),K(j)?j[L].captureNames.slice(0):null,i.addProto);return j}function V(){return{captureNames:null}}function K(h){return !!(h[L]&&h[L].captureNames)}function A(l,k){if(Array.prototype.indexOf){return l.indexOf(k)}var h=l.length,j;for(j=0;j<h;++j){if(l[j]===k){return j}}return -1}function G(i,h){return Z.call(i)==="[object "+h+"]"}function X(i,j,h){return a.test.call(h.indexOf("x")>-1?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,i.slice(j))}function E(k,h){var j;if(M(h)!==h){throw new SyntaxError("Invalid duplicate regex flag "+h)}k=a.replace.call(k,/^\(\?([\w$]+)\)/,function(l,i){if(a.test.call(/[gy]/,i)){throw new SyntaxError("Cannot use flag g or y in mode modifier "+l)}h=M(h+i);return""});for(j=0;j<h.length;++j){if(!e[h.charAt(j)]){throw new SyntaxError("Unknown regex flag "+h.charAt(j))}}return{pattern:k,flags:h}}function P(h){h=h||{};if(G(h,"String")){h=U.forEach(h,/[^\s,]+/,function(i){this[i]=true},{})}return h}function H(h){if(!/^[\w$]$/.test(h)){throw new Error("Flag must be a single character A-Za-z0-9_$")}e[h]=true}function D(m,j,n,p,h){var k=R.length,q=null,l,o;while(k--){o=R[k];if((o.scope===p||o.scope==="all")&&(!o.flag||j.indexOf(o.flag)>-1)){l=U.exec(m,o.regex,n,"sticky");if(l){q={matchLength:l[0].length,output:o.handler.call(h,l,p,j),reparse:o.reparse};break}}}return q}function Q(h){U.cache.flush("patterns");J.astral=h}function c(h){RegExp.prototype.exec=(h?F:a).exec;RegExp.prototype.test=(h?F:a).test;String.prototype.match=(h?F:a).match;String.prototype.replace=(h?F:a).replace;String.prototype.split=(h?F:a).split;J.natives=h}function W(h){if(h==null){throw new TypeError("Cannot convert null or undefined to object")}return h}U=function(l,j){var h={hasNamedCapture:false,captureNames:[]},o=C,i="",m=0,p,k,n;if(U.isRegExp(l)){if(j!==I){throw new TypeError("Cannot supply flags when copying a RegExp")}return Y(l,{addProto:true})}l=l===I?"":String(l);j=j===I?"":String(j);n=l+"***"+j;if(!B[n]){p=E(l,j);l=p.pattern;j=p.flags;while(m<l.length){do{p=D(l,j,m,o,h);if(p&&p.reparse){l=l.slice(0,m)+p.output+l.slice(m+p.matchLength)}}while(p&&p.reparse);if(p){i+=p.output;m+=(p.matchLength||1)}else{k=U.exec(l,g[o],m,"sticky")[0];i+=k;m+=k.length;if(k==="["&&o===C){o=O}else{if(k==="]"&&o===O){o=C}}}}B[n]={pattern:a.replace.call(i,/\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g,""),flags:a.replace.call(j,/[^gimy]+/g,""),captures:h.hasNamedCapture?h.captureNames:null}}n=B[n];return d(new RegExp(n.pattern,n.flags),n.captures,true)};U.prototype=new RegExp;U.version="3.0.0-pre";U.addToken=function(m,l,j){j=j||{};var h=j.optionalFlags,k;if(j.flag){H(j.flag)}if(h){h=a.split.call(h,"");for(k=0;k<h.length;++k){H(h[k])}}R.push({regex:Y(m,{add:"g"+(N?"y":"")}),handler:l,scope:j.scope||C,flag:j.flag,reparse:j.reparse});U.cache.flush("patterns")};U.cache=function(j,h){var i=j+"***"+(h||"");return S[i]||(S[i]=U(j,h))};U.cache.flush=function(h){if(h==="patterns"){B={}}else{S={}}};U.escape=function(h){return a.replace.call(W(h),/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};U.exec=function(m,k,n,l){var j="g",i,h;if(N&&(l||(k.sticky&&l!==false))){j+="y"}k[L]=k[L]||V();h=k[L][j]||(k[L][j]=Y(k,{add:j,remove:l===false?"y":""}));h.lastIndex=n=n||0;i=F.exec.call(h,m);if(l&&i&&i.index!==n){i=null}if(k.global){k.lastIndex=i?h.lastIndex:0}return i};U.forEach=function(m,l,o,k){var n=0,j=-1,h;while((h=U.exec(m,l,n))){o.call(k,h,++j,m,l);n=h.index+(h[0].length||1)}return k};U.globalize=function(h){return Y(h,{add:"g",addProto:true})};U.install=function(h){h=P(h);if(!J.astral&&h.astral){Q(true)}if(!J.natives&&h.natives){c(true)}};U.isInstalled=function(h){return !!(J[h])};U.isRegExp=function(h){return Z.call(h)==="[object RegExp]"};U.match=function(n,m,k){var l=(m.global&&k!=="one")||k==="all",j=(l?"g":"")+(m.sticky?"y":""),h,i;m[L]=m[L]||V();i=m[L][j||"noGY"]||(m[L][j||"noGY"]=Y(m,{add:j,remove:k==="one"?"g":""}));h=a.match.call(W(n),i);if(m.global){m.lastIndex=((k==="one"&&h)?(h.index+h[0].length):0)}return l?(h||[]):(h&&h[0])};U.matchChain=function(i,h){return(function j(k,p){var n=h[p].regex?h[p]:{regex:h[p]},o=[],l=function(q){if(n.backref){if(!(q.hasOwnProperty(n.backref)||+n.backref<q.length)){throw new ReferenceError("Backreference to undefined group: "+n.backref)}o.push(q[n.backref]||"")}else{o.push(q[0])}},m;for(m=0;m<k.length;++m){U.forEach(k[m],n.regex,l)}return((p===h.length-1)||!o.length)?o:j(o,p+1)}([i],0))};U.replace=function(k,p,i,n){var l=U.isRegExp(p),h=(p.global&&n!=="one")||n==="all",j=(h?"g":"")+(p.sticky?"y":""),m=p,o;if(l){p[L]=p[L]||V();m=p[L][j||"noGY"]||(p[L][j||"noGY"]=Y(p,{add:j,remove:n==="one"?"g":""}))}else{if(h){m=new RegExp(U.escape(String(p)),"g")}}o=F.replace.call(W(k),m,i);if(l&&p.global){p.lastIndex=0}return o};U.replaceEach=function(l,j){var h,k;for(h=0;h<j.length;++h){k=j[h];l=U.replace(l,k[0],k[1],k[2])}return l};U.split=function(j,i,h){return F.split.call(W(j),i,h)};U.test=function(j,h,k,i){return !!U.exec(j,h,k,i)};U.uninstall=function(h){h=P(h);if(J.astral&&h.astral){Q(false)}if(J.natives&&h.natives){c(false)}};U.union=function(h,k){var l=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,j=[],n=0,p,q,o,r=function(s,t,u){var i=q[n-p];if(t){++n;if(i){return"(?<"+i+">"}}else{if(u){return"\\"+(+u+p)}}return s},m;if(!(G(h,"Array")&&h.length)){throw new TypeError("Must provide a nonempty array of patterns to merge")}for(m=0;m<h.length;++m){o=h[m];if(U.isRegExp(o)){p=n;q=(o[L]&&o[L].captureNames)||[];j.push(a.replace.call(U(o.source).source,l,r))}else{j.push(U.escape(o))}}return U(j.join("|"),k)};F.exec=function(n){var h=this.lastIndex,l=a.exec.apply(this,arguments),k,j,m;if(l){if(!b&&l.length>1&&A(l,"")>-1){j=Y(this,{remove:"g"});a.replace.call(String(n).slice(l.index),j,function(){var o=arguments.length,p;for(p=1;p<o-2;++p){if(arguments[p]===I){l[p]=I}}})}if(this[L]&&this[L].captureNames){for(m=1;m<l.length;++m){k=this[L].captureNames[m-1];if(k){l[k]=l[m]}}}if(this.global&&!l[0].length&&(this.lastIndex>l.index)){this.lastIndex=l.index}}if(!this.global){this.lastIndex=h}return l};F.test=function(h){return !!F.exec.call(this,h)};F.match=function(i){var h;if(!U.isRegExp(i)){i=new RegExp(i)}else{if(i.global){h=a.match.apply(this,arguments);i.lastIndex=0;return h}}return F.exec.call(i,W(this))};F.replace=function(k,l){var m=U.isRegExp(k),i,j,h;if(m){if(k[L]){j=k[L].captureNames}i=k.lastIndex}else{k+=""}if(G(l,"Function")){h=a.replace.call(String(this),k,function(){var n=arguments,o;if(j){n[0]=new String(n[0]);for(o=0;o<j.length;++o){if(j[o]){n[0][j[o]]=n[o+1]}}}if(m&&k.global){k.lastIndex=n[n.length-2]+n[0].length}return l.apply(I,n)})}else{h=a.replace.call(this==null?this:String(this),k,function(){var n=arguments;return a.replace.call(String(l),f,function(p,o,r){var q;if(o){q=+o;if(q<=n.length-3){return n[q]||""}q=j?A(j,o):-1;if(q<0){throw new SyntaxError("Backreference to undefined group "+p)}return n[q+1]||""}if(r==="$"){return"$"}if(r==="&"||+r===0){return n[0]}if(r==="`"){return n[n.length-1].slice(0,n[n.length-2])}if(r==="'"){return n[n.length-1].slice(n[n.length-2]+n[0].length)}r=+r;if(!isNaN(r)){if(r>n.length-3){throw new SyntaxError("Backreference to undefined group "+p)}return n[r]||""}throw new SyntaxError("Invalid token "+p)})})}if(m){if(k.global){k.lastIndex=0}else{k.lastIndex=i}}return h};F.split=function(l,i){if(!U.isRegExp(l)){return a.split.apply(this,arguments)}var n=String(this),k=[],h=l.lastIndex,m=0,j;i=(i===I?-1:i)>>>0;U.forEach(n,l,function(o){if((o.index+o[0].length)>m){k.push(n.slice(m,o.index));if(o.length>1&&o.index<n.length){Array.prototype.push.apply(k,o.slice(1))}j=o[0].length;m=o.index+j}});if(m===n.length){if(!a.test.call(l,"")||j){k.push("")}}else{k.push(n.slice(m))}l.lastIndex=h;return k.length>i?k.slice(0,i):k};T=U.addToken;T(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(h,i){if(h[1]==="B"&&i===C){return h[0]}throw new SyntaxError("Invalid escape "+h[0])},{scope:"all"});T(/\[(\^?)]/,function(h){return h[1]?"[\\s\\S]":"\\b\\B"});T(/\(\?#[^)]*\)/,function(i,j,h){return X(i.input,i.index+i[0].length,h)?"":"(?:)"});T(/\s+|#.*/,function(i,j,h){return X(i.input,i.index+i[0].length,h)?"":"(?:)"},{flag:"x"});T(/\./,function(){return"[\\s\\S]"},{flag:"s"});T(/\\k<([\w$]+)>/,function(i){var h=isNaN(i[1])?(A(this.captureNames,i[1])+1):+i[1],j=i.index+i[0].length;if(!h||h>this.captureNames.length){throw new SyntaxError("Backreference to undefined group "+i[0])}return"\\"+h+(j===i.input.length||isNaN(i.input.charAt(j))?"":"(?:)")});T(/\\(\d+)/,function(h,i){if(!(i===C&&/^[1-9]/.test(h[1])&&+h[1]<=this.captureNames.length)&&h[1]!=="0"){throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+h[0])}return h[0]},{scope:"all"});T(/\(\?P?<([\w$]+)>/,function(h){if(!isNaN(h[1])){throw new SyntaxError("Cannot use integer as capture name "+h[0])}if(h[1]==="length"||h[1]==="__proto__"){throw new SyntaxError("Cannot use reserved word as capture name "+h[0])}if(A(this.captureNames,h[1])>-1){throw new SyntaxError("Cannot use same name for multiple groups "+h[0])}this.captureNames.push(h[1]);this.hasNamedCapture=true;return"("});T(/\((?!\?)/,function(i,j,h){if(h.indexOf("n")>-1){return"(?:"}this.captureNames.push(null);return"("},{optionalFlags:"n"});return U}());;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/lib/xregexp/xregexp-AMD.js' */
define("xregexp",[],function(){return XRegExp});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/bower/xregexp/src/addons/unicode/unicode-base.js' */
/*
 * XRegExp Unicode Base 3.0.0-pre
 * <http://xregexp.com/>
 * Steven Levithan � 2008-2012 MIT License
 * Uses Unicode 6.2.0 <http://unicode.org/>
 * Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
 */
(function(H){var A={};function F(L){return L.replace(/[- _]+/g,"").toLowerCase()}function I(L){while(L.length<4){L="0"+L}return L}function D(L){return parseInt(L,16)}function C(L){return parseInt(L,10).toString(16)}function J(M){var L=/^\\[xu](.+)/.exec(M);return L?D(L[1]):M.charCodeAt(M.charAt(0)==="\\"?1:0)}function B(M){var L="",N=-1,O;H.forEach(M,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(P){O=J(P[1]);if(O>(N+1)){L+="\\u"+I(C(N+1));if(O>(N+2)){L+="-\\u"+I(C(O-1))}}N=J(P[2]||P[1])});if(N<65535){L+="\\u"+I(C(N+1));if(N<65534){L+="-\\uFFFF"}}return L}function E(L){var M="b!";return A[L][M]||(A[L][M]=B(A[L].bmp))}function G(L,M){var O=A[L],N="";if(O.bmp&&!O.isBmpLast){N="["+O.bmp+"]"+(O.astral?"|":"")}if(O.astral){N+=O.astral}if(O.isBmpLast&&O.bmp){N+=(O.astral?"|":"")+"["+O.bmp+"]"}return M?"(?:(?!"+N+")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))":"(?:"+N+")"}function K(L,M){var N=M?"a!":"a=";return A[L][N]||(A[L][N]=G(L,M))}H.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(S,W,O){var U="Invalid double negation ",P="Unknown Unicode token ",M="Unicode token missing data ",N="Astral mode required for Unicode token ",L="Astral mode does not support Unicode tokens within character classes",T=S[1]==="P"||!!S[2],R=O.indexOf("A")>-1||H.isInstalled("astral"),Q=F(S[4]||S[3]),V=A[Q];if(S[1]==="P"&&S[2]){throw new SyntaxError(U+S[0])}if(!A.hasOwnProperty(Q)){throw new SyntaxError(P+S[0])}if(V.inverseOf){Q=F(V.inverseOf);if(!A.hasOwnProperty(Q)){throw new ReferenceError(M+S[0]+" -> "+V.inverseOf)}V=A[Q];T=!T}if(!(V.bmp||R)){throw new SyntaxError(N+S[0])}if(R){if(W==="class"){throw new SyntaxError(L)}return K(Q,T)}return W==="class"?(T?E(Q):V.bmp):(T?"[^":"[")+V.bmp+"]"},{scope:"all",optionalFlags:"A"});H.addUnicodeData=function(P){var L="Unicode token requires name",O="Unicode token has no character data ",N,M;for(M=0;M<P.length;++M){N=P[M];if(!N.name){throw new Error(L)}if(!(N.inverseOf||N.bmp||N.astral)){throw new Error(O+N.name)}A[F(N.name)]=N;if(N.alias){A[F(N.alias)]=N}}H.cache.flush("patterns")};H.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72]|\uD801[\uDC00-\uDC9D]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1E\uDF30-\uDF40\uDF42-\uDF49\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD81A[\uDC00-\uDE38]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD83-\uDDB2\uDDC1-\uDDC4]|\uD86E[\uDC00-\uDC1D]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD803[\uDC00-\uDC48]|\uD80D[\uDC00-\uDC2E]|\uD805[\uDE80-\uDEAA]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD82C[\uDC00\uDC01]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD808[\uDC00-\uDF6E]"}])}(XRegExp));;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/bower/xregexp/src/addons/unicode/unicode-categories.js' */
/*
 * XRegExp Unicode Categories 3.0.0-pre
 * <http://xregexp.com/>
 * Steven Levithan � 2010-2012 MIT License
 * Uses Unicode 6.2.0 <http://unicode.org/>
 * Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
 */
(function(A){if(!A.addUnicodeData){throw new ReferenceError("Unicode Base must be loaded before Unicode Categories")}A.addUnicodeData([{name:"C",alias:"Other",isBmpLast:true,bmp:"\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF",astral:"\uD808[\uDF6F-\uDFFF]|\uD809[\uDC63-\uDC6F\uDC74-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7F\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD7F\uDDC9-\uDDCF\uDDDA-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC60-\uDCFF\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDE80-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF80-\uDFFF]|\uD86D[\uDF35-\uDF3F]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD86E[\uDC1E-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8B-\uDD8F\uDD9C-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF1F\uDF24-\uDF2F\uDF4B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|\uD803[\uDC49-\uDE5F\uDE7F-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|[\uD806\uD807\uD80A\uD80B\uD80E-\uD819\uD81C-\uD82B\uD82D-\uD833\uD836-\uD83A\uD83E\uD83F\uD86F-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD83D[\uDC3F\uDC41\uDCF8\uDCFD-\uDCFF\uDD3E\uDD3F\uDD44-\uDD4F\uDD68-\uDDFA\uDE41-\uDE44\uDE50-\uDE7F\uDEC6-\uDEFF\uDF74-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCBF\uDCC0\uDCD0\uDCE0-\uDCFF\uDD0B-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF\uDF21-\uDF2F\uDF36\uDF7D-\uDF7F\uDF94-\uDF9F\uDFC5\uDFCB-\uDFDF\uDFF1-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD81A[\uDE39-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDDE-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDFFF]|\uD805[\uDC00-\uDE7F\uDEB8-\uDEBF\uDECA-\uDFFF]|\uD82C[\uDC02-\uDFFF]"},{name:"Cc",alias:"Control",bmp:"\0-\x1F\x7F-\x9F"},{name:"Cf",alias:"Format",bmp:"\xAD\u0600-\u0604\u06DD\u070F\u200B-\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB",astral:"\uDB40[\uDC01\uDC20-\uDC7F]|\uD834[\uDD73-\uDD7A]|\uD804\uDCBD"},{name:"Cn",alias:"Unassigned",bmp:"\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u05FF\u0605\u061C\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065-\u2069\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF",astral:"\uD808[\uDF6F-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDDE-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC60-\uDCFF\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDE80-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF80-\uDFFF]|\uD86D[\uDF35-\uDF3F]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD809[\uDC63-\uDC6F\uDC74-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8B-\uDD8F\uDD9C-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF1F\uDF24-\uDF2F\uDF4B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7F\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD7F\uDDC9-\uDDCF\uDDDA-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD803[\uDC49-\uDE5F\uDE7F-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|[\uD806\uD807\uD80A\uD80B\uD80E-\uD819\uD81C-\uD82B\uD82D-\uD833\uD836-\uD83A\uD83E\uD83F\uD86F-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD83D[\uDC3F\uDC41\uDCF8\uDCFD-\uDCFF\uDD3E\uDD3F\uDD44-\uDD4F\uDD68-\uDDFA\uDE41-\uDE44\uDE50-\uDE7F\uDEC6-\uDEFF\uDF74-\uDFFF]|\uD86E[\uDC1E-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCBF\uDCC0\uDCD0\uDCE0-\uDCFF\uDD0B-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF\uDF21-\uDF2F\uDF36\uDF7D-\uDF7F\uDF94-\uDF9F\uDFC5\uDFCB-\uDFDF\uDFF1-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD81A[\uDE39-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDFFF]|\uD805[\uDC00-\uDE7F\uDEB8-\uDEBF\uDECA-\uDFFF]|\uD82C[\uDC02-\uDFFF]"},{name:"Co",alias:"Private_Use",bmp:"\uE000-\uF8FF",astral:"[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]"},{name:"Cs",alias:"Surrogate",bmp:"\uD800-\uDFFF"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A",astral:"\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD801[\uDC28-\uDC4F]"},{name:"Lm",alias:"Modifier_Letter",bmp:"\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uAA70\uAADD\uAAF3\uAAF4\uFF70\uFF9E\uFF9F",astral:"\uD81B[\uDF93-\uDF9F]"},{name:"Lo",alias:"Other_Letter",bmp:"\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1E\uDF30-\uDF40\uDF42-\uDF49\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD81A[\uDC00-\uDE38]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD83-\uDDB2\uDDC1-\uDDC4]|\uD86E[\uDC00-\uDC1D]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD803[\uDC00-\uDC48]|\uD80D[\uDC00-\uDC2E]|\uD805[\uDE80-\uDEAA]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50]|\uD801[\uDC50-\uDC9D]|\uD82C[\uDC00\uDC01]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD808[\uDC00-\uDF6E]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A",astral:"\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD801[\uDC00-\uDC27]"},{name:"M",alias:"Mark",bmp:"\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u08FE\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1DC0-\u1DE6\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26",astral:"\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC80-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD80-\uDD82\uDDB3-\uDDC0]|\uD805[\uDEAB-\uDEB7]|\uD800\uDDFD|\uDB40[\uDD00-\uDDEF]"},{name:"Mc",alias:"Spacing_Mark",bmp:"\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u19B0-\u19C0\u19C8\u19C9\u1A19-\u1A1B\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BAC\u1BAD\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC",astral:"\uD834[\uDD65\uDD66\uDD6D-\uDD72]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0]|\uD805[\uDEAC\uDEAE\uDEAF\uDEB6]|\uD81B[\uDF51-\uDF7E]"},{name:"Me",alias:"Enclosing_Mark",bmp:"\u0488\u0489\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u08FE\u0900-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1DC0-\u1DE6\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26",astral:"\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD81B[\uDF8F-\uDF92]|\uD805[\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7]|\uD804[\uDC01\uDC38-\uDC46\uDC80\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD80\uDD81\uDDB6-\uDDBE]|\uD800\uDDFD|\uDB40[\uDD00-\uDDEF]"},{name:"N",alias:"Number",bmp:"0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19",astral:"\uD802[\uDC58-\uDC5F\uDD16-\uDD1B\uDE40-\uDE47\uDE7D\uDE7E\uDF58-\uDF5F\uDF78-\uDF7F]|\uD801[\uDCA0-\uDCA9]|\uD809[\uDC00-\uDC62]|\uD835[\uDFCE-\uDFFF]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD834[\uDF60-\uDF71]|\uD803[\uDE60-\uDE7E]|\uD83C[\uDD00-\uDD0A]|\uD805[\uDEC0-\uDEC9]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19",astral:"\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9]|\uD805[\uDEC0-\uDEC9]|\uD801[\uDCA0-\uDCA9]|\uD835[\uDFCE-\uDFFF]"},{name:"Nl",alias:"Letter_Number",bmp:"\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF",astral:"\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC62]"},{name:"No",alias:"Other_Number",bmp:"\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D70-\u0D75\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835",astral:"\uD802[\uDC58-\uDC5F\uDD16-\uDD1B\uDE40-\uDE47\uDE7D\uDE7E\uDF58-\uDF5F\uDF78-\uDF7F]|\uD834[\uDF60-\uDF71]|\uD803[\uDE60-\uDE7E]|\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDF20-\uDF23]|\uD83C[\uDD00-\uDD0A]|\uD804[\uDC52-\uDC65]"},{name:"P",alias:"Punctuation",bmp:"\x21-\x23\x25-\\x2A\x2C-\x2F\x3A\x3B\\x3F\x40\\x5B-\\x5D\x5F\\x7B\x7D\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65",astral:"\uD809[\uDC70-\uDC73]|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDF39-\uDF3F]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDDC5-\uDDC8]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"\x5F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\x2D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\x29\\x5D\x7D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3F\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63"},{name:"Pf",alias:"Final_Punctuation",bmp:"\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21"},{name:"Pi",alias:"Initial_Punctuation",bmp:"\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20"},{name:"Po",alias:"Other_Punctuation",bmp:"\x21-\x23\x25-\x27\\x2A\x2C\\x2E\x2F\x3A\x3B\\x3F\x40\\x5C\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65",astral:"\uD809[\uDC70-\uDC73]|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDF39-\uDF3F]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDDC5-\uDDC8]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\x28\\x5B\\x7B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3E\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62"},{name:"S",alias:"Symbol",bmp:"\\x24\\x2B\x3C-\x3E\\x5E\x60\\x7C\x7E\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BA\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u2190-\u2328\u232B-\u23F3\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u26FF\u2701-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B4C\u2B50-\u2B59\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD",astral:"\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCF7\uDCF9-\uDCFC\uDD00-\uDD3D\uDD40-\uDD43\uDD50-\uDD67\uDDFB-\uDE40\uDE45-\uDE4F\uDE80-\uDEC5\uDF00-\uDF73]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBE\uDCC1-\uDCCF\uDCD1-\uDCDF\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDF20\uDF30-\uDF35\uDF37-\uDF7C\uDF80-\uDF93\uDFA0-\uDFC4\uDFC6-\uDFCA\uDFE0-\uDFF0]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDDD\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD90-\uDD9B\uDDD0-\uDDFC]|\uD83B[\uDEF0\uDEF1]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\x24\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BA\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\x5E\x60\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3"},{name:"Sm",alias:"Math_Symbol",bmp:"\\x2B\x3C-\x3E\\x7C\x7E\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2308-\u230B\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC",astral:"\uD83B[\uDEF0\uDEF1]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]"},{name:"So",alias:"Other_Symbol",bmp:"\xA6\xA9\xAE\xB0\u0482\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u23F3\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u26FF\u2701-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B50-\u2B59\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD",astral:"\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCF7\uDCF9-\uDCFC\uDD00-\uDD3D\uDD40-\uDD43\uDD50-\uDD67\uDDFB-\uDE40\uDE45-\uDE4F\uDE80-\uDEC5\uDF00-\uDF73]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDDD\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBE\uDCC1-\uDCCF\uDCD1-\uDCDF\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDF20\uDF30-\uDF35\uDF37-\uDF7C\uDF80-\uDF93\uDFA0-\uDFC4\uDFC6-\uDFCA\uDFE0-\uDFF0]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD90-\uDD9B\uDDD0-\uDDFC]"},{name:"Z",alias:"Separator",bmp:"\x20\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000"},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"\x20\xA0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000"}])}(XRegExp));;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-search', location = '/static/feature/repository/repository-search/repository-search.soy' */
// This file was automatically generated from repository-search.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.repositorySearch = function(opt_data, opt_ignored) {
  return '<form class="aui-quicksearch"><div class="repository-search-trigger"><label class="assistive" for="repository-search">' + soy.$$escapeHtml("Find a repository...") + '</label><input id="repository-search" type="text" autocomplete="off" placeholder="' + soy.$$escapeHtml("Find a repository...") + '"/><div class="spinner"></div></div></form>';
};
if (goog.DEBUG) {
  stash.feature.repository.repositorySearch.soyTemplateName = 'stash.feature.repository.repositorySearch';
}


stash.feature.repository.repositorySearchResults = function(opt_data, opt_ignored) {
  return '' + ((! (opt_data.isPreload && opt_data.size == 0)) ? '<div class="results-section' + ((opt_data.isPreload) ? ' recently-viewed' : '') + '">' + stash.feature.repository.menuItems({repos: opt_data.values, extraClasses: 'result', projectHighlightText: opt_data.projectSearchTerm, repositoryHighlightText: opt_data.repositorySearchTerm}) + ((opt_data.isLastPage) ? (opt_data.size > 0) ? '<li class="no-results">' + soy.$$escapeHtml(opt_data.noMoreResultsText) + '</li>' : '<li class="no-results">' + soy.$$escapeHtml(opt_data.noResultsText) + '</li>' : '') + '</div>' : '');
};
if (goog.DEBUG) {
  stash.feature.repository.repositorySearchResults.soyTemplateName = 'stash.feature.repository.repositorySearchResults';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-search', location = '/static/feature/repository/repository-search/repository-search.js' */
define("feature/repository/repository-search",["aui","jquery","lodash","xregexp","stash/api/util/navbuilder","util/events","widget/searchable-selector"],function(F,B,G,E,A,I,D){var C=null;I.on("stash.feature.repositories.recent.loaded",function(J){C=J});var H=function(M,K,J){J=J||{};J.externalSearchField=M;var L=this.init(K,J);L._bindSearchFieldEvents();L.dialog.on("click","a",function(){I.trigger("internal.stash.ui.nav.search.result.clicked",null,{repositoryId:B(this).attr("data-repo-id")})});return L};B.extend(H.prototype,D.prototype);H.prototype._generatePreloadData=function(){if(C==null){return null}var J;var L=this._parseSearchTerm(this._getSearchTerm());if(L){var M=L.projectName&&new RegExp("^"+E.escape(L.projectName),"i");var K=L.repositoryName&&new RegExp("^"+E.escape(L.repositoryName),"i");J=G.filter(C.values,function(N){return(L.projectName==null||N.project.name.match(M)!=null)&&(L.repositoryName==null||N.name.match(K)!=null)})}else{J=C.values}J.sort(function(O,N){return(L&&L.projectName?O.project.name.localeCompare(N.project.name):0)||O.name.localeCompare(N.name)||O.id-N.id});return G.extend({},C,{values:J,size:J.length,isLastPage:false})};H.prototype.defaults=B.extend({},D.prototype.defaults,{extraClasses:"repository-search-dialog",url:A.rest().allRepos().withParams({avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).build(),queryParamsBuilder:function(K,M,J){var L=this._parseSearchTerm(K);if(L==null){return null}return{start:M,limit:J,name:L.repositoryName,projectname:L.projectName}},dataTransform:function(L,J){var K=this._parseSearchTerm(J);if(K==null){return L}return B.extend({repositorySearchTerm:K.repositoryName,projectSearchTerm:K.projectName},L)},preloadData:H.prototype._generatePreloadData,alwaysShowPreload:true,followLinks:true,resultsTemplate:stash.feature.repository.repositorySearchResults,noResultsText:"No repositories matching your search",noMoreResultsText:"No more repositories",adjacentItems:false,clearResultsOnSearch:false,popUpOffsetY:1});H.prototype._bindSearchFieldEvents=function(){var J=this;this.$searchField.on("keydown.repository-search",function(K){if(K.which===F.keyCode.ENTER){K.preventDefault()}});this.$searchField.on("keyup.repository-search",function(K){var L=J.dialog.is(":visible");if(!L&&K.which===F.keyCode.ESCAPE){B(this).blur()}});this.$searchField.on("focus",function(){I.trigger("internal.stash.ui.nav.search.focused")})};H.prototype._parseSearchTerm=function(J){J=B.trim(J);if(J===""||J==="/"){return null}var L={};var K=J.lastIndexOf("/");if(K===-1){L.projectName=null;L.repositoryName=J}else{L.projectName=B.trim(J.substr(0,K));L.repositoryName=B.trim(J.substr(K+1))}return L};H.prototype._showSpinner=function(J){J.$scrollElement.find(".spinner").hide();this.$searchField.closest(".aui-quicksearch").addClass("loading");this.$searchField.next(".spinner").spin()};H.prototype._hideSpinner=function(){this.$searchField.closest(".aui-quicksearch").removeClass("loading");this.$searchField.next(".spinner").spinStop()};return H});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:base-layout', location = '/static/layout/base/base.js' */
define("layout/base",["aui","jquery","lodash","memoir","stash/api/util/navbuilder","util/analytics","util/client-storage","util/events","model/page-state","model/stash-user","widget/aui/dropdown","widget/aui/form","feature/repository/repository-search","exports"],function(J,F,Q,M,I,H,K,C,L,N,P,D,A,R){if(location.search){var G=I.parse(location.href),B=G.getQueryParamValue("eve");B&&C.on(B,function(){console.log([C.name()],this,arguments)})}function O(S){if(S){S.isAdmin=!!F("#header").find("a.admin-link").length;L.setCurrentUser(new N(S))}}function E(S){if(!K.getSessionItem(S)){K.setSessionItem(S,true);H.add("demographics",{d_lang:document.documentElement.lang},true)}}R.onReady=function(V,T){O(V);P.onReady();D.onReady();J.params["build-number"]=encodeURIComponent(F("#product-version").attr("data-system-build-number"));var W=F(window);var U=Q.debounce(function(){C.trigger("window.resize.debounced",W,W.width(),W.height())},200);W.on("resize",U);var X=Q.throttle(function(){C.trigger("window.scroll.throttled",W,W.scrollTop())},25);W.on("scroll",X);var S=F("#repository-search");new A(S,S.closest(".repository-search-trigger"));M.setTitleSuffix(" - "+T);E(K.buildKey("demographic-analytics","user"))};C.on("memoir.changestate",function(T){var S=F("#login-link");if(S.length&&T.state){S.attr("href",I.login().next().build())}F("body").children(".tipsy").remove()})});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:quick-copy-text', location = '/static/widget/quick-copy-text.js' */
define("widget/quick-copy-text",["jquery","exports"],function(B,A){var C=true;A.onReady=function(){if(C){C=false;B(document).on("click",".quick-copy-text",function(D){this.focus();this.select()})}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:browser-location', location = '/static/util/browser-location.js' */
define("util/browser-location",["exports"],function(A){A.location=window.location});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:sticky-branches', location = '/static/feature/repository/sticky-branches.js' */
define("feature/repository/sticky-branches",["jquery","stash/api/util/navbuilder","util/browser-location","util/client-storage","util/events","util/text","exports"],function(E,A,B,C,L,F,D){var I;var J;var K;D.onReady=function(){var P=A.parse(B.location.href),S=A.currentRepo().browse().build(),T=A.currentRepo().commits().build(),O=P.path().indexOf(S)===0,U=P.path()===T,X=O?P.getQueryParamValue("at"):U?P.getQueryParamValue("until"):undefined,M=O||U,W=C.buildKey("current-branch","repo"),V=C.getSessionItem(W);I=E("#repository-nav-files");J=E("#repository-nav-commits");K=E("#repository-nav-branches");var Q;if(X&&O){var R=E("[data-revision-ref]","#repository-layout-revision-selector").data("revision-ref");Q=R&&((R.id===X&&R.type.id==="commit")||(R.id!==X&&(R.type.id==="branch"||R.type.id==="tag")&&/^[0-9a-f]{7,40}$/.test(X)))}var N=!(O&&Q);if(X&&N){X=decodeURIComponent(X);if(X!==V){C.setSessionItem(W,X)}H(X)}else{if(M&&N){C.removeSessionItem(W)}else{if(V){H(V)}}}L.on("stash.layout.branch.revisionRefChanged",function(Y){if(Y){if(!Y.getIsDefault()){var Z=Y.getId();H(Z);C.setSessionItem(W,Z)}else{G();C.removeSessionItem(W)}}});L.on("stash.*.*.revisionRefRemoved",function(Z){var Y=C.getSessionItem(W);if(Y&&F.endsWith(Z.id,Y)){G();C.removeSessionItem(W)}})};function H(M){if(M){M=encodeURIComponent(M);I.attr("href",A.parse(I.attr("href")).replaceQueryParam("at",M));J.attr("href",A.parse(J.attr("href")).replaceQueryParam("until",M));K.attr("href",A.parse(K.attr("href")).replaceQueryParam("base",M))}else{G()}}function G(){I.attr("href",A.parse(I.attr("href")).deleteQueryParam("at"));J.attr("href",A.parse(J.attr("href")).deleteQueryParam("until"));K.attr("href",A.parse(K.attr("href")).deleteQueryParam("base"))}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-public-lozenge', location = '/static/feature/repository/public-lozenge/public-lozenge.soy' */
// This file was automatically generated from public-lozenge.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.publicLozenge = function(opt_data, opt_ignored) {
  return '' + ((true && (opt_data.repository['public'] || opt_data.repository.project['public'])) ? '<div class="public-lozenge aui-lozenge aui-lozenge-subtle">' + soy.$$escapeHtml("Public") + '</div>' : '');
};
if (goog.DEBUG) {
  stash.feature.repository.publicLozenge.soyTemplateName = 'stash.feature.repository.publicLozenge';
}
;
;/* module-key = 'com.atlassian.plugins.atlassian-chaperone:internals', location = '/internals/syncing.js' */
var Chaperone={_internal:{}};Chaperone._internal.syncing=(function(){function a(c,d){return(d||AJS.$).ajax({url:AJS.contextPath()+"/rest/chaperone/1/chaperone/"+c})}function b(c,e,d){return(d||AJS.$).ajax({url:AJS.contextPath()+"/rest/chaperone/1/chaperone/"+c,type:"POST",data:{json:e}})}return{syncToServer:b,syncFromServer:a}})();;
;/* module-key = 'com.atlassian.plugins.atlassian-chaperone:feature-discovery', location = '/feature-discovery/feature-discovery.js' */
(function(i,g,k,e,f){var j=e.syncFromServer;var h=e.syncToServer;var c=g.Callbacks();g(document).on("ajaxStop",function(){c.fire()});var b=g.Callbacks();g(window).on("resize",function(){b.fire()});function a(l){var m=g.Deferred();function n(){var o=g(l);if(o.length){m.resolve(o);c.remove(n)}}c.add(n);n();return m}function d(p,r,m,o){var l=g.Callbacks();var n=g.Callbacks();var s=g.Callbacks();function q(u){var w;function t(y){return function(){g(document).off("hideLayer",v);u.off(".chaperone");w.remove();b.remove(w.refresh);c.remove(x);if(y){y.fire()}}}function x(){if(!u.is(":visible")){t()()}}var v=t(l);w=new i.InlineDialog(u,"feature-discovery-"+p,function(A,y,D){A.html(chaperone.featureDiscovery.content({step:r,paging:m}));var C=A.find(".feature-discovery-action");var z=A.find(".feature-discovery-next");var B=A.find(".feature-discovery-close");if(r.action&&r.action.click){C.click(r.action.click)}u.on("click.chaperone",t(s));z.click(t(n));B.click(v);C.click(t(s));D();if(!o.modal){k.delay(function(){g(document).on("showLayer",v)},100)}},{closeOthers:false,hideDelay:null,noBind:true,gravity:r.gravity||(r.dir||"s").replace(/[nswe]/g,function(y){return{n:"s",s:"n",e:"w",w:"e"}[y]}),offsetX:r.offsetX,offsetY:r.offsetY,persistent:true,width:r.width||300,addActiveClass:false});b.add(w.refresh);c.add(x);w.show()}return{showWhenTargetVisible:function(){return a(r.selector).then(q)},on:function(t,u){switch(t){case"close":l.add(u);break;case"next":n.add(u);break;case"action":s.add(u);break}}}}f.registerFeature=function(n,l,m){m=m||{};var p=j(n).pipe(function(q){q=q||{};if(q.isAllDismissed){return g.Deferred().reject()}return q});function o(t,r,q){var s=r.stepInfoById[t.id||t.selector];switch(m.dismissalMode){case"progressive":s.isDismissed=true;h(n,JSON.stringify(r));break;default:if(q&&!r.isAllDismissed){r.isAllDismissed=true;h(n,JSON.stringify(r))}break}}k.reduce(l,function(r,q){return r.then(function(x){var D=x.stepInfoById=x.stepInfoById||{};var w=q.id||q.selector;var s=D[w]=D[w]||{};if(s.isDismissed){return r}var B=l.length;var v=k.indexOf(l,q);var t=v<B-1;var y=new d(n,q,{numSteps:B,stepIndex:v,hasNext:t},m);var C=g.Deferred();y.on("close",C.reject);y.on("next",k.bind(C.resolve,C,x));y.on("action",k.bind(C.resolve,C,x));var z=y.showWhenTargetVisible();var A=k.bind(o,null,q,x,!t);var u=k.bind(o,null,q,x,"all");if(q.once){z.then(A)}else{y.on("close",u);y.on("next",A);y.on("action",A)}return C})},p)};f.checkFeatureVisibility=function(){c.fire()};f.checkFeatureAlignment=function(){b.fire()}})(AJS,AJS.$,_,Chaperone._internal.syncing,Chaperone);;
;/* module-key = 'com.atlassian.plugins.atlassian-chaperone:feature-discovery', location = '/feature-discovery/feature-discovery.soy' */
// This file was automatically generated from feature-discovery.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace chaperone.featureDiscovery.
 */

if (typeof chaperone == 'undefined') { var chaperone = {}; }
if (typeof chaperone.featureDiscovery == 'undefined') { chaperone.featureDiscovery = {}; }


chaperone.featureDiscovery.content = function(opt_data, opt_ignored) {
  return '' + ((opt_data.step.title) ? '<h2>' + soy.$$escapeHtml(opt_data.step.title) + '</h2>' : '') + ((opt_data.step.content) ? soy.$$filterNoAutoescape(opt_data.step.content) : '') + aui.form.form({action: '', content: '' + ((opt_data.step.action && opt_data.step.action.text) ? aui.buttons.button(soy.$$augmentMap(opt_data.step.action, {extraClasses: aui.renderExtraClasses(opt_data.step.action) + ' feature-discovery-action', extraAttributes: aui.renderExtraAttributes(opt_data.step.action) + ' type="button"'})) : '') + ((opt_data.paging && opt_data.paging.hasNext) ? aui.buttons.button({text: "Next", type: opt_data.step.action && opt_data.step.action.text ? 'link' : null, extraClasses: 'feature-discovery-next', extraAttributes: {type: 'button'}}) : '') + aui.buttons.button({text: "Close", type: opt_data.step.action && opt_data.step.action.text || opt_data.paging && opt_data.paging.hasNext ? 'link' : null, extraClasses: 'feature-discovery-close', extraAttributes: {type: 'button'}}) + ((opt_data.step.moreInfo) ? aui.buttons.button(soy.$$augmentMap(opt_data.step.moreInfo, {text: opt_data.step.moreInfo.text ? opt_data.step.moreInfo.text : "Learn more", type: 'link'})) : '') + ((opt_data.paging && opt_data.paging.numSteps > 1) ? '<span class="multi-step-trigger">' + soy.$$escapeHtml(AJS.format("{0}/{1}",opt_data.paging.stepIndex + 1,opt_data.paging.numSteps)) + '</span>' : '')});
};
if (goog.DEBUG) {
  chaperone.featureDiscovery.content.soyTemplateName = 'chaperone.featureDiscovery.content';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:chaperone-feature-discovery', location = '/static/lib/chaperone-AMD.js' */
define("chaperone",function(){return Chaperone});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:sidebar', location = '/static/widget/sidebar/sidebar.js' */
define("widget/sidebar",["aui","chaperone","jquery","util/client-storage","util/events","exports"],function(K,D,G,E,L,F){var J="sidebar_expanded";var C=".aui-sidebar";var A;function B(){A=K.sidebar(C);A.on("collapse-end",function(){E.setItem(J,false);L.trigger("stash.feature.sidebar.collapseEnd")});A.on("expand-end",function(){E.setItem(J,true);L.trigger("stash.feature.sidebar.expandEnd")});var M=null;A.$el.find(".aui-sidebar-body").on("mousemove mouseleave",function(O){if(typeof O.srcElement==="undefined"&&O.target!==M){var N=(O.type==="mousemove")&&!G(O.target).parentsUntil(A.$el).filter(".aui-page-header, .aui-navgroup").length;A.$el.toggleClass("aui-is-hover",N);M=O.target}});I()}function I(){var M=E.getItem(J);A.on("expand",function(){M=true});A.on("collapse",function(){M=false});D.registerFeature("sidebar",[{id:"sidebar-discovery",selector:".aui-sidebar[aria-expanded=false] .aui-page-header, .aui-sidebar[aria-expanded=true] .aui-sidebar-group:first-child",title:"Improvements to navigation in Stash",content:stash.widget.sidebar.discoveryContent(),moreInfo:{href:"http://go.atlassian.com/stashsidebar"},gravity:"w",width:350,offsetX:function(){return M?-10:10},once:true}]);A.on("expand",D.checkFeatureAlignment);A.on("collapse",D.checkFeatureAlignment);A.on("expand-end",D.checkFeatureAlignment);A.on("collapse-end",D.checkFeatureAlignment)}function H(){var M=E.getItem(J);G(document.body).toggleClass("aui-sidebar-collapsed",!M);G(C).attr("aria-expanded",M)}F.preload=H;F.onReady=B});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:sidebar', location = '/static/widget/sidebar/sidebar.soy' */
// This file was automatically generated from sidebar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.sidebar.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }
if (typeof stash.widget.sidebar == 'undefined') { stash.widget.sidebar = {}; }


stash.widget.sidebar.discoveryContent = function(opt_data, opt_ignored) {
  return '<ul><li>' + soy.$$escapeHtml("Actions and navigation in one place") + '</li><li>' + soy.$$escapeHtml("Always visible for faster access") + '</li><li>' + soy.$$filterNoAutoescape(AJS.format("Collapse the sidebar with {0}[{1} when you need more space",'<kbd>','</kbd>')) + '</li></ul>';
};
if (goog.DEBUG) {
  stash.widget.sidebar.discoveryContent.soyTemplateName = 'stash.widget.sidebar.discoveryContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-layout', location = '/static/layout/repository/repository.js' */
define("layout/repository",["aui","jquery","lodash","stash/api/util/navbuilder","util/events","model/page-state","model/repository","widget/quick-copy-text","widget/sidebar","feature/repository/sticky-branches","exports"],function(J,H,S,I,C,L,G,F,M,R,T){function O(V){var U=new G(V);L.setRepository(U);L.setProject(U.getProject());H(".aui-page-header-image > a").on("click",function(){C.trigger("stash.sidebar.clickAvatar.expanded."+H(".aui-sidebar").attr("aria-expanded"),null)})}function B(){return H(".clone-url")}function E(){return H(".repository-protocol")}function D(){var b=B(),W=b.find("input"),Z=E(),V=H("#"+Z.attr("aria-owns")),Y=V.find("li"),a,U,X="";if(Z.is("button")){N(Z,Z.text());a=Z.attr("data-clone-url");U=Z.attr("data-module-key")}else{N(Z,Y.first().children("a").text());a=Y.first().attr("data-clone-url");U=Y.first().attr("data-module-key")}W.val(a);b.addClass(U);X=U;Y.on("click",function(c){var d=H(this);N(Z,d.text());W.val(d.attr("data-clone-url")).select();U=d.attr("data-module-key");b.removeClass(X).addClass(U);X=U;C.trigger("stash.feature.repository.clone.protocol.changed",null,U,d.attr("data-clone-url"));c.stopPropagation();if(V.is(":visible")){Z.trigger("aui-button-invoke")}c.preventDefault()});C.trigger("stash.feature.repository.clone.protocol.initial",null,U,a)}function N(V,W){var U=V.children("span").remove();V.text(W).append(U)}function K(V,Z){var U=H(Z);var Y=null;var X=null;var W=J.InlineDialog(null,"clone-repo-dialog",function(b,a,c){b.append(U);c();S.defer(function(){U.find(".clone-url input").select()})},{noBind:true,width:360,gravity:"w",hideCallback:function(){var b=E(),a=H("#"+b.attr("aria-owns"));if(a.is(":visible")){b.trigger("aui-button-invoke")}},calculatePositions:function(){if(Y===null&&X===null){return J.InlineDialog.opts.calculatePositions.apply(this,arguments)}else{return{gravity:"w",popupCss:Y,arrowCss:X}}}});H(document).on("click",V,function(c){c.preventDefault();if(H(c.target).closest(".aui-sidebar").length===0){var b=H("#inline-dialog-sidebar-submenu");var a=b.find("#arrow-sidebar-submenu");Y=b.offset();X=a.position()}else{Y=null;X=null}W.show(c,this)});H(document).keyup(function(a){if(a.keyCode===J.keyCode.ESCAPE){W.hide()}});U.find("a.sourcetree-clone-button").on("click",function(){W.hide()})}function Q(){var U=H(".aui-page-header-actions .create-pull-request");C.on("stash.layout.branch.revisionRefChanged",function(W){var V=I.currentRepo().createPullRequest();if(!W.isDefault()&&W.isBranch()){V=V.sourceBranch(W.getId())}U.attr("href",V.build())})}function A(){H(".repository-badge .badge").tooltip({gravity:"n"})}function P(){var U=H(".aui-sidebar[aria-expanded=false] .aui-page-header-image");U.tooltip({gravity:"w",delayIn:0,live:true,html:true,aria:true,className:"aui-sidebar-section-tooltip",title:function(){return H(this).find(".aui-avatar").attr("data-tooltip")}})}T.onReady=function(W,U,V){O(W);D();F.onReady();H(document).ready(M.onReady);R.onReady();K(U,V);Q();A();P();C.on("stash.widget.keyboard-shortcuts.register-contexts",function(X){X.enableContext("repository")})}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:revision-reference-selector', location = '/static/feature/repository/revision-reference-selector/revision-reference-selector.js' */
define("feature/repository/revision-reference-selector",["aui","jquery","lodash","stash/api/util/navbuilder","util/ajax","util/events","model/page-state","model/repository","model/revision-reference","widget/searchable-selector"],function(I,C,J,B,G,K,H,D,A,E){function F(M,L){return this.init.apply(this,arguments)}C.extend(F.prototype,E.prototype);F.prototype._addRefTypeAndRepositoryToResults=function(M){if(M&&M.values){var N=C.extend(true,{},M);var L=this._getCurrentType();J.each(N.values,J.bind(function(O){if(!O.type){O.type=L}if(!O.repository){O.repository=this.repository&&this.repository.toJSON()}},this));return N}return M};F.prototype.defaults=C.extend(true,{},E.prototype.defaults,{tabs:[{label:"Branches",type:A.type.BRANCH,url:function(){return this.getBranchesUrl()},resultsTemplate:stash.feature.repository.revisionReferenceSelectorBranchResults,searchPlaceholder:"Search for a branch"},{label:"Tags",type:A.type.TAG,url:function(){return this.getTagsUrl()},resultsTemplate:stash.feature.repository.revisionReferenceSelectorTagResults,searchPlaceholder:"Search for a tag"},{label:"Commits",type:A.type.COMMIT,url:function(){return this.getCommitsUrl()},resultsTemplate:stash.feature.repository.revisionReferenceSelectorCommitResults,searchPlaceholder:"Search for a commit"}],queryParamKey:"filterText",namespace:"revision-reference-selector",itemSelectedEvent:"stash.feature.repository.revisionReferenceSelector.revisionRefChanged",itemUnselectedEvent:"stash.feature.repository.revisionReferenceSelector.revisionRefUnselected",itemDataKey:"revision-ref",statusCodeHandlers:G.ignore404WithinRepository(),triggerContentTemplate:stash.feature.repository.revisionReferenceSelectorTriggerContent,extraClasses:"revision-reference-selector",repository:function(){return H.getRepository()},show:{branches:true,tags:true,commits:false},dataTransform:F.prototype._addRefTypeAndRepositoryToResults,postOptionsInit:function(){this.setRepository(this._getOptionVal("repository"))}});F.prototype.init=function(M,L){E.prototype.init.apply(this,arguments);return this};F.prototype.setOptions=function(N){if(N.extraClasses){N.extraClasses=this.defaults.extraClasses+" "+C.trim(N.extraClasses)}N=C.extend(true,{},this.defaults,N);var M={branches:A.type.BRANCH.id,tags:A.type.TAG.id,commits:A.type.COMMIT.id};var L=J.filter(M,function(P,O){return N.show[O]});N.tabs=J.filter(N.tabs,function(O){return J.indexOf(L,O.type.id)!==-1});this.options=N};F.prototype._getItemFromTrigger=function(){var L=this.$trigger.find(".name");return new A(C.extend({},this._buildObjectFromElementDataAttributes(L),{displayId:L.text(),repository:this.repository}))};F.prototype.getBranchesUrl=function(){return B.rest().project(this.repository.getProject()).repo(this.repository).branches().build()};F.prototype.getTagsUrl=function(){return B.rest().project(this.repository.getProject()).repo(this.repository).tags().build()};F.prototype.getCommitsUrl=function(){return B.rest().project(this.repository.getProject()).repo(this.repository).commits().build()};F.prototype.getRepository=function(){return this.repository};F.prototype.setRepository=function(L){var N=this.repository;if(L instanceof D&&!L.isEqual(N)){this.repository=L;if(N){var M=this._getCurrentScrollable();if(M){this._emptyScrollable(M);M.init()}this.clearSelection();this.dialog.hide();K.trigger("stash.feature.repository.revisionReferenceSelector.repoChanged",this,L,this._getOptionVal("context"))}}};F.prototype._getCurrentType=function(){return this.tabs[this.currentTabId||0].type};F.prototype.setSelectedItem=function(L){if(L instanceof A&&!L.isEqual(this._selectedItem)){this._itemSelected(L)}};F.prototype.clearSelection=function(){E.prototype.clearSelection.apply(this,arguments);K.trigger(this._getOptionVal("itemUnselectedEvent"),this,null,this._getOptionVal("context"))};F.prototype._itemSelected=function(N){var L;var M;if(N instanceof A){L=N.toJSON();M=N}else{L=J.pick(N,J.keys(A.prototype.namedAttributes));M=new A(L)}this._selectedItem=M;if(this._getOptionVal("field")){C(this._getOptionVal("field")).val(L.id)}this.updateTrigger({ref:L});K.trigger(this._getOptionVal("itemSelectedEvent"),this,M,this._getOptionVal("context"))};return F});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:revision-reference-selector', location = '/static/feature/repository/revision-reference-selector/revision-reference-selector.soy' */
// This file was automatically generated from revision-reference-selector.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.revisionReferenceSelectorBranchResults = function(opt_data, opt_ignored) {
  return '' + stash.feature.repository.revisionReferenceSelectorResults({values: opt_data.values, isLastPage: opt_data.isLastPage, size: opt_data.size, isPreload: opt_data.isPreload, noResultsText: "No branches", noMoreResultsText: "No more branches"});
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorBranchResults.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorBranchResults';
}


stash.feature.repository.revisionReferenceSelectorTagResults = function(opt_data, opt_ignored) {
  return '' + stash.feature.repository.revisionReferenceSelectorResults({values: opt_data.values, isLastPage: opt_data.isLastPage, size: opt_data.size, isPreload: opt_data.isPreload, noResultsText: "No tags", noMoreResultsText: "No more tags"});
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorTagResults.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorTagResults';
}


stash.feature.repository.revisionReferenceSelectorCommitResults = function(opt_data, opt_ignored) {
  return '' + stash.feature.repository.revisionReferenceSelectorResults({values: opt_data.values, isLastPage: opt_data.isLastPage, size: opt_data.size, isPreload: opt_data.isPreload, noResultsText: "No commits", noMoreResultsText: "No more commits"});
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorCommitResults.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorCommitResults';
}


stash.feature.repository.revisionReferenceSelectorResults = function(opt_data, opt_ignored) {
  var output = '';
  var refList27 = opt_data.values;
  var refListLen27 = refList27.length;
  for (var refIndex27 = 0; refIndex27 < refListLen27; refIndex27++) {
    var refData27 = refList27[refIndex27];
    output += '<li class="result ' + ((opt_data.isPreload) ? 'preload' : '') + '"><a href="' + soy.$$escapeHtml(refData27.url ? refData27.url : '#') + '" data-id="' + soy.$$escapeHtml(refData27.id) + '" tabindex="-1">' + stash.feature.repository.revisionReferenceSelectorRef({ref: refData27}) + '</a></li>';
  }
  output += (opt_data.isLastPage) ? (opt_data.size > 0) ? '<li class="no-results">' + soy.$$escapeHtml(opt_data.noMoreResultsText ? opt_data.noMoreResultsText : "No more results") + '</li>' : '<li class="no-results">' + soy.$$escapeHtml(opt_data.noResultsText ? opt_data.noResultsText : "No results") + '</li>' : '';
  return output;
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorResults.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorResults';
}


stash.feature.repository.revisionReferenceSelectorTrigger = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + stash.widget.searchableSelectorTriggerGeneric({id: opt_data.id, content: '' + stash.feature.repository.revisionReferenceSelectorTriggerContent(opt_data), autofocus: opt_data.autofocus, extraClasses: 'revision-reference-selector-trigger' + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : ''), extraAttributes: opt_data.extraAttributes});
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorTrigger.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorTrigger';
}


stash.feature.repository.revisionReferenceSelectorTriggerWithField = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + stash.feature.repository.revisionReferenceSelectorTrigger(opt_data) + widget.aui.form.input({id: opt_data.fieldId ? opt_data.fieldId : opt_data.id ? opt_data.id + '-field' : opt_data.id, name: opt_data.fieldName ? opt_data.fieldName : opt_data.id + '-field', initialValue: opt_data.ref ? opt_data.ref.id : null, type: 'hidden'});
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorTriggerWithField.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorTriggerWithField';
}


stash.feature.repository.revisionReferenceSelectorTriggerContent = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + ((opt_data.ref) ? stash.feature.repository.revisionReferenceSelectorRef(opt_data) : '<span class="placeholder">' + soy.$$escapeHtml(opt_data.text ? opt_data.text : "Select revision") + '</span>');
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorTriggerContent.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorTriggerContent';
}


stash.feature.repository.revisionReferenceSelectorRef = function(opt_data, opt_ignored) {
  return ((opt_data.ref.type) ? aui.icons.icon({size: 'small', useIconFont: true, iconFontSet: 'devtools', icon: opt_data.ref.type.id, accessibilityText: opt_data.ref.type.name}) : '') + '<span class="name" title="' + soy.$$escapeHtml(opt_data.ref.displayId) + '" data-id="' + soy.$$escapeHtml(opt_data.ref.id) + '" data-revision-ref="' + soy.$$escapeHtml(JSON.stringify(opt_data.ref).replace(/\//g, '\\/')) + '">' + soy.$$escapeHtml(opt_data.ref.displayId ? opt_data.ref.displayId : opt_data.ref.id) + '</span>';
};
if (goog.DEBUG) {
  stash.feature.repository.revisionReferenceSelectorRef.soyTemplateName = 'stash.feature.repository.revisionReferenceSelectorRef';
}
;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:create-branch-action', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-branch-utils','key':'create-branch-action','moduleKey':'create-branch-action','completeModuleKey':'com.atlassian.stash.stash-branch-utils:create-branch-action','weight':30.0,'params':{},'styleClass':WebFragments._formatI18n(null, null, 'create-branch'),'location':'stash.branch.layout.actions.dropdown','url':function(ctx) { return WebFragments._getValue((
            function (ctx) {
            var navbuilder = require('stash/api/util/navbuilder');
            var urlBuilder = navbuilder.pluginServlets().path('create-branch');
            if (ctx.repository) {
            urlBuilder = urlBuilder.withParams({repoId: ctx.repository.id});
            }
            if (ctx.atRevisionRef && (ctx.atRevisionRef.type.id === 'branch' || ctx.atRevisionRef.type.id === 'tag')) {
            urlBuilder = urlBuilder.withParams({branchFrom: ctx.atRevisionRef.id});
            }
            return urlBuilder.build();
            }
        ), ctx); },'linkText':WebFragments._formatI18n("Create branch from here", 'stash.branch.actions.create', '')});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:zero-clipboard', location = '/static/lib/zero-clipboard/ZeroClipboard.js' */
/*
 * zeroclipboard
 * The Zero Clipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.
 * Copyright 2012 Jon Rohan, James M. Greene, .
 * Released under the MIT license
 * http://jonrohan.github.com/ZeroClipboard/
 * v1.1.7
 */
(function(){var M=function(S,U){var T=S.style[U];if(S.currentStyle){T=S.currentStyle[U]}else{if(window.getComputedStyle){T=document.defaultView.getComputedStyle(S,null).getPropertyValue(U)}}if(T=="auto"&&U=="cursor"){var Q=["a"];for(var R=0;R<Q.length;R++){if(S.tagName.toLowerCase()==Q[R]){return"pointer"}}}return T};var I=function(Q){if(!G.prototype._singleton){return }if(!Q){Q=window.event}var R;if(this!==window){R=this}else{if(Q.target){R=Q.target}else{if(Q.srcElement){R=Q.srcElement}}}G.prototype._singleton.setCurrent(R)};var J=function(Q,S,R){if(Q.addEventListener){Q.addEventListener(S,R,false)}else{if(Q.attachEvent){Q.attachEvent("on"+S,R)}}};var H=function(Q,S,R){if(Q.removeEventListener){Q.removeEventListener(S,R,false)}else{if(Q.detachEvent){Q.detachEvent("on"+S,R)}}};var L=function(R,T){if(R.addClass){R.addClass(T);return R}if(T&&typeof T==="string"){var V=(T||"").split(/\s+/);if(R.nodeType===1){if(!R.className){R.className=T}else{var S=" "+R.className+" ",U=R.className;for(var W=0,Q=V.length;W<Q;W++){if(S.indexOf(" "+V[W]+" ")<0){U+=" "+V[W]}}R.className=U.replace(/^\s+|\s+$/g,"")}}}return R};var A=function(R,T){if(R.removeClass){R.removeClass(T);return R}if(T&&typeof T==="string"||T===undefined){var U=(T||"").split(/\s+/);if(R.nodeType===1&&R.className){if(T){var S=(" "+R.className+" ").replace(/[\n\t]/g," ");for(var V=0,Q=U.length;V<Q;V++){S=S.replace(" "+U[V]+" "," ")}R.className=S.replace(/^\s+|\s+$/g,"")}else{R.className=""}}}return R};var B=function(U){var T={left:0,top:0,width:U.width||U.offsetWidth||0,height:U.height||U.offsetHeight||0,zIndex:9999};var R=M(U,"zIndex");if(R&&R!="auto"){T.zIndex=parseInt(R,10)}while(U){var Q=parseInt(M(U,"borderLeftWidth"),10);var S=parseInt(M(U,"borderTopWidth"),10);T.left+=isNaN(U.offsetLeft)?0:U.offsetLeft;T.left+=isNaN(Q)?0:Q;T.top+=isNaN(U.offsetTop)?0:U.offsetTop;T.top+=isNaN(S)?0:S;U=U.offsetParent}return T};var K=function(Q){return(Q.indexOf("?")>=0?"&":"?")+"nocache="+(new Date).getTime()};var D=function(Q){var R=[];if(Q.trustedDomains){if(typeof Q.trustedDomains==="string"){R.push("trustedDomain="+Q.trustedDomains)}else{R.push("trustedDomain="+Q.trustedDomains.join(","))}}return R.join("&")};var O=function(S,T){if(T.indexOf){return T.indexOf(S)}for(var Q=0,R=T.length;Q<R;Q++){if(T[Q]===S){return Q}}return -1};var P=function(Q){if(typeof Q==="string"){throw new TypeError("ZeroClipboard doesn't accept query strings.")}if(!Q.length){return[Q]}return Q};var G=function(T,S){if(T){(G.prototype._singleton||this).glue(T)}if(G.prototype._singleton){return G.prototype._singleton}G.prototype._singleton=this;this.options={};for(var R in E){this.options[R]=E[R]}for(var Q in S){this.options[Q]=S[Q]}this.handlers={};if(G.detectFlashSupport()){N()}};var F,C=[];G.prototype.setCurrent=function(Q){F=Q;this.reposition();if(Q.getAttribute("title")){this.setTitle(Q.getAttribute("title"))}this.setHandCursor(M(Q,"cursor")=="pointer")};G.prototype.setText=function(Q){if(Q&&Q!==""){this.options.text=Q;if(this.ready()){this.flashBridge.setText(Q)}}};G.prototype.setTitle=function(Q){if(Q&&Q!==""){this.htmlBridge.setAttribute("title",Q)}};G.prototype.setSize=function(R,Q){if(this.ready()){this.flashBridge.setSize(R,Q)}};G.prototype.setHandCursor=function(Q){if(this.ready()){this.flashBridge.setHandCursor(Q)}};G.version="1.1.7";var E={moviePath:"ZeroClipboard.swf",trustedDomains:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain"};G.setDefaults=function(R){for(var Q in R){E[Q]=R[Q]}};G.destroy=function(){G.prototype._singleton.unglue(C);var Q=G.prototype._singleton.htmlBridge;Q.parentNode.removeChild(Q);delete G.prototype._singleton};G.detectFlashSupport=function(){var Q=false;try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")){Q=true}}catch(R){if(navigator.mimeTypes["application/x-shockwave-flash"]){Q=true}}return Q};var N=function(){var R=G.prototype._singleton;var Q=document.getElementById("global-zeroclipboard-html-bridge");if(!Q){var S='      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%">         <param name="movie" value="'+R.options.moviePath+'"/>         <param name="allowScriptAccess" value="'+R.options.allowScriptAccess+'"/>         <param name="scale" value="exactfit"/>         <param name="loop" value="false"/>         <param name="menu" value="false"/>         <param name="quality" value="best" />         <param name="bgcolor" value="#ffffff"/>         <param name="wmode" value="transparent"/>         <param name="flashvars" value="'+D(R.options)+'"/>         <embed src="'+R.options.moviePath+'"           loop="false" menu="false"           quality="best" bgcolor="#ffffff"           width="100%" height="100%"           name="global-zeroclipboard-flash-bridge"           allowScriptAccess="always"           allowFullScreen="false"           type="application/x-shockwave-flash"           wmode="transparent"           pluginspage="http://www.macromedia.com/go/getflashplayer"           flashvars="'+D(R.options)+'"           scale="exactfit">         </embed>       </object>';Q=document.createElement("div");Q.id="global-zeroclipboard-html-bridge";Q.setAttribute("class","global-zeroclipboard-container");Q.setAttribute("data-clipboard-ready",false);Q.style.position="absolute";Q.style.left="-9999px";Q.style.top="-9999px";Q.style.width="15px";Q.style.height="15px";Q.style.zIndex="9999";Q.innerHTML=S;document.body.appendChild(Q)}R.htmlBridge=Q;R.flashBridge=document["global-zeroclipboard-flash-bridge"]||Q.children[0].lastElementChild};G.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px";this.htmlBridge.style.top="-9999px";this.htmlBridge.removeAttribute("title");this.htmlBridge.removeAttribute("data-clipboard-text");A(F,this.options.activeClass);F=null;this.options.text=null};G.prototype.ready=function(){var Q=this.htmlBridge.getAttribute("data-clipboard-ready");return Q==="true"||Q===true};G.prototype.reposition=function(){if(!F){return false}var Q=B(F);this.htmlBridge.style.top=Q.top+"px";this.htmlBridge.style.left=Q.left+"px";this.htmlBridge.style.width=Q.width+"px";this.htmlBridge.style.height=Q.height+"px";this.htmlBridge.style.zIndex=Q.zIndex+1;this.setSize(Q.width,Q.height)};G.dispatch=function(Q,R){G.prototype._singleton.receiveEvent(Q,R)};G.prototype.on=function(Q,T){var S=Q.toString().split(/\s/g);for(var R=0;R<S.length;R++){Q=S[R].toLowerCase().replace(/^on/,"");if(!this.handlers[Q]){this.handlers[Q]=T}}if(this.handlers.noflash&&!G.detectFlashSupport()){this.receiveEvent("onNoFlash",null)}};G.prototype.addEventListener=G.prototype.on;G.prototype.off=function(Q,U){var S=Q.toString().split(/\s/g);for(var R=0;R<S.length;R++){Q=S[R].toLowerCase().replace(/^on/,"");for(var T in this.handlers){if(T===Q&&this.handlers[T]===U){delete this.handlers[T]}}}};G.prototype.removeEventListener=G.prototype.off;G.prototype.receiveEvent=function(Q,T){Q=Q.toString().toLowerCase().replace(/^on/,"");var U=F;switch(Q){case"load":if(T&&parseFloat(T.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10){this.receiveEvent("onWrongFlash",{flashVersion:T.flashVersion});return }this.htmlBridge.setAttribute("data-clipboard-ready",true);break;case"mouseover":L(U,this.options.hoverClass);break;case"mouseout":A(U,this.options.hoverClass);this.resetBridge();break;case"mousedown":L(U,this.options.activeClass);break;case"mouseup":A(U,this.options.activeClass);break;case"datarequested":var S=U.getAttribute("data-clipboard-target"),X=!S?null:document.getElementById(S);if(X){var W=X.value||X.textContent||X.innerText;if(W){this.setText(W)}}else{var R=U.getAttribute("data-clipboard-text");if(R){this.setText(R)}}break;case"complete":this.options.text=null;break}if(this.handlers[Q]){var V=this.handlers[Q];if(typeof V=="function"){V.call(U,this,T)}else{if(typeof V=="string"){window[V].call(U,this,T)}}}};G.prototype.glue=function(R){R=P(R);for(var Q=0;Q<R.length;Q++){if(O(R[Q],C)==-1){C.push(R[Q]);J(R[Q],"mouseover",I)}}};G.prototype.unglue=function(S){S=P(S);for(var R=0;R<S.length;R++){H(S[R],"mouseover",I);var Q=O(S[R],C);if(Q!=-1){C.splice(Q,1)}}};if(typeof module!=="undefined"){module.exports=G}else{if(typeof define==="function"&&define.amd){define(function(){return G})}else{window.ZeroClipboard=G}}})();;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:zero-clipboard', location = '/static/lib/zero-clipboard/ZeroClipboard-AMD.js' */
define("zero-clipboard",["aui"],function(B){var A=window.ZeroClipboard;A.setDefaults({moviePath:B.contextPath()+"/s/"+A.version+"/_/download/resources/com.atlassian.stash.stash-web-plugin:zero-clipboard/ZeroClipboard.swf",useNoCache:false});return A});require("zero-clipboard");;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:notifications-center', location = '/static/widget/notifications-center/notifications-center.soy' */
// This file was automatically generated from notifications-center.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.notifications.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }
if (typeof stash.widget.notifications == 'undefined') { stash.widget.notifications = {}; }


stash.widget.notifications.center = function(opt_data, opt_ignored) {
  return '<div id="notifications-center"></div>';
};
if (goog.DEBUG) {
  stash.widget.notifications.center.soyTemplateName = 'stash.widget.notifications.center';
}


stash.widget.notifications.notification = function(opt_data, opt_ignored) {
  return '<div class="status-notification">' + soy.$$escapeHtml(opt_data.message) + '</div>';
};
if (goog.DEBUG) {
  stash.widget.notifications.notification.soyTemplateName = 'stash.widget.notifications.notification';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:notifications-center', location = '/static/widget/notifications-center/notifications-center.js' */
define("widget/notifications-center",["jquery","util/navigator","exports"],function(E,C,B){var F;function A(){if(F){return F}F=E(stash.widget.notifications.center()).appendTo("body");return F}function D(G){var H=E(stash.widget.notifications.notification({message:G}));A().prepend(H);if(C.isIE()&&C.majorVersion()<=9){H.fadeIn(function(){window.setTimeout(function(){H.fadeOut(function(){H.remove()})},1500)})}H.on("animationend webkitAnimationEnd MSAnimationEnd oanimationend",function(){H.remove()});return H}B.showNotification=D});;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:branch-copy', location = '/static/branch-copy/feature/branch-copy.js' */
define("feature/branch/branch-copy",["aui","jquery","lodash","zero-clipboard","util/navigator","widget/notifications-center","widget/quick-copy-text","exports"],function(i,e,j,f,h,k,c,d){c.onReady();function b(l){var m=i.dialog2(aui.dialog.dialog2({titleText:"Copy branch name",content:stash.feature.branchCopy.dialogContent({branchName:l,flashSupported:f.detectFlashSupport()}),footerHintText:i.format("{0} to copy the branch name to your clipboard",h.isMac()?"⌘ + c":"Ctrl + c"),removeOnHide:true})).show();m.$el.find("form").on("submit",function(n){n.preventDefault()});m.$el.find("#branch-copy-field").on("copy",function(){j.defer(function(){m.hide()});k.showNotification("Branch name has been copied")}).focus().select()}function a(){e("#global-zeroclipboard-html-bridge").css({top:"-9999px",left:"-9999px"})}function g(q,n,p){var o;var l;var m=function(r,s){r.setText(l)};e(document).on("aui-dropdown2-show",n,function(){var r=e(this);var s=e(q);l=p(r);var t=function(u){u.preventDefault();b(l)};s.on("click",t);r.on("aui-dropdown2-hide",function(){s.off("click",t)});if(o){o.off("dataRequested",m)}if(f.detectFlashSupport()){o=new f(s,{forceHandCursor:true});o.on("dataRequested",m);o.on("complete",function(u,v){a();k.showNotification("Branch name has been copied")})}})}d.bindToDropdownLink=g});;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:branch-copy', location = '/static/branch-copy/feature/branch-copy.soy' */
// This file was automatically generated from branch-copy.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.branchCopy.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.branchCopy == 'undefined') { stash.feature.branchCopy = {}; }


stash.feature.branchCopy.dialogContent = function(opt_data, opt_ignored) {
  return '' + ((! opt_data.flashSupported) ? '<p class="install-flash-message">' + soy.$$filterNoAutoescape(AJS.format("Install {0}Adobe Flash{1} to automatically copy the branch name to your clipboard.",'<a href="http://get.adobe.com/flashplayer/" target="_blank">','</a>')) + '</p>' : '') + aui.form.form({content: '' + widget.aui.form.text({id: 'branch-copy-field', labelContent: '' + soy.$$escapeHtml("Branch name"), extraClasses: 'quick-copy-text', initialValue: opt_data.branchName, autofocus: true, readonly: true}), action: ''});
};
if (goog.DEBUG) {
  stash.feature.branchCopy.dialogContent.soyTemplateName = 'stash.feature.branchCopy.dialogContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:branch-copy-branch-layout', location = '/static/branch-copy/branch-layout-copy.js' */
define("feature/branch/branch-selector-copy",["model/page-state","feature/branch/branch-copy","exports"],function(b,c,a){a.onReady=function(){c.bindToDropdownLink(".copy-branch-name","#branch-actions-menu",function(){return b.getRevisionRef().getDisplayId()})}});jQuery(document).ready(function(){require("feature/branch/branch-selector-copy").onReady()});;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:copy-branch-action', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-branch-utils','key':'copy-branch-action','moduleKey':'copy-branch-action','completeModuleKey':'com.atlassian.stash.stash-branch-utils:copy-branch-action','weight':15.0,'condition':function(ctx) { return WebFragments._getValue((function(ctx) { return ctx.atRevisionRef.type.id === 'branch'}), ctx); },'params':{},'styleClass':WebFragments._formatI18n(null, null, 'copy-branch-name'),'location':'stash.branch.layout.actions.dropdown','linkText':WebFragments._formatI18n("Copy branch name", 'stash.branch.actions.copybranch', '')});;
;/* module-key = 'com.atlassian.stash.stash-compare-plugin:compare-branch-action', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-compare-plugin','key':'compare-branch-action','moduleKey':'compare-branch-action','completeModuleKey':'com.atlassian.stash.stash-compare-plugin:compare-branch-action','weight':10.0,'condition':function(ctx) { return WebFragments._getValue((function(ctx) { return ctx.atRevisionRef.type.id === 'branch'}), ctx); },'params':{},'styleClass':WebFragments._formatI18n(null, null, 'compare-branch-action'),'location':'stash.branch.layout.actions.dropdown','url':function(ctx) { return WebFragments._getValue((
            function(ctx) {
            return require('stash/api/util/navbuilder').project(ctx.repository.project).repo(ctx.repository).compare()
            .sourceBranch(ctx.atRevisionRef.id).build();
            }
        ), ctx); },'linkText':WebFragments._formatI18n("Compare", 'stash.web.repository.branch.actions.compare', '')});;
;/* module-key = 'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-checkout', location = '/static/sourcetree-checkout/sourcetree-checkout.js' */
define("plugin/sourcetree/sourcetree-checkout",["jquery","aui","model/page-state","util/events","util/navbuilder","exports"],function(d,a,h,j,e,b){var g=navigator.platform.indexOf("Mac")!==-1;var i;var c=function(k,l){i=l};function f(){return i||e.currentRepo().clone(h.getRepository().getScmId()).buildAbsolute()}b.init=function(){j.on("stash.feature.repository.clone.protocol.changed",c);j.on("stash.feature.repository.clone.protocol.initial",c);d(".sourcetree-checkout").tipsy({gravity:d.fn.tipsy.autoWE,live:true});d(document).on("aui-dropdown2-hide",".aui-dropdown2",function(){d(".sourcetree-checkout").each(function(){d(this).tipsy("hide")})})};b.getSourceTreeCheckoutUrl=function(k){var m="sourcetree://checkoutRef?type=stash&ref="+encodeURIComponent(k.id)+"&baseWebUrl="+encodeURIComponent(window.location.origin+a.contextPath())+"&cloneUrl="+encodeURIComponent(f());var l=h.getCurrentUser();if(l){m=m+"&user="+encodeURIComponent(l.getName())}return m};b.getMinimumSourceTreeVersionTooltip=function(){var k=g?1.7:1.2;return AJS.format("Requires SourceTree v{0}+",k)}});require("plugin/sourcetree/sourcetree-checkout").init();;
;/* module-key = 'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-checkout-action-branch-layout', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-sourcetree-plugin','key':'sourcetree-checkout-action-branch-layout','moduleKey':'sourcetree-checkout-action-branch-layout','completeModuleKey':'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-checkout-action-branch-layout','weight':20.0,'params':{},'tooltip':function(ctx) { return WebFragments._getValue((require('plugin/sourcetree/sourcetree-checkout').getMinimumSourceTreeVersionTooltip()), ctx); },'styleClass':WebFragments._formatI18n(null, null, 'sourcetree-checkout'),'location':'stash.branch.layout.actions.dropdown','url':function(ctx) { return WebFragments._getValue((
            function(ctx) {
                return require('plugin/sourcetree/sourcetree-checkout').getSourceTreeCheckoutUrl(ctx.atRevisionRef);
            }
        ), ctx); },'linkText':WebFragments._formatI18n("Check out in SourceTree", 'stash.branch.actions.sourcetree.checkout', '')});;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:copy-commit-action', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-branch-utils','key':'copy-commit-action','moduleKey':'copy-commit-action','completeModuleKey':'com.atlassian.stash.stash-branch-utils:copy-commit-action','weight':12.0,'condition':function(ctx) { return WebFragments._getValue((function(ctx) { return ctx.atRevisionRef.type.id === 'commit'}), ctx); },'params':{},'styleClass':WebFragments._formatI18n(null, null, 'copy-branch-name'),'location':'stash.branch.layout.actions.dropdown','linkText':WebFragments._formatI18n("Copy revision", 'stash.branch.actions.copyrevision', '')});;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:copy-tag-action', location = '/web-fragment-placeholder.config' */
WebFragments.addWebItemDescriptor({'pluginKey':'com.atlassian.stash.stash-branch-utils','key':'copy-tag-action','moduleKey':'copy-tag-action','completeModuleKey':'com.atlassian.stash.stash-branch-utils:copy-tag-action','weight':11.0,'condition':function(ctx) { return WebFragments._getValue((function(ctx) { return ctx.atRevisionRef.type.id === 'tag'}), ctx); },'params':{},'styleClass':WebFragments._formatI18n(null, null, 'copy-branch-name'),'location':'stash.branch.layout.actions.dropdown','linkText':WebFragments._formatI18n("Copy tag name", 'stash.branch.actions.copytag', '')});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:web-fragment-templates', location = '/static/widget/web-fragment.soy' */
// This file was automatically generated from web-fragment.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.webItem = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '<' + soy.$$escapeHtml(opt_data.url || opt_data.forceLink ? 'a' : 'span') + ((opt_data.url) ? ' href="' + soy.$$escapeHtml(opt_data.url) + '"' : '') + ((opt_data.linkId) ? ' id="' + soy.$$escapeHtml(opt_data.linkId) + '"' : '') + ((opt_data.styleClass) ? ' class="' + soy.$$escapeHtml(opt_data.styleClass) + '"' : '') + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + ((opt_data.pluginKey && opt_data.moduleKey) ? ' data-web-item-key="' + soy.$$escapeHtml(opt_data.pluginKey) + ':' + soy.$$escapeHtml(opt_data.moduleKey) + '"' : '') + '>' + ((opt_data.content) ? soy.$$filterNoAutoescape(opt_data.content) : (opt_data.params && opt_data.params['stashIconClass']) ? '<span class="aui-icon ' + soy.$$escapeHtml(opt_data.params['stashIconClass']) + '">' + soy.$$escapeHtml(opt_data.linkText) + '</span>' : soy.$$escapeHtml(opt_data.linkText)) + '</' + soy.$$escapeHtml(opt_data.url || opt_data.forceLink ? 'a' : 'span') + '>';
};
if (goog.DEBUG) {
  stash.widget.webItem.soyTemplateName = 'stash.widget.webItem';
}


stash.widget.webItemButton = function(opt_data, opt_ignored) {
  return '' + stash.buttons.button({buttonText: opt_data.linkText ? opt_data.linkText : '', id: opt_data.linkId, title: opt_data.tooltip, extraClasses: opt_data.styleClass && opt_data.extraClasses ? opt_data.styleClass + ' ' + opt_data.extraClasses : opt_data.styleClass ? opt_data.styleClass : opt_data.extraClasses, href: opt_data.url, iconType: opt_data.params['stashIconClass'] ? 'custom' : '', iconClass: opt_data.params['stashIconClass'], iconText: ! opt_data.linkText ? opt_data.tooltip : ''});
};
if (goog.DEBUG) {
  stash.widget.webItemButton.soyTemplateName = 'stash.widget.webItemButton';
}


stash.widget.webItemtabMenuItem = function(opt_data, opt_ignored) {
  return '' + widget.aui.tabMenuItem({id: opt_data.linkId, tooltip: opt_data.tooltip, text: opt_data.linkText, url: opt_data.url, extraClasses: opt_data.styleClass, isActive: opt_data.isActive});
};
if (goog.DEBUG) {
  stash.widget.webItemtabMenuItem.soyTemplateName = 'stash.widget.webItemtabMenuItem';
}


stash.widget.webItemDropdownItem = function(opt_data, opt_ignored) {
  return '' + stash.widget.webItem(soy.$$augmentMap(opt_data, {forceLink: true}));
};
if (goog.DEBUG) {
  stash.widget.webItemDropdownItem.soyTemplateName = 'stash.widget.webItemDropdownItem';
}


stash.widget.webFragmentButtons = function(opt_data, opt_ignored) {
  var output = '';
  var webFragmentList70 = opt_data.isReverse ? WebFragments.getWebFragments(opt_data.location,opt_data.context).reverse() : WebFragments.getWebFragments(opt_data.location,opt_data.context);
  var webFragmentListLen70 = webFragmentList70.length;
  for (var webFragmentIndex70 = 0; webFragmentIndex70 < webFragmentListLen70; webFragmentIndex70++) {
    var webFragmentData70 = webFragmentList70[webFragmentIndex70];
    switch (webFragmentData70.type) {
      case 'ITEM':
        output += stash.buttons.buttons({content: '' + stash.widget.webItemButton(webFragmentData70)});
        break;
      case 'SECTION':
        var param78 = '';
        var webItemList79 = opt_data.isReverse ? WebFragments.getWebItems(opt_data.location + '/' + webFragmentData70.key,opt_data.context).reverse() : WebFragments.getWebItems(opt_data.location + '/' + webFragmentData70.key,opt_data.context);
        var webItemListLen79 = webItemList79.length;
        for (var webItemIndex79 = 0; webItemIndex79 < webItemListLen79; webItemIndex79++) {
          var webItemData79 = webItemList79[webItemIndex79];
          param78 += stash.widget.webItemButton(webItemData79);
        }
        output += stash.buttons.buttons({extraClasses: webFragmentData70.styleClass, content: param78});
        break;
    }
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.webFragmentButtons.soyTemplateName = 'stash.widget.webFragmentButtons';
}


stash.widget.webItemTabs = function(opt_data, opt_ignored) {
  var param85 = '' + ((opt_data.tabItemsContent) ? soy.$$filterNoAutoescape(opt_data.tabItemsContent) : '');
  var itemList90 = opt_data.webItems ? opt_data.webItems : WebFragments.getWebItems(opt_data.location,opt_data.context ? opt_data.context : null);
  var itemListLen90 = itemList90.length;
  for (var itemIndex90 = 0; itemIndex90 < itemListLen90; itemIndex90++) {
    var itemData90 = itemList90[itemIndex90];
    var param98 = '';
    var subPanelList99 = WebFragments.getWebPanels(itemData90.moduleKey + '.meta',opt_data.context ? opt_data.context : null).map(function(webPanel) { return soydata.VERY_UNSAFE.ordainSanitizedHtml(webPanel); });
    var subPanelListLen99 = subPanelList99.length;
    for (var subPanelIndex99 = 0; subPanelIndex99 < subPanelListLen99; subPanelIndex99++) {
      var subPanelData99 = subPanelList99[subPanelIndex99];
      param98 += soy.$$escapeHtml(subPanelData99);
    }
    param85 += widget.aui.tabMenuItem({url: itemData90.url, text: itemData90.linkText, id: itemData90.linkId, extraLinkClasses: itemData90.styleClass, tooltip: itemData90.tooltip, isActive: opt_data.showFirstTab ? itemIndex90 == 0 : opt_data.activeTab ? itemData90.moduleKey == opt_data.activeTab : false, extraAttributes: {'data-module-key': itemData90.moduleKey}, extraLinkContent: param98});
  }
  var output = '' + widget.aui.tabChrome(soy.$$augmentMap(opt_data, {tabItemsContent: param85}));
  return output;
};
if (goog.DEBUG) {
  stash.widget.webItemTabs.soyTemplateName = 'stash.widget.webItemTabs';
}


stash.widget.sidebarWebFragmentNavigation = function(opt_data, opt_ignored) {
  var output = '';
  if (opt_data.primaryNavContent || opt_data.secondaryNavContent || opt_data.webFragments.length > 0) {
    var param112 = '<ul class="aui-nav">' + ((opt_data.primaryNavContent) ? soy.$$filterNoAutoescape(opt_data.primaryNavContent) : '');
    var fragmentList118 = opt_data.webFragments;
    var fragmentListLen118 = fragmentList118.length;
    for (var fragmentIndex118 = 0; fragmentIndex118 < fragmentListLen118; fragmentIndex118++) {
      var fragmentData118 = fragmentList118[fragmentIndex118];
      param112 += (fragmentData118.type == 'ITEM') ? stash.widget.sidebarNavItemWebItem({context: opt_data.context, isActive: fragmentData118.moduleKey == opt_data.activeNavItem, isTierOne: opt_data.isTierOne, webItem: fragmentData118}) : (fragmentData118.type == 'SECTION') ? stash.widget.sidebarNavWebSection({activeNavItem: opt_data.activeNavItem, context: opt_data.context, fragment: fragmentData118, isTierOne: opt_data.isTierOne}) : '';
    }
    param112 += '</ul>';
    output += widget.aui.sidebarNavGroup({extraClasses: opt_data.extraClasses, isTierOne: opt_data.isTierOne, isActions: opt_data.isActions, title: opt_data.title, navContent: param112, secondaryNavContent: '' + ((opt_data.secondaryNavContent) ? '<ul class="aui-nav">' + soy.$$filterNoAutoescape(opt_data.secondaryNavContent) + '</ul>' : '')});
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.sidebarWebFragmentNavigation.soyTemplateName = 'stash.widget.sidebarWebFragmentNavigation';
}


stash.widget.sidebarNavWebSection = function(opt_data, opt_ignored) {
  return '' + stash.widget.sidebarNavSectionWithItems({activeNavItem: opt_data.activeNavItem, context: opt_data.context, heading: opt_data.fragment.labelText, isTierOne: opt_data.isTierOne, webItems: WebFragments.getWebItems(opt_data.fragment.location + '/' + opt_data.fragment.key,opt_data.context ? opt_data.context : null)});
};
if (goog.DEBUG) {
  stash.widget.sidebarNavWebSection.soyTemplateName = 'stash.widget.sidebarNavWebSection';
}


stash.widget.sidebarNavSectionWithItems = function(opt_data, opt_ignored) {
  var output = '';
  if (opt_data.webItems.length) {
    output += widget.aui.navHeading({text: opt_data.heading}) + '<ul class="aui-nav">';
    var webItemList155 = opt_data.webItems;
    var webItemListLen155 = webItemList155.length;
    for (var webItemIndex155 = 0; webItemIndex155 < webItemListLen155; webItemIndex155++) {
      var webItemData155 = webItemList155[webItemIndex155];
      output += stash.widget.sidebarNavItemWebItem({context: opt_data.context, isActive: webItemData155.moduleKey == opt_data.activeNavItem || webItemData155.linkId == opt_data.activeNavItem, isTierOne: opt_data.isTierOne, webItem: webItemData155});
    }
    output += '</ul>';
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.sidebarNavSectionWithItems.soyTemplateName = 'stash.widget.sidebarNavSectionWithItems';
}


stash.widget.sidebarNavItemWebItem = function(opt_data, opt_ignored) {
  var param172 = '';
  if (opt_data.webItem.moduleKey) {
    var badgeContentList175 = WebFragments.getWebPanels(opt_data.webItem.moduleKey + '.badge',opt_data.context ? opt_data.context : null).map(function(webPanel) { return soydata.VERY_UNSAFE.ordainSanitizedHtml(webPanel); });
    var badgeContentListLen175 = badgeContentList175.length;
    for (var badgeContentIndex175 = 0; badgeContentIndex175 < badgeContentListLen175; badgeContentIndex175++) {
      var badgeContentData175 = badgeContentList175[badgeContentIndex175];
      param172 += ' ' + soy.$$escapeHtml(badgeContentData175);
    }
  }
  var output = '' + widget.aui.sidebarNavItem({extraClasses: opt_data.webItem.styleClass, iconClass: opt_data.webItem.params['stashIconClass'], id: opt_data.webItem.linkId, isActive: opt_data.isActive, isTierOne: opt_data.isTierOne, text: opt_data.webItem.linkText, tooltip: opt_data.webItem.tooltip, url: opt_data.webItem.url, badgeContent: param172});
  return output;
};
if (goog.DEBUG) {
  stash.widget.sidebarNavItemWebItem.soyTemplateName = 'stash.widget.sidebarNavItemWebItem';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:branch-layout', location = '/static/layout/branch/branch.js' */
define("layout/branch",["jquery","lodash","stash/api/util/navbuilder","util/events","model/page-state","model/revision-reference","feature/repository/revision-reference-selector","exports"],function(F,C,H,E,D,G,B,A){A.onReady=function(I,J){J=J||"at";var L=function(M){M=B.prototype._addRefTypeAndRepositoryToResults.call(this,M);var N=H.parse(window.location.href);C.each(M.values,function(P){if(!P.url){var O=N.clone();O.replaceQueryParam(J,P.id);P.url=O.query()+(O.anchor()?O.anchor():"")}});return M};var K=new B(F(I),{id:"repository-layout-revision-selector-dialog",dataTransform:L});D.setRevisionRef(K.getSelectedItem());E.on("stash.feature.repository.revisionReferenceSelector.revisionRefChanged",function(M){if(this===K){E.trigger("stash.layout.branch.revisionRefChanged",this,M);D.setRevisionRef(K.getSelectedItem())}});E.on("stash.page.*.revisionRefChanged",function(M){K.setSelectedItem(G.hydrateDeprecated(M))});E.on("stash.widget.keyboard-shortcuts.register-contexts",function(M){M.enableContext("branch")});F("#branch-actions-menu").on("aui-dropdown2-show",function(){E.trigger("stash.layout.branch.actions.dropdownShown");F("#branch-actions").focus();F(this).html(stash.layout.branch.actionsDropdownMenu({repository:D.getRepository().toJSON(),atRevisionRef:D.getRevisionRef().toJSON()}))}).on("aui-dropdown2-hide",function(){E.trigger("stash.layout.branch.actions.dropdownHidden")})}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:branch-layout', location = '/static/layout/branch/branch-actions-clientside.soy' */
// This file was automatically generated from branch-actions-clientside.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.layout.branch.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.layout == 'undefined') { stash.layout = {}; }
if (typeof stash.layout.branch == 'undefined') { stash.layout.branch = {}; }


stash.layout.branch.actionsDropdownMenu = function(opt_data, opt_ignored) {
  var output = '<ul>';
  var webItemList4 = WebFragments.getWebItems('stash.branch.layout.actions.dropdown',{repository: opt_data.repository, atRevisionRef: opt_data.atRevisionRef});
  var webItemListLen4 = webItemList4.length;
  for (var webItemIndex4 = 0; webItemIndex4 < webItemListLen4; webItemIndex4++) {
    var webItemData4 = webItemList4[webItemIndex4];
    output += '<li class="branch-action-item">' + stash.widget.webItem(soy.$$augmentMap(webItemData4, {url: webItemData4.url ? webItemData4.url : '#'})) + '</li>';
  }
  output += '</ul>';
  return output;
};
if (goog.DEBUG) {
  stash.layout.branch.actionsDropdownMenu.soyTemplateName = 'stash.layout.branch.actionsDropdownMenu';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:files-layout', location = '/static/layout/files/files.js' */
define("layout/files",["util/events","model/page-state","model/path","model/revision-reference","widget/breadcrumbs","exports"],function(C,B,D,F,E,A){A.onReady=function(K,J,L,I){B.setFilePath(new D(K));var H=new F(J);var G=new E(L);C.on("stash.widget.breadcrumbs.urlChanged",function(M){if(this===G){C.trigger("stash.layout.files.urlChanged",this,M)}});C.on("stash.page.*.revisionRefChanged",function(M){H=F.hydrateDeprecated(M);G.update(H,new D(B.getFilePath()),I)});C.on("stash.page.*.pathChanged",function(M){M=new D(M);B.setFilePath(M);G.update(H,M,I)})}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:paragraph', location = '/static/widget/paragraph.soy' */
// This file was automatically generated from paragraph.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.paragraph = function(opt_data, opt_ignored) {
  return '<p' + ((opt_data.extraClasses) ? ' class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + '>' + soy.$$escapeHtml(opt_data.text) + '</p>';
};
if (goog.DEBUG) {
  stash.widget.paragraph.soyTemplateName = 'stash.widget.paragraph';
}
;
;/* module-key = 'com.atlassian.stash.stash-branch-utils:branch-creation-oncreated', location = '/static/branch-creation/branch-oncreated-discovery.js' */
jQuery(document).ready(function(){require(["aui","chaperone","util/client-storage","util/events"],function(b,e,a,c){function f(){var g=a.getFlashItem("stash.branch.created");return g+(30*1000)>new Date().getTime()}function d(){e.registerFeature("branch-created-actions-discovery",[{id:"action-discovery",selector:"#branch-actions",title:"Working with your new branch",content:stash.widget.paragraph({text:"Now that you\u0027ve created a new branch you can start development on it. Find branch-related actions in this menu."}),once:true}])}c.on("stash.feature.branch-creation.branchCreated",function(){a.setFlashItem("stash.branch.created",new Date().getTime())});if(f()){d()}})});;
;/* module-key = 'com.atlassian.stash.stash-repository-ref-sync:ref-sync-banner', location = '/static/feature/sync/banner/ref-sync-banner.js' */
define("feature/sync/banner/ref-sync-banner",["jquery","util/promise","feature/sync/common/ref-sync-common","exports"],function(c,b,d,a){a.onReady=function(){c("#disable-ref-sync").click(function(){b.spinner(c('<div class="spinner"></div>').insertAfter("#disable-ref-sync"),d.enableRefSyncing(false).done(function(){c("#ref-sync-banner").remove()}))})}});jQuery(function(){require("feature/sync/banner/ref-sync-banner").onReady()});;
;/* module-key = 'com.atlassian.analytics.analytics-client:js-events', location = 'js/store-1.3.1.js' */
(function(){var l={},h=window,k=h.document,c="localStorage",n="globalStorage",d="__storejs__",g;l.disabled=false;l.set=function(e,o){};l.get=function(e){};l.remove=function(e){};l.clear=function(){};l.transact=function(e,o){var p=l.get(e);if(typeof p=="undefined"){p={}}o(p);l.set(e,p)};l.serialize=function(e){return JSON.stringify(e)};l.deserialize=function(e){if(typeof e!="string"){return undefined}return JSON.parse(e)};function b(){try{return(c in h&&h[c])}catch(e){return false}}function m(){try{return(n in h&&h[n]&&h[n][h.location.hostname])}catch(e){return false}}if(b()){g=h[c];l.set=function(e,o){if(o===undefined){return l.remove(e)}g.setItem(e,l.serialize(o))};l.get=function(e){return l.deserialize(g.getItem(e))};l.remove=function(e){g.removeItem(e)};l.clear=function(){g.clear()}}else{if(m()){g=h[n][h.location.hostname];l.set=function(e,o){if(o===undefined){return l.remove(e)}g[e]=l.serialize(o)};l.get=function(e){return l.deserialize(g[e]&&g[e].value)};l.remove=function(e){delete g[e]};l.clear=function(){for(var e in g){delete g[e]}}}else{if(k.documentElement.addBehavior){var j,f;try{f=new ActiveXObject("htmlfile");f.open();f.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></frame>');f.close();j=f.w.frames[0].document;g=j.createElement("div")}catch(i){g=k.createElement("div");j=k.body}function a(e){return function(){var p=Array.prototype.slice.call(arguments,0);p.unshift(g);j.appendChild(g);g.addBehavior("#default#userData");g.load(c);var o=e.apply(l,p);j.removeChild(g);return o}}l.set=a(function(p,e,o){if(o===undefined){return l.remove(e)}p.setAttribute(e,l.serialize(o));p.save(c)});l.get=a(function(o,e){return l.deserialize(o.getAttribute(e))});l.remove=a(function(o,e){o.removeAttribute(e);o.save(c)});l.clear=a(function(q){var o=q.XMLDocument.documentElement.attributes;q.load(c);for(var p=0,e;e=o[p];p++){q.removeAttribute(e.name)}q.save(c)})}}}try{l.set(d,d);if(l.get(d)!=d){l.disabled=true}l.remove(d)}catch(i){l.disabled=true}if(typeof module!="undefined"){module.exports=l}else{if(typeof define==="function"&&define.amd){define(l)}else{this.store=l}}})();;
;/* module-key = 'com.atlassian.analytics.analytics-client:js-events', location = 'js/atlassian-analytics.js' */
(function(b){var m=AJS.$.ajax;var h="atlassian-analytics";var g=typeof AJS.contextPath=="function"?AJS.contextPath():typeof AJS.Confluence!="undefined"?AJS.Confluence.getContextPath():window.contextPath!=null?window.contextPath:"";var l=null;var i=null;var d=null;var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(u){var t=Math.random()*16|0,s=u=="x"?t:(t&3|8);return s.toString(16)});var p=function(){var s="unknown";if(document.body.id=="jira"){s="jira"}else{if(document.body.id=="com-atlassian-confluence"){s="confluence"}}i=h+"."+s;d=i+".lock"};var c=function(){if(store.get(d)){return false}store.set(d,n);return(store.get(d)===n)};var q=function(){store.set(d,null)};var f=function(){var t=[],v,w,s,u;if(AJS.EventQueue.length==0){return}t=store.get(i)||t;for(s=0,u=AJS.EventQueue.length;s<u;++s){w=AJS.EventQueue[s];if(w.name){v={name:w.name,properties:w.properties,time:w.time||0};t.push(v)}}AJS.EventQueue.length=0;store.set(i,t)};var e=function(){var t;if(!c()){return}f();t=store.get(i);if(t&&t.length){store.remove(i);q();if(k(t)){var u=new Date().getTime();for(var s=0;s<t.length;s++){if(t[s].time>0){t[s].timeDelta=t[s].time-u}else{t[s].timeDelta=s-t.length}delete t[s].time}l=m({type:"POST",url:g+"/rest/analytics/1.0/publish/bulk",data:JSON.stringify(t),contentType:"application/json",dataType:"json"});l.fail(function(){AJS.EventQueue.concat(t);f()})}}else{q()}};var k=function(u){for(var t=u.length-1;t>=0;t--){var w="";var v=u[t];var s=v.properties;if(typeof v.name==="undefined"){w="you must provide a name for the event."}else{if(typeof s!=="undefined"&&s!==null){if(s.constructor!==Object){w="properties must be an object with key value pairs."}else{a(s)}}}if(w!==""){AJS.log("WARN: Invalid analytics event detected and ignored, "+w+"\nEvent: "+JSON.stringify(v));u.splice(t,1)}}return u.length};var a=function(u){for(var t in u){if(u.hasOwnProperty(t)){var s=u[t];if(typeof s!=="undefined"&&s!==null&&s.toString){u[t]=s.toString()}else{u[t]=""}}}};var j=function(){if(l&&!(l.state()==="resolved"||l.state()==="rejected")){l.abort()}};AJS.EventQueue=AJS.EventQueue||[];var o=Array.prototype.push;AJS.EventQueue.push=function(s){s.time=new Date().getTime();o.call(AJS.EventQueue,s)};AJS.toInit(function(){p();setTimeout(e,500);setInterval(e,5000);r()});b(window).unload(function(){j();f()});AJS.Analytics={triggerPrivacyPolicySafeEvent:function(s,t){AJS.log("WARN: 'triggerPrivacyPolicySafeEvent' has been deprecated");AJS.EventQueue.push({name:s,properties:t})}};AJS.bind("analytics",function(s,t){AJS.EventQueue.push({name:t.name,properties:t.data})});AJS.bind("analyticsEvent",function(s,t){AJS.EventQueue.push({name:t.name,properties:t.data})});var r=function(){if(window.location.pathname.indexOf("/secure/admin/ViewApplicationProperties")>-1){AJS.$("[data-property-id='analytics-enabled']").remove()}else{if(window.location.pathname.indexOf("/secure/admin/EditApplicationProperties")>-1){var t=AJS.$(":contains(Enable Atlassian analytics)");if(t.size()>0){var s=t[t.size()-2];if(s){s.remove()}}}}}}(AJS.$));;
;/* module-key = 'com.atlassian.analytics.analytics-client:policy-update', location = 'js/policy-update.js' */
;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:application-header-administration-cog-resource', location = 'header/cog.js' */
var NavLinks=(function(a){a.ApplicationHeader=function(b){b.Cog=(function(){var c=function(){var d=AJS.$("#system-admin-menu-content");if(d.length>0){return d}var e=AJS.$("#admin-menu-link-content");if(e.length>0){return e}return AJS.$("#bamboo\\.global\\.header-admin\\.menu")};return{getDropdown:c}}());return b}(a.ApplicationHeader||{});return a}(NavLinks||{}));;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:administration-shortcuts-resources', location = 'adminshortcuts/adminshortcuts.soy' */
// This file was automatically generated from adminshortcuts.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace navlinks.templates.adminshortcuts.
 */

if (typeof navlinks == 'undefined') { var navlinks = {}; }
if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
if (typeof navlinks.templates.adminshortcuts == 'undefined') { navlinks.templates.adminshortcuts = {}; }


navlinks.templates.adminshortcuts.section = function(opt_data, opt_ignored) {
  var param5 = '<ul class="aui-list-truncate">';
  var linkList7 = opt_data.links;
  var linkListLen7 = linkList7.length;
  for (var linkIndex7 = 0; linkIndex7 < linkListLen7; linkIndex7++) {
    var linkData7 = linkList7[linkIndex7];
    param5 += '<li><a href="' + soy.$$escapeHtml(linkData7.link) + '">' + soy.$$escapeHtml(linkData7.label) + '</a></li>';
  }
  param5 += '</ul>';
  var output = '' + aui.dropdown2.section({id: 'nl-remote-admin-section', label: "Other applications", content: param5});
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.adminshortcuts.section.soyTemplateName = 'navlinks.templates.adminshortcuts.section';
}
;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:administration-shortcuts-resources', location = 'adminshortcuts/adminnavlinks.js' */
var NavLinks=(function(a){a.AdminShortcuts=(function(){var c=function(){return AJS.$.ajax({url:AJS.contextPath()+"/rest/menu/latest/admin",cache:false,dataType:"json"})};var b=function(){AJS.$("#nl-remote-admin-section").on("click","a",function(){NL.trackEvent("remoteAdminItemSelected",NL.getCurrentApplication(),$(this).attr("href"))})};return{render:function(){c().done(function(e){e=_.reject(e,function(f){return f.local===true});if(e.length){var d=navlinks.templates.adminshortcuts.section({links:e});a.ApplicationHeader.Cog.getDropdown().append(d);b()}})}}}());return a}(NavLinks||{}));;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-projectshortcuts', location = 'projectshortcuts/projectshortcuts.soy' */
// This file was automatically generated from projectshortcuts.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace navlinks.templates.projectshortcuts.
 */

if (typeof navlinks == 'undefined') { var navlinks = {}; }
if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
if (typeof navlinks.templates.projectshortcuts == 'undefined') { navlinks.templates.projectshortcuts = {}; }


navlinks.templates.projectshortcuts.dialogContent = function(opt_data, opt_ignored) {
  return '' + ((opt_data.localShortcuts && opt_data.localShortcuts.length > 0) ? navlinks.templates.projectshortcuts.dialogContentShortcuts({shortcuts: opt_data.localShortcuts, listClass: 'projectshortcut-links'}) : '') + ((opt_data.remoteShortcuts != null) ? (opt_data.remoteShortcuts.length > 0) ? '<h2 class="projectshortcuts-heading">Related Links</h2>' + navlinks.templates.projectshortcuts.dialogContentShortcuts(soy.$$augmentMap(opt_data.remoteShortcuts, {shortcuts: opt_data.remoteShortcuts, listClass: 'projectshortcut-links'})) : '' : navlinks.templates.projectshortcuts.dialogLoading(null));
};
if (goog.DEBUG) {
  navlinks.templates.projectshortcuts.dialogContent.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogContent';
}


navlinks.templates.projectshortcuts.headingWrapper = function(opt_data, opt_ignored) {
  return '<div class="project-dialog-header-wrapper"><div class="project-header"><img class="project-img" src="' + soy.$$escapeHtml(opt_data.logoUrl) + '"><h2 class="dialog-title">' + soy.$$escapeHtml(opt_data.title) + '</h2></div><div class="project-content-wrapper">' + soy.$$filterNoAutoescape(opt_data.contentHtml) + '</div></div>';
};
if (goog.DEBUG) {
  navlinks.templates.projectshortcuts.headingWrapper.soyTemplateName = 'navlinks.templates.projectshortcuts.headingWrapper';
}


navlinks.templates.projectshortcuts.dialogContentShortcuts = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  var output = '<ul' + ((opt_data.listClass) ? ' class="' + soy.$$escapeHtml(opt_data.listClass) + '"' : '') + '>';
  var shortcutList35 = opt_data.shortcuts;
  var shortcutListLen35 = shortcutList35.length;
  for (var shortcutIndex35 = 0; shortcutIndex35 < shortcutListLen35; shortcutIndex35++) {
    var shortcutData35 = shortcutList35[shortcutIndex35];
    output += '<li' + ((shortcutIndex35 == shortcutListLen35 - 1) ? ' class="last"' : '') + '>' + navlinks.templates.projectshortcuts.dialogContentShortcut(shortcutData35) + '</li>';
  }
  output += '</ul>';
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.projectshortcuts.dialogContentShortcuts.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogContentShortcuts';
}


navlinks.templates.projectshortcuts.dialogContentShortcut = function(opt_data, opt_ignored) {
  return '<a href="' + soy.$$escapeHtml(opt_data.link) + '"' + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + '>' + soy.$$escapeHtml(opt_data.label) + '</a>';
};
if (goog.DEBUG) {
  navlinks.templates.projectshortcuts.dialogContentShortcut.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogContentShortcut';
}


navlinks.templates.projectshortcuts.dialogLoading = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '<div class="projectshortcuts-loading">' + ((opt_data.text) ? soy.$$escapeHtml(opt_data.text) : '') + '</div>';
};
if (goog.DEBUG) {
  navlinks.templates.projectshortcuts.dialogLoading.soyTemplateName = 'navlinks.templates.projectshortcuts.dialogLoading';
}
;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-projectshortcuts', location = 'projectshortcuts/projectshortcuts.js' */
(function(e,g){var i,k={},m="key",b="name",j="entity-type";function f(s){var n=e(this),o=n.data(m),q=n.data(b),p=n.data(j);if(typeof o==="undefined"){return}s.preventDefault();i=new AJS.Dialog({width:600,keypressListener:function(u){if(u.which==jQuery.ui.keyCode.ESCAPE){i.remove()}},id:"project-shortcuts-dialog"}).addCancel("Close",function(){i.remove()}).addPanel("",navlinks.templates.projectshortcuts.headingWrapper({title:q,logoUrl:h(),contentHtml:navlinks.templates.projectshortcuts.dialogLoading({text:"Retrieving links…"})})).show();c(i);if(!k[o]){k[o]={entity:{title:q},localShortcuts:null,remoteShortcuts:null};d(AJS.contextPath()+"/rest/project-shortcuts/1.0/local/"+o,{entityType:p}).done(t);d(AJS.contextPath()+"/rest/project-shortcuts/1.0/remote/"+o,{entityType:p}).done(r).fail(function(){var u=i.getCurrentPanel().body.find(".project-content-wrapper");u.find(".projectshortcuts-loading").remove();AJS.messages.error(u,{body:"Could not retrieve remote project shortcuts",closeable:false});c(i)})}else{l(k[o])}function t(u){k[o].localShortcuts=u.shortcuts;l(k[o])}function r(u){k[o].remoteShortcuts=u.shortcuts;l(k[o])}}function h(){return e(".project-shortcut-dialog-trigger img").attr("src")}function l(n){if(n.localShortcuts){i.getCurrentPanel().html(navlinks.templates.projectshortcuts.headingWrapper({title:n.entity.title,logoUrl:h(),contentHtml:navlinks.templates.projectshortcuts.dialogContent(n)}));c(i)}}function a(p){var o=210;if(!p||p.length<=o){return p}var n=o;while(n>0&&p.charAt(n)!=" "){n--}if(n==0){n=o}p=p.substring(0,n);if(p.length>=n){p=p+"..."}return p}function c(n){var q=n.popup.element,p=q.find(".dialog-panel-body"),o=q.find(".dialog-components");p.height("auto");q.height(o.outerHeight()-1);e(".aui-shadow").remove()}function d(n,o){return e.ajax({url:n,cache:false,data:o,dataType:"json"})}e(document).on("click",".project-shortcut-dialog-trigger",f)}(jQuery,window.NL=(window.NL||{})));;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:atlassian-ui-popup-display-controller', location = 'popups/DisplayController.js' */
AJS.Popups=AJS.Popups||{};AJS.Popups.DisplayController=function(){var c=[];var a=false;var b=false;AJS.toInit(function(){setTimeout(function(){AJS.Popups.DisplayController.render()},0)});return{request:function(d){c.push(d);if(a&&b===false){this.render()}},render:function(){c.sort(function(e,d){return e.weight-d.weight});a=true;if(c.length!==0){b=true;c[0].show()}}}}();;
;/* module-key = 'com.atlassian.support.stp:stp-license-status-resources', location = 'js/stp-licenseStatus.js' */
(function(b){var a={destroyBanner:function(){AJS.$("#stp-licenseStatus-banner").slideUp(function(){AJS.$("#stp-licenseStatus-banner").remove()})},remindMeNever:function(c){c.preventDefault();AJS.$.ajax({type:"POST",async:true,url:AJS.contextPath()+"/rest/stp/1.0/license/remindMeNever"});a.destroyBanner()},remindMeLater:function(){AJS.$.ajax({type:"POST",async:true,url:AJS.contextPath()+"/rest/stp/1.0/license/remindMeLater"});a.destroyBanner()},recordOutboundLink:function(c,d){var e=e||[];e.push(["_setAccount",c],["_setCampSourceKey","STP"],["_setCampMediumKey","renewals_reminder"],["_setCampNameKey",d],["_trackEvent","renewal"])},createBanner:function(){AJS.$.ajax({type:"GET",dataType:"json",async:true,url:AJS.contextPath()+"/rest/stp/1.0/license/status",statusCode:{200:function(f){var c="\n<div id='stp-licenseStatus-banner' class='aui-message warning'>\n";var e=f.daysToExpiry;var d="http://www.atlassian.com/company/contact?utm_source=STP&utm_medium=renewals_reminder&utm_campaign=";var g="http://www.my.atlassian.com?utm_source=STP&utm_medium=renewals_reminder&utm_campaign=";if(e<=30&&e>14){licenseLink=d+"renewals_30_reminder";c+=AJS.format("Your {0} license maintenance expires in {1} days. {2}Contact Atlassian{3}, {4}remind me later{5} or {6}never remind me again{7}.",f.productName,30,"<a id='stp-licenseStatus-contactAtlassian' target='_blank' href=\""+licenseLink+'">',"</a>","<a id='stp-licenseStatus-remindMeLater' href='#'>","</a>","<a id='stp-licenseStatus-remindMeNever' href='#'>","</a>");c+="<span class ='aui-icon icon-warning'></span>"}else{if(e<=14&&e>7){licenseLink=d+"renewals_14_reminder";c+=AJS.format("You will lose access to Support and Updates for {0} in {1} days. {2}Contact Atlassian{3}, {4}remind me later{5} or {6}never remind me again{7}.",f.productName,14,"<a id='stp-licenseStatus-contactAtlassian' target='_blank' href=\""+licenseLink+'">',"</a>","<a id='stp-licenseStatus-remindMeLater' href='#'>","</a>","<a id='stp-licenseStatus-remindMeNever' href='#'>","</a>");c+="<span class ='aui-icon icon-warning'></span>"}else{if(e<=7){licenseLink=g+"renewals_7_reminder";c+=AJS.format("Your {0} Support and Updates access expires in {1} days. You can renew via {2}my.atlassian.com{3}. {4}Remind me later{5} or {6}never remind me again{7}.",f.productName,7,"<a id='stp-licenseStatus-renewNow' target='_blank' href=\""+licenseLink+'">',"</a>","<a id='stp-licenseStatus-remindMeLater' href='#'>","</a>","<a id='stp-licenseStatus-remindMeNever' href='#'>","</a>");c+="<span class ='aui-icon icon-warning'></span>"}}}c+="\n</div>";b(c).prependTo(document.body);AJS.$("#stp-licenseStatus-remindMeNever").click(a.remindMeNever);AJS.$("#stp-licenseStatus-remindMeLater").click(function(h){h.preventDefault();a.remindMeLater()});AJS.$("#stp-licenseStatus-contactAtlassian").click(function(h){a.remindMeLater()});AJS.$("#stp-licenseStatus-renewNow").click(function(h){a.remindMeLater()})}}})}};AJS.$(document).ready(function(){b("#stp-licenseStatus-banner").length||a.createBanner()})})(AJS.$);;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher.soy' */
// This file was automatically generated from appswitcher.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace navlinks.templates.appswitcher.
 */

if (typeof navlinks == 'undefined') { var navlinks = {}; }
if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
if (typeof navlinks.templates.appswitcher == 'undefined') { navlinks.templates.appswitcher = {}; }


navlinks.templates.appswitcher.linkSection = function(opt_data, opt_ignored) {
  var output = '';
  if (opt_data.list.length > 0) {
    output += '<div class="aui-nav-heading sidebar-section-header">' + soy.$$escapeHtml(opt_data.title) + '</div><ul class="aui-nav nav-links">';
    var linkList8 = opt_data.list;
    var linkListLen8 = linkList8.length;
    for (var linkIndex8 = 0; linkIndex8 < linkListLen8; linkIndex8++) {
      var linkData8 = linkList8[linkIndex8];
      output += navlinks.templates.appswitcher.applicationsItem(linkData8);
    }
    output += '</ul>';
  }
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.linkSection.soyTemplateName = 'navlinks.templates.appswitcher.linkSection';
}


navlinks.templates.appswitcher.applicationsItem = function(opt_data, opt_ignored) {
  return '<li class="nav-link"><a href="' + soy.$$escapeHtml(opt_data.link) + '" class="interactive' + ((opt_data.self) ? ' checked' : '') + '" title="' + soy.$$escapeHtml(opt_data.link) + '"><span class="nav-link-label">' + soy.$$escapeHtml(opt_data.label) + '</span></a></li>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.applicationsItem.soyTemplateName = 'navlinks.templates.appswitcher.applicationsItem';
}


navlinks.templates.appswitcher.shortcutsItem = function(opt_data, opt_ignored) {
  return '<li class="nav-link"><a href="' + soy.$$escapeHtml(opt_data.link) + '" class="interactive' + ((opt_data.self) ? ' checked' : '') + '" title="' + soy.$$escapeHtml(opt_data.link) + '"><span class="nav-link-label">' + soy.$$escapeHtml(opt_data.label) + '</span>' + ((opt_data.showDescription && opt_data.description) ? '<span class="nav-link-description">' + soy.$$escapeHtml(opt_data.description) + '</span>' : '') + '</a></li>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.shortcutsItem.soyTemplateName = 'navlinks.templates.appswitcher.shortcutsItem';
}


navlinks.templates.appswitcher.error = function(opt_data, opt_ignored) {
  return '<div class="app-switcher-error">' + soy.$$filterNoAutoescape("Something went wrong, please \x3cspan class\x3d\x22app-switcher-retry\x22\x3etry again\x3c/span\x3e.") + '</div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.error.soyTemplateName = 'navlinks.templates.appswitcher.error';
}


navlinks.templates.appswitcher.sidebarContents = function(opt_data, opt_ignored) {
  return '<div class="aui-page-panel-nav"><nav class="aui-navgroup aui-navgroup-vertical"><div class="app-switcher-section app-switcher-applications"><div class="aui-nav-heading">' + soy.$$escapeHtml("Application Links") + '</div><div class="app-switcher-loading">' + soy.$$filterNoAutoescape("Loading\x26hellip;") + '</div></div><div class="app-switcher-section app-switcher-shortcuts"><div class="aui-nav-heading">' + soy.$$escapeHtml("Shortcuts") + '</div><div class="app-switcher-loading">' + soy.$$filterNoAutoescape("Loading\x26hellip;") + '</div></div></nav></div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.sidebarContents.soyTemplateName = 'navlinks.templates.appswitcher.sidebarContents';
}


navlinks.templates.appswitcher.trigger = function(opt_data, opt_ignored) {
  return '<span class="aui-icon aui-icon-small aui-iconfont-appswitcher">' + soy.$$escapeHtml("Linked Applications") + '</span>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.trigger.soyTemplateName = 'navlinks.templates.appswitcher.trigger';
}


navlinks.templates.appswitcher.projectHeaderSection = function(opt_data, opt_ignored) {
  return '<div class="app-switcher-title">' + aui.avatar.avatar({size: 'large', avatarImageUrl: opt_data.avatarUrl, isProject: true, title: opt_data.name}) + '<div class="sidebar-project-name">' + soy.$$escapeHtml(opt_data.name) + '</div></div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.projectHeaderSection.soyTemplateName = 'navlinks.templates.appswitcher.projectHeaderSection';
}


navlinks.templates.appswitcher.cogDropdown = function(opt_data, opt_ignored) {
  var output = '';
  var dropdownList__soy74 = '' + navlinks.templates.appswitcher.dropdownList({list: opt_data.links});
  output += aui.dropdown2.dropdown2({menu: {id: opt_data.id, content: dropdownList__soy74, extraClasses: 'aui-style-default sidebar-customize-section'}, trigger: {showIcon: false, content: '<span class="aui-icon aui-icon-small aui-iconfont-configure"></span>', container: '#app-switcher'}});
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.cogDropdown.soyTemplateName = 'navlinks.templates.appswitcher.cogDropdown';
}


navlinks.templates.appswitcher.dropdownList = function(opt_data, opt_ignored) {
  var output = '<ul class="sidebar-admin-links">';
  var linkList82 = opt_data.list;
  var linkListLen82 = linkList82.length;
  for (var linkIndex82 = 0; linkIndex82 < linkListLen82; linkIndex82++) {
    var linkData82 = linkList82[linkIndex82];
    output += '<li class="nav-link"><a href="' + soy.$$escapeHtml(linkData82.href) + '" title="' + soy.$$escapeHtml(linkData82.title) + '"><span class="nav-link-label">' + soy.$$escapeHtml(linkData82.label) + '</span></a></li>';
  }
  output += '</ul>';
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.dropdownList.soyTemplateName = 'navlinks.templates.appswitcher.dropdownList';
}


navlinks.templates.appswitcher.switcher = function(opt_data, opt_ignored) {
  var output = '';
  if (true) {
    if (AJS.DarkFeatures.isEnabled('rotp.sidebar')) {
      var sidebarContents__soy97 = '' + navlinks.templates.appswitcher.sidebarContents(null);
      var triggerContent__soy99 = '' + navlinks.templates.appswitcher.trigger(null);
      output += navlinks.templates.appswitcher.sidebar({sidebar: {id: 'app-switcher', content: sidebarContents__soy97}, trigger: {showIcon: false, content: triggerContent__soy99}}) + '<script>\n                (function (NL) {\n                    var initialise = function () {\n                        new NL.SideBar({\n                            sidebarContents: \'#app-switcher\'\n                        });\n                    };\n                    if (NL.SideBar) {\n                        initialise();\n                    } else {\n                        NL.onInit = initialise;\n                    }\n                }(window.NL = (window.NL || {})));\n                window.NL.isUserAdmin = ' + soy.$$escapeHtml(false) + '<\/script>';
    } else {
      output += navlinks.templates.appswitcher_old.switcher(null);
    }
  }
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.switcher.soyTemplateName = 'navlinks.templates.appswitcher.switcher';
}


navlinks.templates.appswitcher.sidebar = function(opt_data, opt_ignored) {
  return '<a href="' + soy.$$escapeHtml(opt_data.sidebar.id) + '" class="sidebar-trigger app-switcher-trigger" aria-owns="' + soy.$$escapeHtml(opt_data.sidebar.id) + '" aria-haspopup="true">' + soy.$$filterNoAutoescape(opt_data.trigger.content) + '</a><div id=' + soy.$$escapeHtml(opt_data.sidebar.id) + ' class="app-switcher-sidebar aui-style-default sidebar-offscreen">' + soy.$$filterNoAutoescape(opt_data.sidebar.content) + '</div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher.sidebar.soyTemplateName = 'navlinks.templates.appswitcher.sidebar';
}
;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher.js' */
(function(c,a){a.SideBar=function(d){var e=this;this.$sidebar=null;d=c.extend({sidebarContents:null},d);this.getLinks=function(){return c.ajax({url:AJS.contextPath()+"/rest/menu/latest/appswitcher",cache:false,dataType:"json"}).done(this.updateAppLinks).fail(this.showAppSwitcherError)};this.populateProjectHeader=function(g,f){e.getSidebar().find(".app-switcher-shortcuts .aui-nav-heading").after(navlinks.templates.appswitcher.projectHeaderSection({avatarUrl:f,name:g}))};this.getProjectData=function(){var f=c(".project-shortcut-dialog-trigger"),g=f.data("key"),h=f.data("entity-type");if(f.size()==0||!g||!h){c(".app-switcher-shortcuts").remove();return}var j,i;i=c.ajax({url:AJS.contextPath()+"/rest/project-shortcuts/1.0/local/"+g,cache:false,data:{entityType:h},dataType:"json"});j=c.ajax({url:AJS.contextPath()+"/rest/project-shortcuts/1.0/remote/"+g,cache:false,data:{entityType:h},dataType:"json"});c.when(i,j).then(function(l,k){e.updateProjectShortcuts(l,k,{key:g,entityType:h,name:f.data("name"),avatarUrl:f.find("img").prop("src")})},e.showProjectShortcutsError)};this.getSidebar=function(){if(!this.$sidebar){this.$sidebar=c(d.sidebarContents)}return this.$sidebar};this.addApplicationsCog=function(){c(".app-switcher-applications .aui-nav-heading").before(navlinks.templates.appswitcher.cogDropdown({id:"sidebar-applications-admin-dropdown",links:[{href:AJS.contextPath()+"/plugins/servlet/customize-application-navigator",label:"Customize navigator",title:"Add new entries, hide existing or restrict who sees what"},{href:AJS.contextPath()+"/plugins/servlet/applinks/listApplicationLinks",label:"Manage application links",title:"Link to more Atlassian applications"}]}))};this.addProjectShortcutsCog=function(f,h){var g=[{href:AJS.contextPath()+"/plugins/servlet/custom-content-links-admin?entityKey="+f,label:"Customize shortcuts",title:""}];if(e.entityMappings[h]){g.push({href:e.generateEntityLinksUrl(f,e.entityMappings[h]),label:"Manage product links",title:""})}e.getSidebar().find(".app-switcher-shortcuts .aui-nav-heading").before(navlinks.templates.appswitcher.cogDropdown({id:"sidebar-project-shortcuts-admin-dropdown",links:g}))};this.updateAppLinks=function(f){c(function(){e.getSidebar().find(".app-switcher-applications").html(navlinks.templates.appswitcher.linkSection({title:"Application Links",list:f}));if(a.isUserAdmin){e.addApplicationsCog()}e.bindAnalyticsHandlers(e.getSidebar(),f)})};this.updateProjectShortcuts=function(i,g,h){var j=i[0].shortcuts,f=g[0].shortcuts;e.getSidebar().find(".app-switcher-shortcuts").html(navlinks.templates.appswitcher.linkSection({title:"Shortcuts",list:j.concat(f)}));if(a.isUserAdmin){e.addProjectShortcutsCog(h.key,h.entityType)}e.populateProjectHeader(h.name,h.avatarUrl);e.bindAnalyticsHandlers(e.getSidebar(),data)};this.entityMappings={"confluence.space":"com.atlassian.applinks.api.application.confluence.ConfluenceSpaceEntityType","jira.project":"com.atlassian.applinks.api.application.jira.JiraProjectEntityType","bamboo.project":"com.atlassian.applinks.api.application.bamboo.BambooProjectEntityType","stash.project":"com.atlassian.applinks.api.application.stash.StashProjectEntityType"};this.generateEntityLinksUrl=function(f,g){if(g===e.entityMappings["confluence.space"]){return AJS.contextPath()+"/spaces/listentitylinks.action?typeId="+g+"&key="+f}else{return AJS.contextPath()+"/plugins/servlet/applinks/listEntityLinks/"+g+"/"+f}};this.showAppSwitcherError=function(){c(function(){var f=e.getSidebar();f.find(".app-switcher-applications .app-switcher-loading").replaceWith(navlinks.templates.appswitcher.error());f.off(".appswitcher").on("click.appswitcher",".app-switcher-retry",c.proxy(e.retryLoading,e))})};this.showProjectShortcutsError=function(){c(function(){var f=e.getSidebar();f.find(".app-switcher-shortcuts .app-switcher-loading").replaceWith(navlinks.templates.appswitcher.error());f.off(".appswitcher").on("click.appswitcher",".app-switcher-retry",c.proxy(e.retryLoading,e))})};this.retryLoading=function(f){this.getSidebar().html(navlinks.templates.appswitcher.sidebarContents());this.getLinks();this.getProjectData();f&&f.stopPropagation()};this.bindAnalyticsHandlers=function(f,g){};this.getLinks();c(this.getProjectData);this.toggleSidebar=function(h){var i=e.getSidebar(),g=c("body"),f=c(window.document);if(!g.hasClass("app-switcher-open")){var k=c("#header");i.css("left",-i.width());i.parent("body").length||i.appendTo("body");b({data:i});i.animate({left:0},300);function j(l){var n=l.target&&c(l.target),m=l.keyCode;if(l.originalEvent===h.originalEvent){return}if(n&&!m&&!(n.closest(i).length||n.closest(k).length)&&h.which==1&&!(l.shiftKey||l.ctrlKey||l.metaKey)){e.toggleSidebar()}else{if(m===27){e.toggleSidebar()}}}f.on("click.appSwitcher",j);f.on("keydown.appSwitcher",j);f.on("scroll.appSwitcher",i,b)}else{f.off(".appSwitcher")}g.toggleClass("app-switcher-open")};c("#header").on("click",".app-switcher-trigger",this.toggleSidebar)};function b(f){var d=c(document).scrollTop(),g=c("#header"),e=(g.height()+g.offset().top)-d;if(e>=0){f.data.css({top:e,position:"fixed"})}else{f.data.css({top:0,left:0,position:"fixed"})}}if(a.onInit){a.onInit()}}(jQuery,window.NL=(window.NL||{})));;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher_old.js' */
(function(e,c){c.AppSwitcher=function(f){var g=AJS.contextPath()+"/plugins/servlet/customize-application-navigator";var h=this;this.$dropdown=null;f=e.extend({dropdownContents:null},f);this.getLinks=function(){return e.ajax({url:AJS.contextPath()+"/rest/menu/latest/appswitcher",cache:false,dataType:"json"}).done(this.updateDropdown).fail(this.showError)};this.getDropdown=function(){if(!this.$dropdown){this.$dropdown=e(f.dropdownContents)}return this.$dropdown};this.updateDropdown=function(i){e(function(){h.getDropdown().html(navlinks.templates.appswitcher_old.applications({apps:i,showAdminLink:c.isUserAdmin,adminLink:g}));h.bindAnalyticsHandlers(h.getDropdown(),i);h.processSuggestionApps(i)})};this.bindAnalyticsHandlers=function(i,j){};this.processSuggestionApps=function(i){e.ajax({type:"GET",dataType:"json",contentType:"application/json; charset=UTF-8",url:AJS.contextPath()+"/rest/menu/latest/isAppSuggestionAvailable"}).done(function(j){if(j===true){h.handleSuggestionApps(i)}})};this.handleSuggestionApps=function(k){var l=_.map(k,function(m){return m.applicationType.toLowerCase()});$suggestionApps=e("<div id='app-switcher-suggestion-apps' class='aui-dropdown2-section'/>");$suggestionApps.html(navlinks.templates.appswitcher_old.suggestionApps);var j=$suggestionApps.find(".suggestion-apps");var i=false;_.each(a,function(m){if(!_.contains(l,m.appName)){i=true;j.append(navlinks.templates.appswitcher_old.suggestionApp({appName:m.appName,appDesc:m.appDesc}))}});if(!i){return}e("#app-switcher").append($suggestionApps);e(".app-discovery-suggestion-app").click(function(){AJS.trigger("analytics",{name:"appswitcher.discovery.user.select."+e(this).find("a").attr("id").toLowerCase()});window.open(e(this).find("a").attr("title"),"_blank")});e(".app-discovery-suggestion-app").hover(function(){e(this).find("a").removeClass("active").removeClass("aui-dropdown2-active")});e(".app-discovery-cancel-button").click(function(){AJS.trigger("analytics",{name:"appswitcher.discovery.nothanks.button.click"});d(b,"true");$suggestionApps.remove()})};this.showError=function(){e(function(){h.getDropdown().html(navlinks.templates.appswitcher_old.error()).off(".appswitcher").on("click.appswitcher",".app-switcher-retry",e.proxy(h.retryLoading,h))})};this.retryLoading=function(i){this.getDropdown().html(navlinks.templates.appswitcher_old.loading());this.getLinks();i&&i.stopPropagation()};this.getLinks()};var b="key-no-thanks";var a=[{appName:"jira",appDesc:"Issue & Project Tracking Software"},{appName:"confluence",appDesc:"Collaboration and content sharing"},{appName:"bamboo",appDesc:"Continuous integration"}];var d=function(f,g){e.ajax({url:AJS.contextPath()+"/rest/menu/latest/userdata/",type:"PUT",contentType:"application/json",data:JSON.stringify({key:f,value:g})})};if(c.onInit){c.onInit()}}(jQuery,window.NL=(window.NL||{})));;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/appswitcher_old.soy' */
// This file was automatically generated from appswitcher_old.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace navlinks.templates.appswitcher_old.
 */

if (typeof navlinks == 'undefined') { var navlinks = {}; }
if (typeof navlinks.templates == 'undefined') { navlinks.templates = {}; }
if (typeof navlinks.templates.appswitcher_old == 'undefined') { navlinks.templates.appswitcher_old = {}; }


navlinks.templates.appswitcher_old.applications = function(opt_data, opt_ignored) {
  return '' + navlinks.templates.appswitcher_old.applicationsSection({list: opt_data.apps, listClass: 'nav-links', showDescription: opt_data.showDescription}) + ((opt_data.custom) ? navlinks.templates.appswitcher_old.applicationsSection({list: opt_data.custom, showDescription: opt_data.showDescription}) : '') + ((opt_data.showAdminLink) ? navlinks.templates.appswitcher_old.adminSection(opt_data) : '');
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.applications.soyTemplateName = 'navlinks.templates.appswitcher_old.applications';
}


navlinks.templates.appswitcher_old.applicationsSection = function(opt_data, opt_ignored) {
  var output = '';
  if (opt_data.list.length > 0) {
    var param19 = '<ul' + ((opt_data.listClass) ? ' class="' + soy.$$escapeHtml(opt_data.listClass) + '"' : '') + '>';
    var linkList27 = opt_data.list;
    var linkListLen27 = linkList27.length;
    for (var linkIndex27 = 0; linkIndex27 < linkListLen27; linkIndex27++) {
      var linkData27 = linkList27[linkIndex27];
      param19 += navlinks.templates.appswitcher_old.applicationsItem(soy.$$augmentMap(linkData27, {showDescription: opt_data.showDescription}));
    }
    param19 += '</ul>';
    output += aui.dropdown2.section({content: param19});
  }
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.applicationsSection.soyTemplateName = 'navlinks.templates.appswitcher_old.applicationsSection';
}


navlinks.templates.appswitcher_old.applicationsItem = function(opt_data, opt_ignored) {
  return '<li class="nav-link' + ((opt_data.self) ? ' nav-link-local' : '') + '"><a href="' + soy.$$escapeHtml(opt_data.link) + '" class="aui-dropdown2-radio interactive' + ((opt_data.self) ? ' checked' : '') + '" title="' + soy.$$escapeHtml(opt_data.link) + '"><span class="nav-link-label">' + soy.$$escapeHtml(opt_data.label) + '</span>' + ((opt_data.showDescription && opt_data.description) ? '<span class="nav-link-description">' + soy.$$escapeHtml(opt_data.description) + '</span>' : '') + '</a></li>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.applicationsItem.soyTemplateName = 'navlinks.templates.appswitcher_old.applicationsItem';
}


navlinks.templates.appswitcher_old.adminSection = function(opt_data, opt_ignored) {
  return '' + aui.dropdown2.section({content: '<ul class="nav-links"><li><a class="nav-link-edit-wrapper" href="' + soy.$$escapeHtml(opt_data.adminLink) + '"><span class="nav-link-edit">' + soy.$$filterNoAutoescape("Configure\x26hellip;") + '</span></a></li></ul>'});
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.adminSection.soyTemplateName = 'navlinks.templates.appswitcher_old.adminSection';
}


navlinks.templates.appswitcher_old.error = function(opt_data, opt_ignored) {
  return '<div class="app-switcher-error">' + soy.$$filterNoAutoescape("Something went wrong, please \x3cspan class\x3d\x22app-switcher-retry\x22\x3etry again\x3c/span\x3e.") + '</div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.error.soyTemplateName = 'navlinks.templates.appswitcher_old.error';
}


navlinks.templates.appswitcher_old.loading = function(opt_data, opt_ignored) {
  return '<div class="app-switcher-loading">' + soy.$$filterNoAutoescape("Loading\x26hellip;") + '</div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.loading.soyTemplateName = 'navlinks.templates.appswitcher_old.loading';
}


navlinks.templates.appswitcher_old.trigger = function(opt_data, opt_ignored) {
  return '<span class="aui-icon aui-icon-small aui-iconfont-appswitcher">' + soy.$$escapeHtml("Linked Applications") + '</span>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.trigger.soyTemplateName = 'navlinks.templates.appswitcher_old.trigger';
}


navlinks.templates.appswitcher_old.switcher = function(opt_data, opt_ignored) {
  var output = '';
  if (true) {
    var loadingContent__soy81 = '' + navlinks.templates.appswitcher_old.loading(null);
    var triggerContent__soy83 = '' + navlinks.templates.appswitcher_old.trigger(null);
    output += aui.dropdown2.dropdown2({menu: {id: 'app-switcher', content: loadingContent__soy81, extraClasses: 'aui-style-default'}, trigger: {showIcon: false, content: triggerContent__soy83, extraClasses: 'app-switcher-trigger', extraAttributes: {href: '#app-switcher'}}}) + '<script>\n            (function (NL) {\n                var initialise = function () {\n                    // For some milestones of AUI, the atlassian soy namespace was renamed to aui. Handle that here by ensuring that window.atlassian is defined.\n                    window.atlassian = window.atlassian || window.aui;\n                    new NL.AppSwitcher({\n                        dropdownContents: \'#app-switcher\'\n                    });\n                };\n                if (NL.AppSwitcher) {\n                    initialise();\n                } else {\n                    NL.onInit = initialise;\n                }\n            }(window.NL = (window.NL || {})));\n            window.NL.isUserAdmin = ' + soy.$$escapeHtml(false) + '<\/script>';
  }
  return output;
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.switcher.soyTemplateName = 'navlinks.templates.appswitcher_old.switcher';
}


navlinks.templates.appswitcher_old.suggestionApp = function(opt_data, opt_ignored) {
  return '<li class="app-discovery-suggestion-app"><a id="' + soy.$$escapeHtml(opt_data.appName) + '" href="#" class="app-discovery-link aui-icon-container app-discovery-' + soy.$$escapeHtml(opt_data.appName) + '-product-icon" title="https://www.atlassian.com/software/' + soy.$$escapeHtml(opt_data.appName) + '"/><div class="app-discovery-small">' + soy.$$escapeHtml(opt_data.appDesc) + '</div></li>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.suggestionApp.soyTemplateName = 'navlinks.templates.appswitcher_old.suggestionApp';
}


navlinks.templates.appswitcher_old.suggestionApps = function(opt_data, opt_ignored) {
  return '<ul class=\'nav-links suggestion-apps\'><li><span class=\'app-discovery-suggest-title nav-link-label\'><h6>' + soy.$$escapeHtml("Try other Atlassian apps") + '</h6></span></li></ul><div class=\'buttons-container app-discovery-suggest-apps-buttons\'><div class=\'buttons\'><button class=\'aui-button aui-button-link app-discovery-cancel-button\' name=\'cancel\' accesskey=\'c\' href=\'#\'>' + soy.$$escapeHtml("Don\x27t show this again") + '</button></div></div>';
};
if (goog.DEBUG) {
  navlinks.templates.appswitcher_old.suggestionApps.soyTemplateName = 'navlinks.templates.appswitcher_old.suggestionApps';
}
;
;/* module-key = 'com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu', location = 'appswitcher/inline-dialog.js' */
(function(d){AJS.CustomInlineDialog=AJS.CustomInlineDialog||function(B,n,r,p){p=p||[];if(p.hasOwnProperty("getArrowAttributes")){getArrowAttributesDeprecationLogger()}if(p.hasOwnProperty("getArrowPath")){getArrowPathDeprecationLogger();if(p.hasOwnProperty("gravity")){getArrowPathWithGravityDeprecationLogger()}}if(p.hasOwnProperty("onTop")){onTopDeprecationLogger();if(p.onTop&&p.gravity===undefined){p.gravity="s"}}if(typeof n==="undefined"){n=String(Math.random()).replace(".","");if(d("#inline-dialog-"+n+", #arrow-"+n+", #inline-dialog-shim-"+n).length){throw"GENERATED_IDENTIFIER_NOT_UNIQUE"}}var z=d.extend(false,AJS.CustomInlineDialog.opts,p);if(z.gravity==="w"){z.offsetX=p.offsetX===undefined?10:p.offsetX;z.offsetY=p.offsetY===undefined?0:p.offsetY}var v=function(){return window.Raphael&&p&&(p.getArrowPath||p.getArrowAttributes)};var j;var q;var K;var u=false;var A=false;var I=false;var J;var x;var g=d('<div id="inline-dialog-'+n+'" class="aui-inline-dialog"><div class="aui-inline-dialog-contents contents"></div><div id="arrow-'+n+'" class="aui-inline-dialog-arrow arrow"></div></div>');var m=d("#arrow-"+n,g);var G=g.find(".contents");if(!v()){g.find(".aui-inline-dialog-arrow").addClass("aui-css-arrow")}if(!z.displayShadow){G.addClass("aui-inline-dialog-no-shadow")}if(z.autoWidth){G.addClass("aui-inline-dialog-auto-width")}else{G.css("width",z.width+"px")}G.mouseover(function(O){clearTimeout(q);g.unbind("mouseover")}).mouseout(function(){E()});var D=function(){if(!j){j={popup:g,hide:function(){E(0)},id:n,show:function(){y()},persistent:z.persistent?true:false,reset:function(){function S(U,T){U.css(T.popupCss);if(v()){if(T.gravity==="s"){T.arrowCss.top-=d.browser.msie?10:9}if(!U.arrowCanvas){U.arrowCanvas=Raphael("arrow-"+n,16,16)}var V=z.getArrowPath,W=d.isFunction(V)?V(T):V;U.arrowCanvas.path(W).attr(z.getArrowAttributes())}else{m.removeClass("aui-bottom-arrow aui-left-arrow aui-right-arrow");if(T.gravity==="s"&&!m.hasClass("aui-bottom-arrow")){m.addClass("aui-bottom-arrow")}else{if(T.gravity==="n"){}else{if(T.gravity==="w"){m.addClass("aui-left-arrow")}else{if(T.gravity==="e"){m.addClass("aui-right-arrow")}}}}}m.css(T.arrowCss)}var P=AJS.$(window).height();var Q=Math.round(P*0.75);g.children(".aui-inline-dialog-contents").css("max-height",Q);var O=z.calculatePositions(g,x,J,z);if(O.hasOwnProperty("displayAbove")){displayAboveDeprecationLogger();O.gravity=O.displayAbove?"s":"n"}S(g,O);g.fadeIn(z.fadeTime,function(){});if(d.browser.msie&&~~(d.browser.version)<10){var R=d("#inline-dialog-shim-"+n);if(!R.length){d(g).prepend(d('<iframe class = "inline-dialog-shim" id="inline-dialog-shim-'+n+'" frameBorder="0" src="javascript:false;"></iframe>'))}R.css({width:G.outerWidth(),height:G.outerHeight()})}}}}return j};var y=function(){if(g.is(":visible")){return}K=setTimeout(function(){if(!I||!A){return}z.addActiveClass&&d(B).addClass("active");u=true;if(!z.persistent){H()}AJS.CustomInlineDialog.current=D();d(document).trigger("showLayer",["inlineDialog",D()]);D().reset()},z.showDelay)};var E=function(O){if(typeof O=="undefined"&&z.persistent){return}A=false;if(u&&z.preHideCallback.call(g[0].popup)){O=(O==null)?z.hideDelay:O;clearTimeout(q);clearTimeout(K);if(O!=null){q=setTimeout(function(){l();z.addActiveClass&&d(B).removeClass("active");g.fadeOut(z.fadeTime,function(){z.hideCallback.call(g[0].popup)});if(g.arrowCanvas){g.arrowCanvas.remove();g.arrowCanvas=null}u=false;A=false;d(document).trigger("hideLayer",["inlineDialog",D()]);AJS.CustomInlineDialog.current=null;if(!z.cacheContent){I=false;w=false}},O)}}};var F=function(R,P){var O=d(P);z.upfrontCallback.call({popup:g,hide:function(){E(0)},id:n,show:function(){y()}});g.each(function(){if(typeof this.popup!="undefined"){this.popup.hide()}});if(z.closeOthers){d(".aui-inline-dialog").each(function(){!this.popup.persistent&&this.popup.hide()})}x={target:O};if(!R){J={x:O.offset().left,y:O.offset().top}}else{J={x:R.pageX,y:R.pageY}}if(!u){clearTimeout(K)}A=true;var Q=function(){w=false;I=true;z.initCallback.call({popup:g,hide:function(){E(0)},id:n,show:function(){y()}});y()};if(!w){w=true;if(d.isFunction(r)){r(G,P,Q)}else{d.get(r,function(T,S,U){G.html(z.responseHandler(T,S,U));I=true;z.initCallback.call({popup:g,hide:function(){E(0)},id:n,show:function(){y()}});y()})}}clearTimeout(q);if(!u){y()}return false};g[0].popup=D();var w=false;var t=false;var s=function(){if(!t){d(z.container).append(g);t=true}};var o=d(B);if(z.onHover){if(z.useLiveEvents){if(o.selector){d(document).on("mousemove",o.selector,function(O){s();F(O,this)}).on("mouseout",o.selector,function(){E()})}else{AJS.log("Warning: inline dialog trigger elements must have a jQuery selector when the useLiveEvents option is enabled.")}}else{o.mousemove(function(O){s();F(O,this)}).mouseout(function(){E()})}}else{if(!z.noBind){if(z.useLiveEvents){if(o.selector){d(document).on("click",o.selector,function(O){s();if(M()){g.hide()}else{F(O,this)}return false}).on("mouseout",o.selector,function(){E()})}else{AJS.log("Warning: inline dialog trigger elements must have a jQuery selector when the useLiveEvents option is enabled.")}}else{o.click(function(O){s();if(M()){g.hide()}else{F(O,this)}return false}).mouseout(function(){E()})}}}var M=function(){return u&&z.closeOnTriggerClick};var H=function(){k();f()};var l=function(){C();N()};var i=false;var h=n+".inline-dialog-check";var k=function(){if(!i){d("body").bind("click."+h,function(P){var O=d(P.target);if(O.closest("#inline-dialog-"+n+" .contents").length===0){E(0)}});i=true}};var C=function(){if(i){d("body").unbind("click."+h)}i=false};var L=function(O){if(O.keyCode===27){E(0)}};var f=function(){d(document).on("keydown",L)};var N=function(){d(document).off("keydown",L)};g.show=function(P,O){if(P){P.stopPropagation()}s();if(z.noBind&&!(B&&B.length)){F(P,O===undefined?P.target:O)}else{F(P,B)}};g.hide=function(){E(0)};g.refresh=function(){if(u){D().reset()}};g.getOptions=function(){return z};return g};function c(g){var f=d(g);var h=d.extend({left:0,top:0},f.offset());return{left:h.left,top:h.top,width:f.outerWidth(),height:f.outerHeight()}}function b(h,j,t,f){var m=AJS.$.isFunction(f.offsetX)?f.offsetX(h,j,t,f):f.offsetX;var l=AJS.$.isFunction(f.offsetY)?f.offsetY(h,j,t,f):f.offsetY;var q=AJS.$.isFunction(f.arrowOffsetX)?f.arrowOffsetX(h,j,t,f):f.arrowOffsetX;var p=AJS.$.isFunction(f.arrowOffsetY)?f.arrowOffsetY(h,j,t,f):f.arrowOffsetY;var s=f.container.toLowerCase()!=="body";var g=AJS.$(f.container);var o=s?AJS.$(f.container).parent():AJS.$(window);var r=s?g.offset():{left:0,top:0};var k=s?o.offset():{left:0,top:0};var i=j.target;var u=i.offset();var n=i[0].getBBox&&i[0].getBBox();return{screenPadding:10,arrowMargin:5,window:{top:k.top,left:k.left,scrollTop:o.scrollTop(),scrollLeft:o.scrollLeft(),width:o.width(),height:o.height()},scrollContainer:{width:g.width(),height:g.height()},trigger:{top:u.top-r.top,left:u.left-r.left,width:n?n.width:i.outerWidth(),height:n?n.height:i.outerHeight()},dialog:{width:h.width(),height:h.height(),offset:{top:l,left:m}},arrow:{height:h.find(".arrow").outerHeight(),offset:{top:p,left:q}}}}function e(f,p,G,r){var n=b(f,p,G,r);var j=n.screenPadding;var k=n.window;var t=n.trigger;var D=n.dialog;var i=n.arrow;var z=n.scrollContainer;var E={top:t.top-k.scrollTop,left:t.left-k.scrollLeft};var A=Math.floor(t.height/2);var v=Math.floor(D.height/2);var u=Math.floor(i.height/2);var C=E.left-D.offset.left-j;var H=z.width-E.left-t.width-D.offset.left-j;var B=C>=D.width;var h=H>=D.width;var l=!h&&B?"e":"w";var o=E.top+A-u;var q=k.height-o-i.height;j=Math.min(j,o-n.arrowMargin);j=Math.min(j,q-n.arrowMargin);var g=E.top+A;var x=Math.max(g-j,0);var F=Math.max(k.height-g-j,0);var y=v-D.offset.top>x;var m=v+D.offset.top>F;var w;var s;if(y){w={top:k.scrollTop+j,left:l==="w"?t.left+t.width+D.offset.left:t.left-D.width-D.offset.left};s={top:(t.top+A)-(w.top+u)}}else{if(m){w={top:k.scrollTop+k.height-D.height-j,left:l==="w"?t.left+t.width+D.offset.left:t.left-D.width-D.offset.left};s={top:(t.top+A)-(w.top+u)}}else{w={top:t.top+A-v+D.offset.top,left:l==="w"?t.left+t.width+D.offset.left:t.left-D.width-D.offset.left};s={top:v-u+i.offset.top}}}return{gravity:l,popupCss:w,arrowCss:s}}function a(g,o,z,s){var x=AJS.$.isFunction(s.offsetX)?s.offsetX(g,o,z,s):s.offsetX;var v=AJS.$.isFunction(s.offsetY)?s.offsetY(g,o,z,s):s.offsetY;var m=AJS.$.isFunction(s.arrowOffsetX)?s.arrowOffsetX(g,o,z,s):s.arrowOffsetX;var l=AJS.$.isFunction(s.arrowOffsetY)?s.arrowOffsetY(g,o,z,s):s.arrowOffsetY;var f=c(window);var p=c(o.target);var y=c(g);var j=c(g.find(".aui-inline-dialog-arrow"));var i=p.left+p.width/2;var u=(window.pageYOffset||document.documentElement.scrollTop)+f.height;var k=10;y.top=p.top+p.height+~~v;y.left=p.left+~~x;var r=f.width-(y.left+y.width+k);j.left=i-y.left+~~m;j.top=-(j.height/2);var n=p.top>y.height;var h=(y.top+y.height)<u;var q=(!h&&n)||(n&&s.gravity==="s");if(q){y.top=p.top-y.height-(j.height/2);j.top=y.height}if(s.isRelativeToMouse){if(r<0){y.right=k;y.left="auto";j.left=z.x-(f.width-y.width)}else{y.left=z.x-20;j.left=z.x-y.left}}else{if(r<0){y.right=k;y.left="auto";var w=f.width-y.right;var t=w-y.width;j.right="auto";j.left=i-t-j.width/2}else{if(y.width<=p.width/2){j.left=y.width/2;y.left=i-y.width/2}}}return{gravity:q?"s":"n",displayAbove:q,popupCss:{left:y.left,top:y.top,right:y.right},arrowCss:{left:j.left,top:j.top,right:j.right}}}AJS.CustomInlineDialog.opts={onTop:false,responseHandler:function(g,f,h){return g},closeOthers:true,isRelativeToMouse:false,addActiveClass:true,onHover:false,useLiveEvents:false,noBind:false,fadeTime:100,persistent:false,hideDelay:10000,showDelay:0,width:300,offsetX:0,offsetY:10,arrowOffsetX:0,arrowOffsetY:0,container:"body",cacheContent:true,displayShadow:true,autoWidth:false,gravity:"n",closeOnTriggerClick:false,preHideCallback:function(){return true},hideCallback:function(){},initCallback:function(){},upfrontCallback:function(){},calculatePositions:function(f,i,j,h){h=h||{};var g=h.gravity==="w"?e:a;return g(f,i,j,h)},getArrowPath:function(f){if(f.gravity==="s"){return"M0,8L8,16,16,8"}else{return"M0,8L8,0,16,8"}},getArrowAttributes:function(){return{fill:"#fff",stroke:"#ccc"}}}})(AJS.$);;
;/* module-key = 'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-button-panel', location = '/static/button-panel/sourcetree-button-panel.soy' */
// This file was automatically generated from sourcetree-button-panel.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.sourceTree.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.sourceTree == 'undefined') { stash.sourceTree = {}; }


stash.sourceTree.buttonPanel = function(opt_data, opt_ignored) {
  return '<div class="sourcetree-panel">' + stash.buttons.button({buttonText: opt_data.buttonText, id: opt_data.buttonId, extraClasses: 'sourcetree-button', href: opt_data.sourceTreeActionUrl, isPrimary: true}) + ((opt_data.minVersion) ? '<div class="min-version">' + soy.$$escapeHtml(AJS.format("Requires version {0}+",opt_data.minVersion)) + '</div>' : '') + '<p>' + soy.$$filterNoAutoescape(AJS.format("{0} is the free Git and Mercurial client for Windows or Mac.",'<a href="http://www.sourcetreeapp.com" target="_blank">Atlassian SourceTree</a>')) + '</p></div>';
};
if (goog.DEBUG) {
  stash.sourceTree.buttonPanel.soyTemplateName = 'stash.sourceTree.buttonPanel';
}
;
;/* module-key = 'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-clone', location = '/static/sourcetree-clone/sourcetree-clone.js' */
define("plugin/sourcetree/sourcetree-clone",["jquery","aui","util/events","util/navbuilder","model/page-state","exports"],function(c,a,i,d,g,b){var e=navigator.platform.indexOf("Mac")!==-1;var h=function(l,m){var k=g.getCurrentUser();var j="sourcetree://cloneRepo?type=stash&baseWebUrl="+encodeURIComponent(window.location.origin+a.contextPath())+"&cloneUrl="+encodeURIComponent(m);if(k){j=j+"&user="+encodeURIComponent(k.getName())}c("#sourcetree-clone-button").attr("href",j)};var f=function(){var k=e?1.7:1.2;var j="<div class='min-version'>"+AJS.format("Requires SourceTree v{0}+",k)+"</div>";c("#sourcetree-clone-button").after(j)};b.onReady=function(){a.$(document).ready(f);i.on("stash.feature.repository.clone.protocol.changed",h);i.on("stash.feature.repository.clone.protocol.initial",h)}});require("plugin/sourcetree/sourcetree-clone").onReady();;
;/* module-key = 'com.atlassian.stash.plugin.stash-archive:archive-resources', location = '/static/archive.js' */
define("plugin/download-archive",["jquery","aui","model/page-state","util/navbuilder","exports"],function(d,b,c,e,a){a.onReady=function(g){var i=d(g);var h=function(j){i.attr("href",b.contextPath()+"/plugins/servlet/archive/projects/"+encodeURIComponent(c.getProject().getKey())+"/repos/"+encodeURIComponent(c.getRepository().getSlug())+(j?"?at="+encodeURIComponent(j):""))};var f=c.getRevisionRef()?c.getRevisionRef().id:null;h(f);eve.on("stash.feature.repository.revisionReferenceSelector.revisionRefChanged",function(j,k){h(j.id)})}});AJS.$(function(){require("plugin/download-archive").onReady("#download-archive-button")});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:recent-repositories-menu-resources', location = '/static/layout/base/menu/repositories/recent.soy' */
// This file was automatically generated from recent.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.layout.menu.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.layout == 'undefined') { stash.layout = {}; }
if (typeof stash.layout.menu == 'undefined') { stash.layout.menu = {}; }


stash.layout.menu.loadingRecentReposMenuItem = function(opt_data, opt_ignored) {
  return '<li><span class="loading-recent-repos">' + soy.$$escapeHtml("Loading...") + '</span></li>';
};
if (goog.DEBUG) {
  stash.layout.menu.loadingRecentReposMenuItem.soyTemplateName = 'stash.layout.menu.loadingRecentReposMenuItem';
}


stash.layout.menu.noRecentReposMenuItem = function(opt_data, opt_ignored) {
  return '<li><span class="no-recent-repos">' + soy.$$escapeHtml("No recently viewed repositories") + '</span></li>';
};
if (goog.DEBUG) {
  stash.layout.menu.noRecentReposMenuItem.soyTemplateName = 'stash.layout.menu.noRecentReposMenuItem';
}


stash.layout.menu.errorLoadingRecentReposMenuItem = function(opt_data, opt_ignored) {
  return '<li><span>' + soy.$$escapeHtml("An error occurred") + '</span></li>';
};
if (goog.DEBUG) {
  stash.layout.menu.errorLoadingRecentReposMenuItem.soyTemplateName = 'stash.layout.menu.errorLoadingRecentReposMenuItem';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:recent-repositories-menu-resources', location = '/static/layout/base/menu/repositories/recent.js' */
define("layout/base/menu/recent-repos",["jquery","stash/api/util/navbuilder","util/ajax","util/events","util/html","exports"],function(E,F,D,C,B,A){A.initMenu=function(I){var H=E("#"+B.sanitizeId(E("#"+I).attr("aria-owns"))).addClass("recent-repositories-menu"),K=H.find(".recent-repositories-section ul"),J=E(stash.layout.menu.loadingRecentReposMenuItem());H.on("aui-dropdown2-show",function(){C.trigger("internal.stash.ui.nav.repositories.opened")});H.on("click","a",function(){var L=E(this).closest(".aui-dropdown2-section");if(L.is(".recent-repositories-section")){C.trigger("internal.stash.ui.nav.repositories.item.clicked",null,{repositoryId:E(this).attr("data-repo-id")})}if(L.is(".public-repo-list-link-section")){C.trigger("internal.stash.ui.nav.repositories.public.clicked")}});K.append(J);var G=function(){D.rest({url:F.rest().profile().recent().repos().withParams({avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).build(),statusCode:{"*":function(){return false}}}).done(function(M){if(M&&M.size){var L=M.values;L.sort(function(O,N){return O.project.name.localeCompare(N.project.name)||O.name.localeCompare(N.name)});K.append(E(stash.feature.repository.menuItems({repos:L})))}else{K.append(E(stash.layout.menu.noRecentReposMenuItem()))}C.trigger("stash.feature.repositories.recent.loaded",this,M)}).fail(function(){K.append(E(stash.layout.menu.errorLoadingRecentReposMenuItem()))}).always(function(){J.remove()})};E(window).on("load",G)}});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/curl-config.js' */
(function(){if(!window.WRM){window.WRM={}}window.curl={apiContext:WRM,defineContext:WRM}}());;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/lib/curl-0.7.3.js' */
(function(a){var P="0.7.3",u="curl",p="define",G,v,g,d=a.document,l=d&&(d.head||d.getElementsByTagName("head")[0]),V=l&&l.getElementsByTagName("base")[0]||null,i={},N={},c={},A="addEventListener" in a?{}:{loaded:1,complete:1},m={},b=m.toString,y,k={},f={},h=false,O,t=/\?|\.js\b/,e=/^\/|^[^:]+:\/\//,L=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,E=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,C=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,M,x;function Q(){}function D(X,W){return b.call(X).indexOf("[object "+W)==0}function B(X){var W;X.path=J(X.path||X.location||"");W=X.main||"./main";if(!n(W)){W="./"+W}X.main=s(W,X.name+"/");X.config=X.config;return X}function n(W){return W.charAt(0)=="."}function j(W){return e.test(W)}function o(X,W){return J(X)+"/"+W}function J(W){return W&&W.charAt(W.length-1)=="/"?W.substr(0,W.length-1):W}function s(ab,X){var ac,W,Z,Y,aa;ac=1;W=ab;if(n(W)){Y=true;W=W.replace(L,function(ad,ae,af,ag){if(af){ac++}return ag||""})}if(Y){Z=X.split("/");aa=Z.length-ac;if(aa<0){return ab}Z.splice(aa,ac);return Z.concat(W||[]).join("/")}else{return W}}function S(X){var W=X.indexOf("!");return{resourceId:X.substr(W+1),pluginId:W>=0&&X.substr(0,W)}}function U(){}function z(X,W){U.prototype=X||m;var Z=new U();U.prototype=m;for(var Y in W){Z[Y]=W[Y]}return Z}function F(){var X,aa,W;X=this;aa=[];function ab(ac,ad,ae){aa.push([ac,ad,ae])}function Y(ag,ad){var af,ac,ae=0;while((af=aa[ae++])){ac=af[ag];if(ac){ac(ad)}}}W=function Z(ad,ac){ab=ad?function(ae,af){ae&&ae(ac)}:function(ae,af){af&&af(ac)};W=Q;Y(ad?0:1,ac);Y=Q;aa=y};this.then=function(ac,ad,ae){ab(ac,ad,ae);return X};this.resolve=function(ac){X.resolved=ac;W(true,ac)};this.reject=function(ac){X.rejected=ac;W(false,ac)};this.progress=function(ac){Y(2,ac)}}function r(W){return W instanceof F}function H(W,Z,X,Y){if(r(W)){return W.then(Z,X,Y)}else{return Z(W)}}function q(Y,X,Z){var W;return function(){if(--Y>=0&&X){W=X.apply(y,arguments)}if(Y==0&&Z){Z(W)}return W}}x={toAbsId:function(ab,aa,W){var Y,X,Z;Y=s(ab,aa);if(n(Y)){return Y}Z=S(Y);X=Z.pluginId;Y=X||Z.resourceId;if(Y in W.pathMap){Y=W.pathMap[Y].main||Y}if(X){if(X.indexOf("/")<0&&!(X in W.pathMap)){Y=o(W.pluginPath,X)}Y=Y+"!"+Z.resourceId}return Y},createContext:function(W,X,ab,aa){var Z;Z=new F();Z.id=X||"";Z.isPreload=aa;Z.depNames=ab;Z.config=W;function ad(ae){return x.toAbsId(ae,Z.id,W)}function ac(ae){return x.resolvePathInfo(ad(ae),W).url}function Y(ag,ak,af){var ae,aj,ai,ah;ae=ak&&function(){ak.apply(y,arguments[0])};if(D(ag,"String")){if(ae){throw new Error("require(id, callback) not allowed")}aj=ad(ag);ai=k[aj];if(!(aj in k)){throw new Error("Module not resolved: "+aj)}ah=r(ai)&&ai.exports;return ah||ai}else{H(x.getDeps(x.createContext(W,Z.id,ag,aa)),ae,af)}}Z.require=Y;Y.toUrl=ac;Z.toAbsId=ad;return Z},createResourceDef:function(W,ad,ab){var aa,X,Z;aa=x.createContext(W,ad,y,ab);X=aa.resolve;Z=q(1,function(af){aa.deps=af;try{return x.executeDefFunc(aa)}catch(ae){aa.reject(ae)}});aa.resolve=function Y(ae){H(ab||h,function(){X((k[aa.id]=f[aa.url]=Z(ae)))})};aa.exportsReady=function ac(ae){H(ab||h,function(){if(aa.exports){Z(ae);aa.progress(N)}})};return aa},createPluginDef:function(W,aa,Z,Y){var X;X=x.createContext(W,Z,y,Y);return X},getCjsRequire:function(W){return W.require},getCjsExports:function(W){return W.exports||(W.exports={})},getCjsModule:function(X){var W=X.module;if(!W){W=X.module={id:X.id,uri:x.getDefUrl(X),exports:x.getCjsExports(X),config:function(){return X.config}};W.exports=W.exports}return W},getDefUrl:function(W){return W.url||(W.url=x.checkToAddJsExt(W.require.toUrl(W.id),W.config))},setApi:function(W){var Y,Z,X,aa,ab,ac;Y=u;Z=p;X=aa=a;ab=" already exists";if(W){ac=W.overwriteApi||W.overwriteApi;Y=W.apiName||W.apiName||Y;X=W.apiContext||W.apiContext||X;Z=W.defineName||W.defineName||Z;aa=W.defineContext||W.defineContext||aa;if(v&&D(v,"Function")){a[u]=v}v=null;if(g&&D(g,"Function")){a[p]=g}g=null;if(!ac){if(X[Y]&&X[Y]!=K){throw new Error(Y+ab)}if(aa[Z]&&aa[Z]!=I){throw new Error(Z+ab)}}}X[Y]=K;aa[Z]=I},config:function(aa){var ab,Z,W,X;if("baseUrl" in aa){aa.baseUrl=aa.baseUrl}if("main" in aa){aa.main=aa.main}if("preloads" in aa){aa.preloads=aa.preloads}if("pluginPath" in aa){aa.pluginPath=aa.pluginPath}if("dontAddFileExt" in aa||aa.dontAddFileExt){aa.dontAddFileExt=new RegExp(aa.dontAddFileExt||aa.dontAddFileExt)}ab=G;Z=z(ab,aa);Z.pathMap=z(ab.pathMap);W=aa.plugins||{};Z.plugins=z(ab.plugins);Z.paths=z(ab.paths,aa.paths);Z.packages=z(ab.packages,aa.packages);Z.pathList=[];function ac(af,am){var ah,aj,al,ak,an,ai;for(var ag in af){al=af[ag];if(D(al,"String")){al={path:af[ag]}}al.name=al.name||ag;an=Z;ak=S(J(al.name));ah=ak.resourceId;aj=ak.pluginId;if(aj){an=W[aj];if(!an){an=W[aj]=z(Z);an.pathMap=z(Z.pathMap);an.pathList=[]}delete af[ag]}if(am){ai=B(al);if(ai.config){ai.config=z(Z,ai.config)}}else{ai={path:J(al.path)}}ai.specificity=ah.split("/").length;if(ah){an.pathMap[ah]=ai;an.pathList.push(ah)}else{an.baseUrl=x.resolveUrl(al.path,Z)}}}function ad(af){var ag=af.pathMap;af.pathRx=new RegExp("^("+af.pathList.sort(function(ai,ah){return ag[ah].specificity-ag[ai].specificity}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete af.pathList}ac(aa.packages,true);ac(aa.paths,false);for(X in W){var Y=x.toAbsId(X+"!","",Z);Z.plugins[Y.substr(0,Y.length-1)]=W[X]}W=Z.plugins;for(X in W){W[X]=z(Z,W[X]);var ae=W[X].pathList;if(ae){W[X].pathList=ae.concat(Z.pathList);ad(W[X])}}for(X in ab.pathMap){if(!Z.pathMap.hasOwnProperty(X)){Z.pathList.push(X)}}ad(Z);return Z},checkPreloads:function(W){var X;X=W&&W.preloads;if(X&&X.length>0){H(h,function(){h=x.getDeps(x.createContext(G,y,X,true))})}},resolvePathInfo:function(Z,X){var Y,ab,aa,W;Y=X.pathMap;if(!j(Z)){aa=Z.replace(X.pathRx,function(ac){ab=Y[ac]||{};W=ab.config;return ab.path||""})}else{aa=Z}return{config:W||G,url:x.resolveUrl(aa,X)}},resolveUrl:function(Y,W){var X=W.baseUrl;return X&&!j(Y)?o(X,Y):Y},checkToAddJsExt:function(X,W){return X+((W||G).dontAddFileExt.test(X)?"":".js")},loadScript:function(Z,ab,X){var Y=d.createElement("script");function aa(ac){ac=ac||a.event;if(ac.type=="load"||A[Y.readyState]){delete c[Z.id];Y.onload=Y.onreadystatechange=Y.onerror="";ab()}}function W(ac){X(new Error("Syntax or http error: "+Z.url))}Y.onload=Y.onreadystatechange=aa;Y.onerror=W;Y.type=Z.mimetype||"text/javascript";Y.charset="utf-8";Y.async=!Z.order;Y.src=Z.url;c[Z.id]=Y;l.insertBefore(Y,V);return Y},extractCjsDeps:function(X){var Y,W=[],Z;Y=typeof X=="string"?X:X.toSource?X.toSource():X.toString();Y.replace(E,"").replace(C,function(aa,ac,ab){if(ab){Z=Z==ab?y:Z}else{if(!Z){W.push(ac)}}return""});return W},fixArgs:function(X){var ac,aa,Y,ab,W,Z;W=X.length;Y=X[W-1];ab=D(Y,"Function")?Y.length:-1;if(W==2){if(D(X[0],"Array")){aa=X[0]}else{ac=X[0]}}else{if(W==3){ac=X[0];aa=X[1]}}if(!aa&&ab>0){Z=true;aa=["require","exports","module"].slice(0,ab).concat(x.extractCjsDeps(Y))}return{id:ac,deps:aa||[],res:ab>=0?Y:function(){return Y},cjs:Z}},executeDefFunc:function(Y){var X,W;W=Y.cjs?Y.exports:y;X=Y.res.apply(W,Y.deps);if(X===y&&Y.exports){X=Y.module?(Y.exports=Y.module.exports):Y.exports}return X},defineResource:function(X,W){X.res=W.res;X.cjs=W.cjs;X.depNames=W.deps;x.getDeps(X)},getDeps:function(X){var ab,af,ai,ad,ag,aa,W,aj,ah;ai=[];af=X.depNames;ad=af.length;if(af.length==0){Y()}function ae(am,ak,al){ai[ak]=am;if(al){aj(am,ak)}}aj=q(ad,ae,ac);ah=q(ad,ae,Y);for(ab=0;ab<ad;ab++){W=af[ab];if(W in M){ah(M[W](X),ab,true);if(X.exports){X.progress(i)}}else{if(!W){ah(y,ab,true)}else{Z(W,ab)}}}return X;function Z(am,al){var an,ak,ap,ao;an=q(1,function(aq){ak(aq);ah(aq,al)});ak=q(1,function(aq){aj(aq,al)});ap=x.fetchDep(am,X);ao=r(ap)&&ap.exports;if(ao){ak(ao)}H(ap,an,X.reject,X.exports&&function(aq){if(ap.exports){if(aq==i){ak(ap.exports)}else{if(aq==N){an(ap.exports)}}}})}function Y(){X.resolve(ai)}function ac(){X.exportsReady&&X.exportsReady(ai)}},fetchResDef:function(W){x.getDefUrl(W);x.loadScript(W,function(){var X=O;O=y;if(W.useNet!==false){if(!X||X.ex){W.reject(new Error(((X&&X.ex)||"define() missing or duplicated: "+W.url)))}else{x.defineResource(W,X)}}},W.reject);return W},fetchDep:function(ai,X){var W,Z,ae,ab,ah,ad,aa,aj,af,Y,ac,ag;W=X.toAbsId;Z=X.isPreload;ae=X.config||G;ab=S(W(ai));aj=ab.resourceId;ah=ab.pluginId||aj;af=x.resolvePathInfo(ah,ae);if(ab.pluginId){ad=ah}else{ad=af.config.moduleLoader||af.config.moduleLoader;if(ad){aj=ah;ah=ad;af=x.resolvePathInfo(ad,ae)}}if(ah in k){Y=k[ah]}else{if(af.url in f){Y=k[ah]=f[af.url]}else{Y=x.createResourceDef(af.config,ah,Z);Y.url=x.checkToAddJsExt(af.url,af.config);k[ah]=f[af.url]=Y;x.fetchResDef(Y)}}if(ah==ad){ac=new F();ag=ae.plugins[ad]||ae;H(Y,function(am){var ao,ak,an;an=am.dynamic;if("normalize" in am){aj=am.normalize(aj,W,Y.config)||""}else{aj=W(aj)}ak=ad+"!"+aj;ao=k[ak];if(!(ak in k)){ao=x.createPluginDef(ag,ak,aj,Z);if(!an){k[ak]=ao}var al=function(ap){ao.resolve(ap);if(!an){k[ak]=ap}};al.resolve=al;al.reject=al.error=ao.reject;am.load(aj,ao.require,al,ag)}if(ac!=ao){H(ao,ac.resolve,ac.reject,ac.progress)}},ac.reject)}return ac||Y},getCurrentDefName:function(){var W;if(!D(a.opera,"Opera")){for(var X in c){if(c[X].readyState=="interactive"){W=X;break}}}return W}};M={require:x.getCjsRequire,exports:x.getCjsExports,module:x.getCjsModule};function K(){var X=[].slice.call(arguments),W;if(D(X[0],"Object")){W=X.shift();R(W)}return new w(X[0],X[1],X[2])}function R(W){if(W){x.setApi(W);G=x.config(W);x.checkPreloads(W);if("main" in W){setTimeout(function(){var X;X=x.createContext(G,y,[].concat(W.main));x.getDeps(X)},0)}}}function w(Y,ab,X,aa){var Z,W;W=x.createContext(G,y,[].concat(Y));this["then"]=Z=function(ac,ad){H(W,function(ae){if(ac){ac.apply(y,ae)}},function(ae){if(ad){ad(ae)}else{throw ae}});return this};this["next"]=function(ae,ac,ad){return new w(ae,ac,ad,W)};this["config"]=R;if(ab||X){Z(ab,X)}H(aa,function(){x.getDeps(W)})}K.version=P;K.config=R;function T(W){var Z,X,Y;Z=W.id;if(Z==y){if(O!==y){O={ex:"Multiple anonymous defines in url"}}else{if(!(Z=x.getCurrentDefName())){O=W}}}if(Z!=y){X=k[Z];if(!(Z in k)){Y=x.resolvePathInfo(Z,G);X=x.createResourceDef(Y.config,Z);k[Z]=X}if(!r(X)){throw new Error("duplicate define: "+Z)}X.useNet=false;x.defineResource(X,W)}}function I(){var W=x.fixArgs(arguments);T(W)}I.amd={plugins:true,jQuery:true,curl:P};G={baseUrl:"",pluginPath:"curl/plugin",dontAddFileExt:t,paths:{},packages:{},plugins:{},pathMap:{},pathRx:/$^/};v=a[u];g=a[p];if(!v||D(v,"Function")){x.setApi()}else{a[u]=y;R(v)}k[u]=K;k["curl/_privileged"]={core:x,cache:k,config:function(){return G},_define:T,_curl:K,Promise:F}}(this.window||(typeof global!="undefined"&&global)||this));;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/lib/curl-css-0.7.3.js' */
(function(B){var z="createElement",s="parentNode",f=B.setTimeout,H=B.document,k,x=H&&H.createStyleSheet&&!(H.documentMode>=10),v=[],u=[],C=[],i=12,F,g="HTTP or network error.",l={};if(H){k=H.head||H.getElementsByTagName("head")[0];if(x){F=c}else{F=t}}function q(J,I){l[J]=l[J]||I}function y(){var I;I=H[z]("link");I.rel="stylesheet";I.type="text/css";return I}function r(J,I){J.onload=function(){q("load",true);I()}}function n(J,I){J.onerror=function(){q("error",true);I()}}function c(K,I,M){var L;C.push({url:K,cb:I,eb:function J(){M(new Error(g))}});L=h();if(L){m(L)}}function m(K){var J,I;J=C.shift();I=K.styleSheet;if(J){K.onload=function(){J.cb(J.ss);m(K)};K.onerror=function(){J.eb();m(K)};J.ss=I.imports[I.addImport(J.url)]}else{e(K);G(K)}}function G(I){u.push(I)}function h(){var I;I=u.shift();if(!I&&v.length<i){I=H.createElement("style");v.push(I);k.appendChild(I)}return I}function b(L){var K,J,M;if(!L.href||!o()){return false}K=false;try{J=L.sheet;if(J){M=J.cssRules;K=M===null;if(!K&&M){J.insertRule("-curl-css-test {}",0);J.deleteRule(0);K=true}}}catch(I){K=Object.prototype.toString.call(window.opera)!="[object Opera]"&&/security|denied/i.test(I.message)}return K}function e(I){I.onload=I.onerror=j}function w(I){return I.onload==j||!I.onload}function E(J,K,I){if(l.load){return}if(b(J)){I(J.sheet)}else{if(!w(J)){f(function(){E(J,K,I)},K)}}}function A(J,K,I){if(l.error){return}}function p(J,L,I){function K(){if(w(J)){return}e(J);d(function(){I(J.sheet)})}r(J,K);E(J,L,K)}function D(K,L,I){function J(){if(w(K)){return}e(K);I(new Error(g))}n(K,J);A(K,L,J)}function t(J,I,K,M){var L;L=y();p(L,M,I);D(L,M,K);L.href=J;k.appendChild(L)}function d(I){function J(){if(o()){I()}else{f(J,10)}}J()}function o(){return !H.readyState||H.readyState=="complete"}function a(I,J){return I.lastIndexOf(".")<=I.lastIndexOf("/")?I+"."+J:I}function j(){}WRM.define("curl/plugin/css",{normalize:function(N,J){var L,M;if(!N){return N}L=[N];M=[];for(var K=0,I=L.length;K<I;K++){M.push(J(L[K]))}return M.join(",")},load:function(R,L,U,K){var Q,J,V,S,M,O;Q=[];J=[R||""];V=K.cssWatchPeriod||50;S=K.cssNoWait;M=J.length;function N(W){if(J.length>1){Q.push(W)}if(--M==0){U(J.length==1?W:Q)}}function P(X){var W;W=U.reject||function(Y){throw Y};W(X)}for(O=0;O<J.length;O++){R=J[O];var I,T;I=a(L.toUrl(R),"css");if(S){T=y();T.href=I;k.appendChild(T);N(T.sheet||T.styleSheet)}else{F(I,N,P,V)}}},"plugin-builder":"./builder/css",pluginBuilder:"./builder/css"})})(this);;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/lib/curl-js-0.7.3.js' */
(function(b,c,a){WRM.define("curl/plugin/js",["curl/_privileged"],function(m){var f={},j=[],h=c&&c.createElement("script").async==true,l,k,g;l=m.Promise;function i(n,o){return n.lastIndexOf(".")<=n.lastIndexOf("/")?n+"."+o:n}function e(o,u,q){var v,s,p;v=new Date().valueOf()+(o.timeoutMsec||300000);function n(){s=true;if(o.exports){o.resolved=a(o.exports)}if(!o.exports||o.resolved){u(p)}else{q()}}function r(w){s=true;q(w)}function t(){if(!s){if(v<new Date()){q()}else{setTimeout(t,10)}}}if(q&&o.exports){setTimeout(t,10)}p=m.core.loadScript(o,n,r)}function d(n,o){e(n,function(){var p=j.shift();k=j.length>0;if(p){d.apply(null,p)}o.resolve(n.resolved||true)},function(p){o.reject(p)})}return{dynamic:true,normalize:function(q,p,o){var n=q.indexOf("!");return n>=0?p(q.substr(0,n))+q.substr(n):p(q)},load:function(o,r,w,q){var s,t,u,v,n,p,y;s=o.indexOf("!order")>0;t=o.indexOf("!exports=");u=t>0&&o.substr(t+9);v="prefetch" in q?q.prefetch:true;o=s||t>0?o.substr(0,o.indexOf("!")):o;n=i(r.toUrl(o),"js");function x(z){(w.error||function(A){throw A})(z)}if(n in f){if(f[n] instanceof l){f[n].then(w,x)}else{w(f[n])}}else{p={name:o,url:n,order:s,exports:u,timeoutMsec:q.timeout};f[n]=y=new l();y.then(function(z){f[n]=z;w(z)},x);if(s&&!h&&k){j.push([p,y]);if(v){p.mimetype="text/cache";e(p,function(z){z&&z.parentNode.removeChild(z)},function(){});p.mimetype=""}}else{k=k||s;d(p,y)}}}}})}(this,this.document,function(){try{return eval(arguments[0])}catch(ex){return}}));;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/jquery.js' */
WRM.define("wrm/jquery",function(){return AJS.$});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/underscore.js' */
WRM.define("wrm/_",function(){var a={filter:function(f,d){var b=[];for(var c=0;c<f.length;++c){var e=f[c];if(d(e)){b.push(e)}}return b},map:function(d,c){var e=[];for(var b=0;b<d.length;++b){e.push(c(d[b]))}return e},each:function(d,c){if(d.length===+d.length){for(var b=0;b<d.length;++b){c(d[b])}}else{for(var e in d){if(d.hasOwnProperty(e)){c(d[e],e)}}}},bind:function(c,b){return function(){c.apply(b,Array.prototype.slice.call(arguments))}},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isUndefined:function(b){return b===void 0},isNull:function(b){return b===null}};return a});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/builder.js' */
WRM.define("wrm/builder",function(){var a=function(d){var b="(?:$|\\?.*)";var c="^"+d;this.patterns={js:{superBatch:new RegExp(c+"/superbatch/js/batch.js"+b),contextBatch:new RegExp(c+"/contextbatch/js/(.*?)/batch.js"+b),resourceBatch:new RegExp(c+"/batch/(.*?)/(.*).js"+b),noBatch:new RegExp(c+"/resources/(.*?)/(.*).js"+b)},css:{superBatch:new RegExp(c+"/superbatch/css/batch.css"+b),contextBatch:new RegExp(c+"/contextbatch/css/(.*?)/batch.css"+b),resourceBatch:new RegExp(c+"/batch/(.*?)/(.*).css"+b),noBatch:new RegExp(c+"/resources/(.*?)/(.*).css"+b)}}};a.prototype={initialize:function(c){var g,b=c.getElementsByTagName("script"),e=c.getElementsByTagName("link"),f={superBatch:false,modules:[],contexts:[]};for(g=0;g<b.length;++g){var d=b[g];if(d.getAttribute("src")){this._inspectMatches(d.getAttribute("src"),this.patterns.js,f)}}for(g=0;g<e.length;++g){var h=e[g];if(h.getAttribute("href")){this._inspectMatches(h.getAttribute("href"),this.patterns.css,f)}}return f},getModulesAndContextsFromScriptUrl:function(c){var b={superBatch:false,modules:[],contexts:[]};this._inspectMatches(c,this.patterns.js,b);return b},_inspectMatches:function(d,f,c){var b;b=d.match(f.superBatch);if(b){c.superBatch=true;return}b=d.match(f.contextBatch);if(b){var g=b[1].split(",");for(var e=0;e<g.length;++e){this._addToLoadedList(c.contexts,g[e])}return}b=d.match(f.resourceBatch);if(b){this._addToLoadedList(c.modules,b[1]);return}b=d.match(f.noBatch);if(b){this._addToLoadedList(c.modules,b[1]);return}},_addToLoadedList:function(d,c){for(var b=0;b<d.length;++b){if(d[b]===c){return}}d.push(c)}};return a});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/ie-only-filter.js' */
WRM.define("wrm/ie-only-filter",["wrm/jquery","wrm/_"],function(c,a){function b(d){var e=c.browser.msie;return a.filter(d,function(f){return f.ieOnly?e:true})}return b});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/conditional-comment-filter.js' */
WRM.define("wrm/conditional-comment-filter",["wrm/jquery","wrm/_"],function(c,a){function b(e){var f=c.browser.msie;var d=c.browser.version;return a.filter(e,function(h){var g=h.conditionalComment;if(!g){return true}if(!f||d>9){return false}g=g.toLowerCase();switch(g){case"ie":return true;case"lt ie 9":return d<9;case"lte ie 9":return d<=9;case"ie 9":return d==9;case"gt ie 9":return d>9;case"gte ie 9":return d>=9;case"lt ie 8":return d<8;case"lte ie 8":return d<=8;case"ie 8":return d==8;case"gt ie 8":return d>8;case"gte ie 8":return d>=8;default:AJS.log("Cannot parse conditional comment "+g);return false}})}return b});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/resource-base-url-pattern.js' */
WRM.define("wrm/resource-base-url-pattern",function(){return WRM.data.claim("com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager.resource-base-url-pattern")});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/require-handler.js' */
WRM.define("wrm/require-handler",["wrm/jquery","wrm/_","wrm/builder","wrm/conditional-comment-filter","wrm/ie-only-filter","wrm/resource-base-url-pattern"],function(e,h,i,g,a,c){var f=/^wr!(.*)$/,d=/^wrc!(.*)$/;var b=function(){this._requireCache={}};b.prototype={require:function(k,j){if(!h.isArray(k)){k=[k]}if(!this._requireCache.hasOwnProperty(k)){this._requireCache[k]=this._resolveAsync(k)}var l=this._requireCache[k];if(j){l.done(function(){j.apply(this,arguments)})}return l},_resolveAsync:function(l){var j=e.Deferred();var k=this;this._getScriptsForResources(l).done(function(p){if(p.unparsedData){window.WRM._unparsedData||(window.WRM._unparsedData={});h.each(p.unparsedData,function(u,t){window.WRM._unparsedData[t]=u})}var q=[];var s=[];var m=k._filter(p.resources);for(var o=0;o<m.length;++o){var r=m[o];var n=r.url;if(r.resourceType==="JAVASCRIPT"){if(!k._isJSInInitLoad(n)){q.push("js!"+n+"!order")}}else{if(r.resourceType==="CSS"){if(!k._isCSSInInitLoad(n)){if(r.media&&"all"!==r.media){s.push(r)}else{q.push("css!"+n)}}}else{AJS.log("Unknown resource type required: "+n)}}}AJS.log("Downloading resources:\n"+q.join("\n"));WRM.curl(q,function(){h.each(s,function(u){k._loadCssImmediate(u)});var t=h.map(l,function(){return window});j.resolveWith(k,t)},function(){j.rejectWith(k,arguments)})});return j.promise()},_loadCssImmediate:function(k){AJS.log("WARN: asynchronously loading a CSS resource containing a media query: "+k.url);var j='<link rel="stylesheet" type="text/css" href="'+k.url+'" media="'+k.media+'" />';e(j).appendTo("head")},_getScriptsForResources:function(k){if(!this._builder){this._builder=new i(c);this._initLoadResources=this._builder.initialize(document)}var j=[];var l=[];h.each(k,function(n){var m;if(m=n.match(f)){j.push(m[1])}else{if(m=n.match(d)){l.push(m[1])}}});return e.ajax({url:AJS.contextPath()+"/rest/webResources/1.0/resources",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify({r:j,c:l,xc:this._initLoadResources.contexts,xr:this._initLoadResources.modules})})},_isJSInInitLoad:function(j){return e("script[src='"+j+"']").length>0},_isCSSInInitLoad:function(j){return e("link[href='"+j+"']").length>0},_filter:function(k){if(!this._filters){this._filters=[g,a]}var j=k;h.each(this._filters,function(l){j=l(j)});return j}};return b});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/index.js' */
WRM.curl(["wrm/require-handler"],function(b){var a;WRM.require=function(d,c){if(!a){a=new b()}return a.require(d,c)}});;
;/* module-key = 'com.atlassian.stash.plugin.stash-inbox-plugin:inbox-dialog', location = '/static/inbox/inbox.soy' */
// This file was automatically generated from inbox.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.plugin.inbox.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.plugin == 'undefined') { stash.plugin = {}; }
if (typeof stash.plugin.inbox == 'undefined') { stash.plugin.inbox = {}; }


stash.plugin.inbox.dialogContents = function(opt_data, opt_ignored) {
  var output = '<h2>' + soy.$$escapeHtml("My pull requests") + '</h2><div class=\'inbox-table-wrapper aui-tabs horizontal-tabs\'><ul class="tabs-menu">';
  var roleList6 = opt_data.roles;
  var roleListLen6 = roleList6.length;
  for (var roleIndex6 = 0; roleIndex6 < roleListLen6; roleIndex6++) {
    var roleData6 = roleList6[roleIndex6];
    output += '<li class="menu-item"><a href="#inbox-pull-request-' + soy.$$escapeHtml(roleData6.id) + '">' + soy.$$escapeHtml(roleData6.title) + '</a></li>';
  }
  output += '</ul>';
  var roleList14 = opt_data.roles;
  var roleListLen14 = roleList14.length;
  for (var roleIndex14 = 0; roleIndex14 < roleListLen14; roleIndex14++) {
    var roleData14 = roleList14[roleIndex14];
    output += '<div id="inbox-pull-request-' + soy.$$escapeHtml(roleData14.id) + '" class="tabs-pane">' + stash.feature.pullRequest.pullRequestTable({pullRequestsPage: null, scope: 'global', id: 'inbox-pull-request-table-' + roleData14.id}) + '</div>';
  }
  output += '</div>';
  return output;
};
if (goog.DEBUG) {
  stash.plugin.inbox.dialogContents.soyTemplateName = 'stash.plugin.inbox.dialogContents';
}


stash.plugin.inbox.triggerIcon = function(opt_data, opt_ignored) {
  return '<span class=\'aui-icon aui-icon-small ' + ((opt_data.isEmpty) ? 'aui-iconfont-workbox-empty' : 'aui-iconfont-workbox') + '\'></span>';
};
if (goog.DEBUG) {
  stash.plugin.inbox.triggerIcon.soyTemplateName = 'stash.plugin.inbox.triggerIcon';
}


stash.plugin.inbox.emptyInboxMessage = function(opt_data, opt_ignored) {
  return '<span class="aui-icon aui-icon-large aui-iconfont-workbox-empty">' + soy.$$escapeHtml("No pull requests to approve") + '</span><h3>' + soy.$$escapeHtml("Inbox Zero") + '</h3>';
};
if (goog.DEBUG) {
  stash.plugin.inbox.emptyInboxMessage.soyTemplateName = 'stash.plugin.inbox.emptyInboxMessage';
}
;
;/* module-key = 'com.atlassian.stash.plugin.stash-inbox-plugin:inbox-dialog', location = '/static/inbox/inbox.js' */
define("plugin/inbox/inbox",["aui","jquery","underscore","stash/api/util/events","stash/api/util/navbuilder","stash/api/util/state","stash/api/util/server","exports"],function(h,f,s,a,q,i,m,t){var u,b;function k(v){return q.newBuilder().addPathComponents("rest","inbox","latest","pull-requests").withParams({role:v})}function c(){return q.newBuilder().addPathComponents("rest","inbox","latest","pull-requests","count").build()}var o=function(v){if(v.keyCode===f.ui.keyCode.ESCAPE){u.hide();v.preventDefault()}};var p=function(){u.hide()};var n=function(y,v){var z={title:"Could not retrieve inbox",message:"An unknown error occurred"};var x={};if(v){x=v.errors?v.errors[0]:v}var w=f.extend({},z,x);y.html(f(stash.widget.focusMessage.error({title:w.title,text:w.message,extraClasses:"communication-error"})));return false};function r(v){l(v,[{id:"reviewer",title:"Reviewing"},{id:"author",title:"Created"}])}function l(A,w){var z=require("widget/avatar-list");var v=require("feature/pull-request/pull-request-table");var x=f(stash.plugin.inbox.dialogContents({roles:w}));A.append(x);var B=function(E,F,C,D){return n.call(this,A,D)};function y(E,C){var D=new v("open",null,s.partial(k,E),{scope:"global",target:"#inbox-pull-request-table-"+E,scrollPaneSelector:".inbox-table-wrapper",bufferPixels:50,pageSize:10,spinnerSize:"medium",noneFoundMessageHtml:stash.plugin.inbox.emptyInboxMessage(),dataLoadedEvent:"stash.plugin.inbox.dataLoaded."+E,statusCode:{0:B,401:B,500:B,502:B}});D.handleErrors=f.noop;D.init();if(C){h.tabs.change(A.find("[href=#inbox-pull-request-"+E+"]"))}}s.each(w,function(D,C){y(D.id,C===0)});A.find(".tabs-menu").delegate("a","click",function(C){h.tabs.change(f(this),C);C&&C.preventDefault()});z.init()}var j=function(w,v,x){x();f(document).on("keyup",o);h.dialog2.on("show",p);e(w,s.partial(r,w))};var e=s.once(function(v,x){var w=f('<div class="loading-resource-spinner"></div>');v.empty().append(w);w.show().spin("medium");WRM.require("wrc!stash.pullRequest.inbox").always(function(){w.spinStop().remove()}).done(function(){x()})});var g=function(){f(document).off("keyup",o);h.dialog2.off("show",p);if(f(document.activeElement).closest("#inbox-pull-requests-content").length){document.activeElement.blur()}};var d=function(){m.rest({url:c(),type:"GET",statusCode:{"*":false}}).done(function(w){if(w.count>0){var x=f(aui.badges.badge({text:w.count}));b.html(stash.plugin.inbox.triggerIcon({isEmpty:false})).append(x);setTimeout(function(){x.addClass("visible")},0)}else{var v=500;b.find(".aui-badge").removeClass("visible");setTimeout(function(){b.html(stash.plugin.inbox.triggerIcon({isEmpty:true}))},v)}b.attr("data-countLoaded",true)})};t.onReady=function(){b=f("#inbox-pull-requests");if(b.length&&i.getCurrentUser()){b.html(stash.plugin.inbox.triggerIcon({isEmpty:true}));u=h.InlineDialog(b,"inbox-pull-requests-content",j,{width:870,hideCallback:g});d();var v=function(w){if(w.user.name===i.getCurrentUser().name){d()}};a.on("stash.widget.approve-button.added",v);a.on("stash.widget.approve-button.removed",v)}}});AJS.$(document).ready(function(){require("plugin/inbox/inbox").onReady()});;

Zerion Mini Shell 1.0