diff --git a/ui/.gitrepo b/ui/.gitrepo index 847e660..0a33dec 100644 --- a/ui/.gitrepo +++ b/ui/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = git@github.com:crowdfavorite/wp-capsule-ui.git branch = master - commit = 4a1c31e4ed58f5c201c0ab4b6a3b86ae030c0107 - parent = b896aca68aba14b4b06f5c90a5acf47ce42ce190 + commit = 266410fdd6d76ac207cbd0d806c036b34282ec95 + parent = 0a41b65c7f1d7d2d73795c7659fd590a2c7c34ac method = merge cmdver = 0.4.0 diff --git a/ui/Cakefile b/ui/Cakefile index 8df4af5..932fd69 100644 --- a/ui/Cakefile +++ b/ui/Cakefile @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ### requirejs = require 'requirejs' -{minify} = require 'uglify-js' +uglifyjs = require 'uglify-js' fs = require 'fs' temp = require 'temp' @@ -116,7 +116,7 @@ concatAppJS = (outfile = './assets/js/optimized.js') -> console.log "concatenating #{jsfile} - #{stats.size} bytes" fs.appendFileSync(outfile, fs.readFileSync(jsfile)) else - min = minify(jsfile, uglifyOptions).code + min = uglifyjs.minify(fs.readFileSync(jsfile, 'utf8')).code console.log "minifying #{jsfile} - #{stats.size} bytes became #{min.length} bytes" fs.appendFileSync(outfile, min) min = null diff --git a/ui/assets/js/optimized.js b/ui/assets/js/optimized.js index 3caf613..7b244e9 100644 --- a/ui/assets/js/optimized.js +++ b/ui/assets/js/optimized.js @@ -20,15 +20,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */ /*** lib/require.js ***/ -lib,require.js; +var requirejs,require,define;!function(global){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.1",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,aps=ap.slice,apsp=ap.splice,isBrowser=!("undefined"==typeof window||!navigator||!document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i":">","<":"<",'"':""","'":"'"};function t(t,e){return e=e||"","string"!=typeof t&&(t.global&&e.indexOf("g")<0&&(e+="g"),t.ignoreCase&&e.indexOf("i")<0&&(e+="i"),t.multiline&&e.indexOf("m")<0&&(e+="m"),t=t.source),new RegExp(t.replace(/#\{(\w+)\}/g,function(t,e){var r=twttr.txt.regexen[e]||"";return"string"!=typeof r&&(r=r.source),r}),e)}function s(t,r){return t.replace(/#\{(\w+)\}/g,function(t,e){return r[e]||""})}function r(t,e,r){var a=String.fromCharCode(e);return r!==e&&(a+="-"+String.fromCharCode(r)),t.push(a),t}twttr.txt.htmlEscape=function(t){return t&&t.replace(/[&"'><]/g,function(t){return e[t]})},twttr.txt.regexSupplant=t,twttr.txt.stringSupplant=s,twttr.txt.addCharsToCharClass=r;var a=String.fromCharCode,n=[a(32),a(133),a(160),a(5760),a(6158),a(8232),a(8233),a(8239),a(8287),a(12288)];r(n,9,13),r(n,8192,8202);var i=[a(65534),a(65279),a(65535)];r(i,8234,8238),twttr.txt.regexen.spaces_group=t(n.join("")),twttr.txt.regexen.spaces=t("["+n.join("")+"]"),twttr.txt.regexen.invalid_chars_group=t(i.join("")),twttr.txt.regexen.punct=/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$/;var l=[];r(l,1024,1279),r(l,1280,1319),r(l,11744,11775),r(l,42560,42655),r(l,1425,1471),r(l,1473,1474),r(l,1476,1477),r(l,1479,1479),r(l,1488,1514),r(l,1520,1524),r(l,64274,64296),r(l,64298,64310),r(l,64312,64316),r(l,64318,64318),r(l,64320,64321),r(l,64323,64324),r(l,64326,64335),r(l,1552,1562),r(l,1568,1631),r(l,1646,1747),r(l,1749,1756),r(l,1758,1768),r(l,1770,1775),r(l,1786,1788),r(l,1791,1791),r(l,1872,1919),r(l,2208,2208),r(l,2210,2220),r(l,2276,2302),r(l,64336,64433),r(l,64467,64829),r(l,64848,64911),r(l,64914,64967),r(l,65008,65019),r(l,65136,65140),r(l,65142,65276),r(l,8204,8204),r(l,3585,3642),r(l,3648,3662),r(l,4352,4607),r(l,12592,12677),r(l,43360,43391),r(l,44032,55215),r(l,55216,55295),r(l,65441,65500),r(l,12449,12538),r(l,12540,12542),r(l,65382,65439),r(l,65392,65392),r(l,65296,65305),r(l,65313,65338),r(l,65345,65370),r(l,12353,12438),r(l,12441,12446),r(l,13312,19903),r(l,19968,40959),r(l,173824,177983),r(l,177984,178207),r(l,194560,195103),r(l,12291,12291),r(l,12293,12293),r(l,12347,12347),twttr.txt.regexen.nonLatinHashtagChars=t(l.join(""));var o=[];r(o,192,214),r(o,216,246),r(o,248,255),r(o,256,591),r(o,595,596),r(o,598,599),r(o,601,601),r(o,603,603),r(o,611,611),r(o,616,616),r(o,623,623),r(o,626,626),r(o,649,649),r(o,651,651),r(o,699,699),r(o,768,879),r(o,7680,7935),twttr.txt.regexen.latinAccentChars=t(o.join("")),twttr.txt.regexen.hashSigns=/[##]/,twttr.txt.regexen.hashtagAlpha=t(/[a-z_#{latinAccentChars}#{nonLatinHashtagChars}]/i),twttr.txt.regexen.hashtagAlphaNumeric=t(/[a-z0-9_#.\-{latinAccentChars}#{nonLatinHashtagChars}]/i),twttr.txt.regexen.endHashtagMatch=t(/^(?:#{hashSigns}|:\/\/)/),twttr.txt.regexen.hashtagBoundary=t(/(?:^|$|[^&a-z0-9_#{latinAccentChars}#{nonLatinHashtagChars}])/),twttr.txt.regexen.validHashtag=t(/(#{hashtagBoundary})(#{hashSigns})(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi),twttr.txt.regexen.validMentionPrecedingChars=/(?:^|[^a-zA-Z0-9_!#$%&*@@]|RT:?)/,twttr.txt.regexen.atSigns=/[@@]/,twttr.txt.regexen.validMentionOrList=t("(#{validMentionPrecedingChars})(#{atSigns})([a-zA-Z0-9_.-]{1,20})(/[a-zA-Z][a-zA-Z0-9_]{0,24})?","g"),twttr.txt.regexen.validReply=t(/^(?:#{spaces})*#{atSigns}([a-zA-Z0-9_.\-]{1,20})/),twttr.txt.regexen.endMentionMatch=t(/^(?:#{atSigns}|[#{latinAccentChars}]|:\/\/)/),twttr.txt.regexen.validUrlPrecedingChars=t(/(?:[^A-Za-z0-9@@$###{invalid_chars_group}]|^)/),twttr.txt.regexen.invalidUrlWithoutProtocolPrecedingChars=/[-_.\/]$/,twttr.txt.regexen.invalidDomainChars=s("#{punct}#{spaces_group}#{invalid_chars_group}",twttr.txt.regexen),twttr.txt.regexen.validDomainChars=t(/[^#{invalidDomainChars}]/),twttr.txt.regexen.validSubdomain=t(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\.)/),twttr.txt.regexen.validDomainName=t(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\.)/),twttr.txt.regexen.validGTLD=t(/(?:(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx)(?=[^0-9a-zA-Z]|$))/),twttr.txt.regexen.validCCTLD=t(/(?:(?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)(?=[^0-9a-zA-Z]|$))/),twttr.txt.regexen.validPunycode=t(/(?:xn--[0-9a-z]+)/),twttr.txt.regexen.validDomain=t(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/),twttr.txt.regexen.validAsciiDomain=t(/(?:(?:[a-z0-9#{latinAccentChars}]+)\.)+(?:#{validGTLD}|#{validCCTLD}|#{validPunycode})/gi),twttr.txt.regexen.invalidShortDomain=t(/^#{validDomainName}#{validCCTLD}$/),twttr.txt.regexen.validPortNumber=t(/[0-9]+/),twttr.txt.regexen.validGeneralUrlPathChars=t(/[a-z0-9!\*';:=\+,\.\$\/%#\[\]\-_~|&#{latinAccentChars}]/i),twttr.txt.regexen.validUrlBalancedParens=t(/\(#{validGeneralUrlPathChars}+\)/i),twttr.txt.regexen.validUrlPathEndingChars=t(/[\+\-a-z0-9=_#\/#{latinAccentChars}]|(?:#{validUrlBalancedParens})/i),twttr.txt.regexen.validUrlPath=t("(?:(?:#{validGeneralUrlPathChars}*(?:#{validUrlBalancedParens}#{validGeneralUrlPathChars}*)*#{validUrlPathEndingChars})|(?:@#{validGeneralUrlPathChars}+/))","i"),twttr.txt.regexen.validUrlQueryChars=/[a-z0-9!?\*'\(\);:&=\+\$\/%#\[\]\-_\.,~|]/i,twttr.txt.regexen.validUrlQueryEndingChars=/[a-z0-9_&=#\/]/i,twttr.txt.regexen.extractUrl=t("((#{validUrlPrecedingChars})((https?:\\/\\/)?(#{validDomain})(?::(#{validPortNumber}))?(\\/#{validUrlPath}*)?(\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?))","gi"),twttr.txt.regexen.validTcoUrl=/^https?:\/\/t\.co\/[a-z0-9]+/i,twttr.txt.regexen.validateUrlUnreserved=/[a-z0-9\-._~]/i,twttr.txt.regexen.validateUrlPctEncoded=/(?:%[0-9a-f]{2})/i,twttr.txt.regexen.validateUrlSubDelims=/[!$&'()*+,;=]/i,twttr.txt.regexen.validateUrlPchar=t("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}|#{validateUrlSubDelims}|[:|@])","i"),twttr.txt.regexen.validateUrlScheme=/(?:[a-z][a-z0-9+\-.]*)/i,twttr.txt.regexen.validateUrlUserinfo=t("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}|#{validateUrlSubDelims}|:)*","i"),twttr.txt.regexen.validateUrlDecOctet=/(?:[0-9]|(?:[1-9][0-9])|(?:1[0-9]{2})|(?:2[0-4][0-9])|(?:25[0-5]))/i,twttr.txt.regexen.validateUrlIpv4=t(/(?:#{validateUrlDecOctet}(?:\.#{validateUrlDecOctet}){3})/i),twttr.txt.regexen.validateUrlIpv6=/(?:\[[a-f0-9:\.]+\])/i,twttr.txt.regexen.validateUrlIp=t("(?:#{validateUrlIpv4}|#{validateUrlIpv6})","i"),twttr.txt.regexen.validateUrlSubDomainSegment=/(?:[a-z0-9](?:[a-z0-9_\-]*[a-z0-9])?)/i,twttr.txt.regexen.validateUrlDomainSegment=/(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?)/i,twttr.txt.regexen.validateUrlDomainTld=/(?:[a-z](?:[a-z0-9\-]*[a-z0-9])?)/i,twttr.txt.regexen.validateUrlDomain=t(/(?:(?:#{validateUrlSubDomainSegment]}\.)*(?:#{validateUrlDomainSegment]}\.)#{validateUrlDomainTld})/i),twttr.txt.regexen.validateUrlHost=t("(?:#{validateUrlIp}|#{validateUrlDomain})","i"),twttr.txt.regexen.validateUrlUnicodeSubDomainSegment=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9_\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,twttr.txt.regexen.validateUrlUnicodeDomainSegment=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,twttr.txt.regexen.validateUrlUnicodeDomainTld=/(?:(?:[a-z]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,twttr.txt.regexen.validateUrlUnicodeDomain=t(/(?:(?:#{validateUrlUnicodeSubDomainSegment}\.)*(?:#{validateUrlUnicodeDomainSegment}\.)#{validateUrlUnicodeDomainTld})/i),twttr.txt.regexen.validateUrlUnicodeHost=t("(?:#{validateUrlIp}|#{validateUrlUnicodeDomain})","i"),twttr.txt.regexen.validateUrlPort=/[0-9]{1,5}/,twttr.txt.regexen.validateUrlUnicodeAuthority=t("(?:(#{validateUrlUserinfo})@)?(#{validateUrlUnicodeHost})(?::(#{validateUrlPort}))?","i"),twttr.txt.regexen.validateUrlAuthority=t("(?:(#{validateUrlUserinfo})@)?(#{validateUrlHost})(?::(#{validateUrlPort}))?","i"),twttr.txt.regexen.validateUrlPath=t(/(\/#{validateUrlPchar}*)*/i),twttr.txt.regexen.validateUrlQuery=t(/(#{validateUrlPchar}|\/|\?)*/i),twttr.txt.regexen.validateUrlFragment=t(/(#{validateUrlPchar}|\/|\?)*/i),twttr.txt.regexen.validateUrlUnencoded=t("^(?:([^:/?#]+):\\/\\/)?([^/?#]*)([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$","i");var c=' rel="nofollow"',x={urlClass:!0,listClass:!0,usernameClass:!0,hashtagClass:!0,usernameUrlBase:!0,listUrlBase:!0,hashtagUrlBase:!0,usernameUrlBlock:!0,listUrlBlock:!0,hashtagUrlBlock:!0,linkUrlBlock:!0,usernameIncludeSymbol:!0,suppressLists:!0,suppressNoFollow:!0,suppressDataScreenName:!0,urlEntities:!0,before:!0},h={disabled:!0,readonly:!0,multiple:!0,checked:!0};twttr.txt.linkToHashtag=function(t,e,r){var a={hash:e.substring(t.indices[0],t.indices[0]+1),preText:"",text:twttr.txt.htmlEscape(t.hashtag),postText:"",extraHtml:r.suppressNoFollow?"":c};for(var n in r)r.hasOwnProperty(n)&&(a[n]=r[n]);return s('#{before}#{hash}#{preText}#{text}#{postText}',a)},twttr.txt.linkToMentionAndList=function(t,e,r){var a=e.substring(t.indices[0],t.indices[0]+1),n={at:r.usernameIncludeSymbol?"":a,at_before_user:r.usernameIncludeSymbol?a:"",user:twttr.txt.htmlEscape(t.screenName),slashListname:twttr.txt.htmlEscape(t.listSlug),extraHtml:r.suppressNoFollow?"":c,preChunk:"",postChunk:""};for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);if(t.listSlug&&!r.suppressLists){var l=n.chunk=s("#{user}#{slashListname}",n);return n.list=twttr.txt.htmlEscape(l.toLowerCase()),s('#{before}#{at}#{preChunk}#{at_before_user}#{chunk}#{postChunk}',n)}return n.chunk=n.user,n.dataScreenName=r.suppressDataScreenName?"":s('data-screen-name="#{chunk}" ',n),s('#{before}#{at}#{preChunk}#{at_before_user}#{chunk}#{postChunk}',n)},twttr.txt.linkToUrl=function(t,e,r){var a=t.url,n=a,i=twttr.txt.htmlEscape(n),l=r.urlEntities&&r.urlEntities[a]||t;return l.display_url&&(r.title||(r.htmlAttrs=(r.htmlAttrs||"")+' title="'+l.expanded_url+'"'),i=twttr.txt.linkTextWithEntity(l,r)),s('#{linkText}',{htmlAttrs:r.htmlAttrs,url:twttr.txt.htmlEscape(a),linkText:i})},twttr.txt.linkTextWithEntity=function(t,e){var r=t.display_url,a=t.expanded_url,n=r.replace(/…/g,"");if(-1!=a.indexOf(n)){var i=a.indexOf(n),l={displayUrlSansEllipses:n,beforeDisplayUrl:a.substr(0,i),afterDisplayUrl:a.substr(i+n.length),precedingEllipsis:r.match(/^…/)?"…":"",followingEllipsis:r.match(/…$/)?"…":""};return $.each(l,function(t,e){l[t]=twttr.txt.htmlEscape(e)}),l.invisible=e.invisibleTagAttrs,s("#{precedingEllipsis} #{beforeDisplayUrl}#{displayUrlSansEllipses}#{afterDisplayUrl} #{followingEllipsis}",l)}return r},twttr.txt.autoLinkEntities=function(t,e,r){var a,n;if((r=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}(r||{})).suppressNoFollow||(r.rel="nofollow"),r.urlClass&&(r.class=r.urlClass),r.urlClass=r.urlClass||"tweet-url",r.hashtagClass=r.hashtagClass||"hashtag",r.hashtagUrlBase=r.hashtagUrlBase||"https://twitter.com/#!/search?q=%23",r.listClass=r.listClass||"list-slug",r.usernameClass=r.usernameClass||"username",r.usernameUrlBase=r.usernameUrlBase||"https://twitter.com/",r.listUrlBase=r.listUrlBase||"https://twitter.com/",r.before=r.before||"",r.htmlAttrs=twttr.txt.extractHtmlAttrsFromOptions(r),r.invisibleTagAttrs=r.invisibleTagAttrs||"style='position:absolute;left:-9999px;'",r.urlEntities){for(a={},s=0,n=r.urlEntities.length;st[r].indices[0]?(t.splice(r,1),r--):e=t[r]},twttr.txt.extractEntitiesWithIndices=function(t,e){var r=twttr.txt.extractUrlsWithIndices(t,e).concat(twttr.txt.extractMentionsOrListsWithIndices(t)).concat(twttr.txt.extractHashtagsWithIndices(t,{checkUrlOverlap:!1}));return 0==r.length?[]:(twttr.txt.removeOverlappingEntities(r),r)},twttr.txt.extractMentions=function(t){for(var e=[],r=twttr.txt.extractMentionsWithIndices(t),a=0;a");for(var l=0;l",""],u=twttr.txt.splitTags(t),d="",g=0,v=u[0],w=0,m=0,p=!1,f=v,U=[];for(a=0;a=w+v.length;)d+=f.slice(m),p&&l===w+f.length&&(d+=s,o=!0),u[g+1]&&(d+="<"+u[g+1]+">"),w+=f.length,m=0,f=v=u[g+=2],p=!1;o||null==v?o||(o=!0,d+=s):(c=l-w,d+=f.slice(m,c)+s,m=c,p=i%2==0)}if(null!=v)for(m";return d};var u=[a(65534),a(65279),a(65535),a(8234),a(8235),a(8236),a(8237),a(8238)];twttr.txt.isInvalidTweet=function(t){if(!t)return"empty";if(140this.width.client},scrollableY:function(){return(d||f)&&this.height.scroll>this.height.client}};return b.y&&a.scrollableY()||b.x&&a.scrollableX()}})})(jQuery); /*** lib/sidr/dist/jquery.sidr.js ***/ -lib,sidr,dist,jquery.sidr.js; +!function(u){var v=!1,y=!1,d=function(e){return!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)},l=function(e,t){e.html(t)},c=function(e){var t=e.attr("id"),i=e.attr("class");"string"==typeof t&&""!==t&&e.attr("id",t.replace(/([A-Za-z0-9_.\-]+)/g,"sidr-id-$1")),"string"==typeof i&&""!==i&&"sidr-inner"!==i&&e.attr("class",i.replace(/([A-Za-z0-9_.\-]+)/g,"sidr-class-$1")),e.removeAttr("style")},i=function(e,t,i){"function"==typeof t?(i=t,t="sidr"):t||(t="sidr");var s,o,r,n=u("#"+t),a=u(n.data("body")),d=u("html"),l=n.outerWidth(!0),c=n.data("speed"),f=n.data("side"),p="sidr"==t?"sidr-open":"sidr-open "+t+"-open";if("open"===e||"toogle"===e&&!n.is(":visible")){if(n.is(":visible")||v)return;if(!1!==y)return void m.close(y,function(){m.open(t)});v=!0,"left"===f?(s={left:l+"px"},o={left:"0px"}):(s={right:l+"px"},o={right:"0px"}),r=d.scrollTop(),d.css("overflow-x","hidden").scrollTop(r),a.addClass("sidr-animating").css({width:a.width(),position:"absolute"}).animate(s,c,function(){u(this).addClass(p)}),n.css("display","block").animate(o,c,function(){v=!1,y=t,"function"==typeof i&&i(t),a.removeClass("sidr-animating")})}else{if(!n.is(":visible")||v)return;v=!0,"left"===f?(s={left:0},o={left:"-"+l+"px"}):(s={right:0},o={right:"-"+l+"px"}),r=d.scrollTop(),d.removeAttr("style").scrollTop(r),a.addClass("sidr-animating").animate(s,c).removeClass(p),n.animate(o,c,function(){n.removeAttr("style"),a.removeAttr("style"),u("html").removeAttr("style"),y=v=!1,"function"==typeof i&&i(t),a.removeClass("sidr-animating")})}},m={open:function(e,t){i("open",e,t)},close:function(e,t){i("close",e,t)},toogle:function(e,t){i("toogle",e,t)}};u.sidr=function(e){return m[e]?m[e].apply(this,Array.prototype.slice.call(arguments,1)):"function"!=typeof e&&"string"!=typeof e&&e?void u.error("Method "+e+" does not exist on jQuery.sidr"):m.toogle.apply(this,arguments)},u.fn.sidr=function(e){var t=u.extend({name:"sidr",speed:200,side:"left",source:null,renaming:!0,body:"body"},e),i=t.name,s=u("#"+i);if(0===s.length&&(s=u("
").attr("id",i).appendTo(u("body"))),s.addClass("sidr").addClass(t.side).data({speed:t.speed,side:t.side,body:t.body}),"function"==typeof t.source){var o=t.source(i);l(s,o)}else if("string"==typeof t.source&&d(t.source))u.get(t.source,function(e){l(s,e)});else if("string"==typeof t.source){var r="",n=t.source.split(",");if(u.each(n,function(e,t){r+='
'+u(t).html()+"
"}),t.renaming){var a=u("
").html(r);a.find("*").each(function(e,t){var i=u(t);c(i)}),r=a.html()}l(s,r)}else null!==t.source&&u.error("Invalid Sidr Source");return this.each(function(){var e=u(this);e.data("sidr")||(e.data("sidr",i),e.click(function(e){e.preventDefault(),m.toogle(i)}))})}}(jQuery); /*** lib/linkify/1.0/jquery.linkify-1.0-min.js ***/ // encoding: utf-8 // $.fn.linkify 1.0 - MIT/GPL Licensed - More info: http://github.com/maranomynet/linkify/ (function(b){var x=/(^|["'(\s]|<)(www\..+?\..+?)((?:[:?]|\.+)?(?:\s|$)|>|[)"',])/g,y=/(^|["'(\s]|<)((?:(?:https?|ftp):\/\/|mailto:).+?)((?:[:?]|\.+)?(?:\s|$)|>|[)"',])/g,z=function(h){return h.replace(x,'$1$2$3').replace(y,'$1$2$3').replace(/"<``>/g,'"http')},s=b.fn.linkify=function(c){if(!b.isPlainObject(c)){c={use:(typeof c=='string')?c:undefined,handleLinks:b.isFunction(c)?c:arguments[1]}}var d=c.use,k=s.plugins||{},l=[z],f,m=[],n=c.handleLinks;if(d==undefined||d=='*'){for(var i in k){l.push(k[i])}}else{d=b.isArray(d)?d:b.trim(d).split(/ *, */);var o,i;for(var p=0,A=d.length;p1&&/\S/.test(a)){var q,r;f=f||b('
')[0];f.innerHTML='';f.appendChild(e.cloneNode(false));var u=f.childNodes;for(var v=0,g;(g=l[v]);v++){var w=u.length,j;while(w--){j=u[w];if(j.nodeType==3){a=j.nodeValue;if(a.length>1&&/\S/.test(a)){r=a;a=a.replace(/&/g,'&').replace(//g,'>');a=b.isFunction(g)?g(a):a.replace(g.re,g.tmpl);q=q||r!=a;r!=a&&b(j).after(a).remove()}}}}a=f.innerHTML;if(n){a=b('
').html(a);m=m.concat(a.find('a').toArray().reverse());a=a.contents()}q&&b(e).after(a).remove()}}else if(e.nodeType==1&&!/^(a|button|textarea)$/i.test(e.tagName)){arguments.callee.call(e)}}});n&&n(b(m.reverse()));return this};s.plugins={mailto:{re:/(^|["'(\s]|<)([^"'(\s&]+?@.+\.[a-z]{2,7})(([:?]|\.+)?(\s|$)|>|[)"',])/gi,tmpl:'$1$2$3'}}})(jQuery); /*** lib/jquery.hotkeys/jquery.hotkeys.js ***/ -lib,jquery.hotkeys,jquery.hotkeys.js; +!function(l){function t(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var o=t.handler,p=t.data.keys.toLowerCase().split(" ");t.handler=function(a){if(this===a.target||!(l.hotkeys.options.filterInputAcceptingElements&&l.hotkeys.textInputTypes.test(a.target.nodeName)||l.hotkeys.options.filterContentEditable&&l(a.target).attr("contenteditable")||l.hotkeys.options.filterTextInputs&&-1","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},l.each(["keydown","keyup","keypress"],function(){l.event.special[this]={add:t}})}(jQuery||this.jQuery||window.jQuery); /*** r.js built ***/ /* * Based on code from: @@ -404,4 +404,4 @@ tidy_error_count:["int tidy_error_count()","Returns the Number of Tidy errors en normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var r=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});i.hasOwnProperty(r)||(i[r]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,r,i){if(this.completionsDefined||this.defineCompletions(),!t.getTokenAt(r.row,r.column))return[];if("ruleset"===e){var s=t.getLine(r.row).substr(0,r.column);return/:[^;]+$/.test(s)?(/([\w\-]+):[^:]*$/.test(s),this.getPropertyValueCompletions(e,t,r,i)):this.getPropertyCompletions(e,t,r,i)}return[]},this.getPropertyCompletions=function(e,t,r,s){return Object.keys(i).map(function(e){return{caption:e,snippet:e+": $0",meta:"property",score:Number.MAX_VALUE}})},this.getPropertyValueCompletions=function(e,t,r,s){var n=t.getLine(r.row).substr(0,r.column),o=(/([\w\-]+):[^:]*$/.exec(n)||{})[1];if(!o)return[];var a=[];return o in i&&"object"==typeof i[o]&&(a=Object.keys(i[o])),a.map(function(e){return{caption:e,snippet:e,meta:"property value",score:Number.MAX_VALUE}})}}).call(s.prototype),t.CssCompletions=s}),define("ace/mode/behaviour/css",["require","exports","module","../../lib/oop","../behaviour","./cstyle","../../token_iterator"],function(e,t,r){"use strict";var i=e("../../lib/oop"),s=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),n=e("../../token_iterator").TokenIterator,o=function(){this.inherit(s),this.add("colon","insertion",function(e,t,r,i,s){if(":"===s){var o=r.getCursorPosition(),a=new n(i,o.row,o.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type){var c=i.doc.getLine(o.row);if(":"===c.substring(o.column,o.column+1))return{text:"",selection:[1,1]};if(!c.substring(o.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,r,i,s){var o=i.doc.getTextRange(s);if(!s.isMultiLine()&&":"===o){var a=r.getCursorPosition(),l=new n(i,a.row,a.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type){if(";"===i.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s}}}),this.add("semicolon","insertion",function(e,t,r,i,s){if(";"===s){var n=r.getCursorPosition();if(";"===i.doc.getLine(n.row).substring(n.column,n.column+1))return{text:"",selection:[1,1]}}})};i.inherits(o,s),t.CssBehaviour=o}),define("ace/mode/css",["require","exports","module","../lib/oop","./text","./css_highlight_rules","./matching_brace_outdent","../worker/worker_client","./css_completions","./behaviour/css","./folding/cstyle"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("./text").Mode,n=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,_=e("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=n,this.$outdent=new o,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new _};i.inherits(d,s),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,e).tokens;return s.length&&"comment"==s[s.length-1].type?i:(t.match(/^.*\{\s*$/)&&(i+=r),i)},this.checkOutdent=function(e,t,r){return this.$outdent.checkOutdent(t,r)},this.autoOutdent=function(e,t,r){this.$outdent.autoOutdent(t,r)},this.getCompletions=function(e,t,r,i){return this.$completer.getCompletions(e,t,r,i)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(d.prototype),t.Mode=d}),define("ace/mode/behaviour/xml",["require","exports","module","../../lib/oop","../behaviour","../../token_iterator","../../lib/lang"],function(e,t,r){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var s=e("../../lib/oop"),n=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator,a=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,r,s,n){if('"'==n||"'"==n){var a=n,l=s.doc.getTextRange(r.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&r.getWrapBehavioursEnabled())return{text:a+l+a,selection:!1};var c=r.getCursorPosition(),_=s.doc.getLine(c.row),d=_.substring(c.column,c.column+1),u=new o(s,c.row,c.column),m=u.getCurrentToken();if(d==a&&(i(m,"attribute-value")||i(m,"string")))return{text:"",selection:[1,1]};if(m||(m=u.stepBackward()),!m)return;for(;i(m,"tag-whitespace")||i(m,"whitespace");)m=u.stepBackward();var g=!d||d.match(/\s/);if(i(m,"attribute-equals")&&(g||">"==d)||i(m,"decl-attribute-equals")&&(g||"?"==d))return{text:a+a,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,r,i,s){var n=i.doc.getTextRange(s);if(!s.isMultiLine()&&('"'==n||"'"==n)){if(i.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)==n)return s.end.column++,s}}),this.add("autoclosing","insertion",function(e,t,r,s,n){if(">"==n){var a=r.getSelectionRange().start,l=new o(s,a.row,a.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(i(c,"tag-name")||i(c,"tag-whitespace")||i(c,"attribute-name")||i(c,"attribute-equals")||i(c,"attribute-value")))return;if(i(c,"reference.attribute-value"))return;if(i(c,"attribute-value")){var _=c.value.charAt(0);if('"'==_||"'"==_){var d=c.value.charAt(c.value.length-1),u=l.getCurrentTokenColumn()+c.value.length;if(u>a.column||u==a.column&&_!=d)return}}for(;!i(c,"tag-name");)if(c=l.stepBackward(),"<"==c.value){c=l.stepForward();break}var m=l.getCurrentTokenRow(),g=l.getCurrentTokenColumn();if(i(l.stepBackward(),"end-tag-open"))return;var h=c.value;if(m==a.row&&(h=h.substring(0,a.column-g)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,r,i,s){if("\n"==s){var n=r.getCursorPosition(),a=i.getLine(n.row),l=new o(i,n.row,n.column),c=l.getCurrentToken();if(c&&-1!==c.type.indexOf("tag-close")){if("/>"==c.value)return;for(;c&&-1===c.type.indexOf("tag-name");)c=l.stepBackward();if(!c)return;var _=c.value,d=l.getCurrentTokenRow();if(!(c=l.stepBackward())||-1!==c.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[_]){var u=i.getTokenAt(n.row,n.column+1),a=i.getLine(d),m=this.$getIndent(a),g=m+i.getTabString();return u&&"-1}var s=e("../../lib/oop"),n=(e("../../lib/lang"),e("../../range").Range),o=e("./fold_mode").FoldMode,a=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){o.call(this),this.voidElements=e||{},this.optionalEndTags=s.mixin({},this.voidElements),t&&s.mixin(this.optionalEndTags,t)};s.inherits(l,o);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,r){var i=this._getFirstTagInLine(e,r);return i?i.closing||!i.tagName&&i.selfClosing?"markbeginend"==t?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())?"":this._findEndTagInLine(e,r,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(e,r)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/"==o.value;break}return s}if(i(o,"tag-close"))return s.selfClosing="/>"==o.value,s;s.start.column+=o.value.length}return null},this._findEndTagInLine=function(e,t,r,s){for(var n=e.getTokens(t),o=0,a=0;a"==t.value,r.end.row=e.getCurrentTokenRow(),r.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var r=e[e.length-1];if(t&&r.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(r.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,r){var i=this._getFirstTagInLine(e,r);if(!i)return this.getCommentFoldWidget(e,r)&&e.getCommentFoldRange(r,e.getLine(r).length);var s,o=i.closing||i.selfClosing,l=[];if(o)for(var c=new a(e,r,i.end.column),_={row:r,column:i.start.column};s=this._readTagBackward(c);){if(s.selfClosing){if(l.length)continue;return s.start.column+=s.tagName.length+2,s.end.column-=2,n.fromPoints(s.start,s.end)}if(s.closing)l.push(s);else if(this._pop(l,s),0==l.length)return s.start.column+=s.tagName.length+2,s.start.row==s.end.row&&s.start.column-1}function s(e,t){for(var r=new o(e,t.row,t.column),s=r.getCurrentToken();s&&!i(s,"tag-name");)s=r.stepBackward();if(s)return s.value}function n(e,t){for(var r=new o(e,t.row,t.column),s=r.getCurrentToken();s&&!i(s,"attribute-name");)s=r.stepBackward();if(s)return s.value}var o=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],l=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],c=a.concat(l),_={html:{manifest:1},head:{},title:{},base:{href:1,target:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},noscript:{href:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},section:{},nav:{},article:{pubdate:1},aside:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},header:{},footer:{},address:{},main:{},p:{},hr:{},pre:{},blockquote:{cite:1},ol:{start:1,reversed:1},ul:{},li:{value:1},dl:{},dt:{},dd:{},figure:{},figcaption:{},div:{},a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},em:{},strong:{},small:{},s:{},cite:{},q:{cite:1},dfn:{},abbr:{},data:{},time:{datetime:1},code:{},var:{},samp:{},kbd:{},sub:{},sup:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{},bdo:{},span:{},br:{},wbr:{},ins:{cite:1,datetime:1},del:{cite:1,datetime:1},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},embed:{src:1,height:1,width:1,type:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},param:{name:1,value:1},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},source:{src:1,type:1,media:1},track:{kind:1,src:1,srclang:1,label:1,default:1},canvas:{width:1,height:1},map:{name:1},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},svg:{},math:{},table:{summary:1},caption:{},colgroup:{span:1},col:{span:1},tbody:{},thead:{},tfoot:{},tr:{},td:{headers:1,rowspan:1,colspan:1},th:{headers:1,rowspan:1,colspan:1,scope:1},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},fieldset:{disabled:1,form:1,name:1},legend:{},label:{form:1,for:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},datalist:{},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},output:{for:1,form:1,name:1},progress:{value:1,max:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},details:{open:1},summary:{},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},menu:{type:1,label:1},dialog:{open:1}},d=Object.keys(_),u=function(){};(function(){this.getCompletions=function(e,t,r,s){var n=t.getTokenAt(r.row,r.column);return n?i(n,"tag-name")||i(n,"tag-open")||i(n,"end-tag-open")?this.getTagCompletions(e,t,r,s):i(n,"tag-whitespace")||i(n,"attribute-name")?this.getAttributeCompletions(e,t,r,s):i(n,"attribute-value")?this.getAttributeValueCompletions(e,t,r,s):/&[a-z]*$/i.test(t.getLine(r.row).substr(0,r.column))?this.getHTMLEntityCompletions(e,t,r,s):[]:[]},this.getTagCompletions=function(e,t,r,i){return d.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompletions=function(e,t,r,i){var n=s(t,r);if(!n)return[];var o=c;return n in _&&(o=o.concat(Object.keys(_[n]))),o.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})},this.getAttributeValueCompletions=function(e,t,r,i){var o=s(t,r),a=n(t,r);if(!o)return[];var l=[];return o in _&&a in _[o]&&"object"==typeof _[o][a]&&(l=Object.keys(_[o][a])),l.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:Number.MAX_VALUE}})},this.getHTMLEntityCompletions=function(e,t,r,i){return["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"].map(function(e){return{caption:e,snippet:e,meta:"html entity",score:Number.MAX_VALUE}})}}).call(u.prototype),t.HtmlCompletions=u}),define("ace/mode/html",["require","exports","module","../lib/oop","../lib/lang","./text","./javascript","./css","./html_highlight_rules","./behaviour/xml","./folding/html","./html_completions","../worker/worker_client"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("../lib/lang"),n=e("./text").Mode,o=e("./javascript").Mode,a=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,_=e("./folding/html").FoldMode,d=e("./html_completions").HtmlCompletions,u=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],g=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new d,this.createModeDelegates({"js-":o,"css-":a}),this.foldingRules=new _(this.voidElements,s.arrayToMap(g))};i.inherits(h,n),function(){this.blockComment={start:"\x3c!--",end:"--\x3e"},this.voidElements=s.arrayToMap(m),this.getNextLineIndent=function(e,t,r){return this.$getIndent(t)},this.checkOutdent=function(e,t,r){return!1},this.getCompletions=function(e,t,r,i){return this.$completer.getCompletions(e,t,r,i)},this.createWorker=function(e){if(this.constructor==h){var t=new u(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/php",["require","exports","module","../lib/oop","./text","./php_highlight_rules","./php_highlight_rules","./matching_brace_outdent","../range","../worker/worker_client","./php_completions","./behaviour/cstyle","./folding/cstyle","../unicode","./html","./javascript","./css"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("./text").Mode,n=e("./php_highlight_rules").PhpHighlightRules,o=e("./php_highlight_rules").PhpLangHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=(e("../range").Range,e("../worker/worker_client").WorkerClient),c=e("./php_completions").PhpCompletions,_=e("./behaviour/cstyle").CstyleBehaviour,d=e("./folding/cstyle").FoldMode,u=e("../unicode"),m=e("./html").Mode,g=e("./javascript").Mode,h=e("./css").Mode,p=function(e){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new _,this.$completer=new c,this.foldingRules=new d};i.inherits(p,s),function(){this.tokenRe=new RegExp("^["+u.packages.L+u.packages.Mn+u.packages.Mc+u.packages.Nd+u.packages.Pc+"_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+u.packages.L+u.packages.Mn+u.packages.Mc+u.packages.Nd+u.packages.Pc+"_]|\\s])+","g"),this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,e),n=s.tokens,o=s.state;if(n.length&&"comment"==n[n.length-1].type)return i;if("start"==e){var a=t.match(/^.*[\{\(\[:]\s*$/);a&&(i+=r)}else if("doc-start"==e){if("doc-start"!=o)return"";var a=t.match(/^\s*(\/?)\*/);a&&(a[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,r){return this.$outdent.checkOutdent(t,r)},this.autoOutdent=function(e,t,r){this.$outdent.autoOutdent(t,r)},this.getCompletions=function(e,t,r,i){return this.$completer.getCompletions(e,t,r,i)},this.$id="ace/mode/php-inline"}.call(p.prototype);var f=function(e){if(e&&e.inline){var t=new p;return t.createWorker=this.createWorker,t.inlinePhp=!0,t}m.call(this),this.HighlightRules=n,this.createModeDelegates({"js-":g,"css-":h,"php-":p}),this.foldingRules.subModes["php-"]=new d};i.inherits(f,m),function(){this.createWorker=function(e){var t=new l(["ace"],"ace/mode/php_worker","PhpWorker");return t.attachToDocument(e.getDocument()),this.inlinePhp&&t.call("setOptions",[{inline:!0}]),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/php"}.call(f.prototype),t.Mode=f}),define("ace/mode/sql_highlight_rules",["require","exports","module","../lib/oop","./text_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,n=function(){var e=this.createKeywordMapper({"support.function":"avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",keyword:"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant","constant.language":"true|false","storage.type":"int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer"},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};i.inherits(n,s),t.SqlHighlightRules=n}),define("ace/mode/sql",["require","exports","module","../lib/oop","./text","./sql_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("./text").Mode,n=e("./sql_highlight_rules").SqlHighlightRules,o=function(){this.HighlightRules=n,this.$behaviour=this.$defaultBehaviour};i.inherits(o,s),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(o.prototype),t.Mode=o}),define("ace/mode/xml",["require","exports","module","../lib/oop","../lib/lang","./text","./xml_highlight_rules","./behaviour/xml","./folding/xml","../worker/worker_client"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("../lib/lang"),n=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,l=e("./folding/xml").FoldMode,c=e("../worker/worker_client").WorkerClient,_=function(){this.HighlightRules=o,this.$behaviour=new a,this.foldingRules=new l};i.inherits(_,n),function(){this.voidElements=s.arrayToMap([]),this.blockComment={start:"\x3c!--",end:"--\x3e"},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(_.prototype),t.Mode=_}),define("ace/mode/json_highlight_rules",["require","exports","module","../lib/oop","./text_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,n=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};i.inherits(n,s),t.JsonHighlightRules=n}),define("ace/mode/json",["require","exports","module","../lib/oop","./text","./json_highlight_rules","./matching_brace_outdent","./behaviour/cstyle","./folding/cstyle","../worker/worker_client"],function(e,t,r){"use strict";var i=e("../lib/oop"),s=e("./text").Mode,n=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,_=function(){this.HighlightRules=n,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new l};i.inherits(_,s),function(){this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t);if("start"==e){t.match(/^.*[\{\(\[]\s*$/)&&(i+=r)}return i},this.checkOutdent=function(e,t,r){return this.$outdent.checkOutdent(t,r)},this.autoOutdent=function(e,t,r){this.$outdent.autoOutdent(t,r)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){ e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(_.prototype),t.Mode=_}),define("ace/mode/markdown_highlight_rules",["require","exports","module","../lib/oop","../lib/lang","./text_highlight_rules","./javascript_highlight_rules","./xml_highlight_rules","./html_highlight_rules","./css_highlight_rules"],function(e,t,r){"use strict";function i(e,t){return{token:"support.function",regex:"^\\s*```"+e+"\\s*$",push:t+"start"}}var s=e("../lib/oop"),n=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,l=e("./xml_highlight_rules").XmlHighlightRules,c=e("./html_highlight_rules").HtmlHighlightRules,_=e("./css_highlight_rules").CssHighlightRules,d=function(e){return"(?:[^"+n.escapeRegExp(e)+"\\\\]|\\\\.)*"},u=function(){c.call(this),this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s*[^ #]|\s+#.)/,next:"header"},i("(?:javascript|js)","jscode-"),i("xml","xmlcode-"),i("html","htmlcode-"),i("css","csscode-"),{token:"support.function",regex:"^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",next:"githubblock"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+d("]")+")(\\]\\s*\\[)("+d("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\[)("+d("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+d('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},{token:"support.function",regex:"^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",next:"githubblock"},{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:[{token:"support.function",regex:"^\\s*```",next:"start"},{defaultToken:"support.function"}]}),this.embedRules(a,"jscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(c,"htmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(_,"csscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(l,"xmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.normalizeRules()};s.inherits(u,o),t.MarkdownHighlightRules=u}),define("ace/mode/folding/markdown",["require","exports","module","../../lib/oop","./fold_mode","../../range"],function(e,t,r){"use strict";var i=e("../../lib/oop"),s=e("./fold_mode").FoldMode,n=e("../../range").Range,o=t.FoldMode=function(){};i.inherits(o,s),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,r){var i=e.getLine(r);return this.foldingStartMarker.test(i)?"`"==i[0]&&"start"==e.bgTokenizer.getState(r)?"end":"start":""},this.getFoldWidgetRange=function(e,t,r){function i(t){return(d=e.getTokens(t)[0])&&0===d.type.lastIndexOf(u,0)}function s(){var e=d.value[0];return"="==e?6:"-"==e?5:7-d.value.search(/[^#]/)}var o=e.getLine(r),a=o.length,l=e.getLength(),c=r,_=r;if(o.match(this.foldingStartMarker)){if("`"==o[0]){if("start"!==e.bgTokenizer.getState(r)){for(;++r0&&(o=e.getLine(r),!("`"==o[0]&"```"==o.substring(0,3))););return new n(r,o.length,c,0)}var d,u="markup.heading";if(i(r)){for(var m=s();++r=m)break}if((_=r-(d&&-1!=["=","-"].indexOf(d.value[0])?2:1))>c)for(;_>c&&/^\s*$/.test(e.getLine(_));)_--;if(_>c){var h=e.getLine(_).length;return new n(c,a,_,h)}}}}}.call(o.prototype)}),define("cf/js/syntax/cfmarkdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules","ace/mode/json_highlight_rules","ace/mode/sql_highlight_rules","cf/js/syntax/cf_php_highlight_rules"],function(e,t,r){"use strict";function i(e,t){return{token:"support.function",regex:"^```\\s*"+e+"\\s*$",next:t+"start"}}var s=e("ace/lib/oop"),n=e("ace/mode/text_highlight_rules").TextHighlightRules,o=e("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,a=e("ace/mode/xml_highlight_rules").XmlHighlightRules,l=e("ace/mode/html_highlight_rules").HtmlHighlightRules,c=e("ace/mode/css_highlight_rules").CssHighlightRules,_=e("cf/js/syntax/cf_php_highlight_rules").PhpHighlightRules,d=e("cf/js/syntax/cf_php_highlight_rules").PhpLangHighlightRules,u=e("ace/mode/sql_highlight_rules").SqlHighlightRules,m=(e("ace/mode/json_highlight_rules").JsonHighlightRules,function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"keyword",regex:twttr.txt.regexSupplant("(?:^|\\s)#{atSigns}[a-zA-Z0-9._-]{1,20}")},{token:["constant","constant"],regex:twttr.txt.regexSupplant("(#{hashSigns})(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)")},{token:["support.function","support.function","support.function"],regex:"(`+)([^\\r]*?[^`])(\\1)"},{token:"support.function",regex:"^[ ]{4}.+"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.1",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+(e.length-1)},regex:"^#{1,6} "},i("javascript","js-"),i("js","js-"),i("xml","xml-"),i("html","html-"),i("css","css-"),i("php","php-"),i("sql","sql-"),i("json","json-"),{token:"support.function",regex:"^```[a-zA-Z]+\\s*$",next:"githubblock"},{token:"string",regex:"^>[ ].+$",next:"blockquote"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:'(\\[)(\\[[^\\]]*\\]|[^\\[\\]]*)(\\]\\([ \\t]*)(?)((?:[ \t]*"(?:.*?)"[ \\t]*)?)(\\))'},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"},{token:"constant",regex:"^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock"},{token:["string","string","string"],regex:"\\b([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)\\b"},{token:["string","string","string"],regex:"\\b([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)\\b"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"},{token:"text",regex:"[^\\*_@%$`\\[#<>]+?"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:".+"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string",regex:".+"}],githubblock:[{token:"support.function",regex:"^```",next:"start"},{token:"support.function",regex:".+"}]},this.embedRules(o,"js-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(_,"html-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(c,"css-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(a,"xml-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(d,"php-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(u,"sql-",[{token:"support.function",regex:"^```",next:"start"}]),this.embedRules(u,"json-",[{token:"support.function",regex:"^```",next:"start"}]);var e=(new l).getRules();for(var t in e)this.$rules[t]?this.$rules[t]=this.$rules[t].concat(e[t]):this.$rules[t]=e[t]});s.inherits(m,n),t.CFMarkdownHighlightRules=m}),define("cf/js/syntax/cfmarkdown",["require","exports","module","ace/lib/oop","ace/mode/php","ace/mode/sql","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/json","ace/mode/html","ace/tokenizer","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","./cf_php_highlight_rules","./cfmarkdown_highlight_rules"],function(e,t,r){"use strict";var i=e("ace/lib/oop"),s=e("ace/mode/text").Mode,n=e("ace/mode/javascript").Mode,o=e("ace/mode/xml").Mode,a=e("ace/mode/html").Mode,l=e("ace/mode/php").Mode,c=e("cf/js/syntax/cf_php_highlight_rules").PhpLangHighlightRules,_=e("ace/mode/sql").Mode,d=e("ace/mode/json").Mode,u=e("ace/tokenizer").Tokenizer,m=e("./cfmarkdown_highlight_rules").CFMarkdownHighlightRules,g=e("ace/mode/folding/markdown").FoldMode;l.$tokenizer=new u((new c).getRules());var h=function(){var e=new m;this.$tokenizer=new u(e.getRules()),this.$embeds=e.getEmbeds(),this.createModeDelegates({"js-":n,"xml-":o,"html-":a,"php-":l,"sql-":_,"json-":d}),this.foldingRules=new g};i.inherits(h,s),function(){this.getNextLineIndent=function(e,t,r){if("listblock"==e){var i=/^((?:\s+)?)([-+*][ ]+)/.exec(t);return i?new Array(i[1].length+1).join(" ")+i[2]:""}return this.$getIndent(t)}}.call(h.prototype),t.Mode=h}),define("ace/requirejs/text!ace/ext/static.css",[],function(){return".ace_static_highlight {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\n font-size: 12px;\n white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n width: 2em;\n text-align: right;\n padding: 0 3px 0 0;\n margin-right: 3px;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n top: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n content: counter(ace_line, decimal);\n counter-increment: ace_line;\n}\n.ace_static_highlight {\n counter-reset: ace_line;\n}\n"}),define("cf/js/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/requirejs/text!ace/ext/static.css"],function(e,t,r){"use strict";var i=e("ace/edit_session").EditSession,s=e("ace/layer/text").Text,n=e("ace/requirejs/text!ace/ext/static.css");t.render=function(e,t,r,o,a){o=parseInt(o||1,10);var l=new i("");l.setMode(t),l.setUseWorker(!1);var c=new s(document.createElement("div"));c.setSession(l),c.config={characterWidth:10,lineHeight:20},l.setValue(e);for(var _=[],d=[],u="",m=l.getLength(),g=0;g"),c.$renderLine(d,g,!0,!1),d.push("");1!==o&&(u=" style='counter-reset: item "+o+";' ");var h="
\t\t\t:language\t\t\t\t
\t\t\t\t\t
    :code
\t\t\t\t
\t\t\t
".replace(/:cssClass/,r.cssClass).replace(/:language/,a).replace(/:olStyle/,u).replace(/:gutter/,_.join("")).replace(/:code/,d.join(""));return c.destroy(),{css:n+r.cssText,html:h}}}),define("cf/js/capsule",["require","exports","module","jquery","ace/ace","ace/mode/text","ace/lib/dom","ace/tokenizer","cf/js/syntax/cf_php_highlight_rules","cf/js/syntax/cfmarkdown","cf/js/static_highlight","ace/theme/textmate"],function(e,t,r,i){"use strict";var s=e("ace/ace"),n=e("ace/config");n.set("packaged",!0),n.set("basePath",requirejsL10n.ace+"/build/src-min"),window.editors={},window.Capsule={},Capsule.delaySave={},Capsule.spinner=function(e){return void 0===e&&(e=capsuleL10n.loading),'
'+e+"
"},Capsule.authCheck=function(e){return void 0===e.result||"unauthorized"!=e.result||(alert(e.msg),location.href=e.login_url+"?redirect_to="+encodeURIComponent(location.href),!1)},Capsule.get=function(e,t,r,s){i.get(e,t,function(e){Capsule.authCheck(e)&&r.call(this,e)},s)},Capsule.post=function(e,t,r,s){i.post(e,t,function(e){Capsule.authCheck(e)&&r.call(this,e)},s)},Capsule.loadExcerpt=function(e,t){e.addClass("unstyled").children().addClass("transparent").end().append(Capsule.spinner()),Capsule.get(capsuleL10n.endpointAjax,{capsule_action:"post_excerpt",post_id:t},function(r){r.html&&(e.replaceWith(r.html),e=i("#post-content-"+t),Capsule.postExpandable(e),e.scrollintoview({offset:10}).find(".post-content").linkify(),Capsule.highlightCodeSyntax(e.find(".post-content")))},"json")},Capsule.centerEditor=function(e){i("#post-edit-"+e).scrollintoview({duration:200,offset:15})},Capsule.loadEditor=function(e,t){e.addClass("unstyled").children().addClass("transparent").end().append(Capsule.spinner()),Capsule.get(capsuleL10n.endpointAjax,{capsule_action:"post_editor",post_id:t},function(r){r.html&&(e.replaceWith(r.html),Capsule.sizeEditor(),Capsule.initEditor(t,r.content),Capsule.centerEditor(t))},"json")},Capsule.createPost=function(e){e.addClass("unstyled").children().addClass("transparent").end().append(Capsule.spinner()),Capsule.post(capsuleL10n.endpointAjax,{capsule_action:"create_post"},function(t){t.html&&(e.replaceWith(t.html),Capsule.sizeEditor(),Capsule.initEditor(t.post_id,""),Capsule.centerEditor(t.post_id))},"json")},Capsule.watchForEditorChanges=function(e,t,r){void 0===t&&(t=i("#post-edit-"+e)),void 0===r&&(r=!1);var s=(new Date).getTime()/1e3,n=date("g:i a",s),o=function(){Capsule.delaySave[e]=null,Capsule.updatePost(e,window.editors[e].getSession().getValue())},a=function(){return t.clearQueue().addClass("dirty"),Capsule.delaySave[e]&&clearTimeout(Capsule.delaySave[e]),Capsule.delaySave[e]=setTimeout(o,1e4),window.editors[e].getSession().removeEventListener("change",a),!0};r||t.find("span.post-last-saved").html(n),window.editors[e].getSession().on("change",a),t.delay(50).queue(function(){i(this).removeClass("dirty").dequeue()})},Capsule.updatePost=function(e,t,r,s){void 0===s&&(s=!1),void 0===r&&(r=i("#post-edit-"+e)),s?r.addClass("unstyled").children().addClass("transparent").end().append(Capsule.spinner()):r.addClass("saving");var n=t.replace(/^```([^]+?)^```/gm,"").replace(/
([^]+?)<\/pre>/gm,"").replace(/([^]+?)<\/code>/gm,""),o=twttr.txt.extractMentions(n),a=twttr.txt.extractHashtags(n),l=Capsule.extractCodeLanguages(t);Capsule.post(capsuleL10n.endpointAjax,{capsule_action:"update_post",post_id:e,content:t,projects:JSON.stringify(o),post_tag:JSON.stringify(a),code:JSON.stringify(l)},function(t){"success"==t.result&&(s?Capsule.loadExcerpt(r,e):(r.removeClass("saving"),Capsule.updatePostTaxonomies(r,t.projects_html,t.tags_html,t.code_html),Capsule.watchForEditorChanges(e,r)))},"json")},Capsule.updatePostTaxonomies=function(e,t,r,i){e.find(".post-meta").html(t+r+i)},Capsule.deletePost=function(e,t){t.addClass("unstyled").children().addClass("transparent").end().append(Capsule.spinner()),Capsule.post(capsuleL10n.endpointAjax,{capsule_action:"delete_post",post_id:e},function(e){"success"==e.result?t.replaceWith(e.html):(alert(e.msg),t.removeClass("unstyled").children().removeClass("transparent").end().find(".spinner").remove())},"json")},Capsule.undeletePost=function(e,t){t.addClass("unstyled").children().addClass("transparent").end().append(Capsule.spinner()),Capsule.post(capsuleL10n.endpointAjax,{capsule_action:"undelete_post",post_id:e},function(r){"success"==r.result?(t.replaceWith(r.html),t=i("#post-content-"+e),Capsule.postExpandable(t)):(alert(r.msg),t.removeClass("unstyled").children().removeClass("transparent").end().find(".spinner").remove())},"json")},Capsule.stickPost=function(e,t){t.addClass("sticky-loading"),Capsule.post(capsuleL10n.endpointAjax,{capsule_action:"stick_post",post_id:e},function(e){"success"==e.result?t.addClass("sticky").removeClass("sticky-loading"):alert(e.msg)},"json")},Capsule.unstickPost=function(e,t){t.addClass("sticky-loading"),Capsule.post(capsuleL10n.endpointAjax,{capsule_action:"unstick_post",post_id:e},function(e){"success"==e.result?t.removeClass("sticky sticky sticky-loading"):alert(e.msg)},"json")},Capsule.initEditor=function(t,r){window.Capsule.CFMarkdownMode=e("cf/js/syntax/cfmarkdown").Mode,window.editors[t]=s.edit("ace-editor-"+t),window.editors[t].getSession().setUseWrapMode(!0),window.editors[t].getSession().setMode("cf/js/syntax/cfmarkdown"),window.editors[t].setShowPrintMargin(!1),window.editors[t].setTheme("ace/theme/twilight"),window.editors[t].getSession().setValue(r),window.editors[t].container.style.lineHeight="20px",window.editors[t].renderer.setPadding(12),window.editors[t].commands.addCommand({name:"save",bindKey:{mac:"Command-S",win:"Ctrl-S"},exec:function(e){Capsule.updatePost(t,e.getSession().getValue())}}),window.editors[t].commands.addCommand({name:"recenter",bindKey:{mac:"Command-Shift-0",win:"Ctrl-Shift-0"},exec:function(e){Capsule.centerEditor(t)}}),window.editors[t].commands.addCommand({name:"close",bindKey:{mac:"Esc",win:"Esc"},exec:function(e){var r=i("#post-edit-"+t);Capsule.updatePost(t,window.editors[t].getSession().getValue(),r,!0)}}),window.editors[t].commands.addCommand({name:"cfindent",bindKey:{mac:"Command-]",win:"Ctrl-]"},exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine"}),window.editors[t].commands.addCommand({name:"cfoutdent",bindKey:{mac:"Command-[",win:"Ctrl-["},exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine"}),Capsule.watchForEditorChanges(t,void 0,!0),window.editors[t].focus()},Capsule.sizeEditor=function(){i(".ace-editor:not(.resized)").each(function(){i(this).height(i(window).height()-i(this).closest("article").find("header").height()-60+"px")})},Capsule.saveAllEditors=function(){i(".ace-editor").each(function(){var e=i(this).closest("article"),t=e.data("post-id");e.hasClass("dirty")&&Capsule.updatePost(t,window.editors[t].getSession().getValue())})},Capsule.extractCodeLanguages=function(e){var t=new RegExp("^```[a-zA-Z]+\\s*$","gm"),r=new RegExp("[a-zA-Z]+",""),s=[],n=e.match(t);return null!=n&&n.length&&i.each(n,function(e,t){s.push(t.match(r)[0].replace(/^js$/i,"javascript"))}),s},Capsule.postExpandable=function(e){e.find(".post-content:first")[0].scrollHeight>e[0].scrollHeight&&e.addClass("toggleable")},Capsule.highlightCodeSyntax=function(t){void 0===t&&(t=i("article:not(.edit) .post-content")),t.each(function(){i(this).find("pre>code").each(function(t){var r,s,n,o=i(this),a=[""];o.find("br").each(function(e){a.push("")}),r=a.join("\n")+o.text(),"\n"===r.substr(-1)&&(r=r.substr(0,r.length-1)),s=o.attr("class"),s?(s=s.match(/language-([-_a-z0-9]+)/i),s&&(s=s[1].toLowerCase()),"js"===s&&(s="javascript")):s="code",n="code"===s||"bash"===s?"text":s;try{e(["cf/js/static_highlight","ace/theme/textmate","ace/mode/"+n,"ace/lib/dom","ace/tokenizer","cf/js/syntax/cf_php_highlight_rules"],function(t,i,n){var a;if(n){if(n=n.Mode,n=new n,"php"===s){var l=e("ace/tokenizer").Tokenizer,c=e("cf/js/syntax/cf_php_highlight_rules").PhpLangHighlightRules;n.$tokenizer=new l((new c).getRules())}a=t.render(r,n,i,1,s),o.closest("pre").replaceWith(a.html)}})}catch(e){throw console.log(e),e}})})},i(function(){Capsule.highlightCodeSyntax(),i(".js-search").suggest(capsuleSearchURL+"?capsule_action=search",{delay:500,minchars:2,multiple:!0,multipleSep:" ",resultsClass:"search_results",selectClass:"search_selected",matchClass:"search_match"}),i(".js-search").closest("form").on("submit",function(e){e.preventDefault();var t=i(".js-search",i(this)),r=i(this);if(t.val(t.val().trim()),1==r.data("permastruct"))return window.location.href=this.action+"search/"+encodeURIComponent(this.s.value).replace(/%20/g,"+").replace(/%2f/gi,"/"),!1;r.unbind("submit").submit()}),i(document).on("click","article.excerpt.toggleable .post-content",function(e){i(this).closest("article.excerpt.toggleable").removeClass("excerpt").addClass("open")}).on("click","article:not(.excerpt, a.post-edit-link) .post-toggle",function(e){i(this).closest("article").removeClass("open").addClass("excerpt")}).on("click","article .post-edit-link",function(e){var t=i(this).closest("article"),r=t.data("post-id");Capsule.loadEditor(t,r),e.preventDefault()}).on("dblclick","body:not(.capsule-server) article:not(.edit) .post-content",function(e){var t=i(this).closest("article"),r=t.data("post-id");Capsule.loadEditor(t,r)}).on("dblclick","body:not(.capsule-server) article:not(.edit) pre, body:not(.capsule-server) article:not(.edit) code",function(e){e.stopPropagation()}).on("click","article .post-close-link",function(e){e.preventDefault();var t=i(this).closest("article"),r=t.data("post-id");Capsule.updatePost(r,window.editors[r].getSession().getValue(),t,!0)}).on("click","article .post-save-link",function(e){e.preventDefault();var t=i(this).closest("article"),r=t.data("post-id");Capsule.updatePost(r,window.editors[r].getSession().getValue()),window.editors[r].focus()}).on("click","article .post-delete-link",function(e){e.stopPropagation(),e.preventDefault();var t=i(this).closest("article"),r=t.data("post-id");Capsule.deletePost(r,t)}).on("click","article .post-undelete-link",function(e){e.stopPropagation(),e.preventDefault();var t=i(this).closest("article"),r=t.data("post-id");Capsule.undeletePost(r,t)}).on("click","article:not(.sticky) .post-sticky-link",function(e){e.stopPropagation(),e.preventDefault();var t=i(this).closest("article"),r=t.data("post-id");Capsule.stickPost(r,t)}).on("click","article.sticky .post-unsticky-link",function(e){e.stopPropagation(),e.preventDefault();var t=i(this).closest("article"),r=t.data("post-id");Capsule.unstickPost(r,t)}).on("mousewheel","article.edit .post-content",function(e){e.preventDefault()}).on("click",".post-new-link",function(e){e.preventDefault(),i("#sidr-projects").is(":visible")&&i.sidr("close","sidr-projects"),i("#sidr-tags").is(":visible")&&i.sidr("close","sidr-tags"),i("#sidr-servers").is(":visible")&&i.sidr("close","sidr-servers");var t=i("
").height("400px");i(".body").prepend(t),Capsule.createPost(t)}).on("click",".filter-toggle",function(e){e.preventDefault();var t=i("body"),r=i("#header"),s=r.find('input[name="s"]'),n=r.find(".filter");t.hasClass("filters-on")?(n.slideUp(),i("body").removeClass("filters-on"),s.removeAttr("disabled")):(n.slideDown(),i("body").addClass("filters-on"),s.attr("disabled","disabled"))}).on("heartbeat-connection-lost",function(){i('body:not(".capsule-server")').addClass("connection-lost")}).on("heartbeat-connection-restored",function(){i("body").removeClass("connection-lost")}).on("keyup",null,"shift+h",function(){location.href=i(".main-nav .home").attr("href")}).on("keyup",null,"shift+n",function(){i(".main-nav .post-new-link").click()}).on("keyup",null,"shift+f",function(){i(".js-search").focus().select()}),i(window).on("resize",function(){Capsule.sizeEditor()}).on("blur",function(){Capsule.saveAllEditors()}),i("article").each(function(){Capsule.postExpandable(i(this))}),i(".main-nav").find(".projects").sidr({name:"sidr-projects",source:"#projects"}).end().find(".tags").sidr({name:"sidr-tags",source:"#tags"}).end().find(".servers").sidr({name:"sidr-servers",source:"#servers"}),i(":not(.edit) .post-content").linkify()})}); /*** assets/js/load.js ***/ -assets,js,load.js; \ No newline at end of file +require(["cf/js/capsule"]); \ No newline at end of file diff --git a/ui/package-lock.json b/ui/package-lock.json index e84ae67..fe52f70 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -44,9 +44,9 @@ } }, "uglify-js": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.12.tgz", - "integrity": "sha512-4jxrTXlV0HaXTsNILfXW0eey7Qo8qHYM6ih5ZNh45erDWU2GHmKDmekwBTskDb12h+kdd2DBvdzqVb47YzNmTA==", + "version": "3.3.14", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.14.tgz", + "integrity": "sha512-OY8VPQU25q09gQRbC+Ekk3xgEVBmYFEfVcgS47ksjTiNht2LmLlUkWutyi38ZsDSToJHwbe76kDGwmD226Z2Fg==", "requires": { "commander": "2.14.1", "source-map": "0.6.1"