Version Description
- fixed bug: code mirror not initializing properly when new user tries to edit post for the first time
- fixed bug: CodeMirror no longer trying to load on "All Post" and "All Pages"
- fixed bug: Font and theme were reset to default when switching to the visual editor and back
Download this release
Release Info
Developer | nixdns |
Plugin | HTML Editor Syntax Highlighter |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- html-editor-syntax-highlighter.php +8 -5
- lib/hesh.min.js +1 -1
- readme.txt +9 -4
html-editor-syntax-highlighter.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* @since 1.7.
|
5 |
* @package HESH_plugin
|
6 |
*
|
7 |
* Plugin Name: HTML Editor Syntax Highlighter
|
@@ -16,10 +16,10 @@
|
|
16 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
17 |
* GitHub Branch: master
|
18 |
* GitHub Plugin URI: https://github.com/mukhortov/HESH-WordPress-Plugin
|
19 |
-
* Version: 1.7.
|
20 |
* Requires at least: 4.0.11
|
21 |
* Tested up to: 4.5.2
|
22 |
-
* Stable tag: 1.7.
|
23 |
**/
|
24 |
|
25 |
if ( preg_match( '#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'] ) ) {
|
@@ -37,8 +37,11 @@ class wp_html_editor_syntax {
|
|
37 |
// Enqueues scripts and styles for hesh.js
|
38 |
public function admin_enqueue_scripts () {
|
39 |
|
40 |
-
if (
|
41 |
-
|
|
|
|
|
|
|
42 |
|
43 |
wp_enqueue_style( 'codemirror', HESH_LIBS.'codemirror.min.css', false, $ver );
|
44 |
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* @since 1.7.2
|
5 |
* @package HESH_plugin
|
6 |
*
|
7 |
* Plugin Name: HTML Editor Syntax Highlighter
|
16 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
17 |
* GitHub Branch: master
|
18 |
* GitHub Plugin URI: https://github.com/mukhortov/HESH-WordPress-Plugin
|
19 |
+
* Version: 1.7.2
|
20 |
* Requires at least: 4.0.11
|
21 |
* Tested up to: 4.5.2
|
22 |
+
* Stable tag: 1.7.2
|
23 |
**/
|
24 |
|
25 |
if ( preg_match( '#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'] ) ) {
|
37 |
// Enqueues scripts and styles for hesh.js
|
38 |
public function admin_enqueue_scripts () {
|
39 |
|
40 |
+
if (!strstr($_SERVER['SCRIPT_NAME'], 'post.php') &&
|
41 |
+
!strstr($_SERVER['SCRIPT_NAME'], 'post-new.php')) return;
|
42 |
+
|
43 |
+
$plugData = get_plugin_data( __FILE__ ); // need this temporary var to support versions of php < 5.4
|
44 |
+
$ver = $plugData['Version'];
|
45 |
|
46 |
wp_enqueue_style( 'codemirror', HESH_LIBS.'codemirror.min.css', false, $ver );
|
47 |
|
lib/hesh.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d,e){var f=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&h[f.text.charAt(i)]||h[f.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,i+1)),m=c(a,g(b.line,i+(k>0?1:0)),k,l||null,e);return null==m?null:{from:g(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(0>c?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c==(c>0?a.lastLine():a.firstLine())?!1:null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&b(a,i[j].head,!1,d);if(k&&a.getLine(k.from.line).length<=e){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,g(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=e&&h.push(a.markText(k.to,g(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!c)return m;setTimeout(m,800)}}function e(a){a.operation(function(){i&&(i(),i=null),i=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",e),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return b(this,a,c,d)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b=0;b<a.state.activeLines.length;b++)a.removeLineClass(a.state.activeLines[b],"wrap",f),a.removeLineClass(a.state.activeLines[b],"background",g),a.removeLineClass(a.state.activeLines[b],"gutter",h)}function c(a,b){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function d(a,d){for(var e=[],i=0;i<d.length;i++){var j=d[i];if(j.empty()){var k=a.getLineHandleVisualStart(j.head.line);e[e.length-1]!=k&&e.push(k)}}c(a.state.activeLines,e)||a.operation(function(){b(a);for(var c=0;c<e.length;c++)a.addLineClass(e[c],"wrap",f),a.addLineClass(e[c],"background",g),a.addLineClass(e[c],"gutter",h);a.state.activeLines=e})}function e(a,b){d(a,b.ranges)}var f="CodeMirror-activeline",g="CodeMirror-activeline-background",h="CodeMirror-activeline-gutter";a.defineOption("styleActiveLine",!1,function(c,f,g){var h=g&&g!=a.Init;f&&!h?(c.state.activeLines=[],d(c,c.listSelections()),c.on("beforeSelectionChange",e)):!f&&h&&(c.off("beforeSelectionChange",e),b(c),delete c.state.activeLines)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};a.defineMode("xml",function(d,e){function f(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d)return a.eat("!")?a.eat("[")?a.match("CDATA[")?c(i("atom","]]>")):null:a.match("--")?c(i("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(j(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=i("meta","?>"),"meta"):(A=a.eat("/")?"closeTag":"openTag",b.tokenize=g,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function g(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=f,A=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return A="equals",null;if("<"==c){b.tokenize=f,b.state=n,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=h(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=g;break}return"string"};return b.isInAttribute=!0,b}function i(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=f;break}c.next()}return a}}function j(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=j(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=f;break}return c.tokenize=j(a-1),c.tokenize(b,c)}}return"meta"}}function k(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(x.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function l(a){a.context&&(a.context=a.context.prev)}function m(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!x.contextGrabbers.hasOwnProperty(c)||!x.contextGrabbers[c].hasOwnProperty(b))return;l(a)}}function n(a,b,c){return"openTag"==a?(c.tagStart=b.column(),o):"closeTag"==a?p:n}function o(a,b,c){return"word"==a?(c.tagName=b.current(),B="tag",s):(B="error",o)}function p(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&x.implicitlyClosed.hasOwnProperty(c.context.tagName)&&l(c),c.context&&c.context.tagName==d||x.matchClosing===!1?(B="tag",q):(B="tag error",r)}return B="error",r}function q(a,b,c){return"endTag"!=a?(B="error",q):(l(c),n)}function r(a,b,c){return B="error",q(a,b,c)}function s(a,b,c){if("word"==a)return B="attribute",t;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||x.autoSelfClosers.hasOwnProperty(d)?m(c,d):(m(c,d),c.context=new k(c,d,e==c.indented)),n}return B="error",s}function t(a,b,c){return"equals"==a?u:(x.allowMissing||(B="error"),s(a,b,c))}function u(a,b,c){return"string"==a?v:"word"==a&&x.allowUnquoted?(B="string",s):(B="error",s(a,b,c))}function v(a,b,c){return"string"==a?v:s(a,b,c)}var w=d.indentUnit,x={},y=e.htmlMode?b:c;for(var z in y)x[z]=y[z];for(var z in e)x[z]=e[z];var A,B;return f.isInText=!0,{startState:function(a){var b={tokenize:f,state:n,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;A=null;var c=b.tokenize(a,b);return(c||A)&&"comment"!=c&&(B=null,b.state=b.state(A||c,a,b),B&&(c="error"==B?c+" error":B)),c},indent:function(b,c,d){var e=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+w;if(e&&e.noIndent)return a.Pass;if(b.tokenize!=g&&b.tokenize!=f)return d?d.match(/^(\s*)/)[0].length:0;if(b.tagName)return x.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(c))return 0;var h=c&&/^<(\/)?([\w_:\.-]*)/.exec(c);if(h&&h[1])for(;e;){if(e.tagName==h[2]){e=e.prev;break}if(!x.implicitlyClosed.hasOwnProperty(e.tagName))break;e=e.prev}else if(h)for(;e;){var i=x.contextGrabbers[e.tagName];if(!i||!i.hasOwnProperty(h[2]))break;e=e.prev}for(;e&&e.prev&&!e.startOfLine;)e=e.prev;return e?e.indent+w:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(a){a.state==u&&(a.state=s)}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(b.lastType)||"quasi"==b.lastType&&/\{\s*$/.test(a.string.slice(0,a.pos-(c||0)))}a.defineMode("javascript",function(c,d){function e(a){for(var b,c=!1,d=!1;null!=(b=a.next());){if(!c){if("/"==b&&!d)return;"["==b?d=!0:d&&"]"==b&&(d=!1)}c=!c&&"\\"==b}}function f(a,b,c){return va=a,wa=c,b}function g(a,c){var d=a.next();if('"'==d||"'"==d)return c.tokenize=h(d),c.tokenize(a,c);if("."==d&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return f("number","number");if("."==d&&a.match(".."))return f("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(d))return f(d);if("="==d&&a.eat(">"))return f("=>","operator");if("0"==d&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),f("number","number");if("0"==d&&a.eat(/o/i))return a.eatWhile(/[0-7]/i),f("number","number");if("0"==d&&a.eat(/b/i))return a.eatWhile(/[01]/i),f("number","number");if(/\d/.test(d))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),f("number","number");if("/"==d)return a.eat("*")?(c.tokenize=i,i(a,c)):a.eat("/")?(a.skipToEnd(),f("comment","comment")):b(a,c,1)?(e(a),a.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),f("regexp","string-2")):(a.eatWhile(Ea),f("operator","operator",a.current()));if("`"==d)return c.tokenize=j,j(a,c);if("#"==d)return a.skipToEnd(),f("error","error");if(Ea.test(d))return a.eatWhile(Ea),f("operator","operator",a.current());if(Ca.test(d)){a.eatWhile(Ca);var g=a.current(),k=Da.propertyIsEnumerable(g)&&Da[g];return k&&"."!=c.lastType?f(k.type,k.style,g):f("variable","variable",g)}}function h(a){return function(b,c){var d,e=!1;if(za&&"@"==b.peek()&&b.match(Fa))return c.tokenize=g,f("jsonld-keyword","meta");for(;null!=(d=b.next())&&(d!=a||e);)e=!e&&"\\"==d;return e||(c.tokenize=g),f("string","string")}}function i(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=g;break}d="*"==c}return f("comment","comment")}function j(a,b){for(var c,d=!1;null!=(c=a.next());){if(!d&&("`"==c||"$"==c&&a.eat("{"))){b.tokenize=g;break}d=!d&&"\\"==c}return f("quasi","string-2",a.current())}function k(a,b){b.fatArrowAt&&(b.fatArrowAt=null);var c=a.string.indexOf("=>",a.start);if(!(0>c)){for(var d=0,e=!1,f=c-1;f>=0;--f){var g=a.string.charAt(f),h=Ga.indexOf(g);if(h>=0&&3>h){if(!d){++f;break}if(0==--d)break}else if(h>=3&&6>h)++d;else if(Ca.test(g))e=!0;else{if(/["'\/]/.test(g))return;if(e&&!d){++f;break}}}e&&!d&&(b.fatArrowAt=f)}}function l(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function m(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0;for(var d=a.context;d;d=d.prev)for(var c=d.vars;c;c=c.next)if(c.name==b)return!0}function n(a,b,c,d,e){var f=a.cc;for(Ia.state=a,Ia.stream=e,Ia.marked=null,Ia.cc=f,Ia.style=b,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var g=f.length?f.pop():Aa?x:w;if(g(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return Ia.marked?Ia.marked:"variable"==c&&m(a,d)?"variable-2":b}}}function o(){for(var a=arguments.length-1;a>=0;a--)Ia.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=Ia.state;if(Ia.marked="def",c.context){if(b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;d.globalVars&&(c.globalVars={name:a,next:c.globalVars})}}function r(){Ia.state.context={prev:Ia.state.context,vars:Ia.state.localVars},Ia.state.localVars=Ja}function s(){Ia.state.localVars=Ia.state.context.vars,Ia.state.context=Ia.state.context.prev}function t(a,b){var c=function(){var c=Ia.state,d=c.indented;if("stat"==c.lexical.type)d=c.lexical.indented;else for(var e=c.lexical;e&&")"==e.type&&e.align;e=e.prev)d=e.indented;c.lexical=new l(d,Ia.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function u(){var a=Ia.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function v(a){function b(c){return c==a?p():";"==a?o():p(b)}return b}function w(a,b){return"var"==a?p(t("vardef",b.length),X,v(";"),u):"keyword a"==a?p(t("form"),x,w,u):"keyword b"==a?p(t("form"),w,u):"{"==a?p(t("}"),S,u):";"==a?p():"if"==a?("else"==Ia.state.lexical.info&&Ia.state.cc[Ia.state.cc.length-1]==u&&Ia.state.cc.pop()(),p(t("form"),x,w,u,aa)):"function"==a?p(ga):"for"==a?p(t("form"),ba,w,u):"variable"==a?p(t("stat"),L):"switch"==a?p(t("form"),x,t("}","switch"),v("{"),S,u,u):"case"==a?p(x,v(":")):"default"==a?p(v(":")):"catch"==a?p(t("form"),r,v("("),ha,v(")"),w,u,s):"class"==a?p(t("form"),ia,u):"export"==a?p(t("stat"),ma,u):"import"==a?p(t("stat"),na,u):"module"==a?p(t("form"),Y,t("}"),v("{"),S,u,u):"async"==a?p(w):o(t("stat"),x,v(";"),u)}function x(a){return z(a,!1)}function y(a){return z(a,!0)}function z(a,b){if(Ia.state.fatArrowAt==Ia.stream.start){var c=b?H:G;if("("==a)return p(r,t(")"),Q(Y,")"),u,v("=>"),c,s);if("variable"==a)return o(r,Y,v("=>"),c,s)}var d=b?D:C;return Ha.hasOwnProperty(a)?p(d):"function"==a?p(ga,d):"keyword c"==a?p(b?B:A):"("==a?p(t(")"),A,ta,v(")"),u,d):"operator"==a||"spread"==a?p(b?y:x):"["==a?p(t("]"),ra,u,d):"{"==a?R(N,"}",null,d):"quasi"==a?o(E,d):"new"==a?p(I(b)):p()}function A(a){return a.match(/[;\}\)\],]/)?o():o(x)}function B(a){return a.match(/[;\}\)\],]/)?o():o(y)}function C(a,b){return","==a?p(x):D(a,b,!1)}function D(a,b,c){var d=0==c?C:D,e=0==c?x:y;return"=>"==a?p(r,c?H:G,s):"operator"==a?/\+\+|--/.test(b)?p(d):"?"==b?p(x,v(":"),e):p(e):"quasi"==a?o(E,d):";"!=a?"("==a?R(y,")","call",d):"."==a?p(M,d):"["==a?p(t("]"),A,v("]"),u,d):void 0:void 0}function E(a,b){return"quasi"!=a?o():"${"!=b.slice(b.length-2)?p(E):p(x,F)}function F(a){return"}"==a?(Ia.marked="string-2",Ia.state.tokenize=j,p(E)):void 0}function G(a){return k(Ia.stream,Ia.state),o("{"==a?w:x)}function H(a){return k(Ia.stream,Ia.state),o("{"==a?w:y)}function I(a){return function(b){return"."==b?p(a?K:J):o(a?y:x)}}function J(a,b){return"target"==b?(Ia.marked="keyword",p(C)):void 0}function K(a,b){return"target"==b?(Ia.marked="keyword",p(D)):void 0}function L(a){return":"==a?p(u,w):o(C,v(";"),u)}function M(a){return"variable"==a?(Ia.marked="property",p()):void 0}function N(a,b){return"variable"==a||"keyword"==Ia.style?(Ia.marked="property",p("get"==b||"set"==b?O:P)):"number"==a||"string"==a?(Ia.marked=za?"property":Ia.style+" property",p(P)):"jsonld-keyword"==a?p(P):"modifier"==a?p(N):"["==a?p(x,v("]"),P):"spread"==a?p(x):void 0}function O(a){return"variable"!=a?o(P):(Ia.marked="property",p(ga))}function P(a){return":"==a?p(y):"("==a?o(ga):void 0}function Q(a,b){function c(d,e){if(","==d){var f=Ia.state.lexical;return"call"==f.info&&(f.pos=(f.pos||0)+1),p(a,c)}return d==b||e==b?p():p(v(b))}return function(d,e){return d==b||e==b?p():o(a,c)}}function R(a,b,c){for(var d=3;d<arguments.length;d++)Ia.cc.push(arguments[d]);return p(t(b,c),Q(a,b),u)}function S(a){return"}"==a?p():o(w,S)}function T(a){return Ba&&":"==a?p(V):void 0}function U(a,b){return"="==b?p(y):void 0}function V(a){return"variable"==a?(Ia.marked="variable-3",p(W)):void 0}function W(a,b){return"<"==b?p(Q(V,">"),W):"["==a?p(v("]"),W):void 0}function X(){return o(Y,T,$,_)}function Y(a,b){return"modifier"==a?p(Y):"variable"==a?(q(b),p()):"spread"==a?p(Y):"["==a?R(Y,"]"):"{"==a?R(Z,"}"):void 0}function Z(a,b){return"variable"!=a||Ia.stream.match(/^\s*:/,!1)?("variable"==a&&(Ia.marked="property"),"spread"==a?p(Y):"}"==a?o():p(v(":"),Y,$)):(q(b),p($))}function $(a,b){return"="==b?p(y):void 0}function _(a){return","==a?p(X):void 0}function aa(a,b){return"keyword b"==a&&"else"==b?p(t("form","else"),w,u):void 0}function ba(a){return"("==a?p(t(")"),ca,v(")"),u):void 0}function ca(a){return"var"==a?p(X,v(";"),ea):";"==a?p(ea):"variable"==a?p(da):o(x,v(";"),ea)}function da(a,b){return"in"==b||"of"==b?(Ia.marked="keyword",p(x)):p(C,ea)}function ea(a,b){return";"==a?p(fa):"in"==b||"of"==b?(Ia.marked="keyword",p(x)):o(x,v(";"),fa)}function fa(a){")"!=a&&p(x)}function ga(a,b){return"*"==b?(Ia.marked="keyword",p(ga)):"variable"==a?(q(b),p(ga)):"("==a?p(r,t(")"),Q(ha,")"),u,T,w,s):void 0}function ha(a){return"spread"==a?p(ha):o(Y,T,U)}function ia(a,b){return"variable"==a?(q(b),p(ja)):void 0}function ja(a,b){return"extends"==b?p(x,ja):"{"==a?p(t("}"),ka,u):void 0}function ka(a,b){return"variable"==a||"keyword"==Ia.style?"static"==b?(Ia.marked="keyword",p(ka)):(Ia.marked="property","get"==b||"set"==b?p(la,ga,ka):p(ga,ka)):"*"==b?(Ia.marked="keyword",p(ka)):";"==a?p(ka):"}"==a?p():void 0}function la(a){return"variable"!=a?o():(Ia.marked="property",p())}function ma(a,b){return"*"==b?(Ia.marked="keyword",p(qa,v(";"))):"default"==b?(Ia.marked="keyword",p(x,v(";"))):o(w)}function na(a){return"string"==a?p():o(oa,qa)}function oa(a,b){return"{"==a?R(oa,"}"):("variable"==a&&q(b),"*"==b&&(Ia.marked="keyword"),p(pa))}function pa(a,b){return"as"==b?(Ia.marked="keyword",p(oa)):void 0}function qa(a,b){return"from"==b?(Ia.marked="keyword",p(x)):void 0}function ra(a){return"]"==a?p():o(y,sa)}function sa(a){return"for"==a?o(ta,v("]")):","==a?p(Q(B,"]")):o(Q(y,"]"))}function ta(a){return"for"==a?p(ba,ta):"if"==a?p(x,ta):void 0}function ua(a,b){return"operator"==a.lastType||","==a.lastType||Ea.test(b.charAt(0))||/[,.]/.test(b.charAt(0))}var va,wa,xa=c.indentUnit,ya=d.statementIndent,za=d.jsonld,Aa=d.json||za,Ba=d.typescript,Ca=d.wordCharacters||/[\w$\xa1-\uffff]/,Da=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":a("new"),"delete":d,"throw":d,"debugger":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":f,"false":f,"null":f,undefined:f,NaN:f,Infinity:f,"this":a("this"),"class":a("class"),"super":a("atom"),"yield":d,"export":a("export"),"import":a("import"),"extends":d,await:d,async:a("async")};if(Ba){var h={type:"variable",style:"variable-3"},i={"interface":a("class"),"implements":d,namespace:d,module:a("module"),"enum":a("module"),"public":a("modifier"),"private":a("modifier"),"protected":a("modifier"),"abstract":a("modifier"),as:e,string:h,number:h,"boolean":h,any:h};for(var j in i)g[j]=i[j]}return g}(),Ea=/[+\-*&%=<>!?|~^]/,Fa=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ga="([{}])",Ha={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Ia={state:null,column:null,marked:null,cc:null},Ja={name:"this",next:{name:"arguments"}};return u.lex=!0,{startState:function(a){var b={tokenize:g,lastType:"sof",cc:[],lexical:new l((a||0)-xa,0,"block",!1),localVars:d.localVars,context:d.localVars&&{vars:d.localVars},indented:a||0};return d.globalVars&&"object"==typeof d.globalVars&&(b.globalVars=d.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),k(a,b)),b.tokenize!=i&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==va?c:(b.lastType="operator"!=va||"++"!=wa&&"--"!=wa?va:"incdec",n(b,c,va,wa,a))},indent:function(b,c){if(b.tokenize==i)return a.Pass;if(b.tokenize!=g)return 0;var e=c&&c.charAt(0),f=b.lexical;if(!/^\s*else\b/.test(c))for(var h=b.cc.length-1;h>=0;--h){var j=b.cc[h];if(j==u)f=f.prev;else if(j!=aa)break}"stat"==f.type&&"}"==e&&(f=f.prev),ya&&")"==f.type&&"stat"==f.prev.type&&(f=f.prev);var k=f.type,l=e==k;return"vardef"==k?f.indented+("operator"==b.lastType||","==b.lastType?f.info+1:0):"form"==k&&"{"==e?f.indented:"form"==k?f.indented+xa:"stat"==k?f.indented+(ua(b,c)?ya||xa:0):"switch"!=f.info||l||0==d.doubleIndentSwitch?f.align?f.column+(l?0:1):f.indented+(l?0:xa):f.indented+(/^(?:case|default)\b/.test(c)?xa:2*xa)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Aa?null:"/*",blockCommentEnd:Aa?null:"*/",lineComment:Aa?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Aa?"json":"javascript",jsonldMode:za,jsonMode:Aa,expressionAllowed:b,skipExpression:function(a){var b=a.cc[a.cc.length-1];b!=x&&b!=y||a.cc.pop()}}}),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:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&"/"==c){b.tokenize=null;break}d="*"==c}return["comment","comment"]}a.defineMode("css",function(b,c){function d(a,b){return o=b,a}function e(a,b){var c=a.next();if(r[c]){var e=r[c](a,b);if(e!==!1)return e}return"@"==c?(a.eatWhile(/[\w\\\-]/),d("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?d(null,"compare"):'"'==c||"'"==c?(b.tokenize=f(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),d("atom","hash")):"!"==c?(a.match(/^\s*\w*/),d("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),d("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?d(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?d("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?d(null,c):"u"==c&&a.match(/rl(-prefix)?\(/)||"d"==c&&a.match("omain(")||"r"==c&&a.match("egexp(")?(a.backUp(1),b.tokenize=g,d("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),d("property","word")):d(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),d("number","unit")):a.match(/^-[\w\\\-]+/)?(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?d("variable-2","variable-definition"):d("variable-2","variable")):a.match(/^\w+-/)?d("meta","meta"):void 0}function f(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){")"==a&&b.backUp(1);break}f=!f&&"\\"==e}return(e==a||!f&&")"!=a)&&(c.tokenize=null),d("string","string")}}function g(a,b){return a.next(),a.match(/\s*[\"\')]/,!1)?b.tokenize=null:b.tokenize=f(")"),d(null,"(")}function h(a,b,c){this.type=a,this.indent=b,this.prev=c}function i(a,b,c,d){return a.context=new h(c,b.indentation()+(d===!1?0:q),a.context),c}function j(a){return a.context.prev&&(a.context=a.context.prev),a.context.type}function k(a,b,c){return E[c.context.type](a,b,c)}function l(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return k(a,b,c)}function m(a){var b=a.current().toLowerCase();p=B.hasOwnProperty(b)?"atom":A.hasOwnProperty(b)?"keyword":"variable"}var n=c.inline;c.propertyKeywords||(c=a.resolveMode("text/css"));var o,p,q=b.indentUnit,r=c.tokenHooks,s=c.documentTypes||{},t=c.mediaTypes||{},u=c.mediaFeatures||{},v=c.mediaValueKeywords||{},w=c.propertyKeywords||{},x=c.nonStandardPropertyKeywords||{},y=c.fontProperties||{},z=c.counterDescriptors||{},A=c.colorKeywords||{},B=c.valueKeywords||{},C=c.allowNested,D=c.supportsAtComponent===!0,E={};return E.top=function(a,b,c){if("{"==a)return i(c,b,"block");if("}"==a&&c.context.prev)return j(c);if(D&&/@component/.test(a))return i(c,b,"atComponentBlock");if(/^@(-moz-)?document$/.test(a))return i(c,b,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(a))return i(c,b,"atBlock");if(/^@(font-face|counter-style)/.test(a))return c.stateArg=a,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return i(c,b,"at");if("hash"==a)p="builtin";else if("word"==a)p="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return i(c,b,"interpolation");if(":"==a)return"pseudo";if(C&&"("==a)return i(c,b,"parens")}return c.context.type},E.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return w.hasOwnProperty(d)?(p="property","maybeprop"):x.hasOwnProperty(d)?(p="string-2","maybeprop"):C?(p=b.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==a?"block":C||"hash"!=a&&"qualifier"!=a?E.top(a,b,c):(p="error","block")},E.maybeprop=function(a,b,c){return":"==a?i(c,b,"prop"):k(a,b,c)},E.prop=function(a,b,c){if(";"==a)return j(c);if("{"==a&&C)return i(c,b,"propBlock");if("}"==a||"{"==a)return l(a,b,c);if("("==a)return i(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(b.current())){if("word"==a)m(b);else if("interpolation"==a)return i(c,b,"interpolation")}else p+=" error";return"prop"},E.propBlock=function(a,b,c){return"}"==a?j(c):"word"==a?(p="property","maybeprop"):c.context.type},E.parens=function(a,b,c){return"{"==a||"}"==a?l(a,b,c):")"==a?j(c):"("==a?i(c,b,"parens"):"interpolation"==a?i(c,b,"interpolation"):("word"==a&&m(b),"parens")},E.pseudo=function(a,b,c){return"word"==a?(p="variable-3",c.context.type):k(a,b,c)},E.documentTypes=function(a,b,c){return"word"==a&&s.hasOwnProperty(b.current())?(p="tag",c.context.type):E.atBlock(a,b,c)},E.atBlock=function(a,b,c){if("("==a)return i(c,b,"atBlock_parens");if("}"==a||";"==a)return l(a,b,c);if("{"==a)return j(c)&&i(c,b,C?"block":"top");if("interpolation"==a)return i(c,b,"interpolation");if("word"==a){var d=b.current().toLowerCase();p="only"==d||"not"==d||"and"==d||"or"==d?"keyword":t.hasOwnProperty(d)?"attribute":u.hasOwnProperty(d)?"property":v.hasOwnProperty(d)?"keyword":w.hasOwnProperty(d)?"property":x.hasOwnProperty(d)?"string-2":B.hasOwnProperty(d)?"atom":A.hasOwnProperty(d)?"keyword":"error"}return c.context.type},E.atComponentBlock=function(a,b,c){return"}"==a?l(a,b,c):"{"==a?j(c)&&i(c,b,C?"block":"top",!1):("word"==a&&(p="error"),c.context.type)},E.atBlock_parens=function(a,b,c){return")"==a?j(c):"{"==a||"}"==a?l(a,b,c,2):E.atBlock(a,b,c)},E.restricted_atBlock_before=function(a,b,c){return"{"==a?i(c,b,"restricted_atBlock"):"word"==a&&"@counter-style"==c.stateArg?(p="variable","restricted_atBlock_before"):k(a,b,c)},E.restricted_atBlock=function(a,b,c){return"}"==a?(c.stateArg=null,j(c)):"word"==a?(p="@font-face"==c.stateArg&&!y.hasOwnProperty(b.current().toLowerCase())||"@counter-style"==c.stateArg&&!z.hasOwnProperty(b.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},E.keyframes=function(a,b,c){return"word"==a?(p="variable","keyframes"):"{"==a?i(c,b,"top"):k(a,b,c)},E.at=function(a,b,c){return";"==a?j(c):"{"==a||"}"==a?l(a,b,c):("word"==a?p="tag":"hash"==a&&(p="builtin"),"at")},E.interpolation=function(a,b,c){return"}"==a?j(c):"{"==a||";"==a?l(a,b,c):("word"==a?p="variable":"variable"!=a&&"("!=a&&")"!=a&&(p="error"),"interpolation")},{startState:function(a){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new h(n?"block":"top",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||e)(a,b);return c&&"object"==typeof c&&(o=c[1],c=c[0]),p=c,b.state=E[b.state](o,a,b),p},indent:function(a,b){var c=a.context,d=b&&b.charAt(0),e=c.indent;return"prop"!=c.type||"}"!=d&&")"!=d||(c=c.prev),c.prev&&("}"!=d||"block"!=c.type&&"top"!=c.type&&"interpolation"!=c.type&&"restricted_atBlock"!=c.type?(")"!=d||"parens"!=c.type&&"atBlock_parens"!=c.type)&&("{"!=d||"at"!=c.type&&"atBlock"!=c.type)||(e=Math.max(0,c.indent-q),c=c.prev):(c=c.prev,e=c.indent)),e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var d=["domain","regexp","url","url-prefix"],e=b(d),f=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],g=b(f),h=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=b(h),j=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],k=b(j),l=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","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"],m=b(l),n=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],o=b(n),p=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],q=b(p),r=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],s=b(r),t=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],u=b(t),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=b(v),x=d.concat(f).concat(h).concat(j).concat(l).concat(n).concat(t).concat(v);
|
2 |
-
a.registerHelper("hintWords","css",x),a.defineMIME("text/css",{documentTypes:e,mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,tokenHooks:{"/":function(a,b){return a.eat("*")?(b.tokenize=c,c(a,b)):!1}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},":":function(a){return a.match(/\s*\{/)?[null,"{"]:!1},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return a.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},"@":function(a){return a.eat("{")?[null,"interpolation"]:a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),a.defineMIME("text/x-gss",{documentTypes:e,mediaTypes:g,mediaFeatures:i,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(a,b){return a.eat("*")?(b.tokenize=c,c(a,b)):!1}},name:"css",helperType:"gss"})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):d.match(/<\/?$/)&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function c(a){var b=i[a];return b?b:i[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function d(a,b){var d=a.match(c(b));return d?d[2]:""}function e(a,b){return new RegExp((b?"^":"")+"</s*"+a+"s*>","i")}function f(a,b){for(var c in a)for(var d=b[c]||(b[c]=[]),e=a[c],f=e.length-1;f>=0;f--)d.unshift(e[f])}function g(a,b){for(var c=0;c<a.length;c++){var e=a[c];if(!e[0]||e[1].test(d(b,e[0])))return e[2]}}var h={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},i={};a.defineMode("htmlmixed",function(c,d){function i(d,f){var h,l=j.token(d,f.htmlState),m=/\btag\b/.test(l);if(m&&!/[<>\s\/]/.test(d.current())&&(h=f.htmlState.tagName&&f.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(h))f.inTag=h+" ";else if(f.inTag&&m&&/>$/.test(d.current())){var n=/^([\S]+) (.*)/.exec(f.inTag);f.inTag=null;var o=">"==d.current()&&g(k[n[1]],n[2]),p=a.getMode(c,o),q=e(n[1],!0),r=e(n[1],!1);f.token=function(a,c){return a.match(q,!1)?(c.token=i,c.localState=c.localMode=null,null):b(a,r,c.localMode.token(a,c.localState))},f.localMode=p,f.localState=a.startState(p,j.indent(f.htmlState,""))}else f.inTag&&(f.inTag+=d.current(),d.eol()&&(f.inTag+=" "));return l}var j=a.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag}),k={},l=d&&d.tags,m=d&&d.scriptTypes;if(f(h,k),l&&f(l,k),m)for(var n=m.length-1;n>=0;n--)k.script.unshift(["type",m[n].matches,m[n].mode]);return{startState:function(){var b=a.startState(j);return{token:i,inTag:null,localMode:null,localState:null,htmlState:b}},copyState:function(b){var c;return b.localState&&(c=a.copyState(b.localMode,b.localState)),{token:b.token,inTag:b.inTag,localMode:b.localMode,localState:c,htmlState:a.copyState(j,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return!b.localMode||/^\s*<\//.test(c)?j.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||j}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("wordpresspost",function(b,c){function d(a,b){b.isInShortcode=!0;var c=h.token(a,b.shortcodeState),d=b.shortcodeState.tokenize.isInText,f=b.shortcodeState.tokenize.isInEscape;if(d)b.token=e;else if(f&&/\]/.test(a.current())){var g=a.current(),i=g.search(/\]/);a.backUp(g.length-i-1),"]"!==a.peek()&&(b.token=e)}return c}function e(b,c){c.isInShortcode=!1;var e=g.token(b,c.htmlmixedState),i=c.htmlmixedState.htmlState.tokenize.isInText;if(i&&/\[/.test(b.current())&&!c.htmlmixedState.localState&&null===e){var j=b.current(),k=j.search(/\[/);b.backUp(j.length-k),null==c.shortcodeState&&(c.shortcodeState=a.startState(h,g.indent(c.htmlmixedState,""))),c.token=d}else i&&/<!\-\-more|<!\-\-noteaser\-\->/.test(b.current())&&!c.htmlmixedState.localState&&"comment"===e&&(b.backUp(b.current().length),c.token=f);return e}function f(a,b){return a.match("<!--more")?"meta":a.match("-->")||a.match("<!--noteaser-->")?(b.token=e,"meta"):(a.eatWhile(/[^\-\/]/),"string")}var g=a.getMode(b,{name:"htmlmixed",multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag}),h=a.getMode(b,{name:"shortcode",multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag});return{startState:function(){var a=g.startState();return{token:e,isInShortcode:!1,shortcodeState:null,htmlmixedState:a}},copyState:function(b){var c;return b.shortcodeState&&(c=a.copyState(h,b.shortcodeState)),{token:b.token,shortcodeState:c,htmlmixedState:a.copyState(g,b.htmlmixedState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return b.isInShortcode?b.isInShortcode?h.indent(b.shortcodeState,c):a.Pass:g.indent(b.htmlmixedState,c)},innerMode:function(a){return a.isInShortcode?{state:a.shortcodeState,mode:h}:{state:a.htmlmixedState,mode:g}}}},"htmlmixed","shortcode")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={allowUnquoted:!0,allowMissing:!0,caseFold:!0};a.defineMode("shortcode",function(a,c){function d(a,b){var c=a.next();return"["===c?"["===a.peek()?(b.tokenize=e,"comment"):/\s/.test(a.peek())?null:(x=a.eat("/")?"closeTag":"openTag",b.tokenize=f,"tag bracket"):(a.eatWhile(/[^\[]/),null)}function e(a,b){var c=function(a,b){return a.next(),b.tokenize=d,"comment"};c.isInEscape=!0;var e=a.next();return"]"===e&&"]"===a.peek()&&(b.tokenize=c),a.eatWhile(/[^\]]/),null}function f(a,b){var c=a.next();if("]"===c||"/"===c&&a.eat("]"))return b.tokenize=d,x="endTag","tag bracket";if("="===c)return x="equals",null;if("["===c){b.tokenize=d,b.state=j,b.tagName=b.tagStart=null;var e=b.tokenize(a,b);return e?e+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=g(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=\[\]\"\']*[^\s\u00a0=\[\]\"\'\/]/),"word")}function g(a){var b=function(b,c){var d=b.next();return d===a?(c.tokenize=f,"string"):/[\[\]]/.test(d)?"string error":(b.eatWhile(/[^\[\]\'\"]/),"string")};return b.isInAttribute=!0,b}function h(a,b,c){this.tagHistory=[b],a.context&&(this.tagHistory=this.tagHistory.concat(a.context.tagHistory)),this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c}function i(a){a.context&&(a.context=a.context.prev)}function j(a,b,c){return"openTag"===a?(c.tagStart=b.column(),k):"closeTag"===a?l:j}function k(a,b,c){if("word"===a){var d=b.current();return/[\[\]\/\'\"<>&]/.test(d)?y="error":(c.tagName=b.current(),y="tag"),o}return y="error",k}function l(a,b,c){if("word"===a){var d=b.current();if(c.context&&c.context.tagName===d||t.matchClosing===!1)return y="tag",m;if(c.context&&c.context.tagHistory.indexOf(d)>0){for(var e=c.context.tagHistory.indexOf(d),f=0;e>f;f++)i(c);return y="tag",m}return y="tag error",n}return y="error",n}function m(a,b,c){return"endTag"!==a?(y="error",m):(i(c),j)}function n(a,b,c){return y="error",m(a,b,c)}function o(a,b,c){if("word"===a)return y=/^[a-z0-9_\-]+$/i.test(b.current())?"attribute":"error",p;if("endTag"===a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,c.context=new h(c,d,e===c.indented),j}return y="error",o}function p(a,b,c){return"equals"===a?q:(t.allowMissing||(y="error"),o(a,b,c))}function q(a,b,c){return"string"===a?r:"word"===a&&t.allowUnquoted?(y="string",o):(y="error",o(a,b,c))}function r(a,b,c){return"string"===a?r:o(a,b,c)}var s=a.indentUnit,t={},u=b;for(var v in u)t[v]=u[v];for(var w in c)t[w]=c[w];var x,y;return d.isInText=!0,e.isInEscape=!0,{startState:function(a){var b={tokenize:d,state:j,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;x=null;var c=b.tokenize(a,b);return(c||x)&&"comment"!==c&&(y=null,b.state=b.state(x||c,a,b),y&&(c="error"===y?c+" error":y)),c},indent:function(a,b,c){var e=a.context;if(a.tokenize.isInAttribute)return a.tagStart===a.indented?a.stringStartCol+1:a.indented+s;if(a.tokenize!==f&&a.tokenize!==d)return c?c.match(/^(\s*)/)[0].length:0;if(a.tagName)return t.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+s*(t.multilineTagIndentFactor||1);var g=b&&/^\[(\/)?([\w_:\.-]*)/.exec(b);if(g&&g[1])for(;e;){if(e.tagName===g[2]){e=e.prev;break}break}for(;e&&e.prev&&!e.startOfLine;)e=e.prev;return e?e.indent+s:a.baseIndent||0},skipAttribute:function(a){a.state===q&&(a.state=o)}}})});var CodeMirrorCSS=CodeMirrorCSS||{};CodeMirrorCSS.Themes=["3024-day","3024-night","abcdef","ambiance-mobile","ambiance","base16-dark","base16-light","bespin","blackboard","cobalt","colorforth","dracula","eclipse","elegant","erlang-dark","hopscotch","icecoder","isotope","lesser-dark","liquibyte","material","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","railscasts","rubyblue","seti","solarized","the-matrix","tomorrow-night-bright","tomorrow-night-eighties","ttcn","twilight","vibrant-ink","xq-dark","xq-light","yeti","zenburn"],function(a,b,c,d,e,f){"use strict";function g(){var g=null,h=!1,i=!1,j=a.getElementById("content"),k=null!=a.getElementById("post_ID")?a.getElementById("post_ID").value:0,l=a.getElementById("content-html"),m=a.getElementById("content-tmce"),n=-1!==a.cookie.indexOf("editor%3Dtinymce"),o=null!=a.getElementById("content-tmce"),p=a.getElementById("ed_toolbar"),q=a.getElementById("wp-content-editor-container"),r="heshFullscreen",s=null!=a.getElementById("save-post")?a.getElementById("save-post"):a.getElementById("publish"),t={mode:"wordpresspost",tabMode:"indent",theme:"material",lineNumbers:!0,matchBrackets:!0,indentUnit:4,indentWithTabs:!0,enterMode:"keep",lineWrapping:!0,autofocus:!0,styleActiveLine:!0,electricChars:!1,extraKeys:{F11:function(){H()},Esc:function(){H()},"Ctrl-S":function(){s.click()},"Cmd-S":function(){s.click()}}},u=function(b){var c="; "+a.cookie,d=c.split("; "+b+"=");return 2===d.length?d.pop().split(";").shift():void 0},v=u("hesh_plugin_font_size")||"12";t.theme=u("hesh_plugin_theme")||"material";var w,x,y=function(){g=c.fromTextArea(j,t),C(),g.on("change",function(){g.save(),clearTimeout(x),x=setTimeout(B,3e3)}),g.on("cursorActivity",function(){var b=g.getCursor();a.cookie="hesh_plugin_pos="+k+","+b.line+","+b.ch});var d=(u("hesh_plugin_pos")||"0,0,0").split(",");k===d[0]&&g.setCursor(parseFloat(d[1]),parseFloat(d[2])),G(),M(),h=!0,z(),b.addEventListener("resize",A),b.setTimeout(B,3e3)},z=function(){var b=a.querySelector(".CodeMirror");b.style.marginTop=p.clientHeight+"px"},A=function(){clearTimeout(w),w=setTimeout(z,250)},B=function(){null!==a.querySelector(".CodeMirror")&&(a.querySelector("textarea.wp-editor-area").style.height=a.querySelector(".CodeMirror").clientHeight+"px")},C=function(){if(!i){var b={more:["<!--more-->",""],comment:["<!-- "," -->"],code:["<code>","</code>"],li:["<li>","</li>"],ol:["<ol>","</ol>"],ul:["<ul>","</ul>"],img:['<img src="$" alt="','">',"Enter the URL of the image"],ins:["<ins>","</ins>"],del:["<del>","</del>"],link:['<a href="$">',"</a>","Enter the destination URL"],blockquote:["\r<blockquote>","</blockquote>\r"],h3:["<h3>","</h3>"],h2:["<h2>","</h2>"],h1:["<h1>","</h1>"],p:["<p>","</p>"],i:["<em>","</em>"],b:["<strong>","</strong>"]};for(var c in b){var d=b[c],e=d[2]?'data-prompt="'+d[2]+'"':"";p.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_'+c+"\" data-start='"+d[0]+"' data-end='"+d[1]+"' "+e+' class="ed_button button cm_ed_button" value="'+c+'">'),a.getElementById("cm_content_"+c).onclick=D}J(),L(),I(),i=!0}},D=function(){var c=g.getCursor("start"),d=this.getAttribute("data-start"),f=this.getAttribute("data-end"),h=this.getAttribute("data-prompt")||null,i=g.getSelection();"cm_content_link"===this.id&&e?(e.open(),a.getElementById("wp-link-submit").onclick=function(){var a=e.getAttrs();d='<a href="'+a.href+'" title="'+a.title+'" target="'+a.target+'">',g.replaceSelection(d+i+"</a>"),e.close(),g.setCursor(c.line,c.ch+d.length),g.focus()}):(h&&(d=d.replace("$",b.prompt(h,""))),g.replaceSelection(d+i+f),g.setCursor(c.line,c.ch+d.length),g.focus())},E=function(){h&&(f.switchto&&f.switchto(this),g.toTextArea(),l.onclick=F,h=!1,b.removeEventListener("resize",A))},F=function(){h||(f.switchto&&f.switchto(this),b.setTimeout(y,300),m.onclick=E)},G=function(){var c=a.querySelector(".CodeMirror"),d=a.createElement("div"),e=a.getElementById("wp-content-wrap"),f=c.getBoundingClientRect().top,g=function(d){d=d||b.event;var e=(d.pageY||d.clientY+a.body.scrollTop+a.documentElement.scrollTop)-f;c.style.height=(e>10?e:10)+"px",b.getSelection().removeAllRanges()};d.className="content-resize-handle",e.appendChild(d),d.onmousedown=function(){a.onmousemove=g},a.onmouseup=function(){a.onmousemove=null}},H=function(){q.className=-1===q.className.indexOf(r)?q.className+" "+r:q.className.replace(r,"");var b=a.getElementById("cm_content_fullscreen");b.value="fullscreen"===b.value?"exit fullscreen":"fullscreen",g.focus(),z()},I=function(){p.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_fullscreen" class="ed_button button" title="Toggle fullscreen mode" value="fullscreen">'),a.getElementById("cm_content_fullscreen").onclick=H},J=function(){var b='<select id="cm_select_theme" class="button" title="Change editor colour scheme">';for(var c in d.Themes){var e=d.Themes[c],f=e===t.theme?" selected ":"";b+='<option value="'+e+'"'+f+">"+e+"</option>"}b+="</select>",p.insertAdjacentHTML("afterbegin",b),a.getElementById("cm_select_theme").onchange=function(){var b=this.value;g.setOption("theme",b),a.cookie="hesh_plugin_theme="+b}},K=function(){a.getElementsByClassName("CodeMirror")[0].style.fontSize=v+"px",g.refresh()},L=function(){p.insertAdjacentHTML("afterbegin",'<select id="cm_font_size" class="button"><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="16">16</option><option value="18">18</option><option value="20">20</option><option value="22">22</option></select>');var b=a.getElementById("cm_font_size");K(),b.value=v,b.onchange=function(){v=this.value,K(),a.cookie="hesh_plugin_font_size="+v}},M=function(){b.send_to_editor_wp=b.send_to_editor;var a=function(a){h&&"content"===b.wpActiveEditor?(g.replaceSelection(a),g.save()):b.send_to_editor_wp(a)};b.send_to_editor=a};n&&o?l.onclick=F:(y(),o?m.onclick=E:a.body.className+=" visual-editor-is-disabled")}"complete"!==a.readyState?b.addEventListener?b.addEventListener("load",g,!1):b.attachEvent&&b.attachEvent("onload",g):g()}(document,window,window.CodeMirror,CodeMirrorCSS,window.wpLink,window.switchEditors);
|
1 |
!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d,e){var f=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&h[f.text.charAt(i)]||h[f.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,i+1)),m=c(a,g(b.line,i+(k>0?1:0)),k,l||null,e);return null==m?null:{from:g(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(0>c?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c==(c>0?a.lastLine():a.firstLine())?!1:null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&b(a,i[j].head,!1,d);if(k&&a.getLine(k.from.line).length<=e){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,g(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=e&&h.push(a.markText(k.to,g(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!c)return m;setTimeout(m,800)}}function e(a){a.operation(function(){i&&(i(),i=null),i=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",e),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return b(this,a,c,d)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b=0;b<a.state.activeLines.length;b++)a.removeLineClass(a.state.activeLines[b],"wrap",f),a.removeLineClass(a.state.activeLines[b],"background",g),a.removeLineClass(a.state.activeLines[b],"gutter",h)}function c(a,b){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function d(a,d){for(var e=[],i=0;i<d.length;i++){var j=d[i];if(j.empty()){var k=a.getLineHandleVisualStart(j.head.line);e[e.length-1]!=k&&e.push(k)}}c(a.state.activeLines,e)||a.operation(function(){b(a);for(var c=0;c<e.length;c++)a.addLineClass(e[c],"wrap",f),a.addLineClass(e[c],"background",g),a.addLineClass(e[c],"gutter",h);a.state.activeLines=e})}function e(a,b){d(a,b.ranges)}var f="CodeMirror-activeline",g="CodeMirror-activeline-background",h="CodeMirror-activeline-gutter";a.defineOption("styleActiveLine",!1,function(c,f,g){var h=g&&g!=a.Init;f&&!h?(c.state.activeLines=[],d(c,c.listSelections()),c.on("beforeSelectionChange",e)):!f&&h&&(c.off("beforeSelectionChange",e),b(c),delete c.state.activeLines)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};a.defineMode("xml",function(d,e){function f(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d)return a.eat("!")?a.eat("[")?a.match("CDATA[")?c(i("atom","]]>")):null:a.match("--")?c(i("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(j(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=i("meta","?>"),"meta"):(A=a.eat("/")?"closeTag":"openTag",b.tokenize=g,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function g(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=f,A=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return A="equals",null;if("<"==c){b.tokenize=f,b.state=n,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=h(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=g;break}return"string"};return b.isInAttribute=!0,b}function i(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=f;break}c.next()}return a}}function j(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=j(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=f;break}return c.tokenize=j(a-1),c.tokenize(b,c)}}return"meta"}}function k(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(x.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function l(a){a.context&&(a.context=a.context.prev)}function m(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!x.contextGrabbers.hasOwnProperty(c)||!x.contextGrabbers[c].hasOwnProperty(b))return;l(a)}}function n(a,b,c){return"openTag"==a?(c.tagStart=b.column(),o):"closeTag"==a?p:n}function o(a,b,c){return"word"==a?(c.tagName=b.current(),B="tag",s):(B="error",o)}function p(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&x.implicitlyClosed.hasOwnProperty(c.context.tagName)&&l(c),c.context&&c.context.tagName==d||x.matchClosing===!1?(B="tag",q):(B="tag error",r)}return B="error",r}function q(a,b,c){return"endTag"!=a?(B="error",q):(l(c),n)}function r(a,b,c){return B="error",q(a,b,c)}function s(a,b,c){if("word"==a)return B="attribute",t;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||x.autoSelfClosers.hasOwnProperty(d)?m(c,d):(m(c,d),c.context=new k(c,d,e==c.indented)),n}return B="error",s}function t(a,b,c){return"equals"==a?u:(x.allowMissing||(B="error"),s(a,b,c))}function u(a,b,c){return"string"==a?v:"word"==a&&x.allowUnquoted?(B="string",s):(B="error",s(a,b,c))}function v(a,b,c){return"string"==a?v:s(a,b,c)}var w=d.indentUnit,x={},y=e.htmlMode?b:c;for(var z in y)x[z]=y[z];for(var z in e)x[z]=e[z];var A,B;return f.isInText=!0,{startState:function(a){var b={tokenize:f,state:n,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;A=null;var c=b.tokenize(a,b);return(c||A)&&"comment"!=c&&(B=null,b.state=b.state(A||c,a,b),B&&(c="error"==B?c+" error":B)),c},indent:function(b,c,d){var e=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+w;if(e&&e.noIndent)return a.Pass;if(b.tokenize!=g&&b.tokenize!=f)return d?d.match(/^(\s*)/)[0].length:0;if(b.tagName)return x.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(c))return 0;var h=c&&/^<(\/)?([\w_:\.-]*)/.exec(c);if(h&&h[1])for(;e;){if(e.tagName==h[2]){e=e.prev;break}if(!x.implicitlyClosed.hasOwnProperty(e.tagName))break;e=e.prev}else if(h)for(;e;){var i=x.contextGrabbers[e.tagName];if(!i||!i.hasOwnProperty(h[2]))break;e=e.prev}for(;e&&e.prev&&!e.startOfLine;)e=e.prev;return e?e.indent+w:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(a){a.state==u&&(a.state=s)}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(b.lastType)||"quasi"==b.lastType&&/\{\s*$/.test(a.string.slice(0,a.pos-(c||0)))}a.defineMode("javascript",function(c,d){function e(a){for(var b,c=!1,d=!1;null!=(b=a.next());){if(!c){if("/"==b&&!d)return;"["==b?d=!0:d&&"]"==b&&(d=!1)}c=!c&&"\\"==b}}function f(a,b,c){return va=a,wa=c,b}function g(a,c){var d=a.next();if('"'==d||"'"==d)return c.tokenize=h(d),c.tokenize(a,c);if("."==d&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return f("number","number");if("."==d&&a.match(".."))return f("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(d))return f(d);if("="==d&&a.eat(">"))return f("=>","operator");if("0"==d&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),f("number","number");if("0"==d&&a.eat(/o/i))return a.eatWhile(/[0-7]/i),f("number","number");if("0"==d&&a.eat(/b/i))return a.eatWhile(/[01]/i),f("number","number");if(/\d/.test(d))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),f("number","number");if("/"==d)return a.eat("*")?(c.tokenize=i,i(a,c)):a.eat("/")?(a.skipToEnd(),f("comment","comment")):b(a,c,1)?(e(a),a.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),f("regexp","string-2")):(a.eatWhile(Ea),f("operator","operator",a.current()));if("`"==d)return c.tokenize=j,j(a,c);if("#"==d)return a.skipToEnd(),f("error","error");if(Ea.test(d))return a.eatWhile(Ea),f("operator","operator",a.current());if(Ca.test(d)){a.eatWhile(Ca);var g=a.current(),k=Da.propertyIsEnumerable(g)&&Da[g];return k&&"."!=c.lastType?f(k.type,k.style,g):f("variable","variable",g)}}function h(a){return function(b,c){var d,e=!1;if(za&&"@"==b.peek()&&b.match(Fa))return c.tokenize=g,f("jsonld-keyword","meta");for(;null!=(d=b.next())&&(d!=a||e);)e=!e&&"\\"==d;return e||(c.tokenize=g),f("string","string")}}function i(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=g;break}d="*"==c}return f("comment","comment")}function j(a,b){for(var c,d=!1;null!=(c=a.next());){if(!d&&("`"==c||"$"==c&&a.eat("{"))){b.tokenize=g;break}d=!d&&"\\"==c}return f("quasi","string-2",a.current())}function k(a,b){b.fatArrowAt&&(b.fatArrowAt=null);var c=a.string.indexOf("=>",a.start);if(!(0>c)){for(var d=0,e=!1,f=c-1;f>=0;--f){var g=a.string.charAt(f),h=Ga.indexOf(g);if(h>=0&&3>h){if(!d){++f;break}if(0==--d)break}else if(h>=3&&6>h)++d;else if(Ca.test(g))e=!0;else{if(/["'\/]/.test(g))return;if(e&&!d){++f;break}}}e&&!d&&(b.fatArrowAt=f)}}function l(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function m(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0;for(var d=a.context;d;d=d.prev)for(var c=d.vars;c;c=c.next)if(c.name==b)return!0}function n(a,b,c,d,e){var f=a.cc;for(Ia.state=a,Ia.stream=e,Ia.marked=null,Ia.cc=f,Ia.style=b,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var g=f.length?f.pop():Aa?x:w;if(g(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return Ia.marked?Ia.marked:"variable"==c&&m(a,d)?"variable-2":b}}}function o(){for(var a=arguments.length-1;a>=0;a--)Ia.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=Ia.state;if(Ia.marked="def",c.context){if(b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;d.globalVars&&(c.globalVars={name:a,next:c.globalVars})}}function r(){Ia.state.context={prev:Ia.state.context,vars:Ia.state.localVars},Ia.state.localVars=Ja}function s(){Ia.state.localVars=Ia.state.context.vars,Ia.state.context=Ia.state.context.prev}function t(a,b){var c=function(){var c=Ia.state,d=c.indented;if("stat"==c.lexical.type)d=c.lexical.indented;else for(var e=c.lexical;e&&")"==e.type&&e.align;e=e.prev)d=e.indented;c.lexical=new l(d,Ia.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function u(){var a=Ia.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function v(a){function b(c){return c==a?p():";"==a?o():p(b)}return b}function w(a,b){return"var"==a?p(t("vardef",b.length),X,v(";"),u):"keyword a"==a?p(t("form"),x,w,u):"keyword b"==a?p(t("form"),w,u):"{"==a?p(t("}"),S,u):";"==a?p():"if"==a?("else"==Ia.state.lexical.info&&Ia.state.cc[Ia.state.cc.length-1]==u&&Ia.state.cc.pop()(),p(t("form"),x,w,u,aa)):"function"==a?p(ga):"for"==a?p(t("form"),ba,w,u):"variable"==a?p(t("stat"),L):"switch"==a?p(t("form"),x,t("}","switch"),v("{"),S,u,u):"case"==a?p(x,v(":")):"default"==a?p(v(":")):"catch"==a?p(t("form"),r,v("("),ha,v(")"),w,u,s):"class"==a?p(t("form"),ia,u):"export"==a?p(t("stat"),ma,u):"import"==a?p(t("stat"),na,u):"module"==a?p(t("form"),Y,t("}"),v("{"),S,u,u):"async"==a?p(w):o(t("stat"),x,v(";"),u)}function x(a){return z(a,!1)}function y(a){return z(a,!0)}function z(a,b){if(Ia.state.fatArrowAt==Ia.stream.start){var c=b?H:G;if("("==a)return p(r,t(")"),Q(Y,")"),u,v("=>"),c,s);if("variable"==a)return o(r,Y,v("=>"),c,s)}var d=b?D:C;return Ha.hasOwnProperty(a)?p(d):"function"==a?p(ga,d):"keyword c"==a?p(b?B:A):"("==a?p(t(")"),A,ta,v(")"),u,d):"operator"==a||"spread"==a?p(b?y:x):"["==a?p(t("]"),ra,u,d):"{"==a?R(N,"}",null,d):"quasi"==a?o(E,d):"new"==a?p(I(b)):p()}function A(a){return a.match(/[;\}\)\],]/)?o():o(x)}function B(a){return a.match(/[;\}\)\],]/)?o():o(y)}function C(a,b){return","==a?p(x):D(a,b,!1)}function D(a,b,c){var d=0==c?C:D,e=0==c?x:y;return"=>"==a?p(r,c?H:G,s):"operator"==a?/\+\+|--/.test(b)?p(d):"?"==b?p(x,v(":"),e):p(e):"quasi"==a?o(E,d):";"!=a?"("==a?R(y,")","call",d):"."==a?p(M,d):"["==a?p(t("]"),A,v("]"),u,d):void 0:void 0}function E(a,b){return"quasi"!=a?o():"${"!=b.slice(b.length-2)?p(E):p(x,F)}function F(a){return"}"==a?(Ia.marked="string-2",Ia.state.tokenize=j,p(E)):void 0}function G(a){return k(Ia.stream,Ia.state),o("{"==a?w:x)}function H(a){return k(Ia.stream,Ia.state),o("{"==a?w:y)}function I(a){return function(b){return"."==b?p(a?K:J):o(a?y:x)}}function J(a,b){return"target"==b?(Ia.marked="keyword",p(C)):void 0}function K(a,b){return"target"==b?(Ia.marked="keyword",p(D)):void 0}function L(a){return":"==a?p(u,w):o(C,v(";"),u)}function M(a){return"variable"==a?(Ia.marked="property",p()):void 0}function N(a,b){return"variable"==a||"keyword"==Ia.style?(Ia.marked="property",p("get"==b||"set"==b?O:P)):"number"==a||"string"==a?(Ia.marked=za?"property":Ia.style+" property",p(P)):"jsonld-keyword"==a?p(P):"modifier"==a?p(N):"["==a?p(x,v("]"),P):"spread"==a?p(x):void 0}function O(a){return"variable"!=a?o(P):(Ia.marked="property",p(ga))}function P(a){return":"==a?p(y):"("==a?o(ga):void 0}function Q(a,b){function c(d,e){if(","==d){var f=Ia.state.lexical;return"call"==f.info&&(f.pos=(f.pos||0)+1),p(a,c)}return d==b||e==b?p():p(v(b))}return function(d,e){return d==b||e==b?p():o(a,c)}}function R(a,b,c){for(var d=3;d<arguments.length;d++)Ia.cc.push(arguments[d]);return p(t(b,c),Q(a,b),u)}function S(a){return"}"==a?p():o(w,S)}function T(a){return Ba&&":"==a?p(V):void 0}function U(a,b){return"="==b?p(y):void 0}function V(a){return"variable"==a?(Ia.marked="variable-3",p(W)):void 0}function W(a,b){return"<"==b?p(Q(V,">"),W):"["==a?p(v("]"),W):void 0}function X(){return o(Y,T,$,_)}function Y(a,b){return"modifier"==a?p(Y):"variable"==a?(q(b),p()):"spread"==a?p(Y):"["==a?R(Y,"]"):"{"==a?R(Z,"}"):void 0}function Z(a,b){return"variable"!=a||Ia.stream.match(/^\s*:/,!1)?("variable"==a&&(Ia.marked="property"),"spread"==a?p(Y):"}"==a?o():p(v(":"),Y,$)):(q(b),p($))}function $(a,b){return"="==b?p(y):void 0}function _(a){return","==a?p(X):void 0}function aa(a,b){return"keyword b"==a&&"else"==b?p(t("form","else"),w,u):void 0}function ba(a){return"("==a?p(t(")"),ca,v(")"),u):void 0}function ca(a){return"var"==a?p(X,v(";"),ea):";"==a?p(ea):"variable"==a?p(da):o(x,v(";"),ea)}function da(a,b){return"in"==b||"of"==b?(Ia.marked="keyword",p(x)):p(C,ea)}function ea(a,b){return";"==a?p(fa):"in"==b||"of"==b?(Ia.marked="keyword",p(x)):o(x,v(";"),fa)}function fa(a){")"!=a&&p(x)}function ga(a,b){return"*"==b?(Ia.marked="keyword",p(ga)):"variable"==a?(q(b),p(ga)):"("==a?p(r,t(")"),Q(ha,")"),u,T,w,s):void 0}function ha(a){return"spread"==a?p(ha):o(Y,T,U)}function ia(a,b){return"variable"==a?(q(b),p(ja)):void 0}function ja(a,b){return"extends"==b?p(x,ja):"{"==a?p(t("}"),ka,u):void 0}function ka(a,b){return"variable"==a||"keyword"==Ia.style?"static"==b?(Ia.marked="keyword",p(ka)):(Ia.marked="property","get"==b||"set"==b?p(la,ga,ka):p(ga,ka)):"*"==b?(Ia.marked="keyword",p(ka)):";"==a?p(ka):"}"==a?p():void 0}function la(a){return"variable"!=a?o():(Ia.marked="property",p())}function ma(a,b){return"*"==b?(Ia.marked="keyword",p(qa,v(";"))):"default"==b?(Ia.marked="keyword",p(x,v(";"))):o(w)}function na(a){return"string"==a?p():o(oa,qa)}function oa(a,b){return"{"==a?R(oa,"}"):("variable"==a&&q(b),"*"==b&&(Ia.marked="keyword"),p(pa))}function pa(a,b){return"as"==b?(Ia.marked="keyword",p(oa)):void 0}function qa(a,b){return"from"==b?(Ia.marked="keyword",p(x)):void 0}function ra(a){return"]"==a?p():o(y,sa)}function sa(a){return"for"==a?o(ta,v("]")):","==a?p(Q(B,"]")):o(Q(y,"]"))}function ta(a){return"for"==a?p(ba,ta):"if"==a?p(x,ta):void 0}function ua(a,b){return"operator"==a.lastType||","==a.lastType||Ea.test(b.charAt(0))||/[,.]/.test(b.charAt(0))}var va,wa,xa=c.indentUnit,ya=d.statementIndent,za=d.jsonld,Aa=d.json||za,Ba=d.typescript,Ca=d.wordCharacters||/[\w$\xa1-\uffff]/,Da=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":a("new"),"delete":d,"throw":d,"debugger":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":f,"false":f,"null":f,undefined:f,NaN:f,Infinity:f,"this":a("this"),"class":a("class"),"super":a("atom"),"yield":d,"export":a("export"),"import":a("import"),"extends":d,await:d,async:a("async")};if(Ba){var h={type:"variable",style:"variable-3"},i={"interface":a("class"),"implements":d,namespace:d,module:a("module"),"enum":a("module"),"public":a("modifier"),"private":a("modifier"),"protected":a("modifier"),"abstract":a("modifier"),as:e,string:h,number:h,"boolean":h,any:h};for(var j in i)g[j]=i[j]}return g}(),Ea=/[+\-*&%=<>!?|~^]/,Fa=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ga="([{}])",Ha={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Ia={state:null,column:null,marked:null,cc:null},Ja={name:"this",next:{name:"arguments"}};return u.lex=!0,{startState:function(a){var b={tokenize:g,lastType:"sof",cc:[],lexical:new l((a||0)-xa,0,"block",!1),localVars:d.localVars,context:d.localVars&&{vars:d.localVars},indented:a||0};return d.globalVars&&"object"==typeof d.globalVars&&(b.globalVars=d.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),k(a,b)),b.tokenize!=i&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==va?c:(b.lastType="operator"!=va||"++"!=wa&&"--"!=wa?va:"incdec",n(b,c,va,wa,a))},indent:function(b,c){if(b.tokenize==i)return a.Pass;if(b.tokenize!=g)return 0;var e=c&&c.charAt(0),f=b.lexical;if(!/^\s*else\b/.test(c))for(var h=b.cc.length-1;h>=0;--h){var j=b.cc[h];if(j==u)f=f.prev;else if(j!=aa)break}"stat"==f.type&&"}"==e&&(f=f.prev),ya&&")"==f.type&&"stat"==f.prev.type&&(f=f.prev);var k=f.type,l=e==k;return"vardef"==k?f.indented+("operator"==b.lastType||","==b.lastType?f.info+1:0):"form"==k&&"{"==e?f.indented:"form"==k?f.indented+xa:"stat"==k?f.indented+(ua(b,c)?ya||xa:0):"switch"!=f.info||l||0==d.doubleIndentSwitch?f.align?f.column+(l?0:1):f.indented+(l?0:xa):f.indented+(/^(?:case|default)\b/.test(c)?xa:2*xa)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Aa?null:"/*",blockCommentEnd:Aa?null:"*/",lineComment:Aa?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Aa?"json":"javascript",jsonldMode:za,jsonMode:Aa,expressionAllowed:b,skipExpression:function(a){var b=a.cc[a.cc.length-1];b!=x&&b!=y||a.cc.pop()}}}),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:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&"/"==c){b.tokenize=null;break}d="*"==c}return["comment","comment"]}a.defineMode("css",function(b,c){function d(a,b){return o=b,a}function e(a,b){var c=a.next();if(r[c]){var e=r[c](a,b);if(e!==!1)return e}return"@"==c?(a.eatWhile(/[\w\\\-]/),d("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?d(null,"compare"):'"'==c||"'"==c?(b.tokenize=f(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),d("atom","hash")):"!"==c?(a.match(/^\s*\w*/),d("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),d("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?d(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?d("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?d(null,c):"u"==c&&a.match(/rl(-prefix)?\(/)||"d"==c&&a.match("omain(")||"r"==c&&a.match("egexp(")?(a.backUp(1),b.tokenize=g,d("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),d("property","word")):d(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),d("number","unit")):a.match(/^-[\w\\\-]+/)?(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?d("variable-2","variable-definition"):d("variable-2","variable")):a.match(/^\w+-/)?d("meta","meta"):void 0}function f(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){")"==a&&b.backUp(1);break}f=!f&&"\\"==e}return(e==a||!f&&")"!=a)&&(c.tokenize=null),d("string","string")}}function g(a,b){return a.next(),a.match(/\s*[\"\')]/,!1)?b.tokenize=null:b.tokenize=f(")"),d(null,"(")}function h(a,b,c){this.type=a,this.indent=b,this.prev=c}function i(a,b,c,d){return a.context=new h(c,b.indentation()+(d===!1?0:q),a.context),c}function j(a){return a.context.prev&&(a.context=a.context.prev),a.context.type}function k(a,b,c){return E[c.context.type](a,b,c)}function l(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return k(a,b,c)}function m(a){var b=a.current().toLowerCase();p=B.hasOwnProperty(b)?"atom":A.hasOwnProperty(b)?"keyword":"variable"}var n=c.inline;c.propertyKeywords||(c=a.resolveMode("text/css"));var o,p,q=b.indentUnit,r=c.tokenHooks,s=c.documentTypes||{},t=c.mediaTypes||{},u=c.mediaFeatures||{},v=c.mediaValueKeywords||{},w=c.propertyKeywords||{},x=c.nonStandardPropertyKeywords||{},y=c.fontProperties||{},z=c.counterDescriptors||{},A=c.colorKeywords||{},B=c.valueKeywords||{},C=c.allowNested,D=c.supportsAtComponent===!0,E={};return E.top=function(a,b,c){if("{"==a)return i(c,b,"block");if("}"==a&&c.context.prev)return j(c);if(D&&/@component/.test(a))return i(c,b,"atComponentBlock");if(/^@(-moz-)?document$/.test(a))return i(c,b,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(a))return i(c,b,"atBlock");if(/^@(font-face|counter-style)/.test(a))return c.stateArg=a,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return i(c,b,"at");if("hash"==a)p="builtin";else if("word"==a)p="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return i(c,b,"interpolation");if(":"==a)return"pseudo";if(C&&"("==a)return i(c,b,"parens")}return c.context.type},E.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return w.hasOwnProperty(d)?(p="property","maybeprop"):x.hasOwnProperty(d)?(p="string-2","maybeprop"):C?(p=b.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==a?"block":C||"hash"!=a&&"qualifier"!=a?E.top(a,b,c):(p="error","block")},E.maybeprop=function(a,b,c){return":"==a?i(c,b,"prop"):k(a,b,c)},E.prop=function(a,b,c){if(";"==a)return j(c);if("{"==a&&C)return i(c,b,"propBlock");if("}"==a||"{"==a)return l(a,b,c);if("("==a)return i(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(b.current())){if("word"==a)m(b);else if("interpolation"==a)return i(c,b,"interpolation")}else p+=" error";return"prop"},E.propBlock=function(a,b,c){return"}"==a?j(c):"word"==a?(p="property","maybeprop"):c.context.type},E.parens=function(a,b,c){return"{"==a||"}"==a?l(a,b,c):")"==a?j(c):"("==a?i(c,b,"parens"):"interpolation"==a?i(c,b,"interpolation"):("word"==a&&m(b),"parens")},E.pseudo=function(a,b,c){return"word"==a?(p="variable-3",c.context.type):k(a,b,c)},E.documentTypes=function(a,b,c){return"word"==a&&s.hasOwnProperty(b.current())?(p="tag",c.context.type):E.atBlock(a,b,c)},E.atBlock=function(a,b,c){if("("==a)return i(c,b,"atBlock_parens");if("}"==a||";"==a)return l(a,b,c);if("{"==a)return j(c)&&i(c,b,C?"block":"top");if("interpolation"==a)return i(c,b,"interpolation");if("word"==a){var d=b.current().toLowerCase();p="only"==d||"not"==d||"and"==d||"or"==d?"keyword":t.hasOwnProperty(d)?"attribute":u.hasOwnProperty(d)?"property":v.hasOwnProperty(d)?"keyword":w.hasOwnProperty(d)?"property":x.hasOwnProperty(d)?"string-2":B.hasOwnProperty(d)?"atom":A.hasOwnProperty(d)?"keyword":"error"}return c.context.type},E.atComponentBlock=function(a,b,c){return"}"==a?l(a,b,c):"{"==a?j(c)&&i(c,b,C?"block":"top",!1):("word"==a&&(p="error"),c.context.type)},E.atBlock_parens=function(a,b,c){return")"==a?j(c):"{"==a||"}"==a?l(a,b,c,2):E.atBlock(a,b,c)},E.restricted_atBlock_before=function(a,b,c){return"{"==a?i(c,b,"restricted_atBlock"):"word"==a&&"@counter-style"==c.stateArg?(p="variable","restricted_atBlock_before"):k(a,b,c)},E.restricted_atBlock=function(a,b,c){return"}"==a?(c.stateArg=null,j(c)):"word"==a?(p="@font-face"==c.stateArg&&!y.hasOwnProperty(b.current().toLowerCase())||"@counter-style"==c.stateArg&&!z.hasOwnProperty(b.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},E.keyframes=function(a,b,c){return"word"==a?(p="variable","keyframes"):"{"==a?i(c,b,"top"):k(a,b,c)},E.at=function(a,b,c){return";"==a?j(c):"{"==a||"}"==a?l(a,b,c):("word"==a?p="tag":"hash"==a&&(p="builtin"),"at")},E.interpolation=function(a,b,c){return"}"==a?j(c):"{"==a||";"==a?l(a,b,c):("word"==a?p="variable":"variable"!=a&&"("!=a&&")"!=a&&(p="error"),"interpolation")},{startState:function(a){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new h(n?"block":"top",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||e)(a,b);return c&&"object"==typeof c&&(o=c[1],c=c[0]),p=c,b.state=E[b.state](o,a,b),p},indent:function(a,b){var c=a.context,d=b&&b.charAt(0),e=c.indent;return"prop"!=c.type||"}"!=d&&")"!=d||(c=c.prev),c.prev&&("}"!=d||"block"!=c.type&&"top"!=c.type&&"interpolation"!=c.type&&"restricted_atBlock"!=c.type?(")"!=d||"parens"!=c.type&&"atBlock_parens"!=c.type)&&("{"!=d||"at"!=c.type&&"atBlock"!=c.type)||(e=Math.max(0,c.indent-q),c=c.prev):(c=c.prev,e=c.indent)),e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var d=["domain","regexp","url","url-prefix"],e=b(d),f=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],g=b(f),h=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=b(h),j=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],k=b(j),l=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","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"],m=b(l),n=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],o=b(n),p=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],q=b(p),r=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],s=b(r),t=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],u=b(t),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=b(v),x=d.concat(f).concat(h).concat(j).concat(l).concat(n).concat(t).concat(v);
|
2 |
+
a.registerHelper("hintWords","css",x),a.defineMIME("text/css",{documentTypes:e,mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,tokenHooks:{"/":function(a,b){return a.eat("*")?(b.tokenize=c,c(a,b)):!1}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},":":function(a){return a.match(/\s*\{/)?[null,"{"]:!1},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return a.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},"@":function(a){return a.eat("{")?[null,"interpolation"]:a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),a.defineMIME("text/x-gss",{documentTypes:e,mediaTypes:g,mediaFeatures:i,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(a,b){return a.eat("*")?(b.tokenize=c,c(a,b)):!1}},name:"css",helperType:"gss"})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):d.match(/<\/?$/)&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function c(a){var b=i[a];return b?b:i[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function d(a,b){var d=a.match(c(b));return d?d[2]:""}function e(a,b){return new RegExp((b?"^":"")+"</s*"+a+"s*>","i")}function f(a,b){for(var c in a)for(var d=b[c]||(b[c]=[]),e=a[c],f=e.length-1;f>=0;f--)d.unshift(e[f])}function g(a,b){for(var c=0;c<a.length;c++){var e=a[c];if(!e[0]||e[1].test(d(b,e[0])))return e[2]}}var h={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},i={};a.defineMode("htmlmixed",function(c,d){function i(d,f){var h,l=j.token(d,f.htmlState),m=/\btag\b/.test(l);if(m&&!/[<>\s\/]/.test(d.current())&&(h=f.htmlState.tagName&&f.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(h))f.inTag=h+" ";else if(f.inTag&&m&&/>$/.test(d.current())){var n=/^([\S]+) (.*)/.exec(f.inTag);f.inTag=null;var o=">"==d.current()&&g(k[n[1]],n[2]),p=a.getMode(c,o),q=e(n[1],!0),r=e(n[1],!1);f.token=function(a,c){return a.match(q,!1)?(c.token=i,c.localState=c.localMode=null,null):b(a,r,c.localMode.token(a,c.localState))},f.localMode=p,f.localState=a.startState(p,j.indent(f.htmlState,""))}else f.inTag&&(f.inTag+=d.current(),d.eol()&&(f.inTag+=" "));return l}var j=a.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag}),k={},l=d&&d.tags,m=d&&d.scriptTypes;if(f(h,k),l&&f(l,k),m)for(var n=m.length-1;n>=0;n--)k.script.unshift(["type",m[n].matches,m[n].mode]);return{startState:function(){var b=a.startState(j);return{token:i,inTag:null,localMode:null,localState:null,htmlState:b}},copyState:function(b){var c;return b.localState&&(c=a.copyState(b.localMode,b.localState)),{token:b.token,inTag:b.inTag,localMode:b.localMode,localState:c,htmlState:a.copyState(j,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return!b.localMode||/^\s*<\//.test(c)?j.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||j}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("wordpresspost",function(b,c){function d(a,b){b.isInShortcode=!0;var c=h.token(a,b.shortcodeState),d=b.shortcodeState.tokenize.isInText,f=b.shortcodeState.tokenize.isInEscape;if(d)b.token=e;else if(f&&/\]/.test(a.current())){var g=a.current(),i=g.search(/\]/);a.backUp(g.length-i-1),"]"!==a.peek()&&(b.token=e)}return c}function e(b,c){c.isInShortcode=!1;var e=g.token(b,c.htmlmixedState),i=c.htmlmixedState.htmlState.tokenize.isInText;if(i&&/\[/.test(b.current())&&!c.htmlmixedState.localState&&null===e){var j=b.current(),k=j.search(/\[/);b.backUp(j.length-k),null==c.shortcodeState&&(c.shortcodeState=a.startState(h,g.indent(c.htmlmixedState,""))),c.token=d}else i&&/<!\-\-more|<!\-\-noteaser\-\->/.test(b.current())&&!c.htmlmixedState.localState&&"comment"===e&&(b.backUp(b.current().length),c.token=f);return e}function f(a,b){return a.match("<!--more")?"meta":a.match("-->")||a.match("<!--noteaser-->")?(b.token=e,"meta"):(a.eatWhile(/[^\-\/]/),"string")}var g=a.getMode(b,{name:"htmlmixed",multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag}),h=a.getMode(b,{name:"shortcode",multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag});return{startState:function(){var a=g.startState();return{token:e,isInShortcode:!1,shortcodeState:null,htmlmixedState:a}},copyState:function(b){var c;return b.shortcodeState&&(c=a.copyState(h,b.shortcodeState)),{token:b.token,shortcodeState:c,htmlmixedState:a.copyState(g,b.htmlmixedState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return b.isInShortcode?b.isInShortcode?h.indent(b.shortcodeState,c):a.Pass:g.indent(b.htmlmixedState,c)},innerMode:function(a){return a.isInShortcode?{state:a.shortcodeState,mode:h}:{state:a.htmlmixedState,mode:g}}}},"htmlmixed","shortcode")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={allowUnquoted:!0,allowMissing:!0,caseFold:!0};a.defineMode("shortcode",function(a,c){function d(a,b){var c=a.next();return"["===c?"["===a.peek()?(b.tokenize=e,"comment"):/\s/.test(a.peek())?null:(x=a.eat("/")?"closeTag":"openTag",b.tokenize=f,"tag bracket"):(a.eatWhile(/[^\[]/),null)}function e(a,b){var c=function(a,b){return a.next(),b.tokenize=d,"comment"};c.isInEscape=!0;var e=a.next();return"]"===e&&"]"===a.peek()&&(b.tokenize=c),a.eatWhile(/[^\]]/),null}function f(a,b){var c=a.next();if("]"===c||"/"===c&&a.eat("]"))return b.tokenize=d,x="endTag","tag bracket";if("="===c)return x="equals",null;if("["===c){b.tokenize=d,b.state=j,b.tagName=b.tagStart=null;var e=b.tokenize(a,b);return e?e+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=g(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=\[\]\"\']*[^\s\u00a0=\[\]\"\'\/]/),"word")}function g(a){var b=function(b,c){var d=b.next();return d===a?(c.tokenize=f,"string"):/[\[\]]/.test(d)?"string error":(b.eatWhile(/[^\[\]\'\"]/),"string")};return b.isInAttribute=!0,b}function h(a,b,c){this.tagHistory=[b],a.context&&(this.tagHistory=this.tagHistory.concat(a.context.tagHistory)),this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c}function i(a){a.context&&(a.context=a.context.prev)}function j(a,b,c){return"openTag"===a?(c.tagStart=b.column(),k):"closeTag"===a?l:j}function k(a,b,c){if("word"===a){var d=b.current();return/[\[\]\/\'\"<>&]/.test(d)?y="error":(c.tagName=b.current(),y="tag"),o}return y="error",k}function l(a,b,c){if("word"===a){var d=b.current();if(c.context&&c.context.tagName===d||t.matchClosing===!1)return y="tag",m;if(c.context&&c.context.tagHistory.indexOf(d)>0){for(var e=c.context.tagHistory.indexOf(d),f=0;e>f;f++)i(c);return y="tag",m}return y="tag error",n}return y="error",n}function m(a,b,c){return"endTag"!==a?(y="error",m):(i(c),j)}function n(a,b,c){return y="error",m(a,b,c)}function o(a,b,c){if("word"===a)return y=/^[a-z0-9_\-]+$/i.test(b.current())?"attribute":"error",p;if("endTag"===a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,c.context=new h(c,d,e===c.indented),j}return y="error",o}function p(a,b,c){return"equals"===a?q:(t.allowMissing||(y="error"),o(a,b,c))}function q(a,b,c){return"string"===a?r:"word"===a&&t.allowUnquoted?(y="string",o):(y="error",o(a,b,c))}function r(a,b,c){return"string"===a?r:o(a,b,c)}var s=a.indentUnit,t={},u=b;for(var v in u)t[v]=u[v];for(var w in c)t[w]=c[w];var x,y;return d.isInText=!0,e.isInEscape=!0,{startState:function(a){var b={tokenize:d,state:j,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;x=null;var c=b.tokenize(a,b);return(c||x)&&"comment"!==c&&(y=null,b.state=b.state(x||c,a,b),y&&(c="error"===y?c+" error":y)),c},indent:function(a,b,c){var e=a.context;if(a.tokenize.isInAttribute)return a.tagStart===a.indented?a.stringStartCol+1:a.indented+s;if(a.tokenize!==f&&a.tokenize!==d)return c?c.match(/^(\s*)/)[0].length:0;if(a.tagName)return t.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+s*(t.multilineTagIndentFactor||1);var g=b&&/^\[(\/)?([\w_:\.-]*)/.exec(b);if(g&&g[1])for(;e;){if(e.tagName===g[2]){e=e.prev;break}break}for(;e&&e.prev&&!e.startOfLine;)e=e.prev;return e?e.indent+s:a.baseIndent||0},skipAttribute:function(a){a.state===q&&(a.state=o)}}})});var CodeMirrorCSS=CodeMirrorCSS||{};CodeMirrorCSS.Themes=["3024-day","3024-night","abcdef","ambiance-mobile","ambiance","base16-dark","base16-light","bespin","blackboard","cobalt","colorforth","dracula","eclipse","elegant","erlang-dark","hopscotch","icecoder","isotope","lesser-dark","liquibyte","material","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","railscasts","rubyblue","seti","solarized","the-matrix","tomorrow-night-bright","tomorrow-night-eighties","ttcn","twilight","vibrant-ink","xq-dark","xq-light","yeti","zenburn"],function(a,b,c,d,e,f){"use strict";function g(){var g=null,h=!1,i=!1,j=a.getElementById("content"),k=null!=a.getElementById("post_ID")?a.getElementById("post_ID").value:0,l=a.getElementById("content-html"),m=a.getElementById("content-tmce"),n=a.getElementById("wp-content-wrap").className.indexOf("tmce-active")>-1,o=null!=a.getElementById("content-tmce"),p=a.getElementById("ed_toolbar"),q=a.getElementById("wp-content-editor-container"),r="heshFullscreen",s=null!=a.getElementById("save-post")?a.getElementById("save-post"):a.getElementById("publish"),t={mode:"wordpresspost",tabMode:"indent",theme:"material",lineNumbers:!0,matchBrackets:!0,indentUnit:4,indentWithTabs:!0,enterMode:"keep",lineWrapping:!0,autofocus:!0,styleActiveLine:!0,electricChars:!1,extraKeys:{F11:function(){H()},Esc:function(){H()},"Ctrl-S":function(){s.click()},"Cmd-S":function(){s.click()}}},u=function(b){var c="; "+a.cookie,d=c.split("; "+b+"=");return 2===d.length?d.pop().split(";").shift():void 0},v=u("hesh_plugin_font_size")||"12";t.theme=u("hesh_plugin_theme")||"material";var w,x,y=function(){g=c.fromTextArea(j,t),C(),g.on("change",function(){g.save(),clearTimeout(x),x=setTimeout(B,3e3)}),g.on("cursorActivity",function(){var b=g.getCursor();a.cookie="hesh_plugin_pos="+k+","+b.line+","+b.ch});var d=(u("hesh_plugin_pos")||"0,0,0").split(",");k===d[0]&&g.setCursor(parseFloat(d[1]),parseFloat(d[2])),G(),M(),K(),g.setOption("theme",t.theme),h=!0,z(),b.addEventListener("resize",A),b.setTimeout(B,3e3)},z=function(){var b=a.querySelector(".CodeMirror");b.style.marginTop=p.clientHeight+"px"},A=function(){clearTimeout(w),w=setTimeout(z,250)},B=function(){null!==a.querySelector(".CodeMirror")&&(a.querySelector("textarea.wp-editor-area").style.height=a.querySelector(".CodeMirror").clientHeight+"px")},C=function(){if(!i){var b={more:["<!--more-->",""],comment:["<!-- "," -->"],code:["<code>","</code>"],li:["<li>","</li>"],ol:["<ol>","</ol>"],ul:["<ul>","</ul>"],img:['<img src="$" alt="','">',"Enter the URL of the image"],ins:["<ins>","</ins>"],del:["<del>","</del>"],link:['<a href="$">',"</a>","Enter the destination URL"],blockquote:["\r<blockquote>","</blockquote>\r"],h3:["<h3>","</h3>"],h2:["<h2>","</h2>"],h1:["<h1>","</h1>"],p:["<p>","</p>"],i:["<em>","</em>"],b:["<strong>","</strong>"]};for(var c in b){var d=b[c],e=d[2]?'data-prompt="'+d[2]+'"':"";p.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_'+c+"\" data-start='"+d[0]+"' data-end='"+d[1]+"' "+e+' class="ed_button button cm_ed_button" value="'+c+'">'),a.getElementById("cm_content_"+c).onclick=D}J(),L(),I(),i=!0}},D=function(){var c=g.getCursor("start"),d=this.getAttribute("data-start"),f=this.getAttribute("data-end"),h=this.getAttribute("data-prompt")||null,i=g.getSelection();"cm_content_link"===this.id&&e?(e.open(),a.getElementById("wp-link-submit").onclick=function(){var a=e.getAttrs();d='<a href="'+a.href+'" title="'+a.title+'" target="'+a.target+'">',g.replaceSelection(d+i+"</a>"),e.close(),g.setCursor(c.line,c.ch+d.length),g.focus()}):(h&&(d=d.replace("$",b.prompt(h,""))),g.replaceSelection(d+i+f),g.setCursor(c.line,c.ch+d.length),g.focus())},E=function(){h&&(f.switchto&&f.switchto(this),g.toTextArea(),l.onclick=F,h=!1,b.removeEventListener("resize",A))},F=function(){h||(f.switchto&&f.switchto(this),b.setTimeout(y,300),m.onclick=E)},G=function(){var c=a.querySelector(".CodeMirror"),d=a.createElement("div"),e=a.getElementById("wp-content-wrap"),f=c.getBoundingClientRect().top,g=function(d){d=d||b.event;var e=(d.pageY||d.clientY+a.body.scrollTop+a.documentElement.scrollTop)-f;c.style.height=(e>10?e:10)+"px",b.getSelection().removeAllRanges()};d.className="content-resize-handle",e.appendChild(d),d.onmousedown=function(){a.onmousemove=g},a.onmouseup=function(){a.onmousemove=null}},H=function(){q.className=-1===q.className.indexOf(r)?q.className+" "+r:q.className.replace(r,"");var b=a.getElementById("cm_content_fullscreen");b.value="fullscreen"===b.value?"exit fullscreen":"fullscreen",g.focus(),z()},I=function(){p.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_fullscreen" class="ed_button button" title="Toggle fullscreen mode" value="fullscreen">'),a.getElementById("cm_content_fullscreen").onclick=H},J=function(){var b='<select id="cm_select_theme" class="button" title="Change editor colour scheme">';for(var c in d.Themes){var e=d.Themes[c],f=e===t.theme?" selected ":"";b+='<option value="'+e+'"'+f+">"+e+"</option>"}b+="</select>",p.insertAdjacentHTML("afterbegin",b),a.getElementById("cm_select_theme").onchange=function(){t.theme=this.value,g.setOption("theme",t.theme),a.cookie="hesh_plugin_theme="+t.theme}},K=function(){a.getElementsByClassName("CodeMirror")[0].style.fontSize=v+"px",g.refresh()},L=function(){p.insertAdjacentHTML("afterbegin",'<select id="cm_font_size" class="button"><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="16">16</option><option value="18">18</option><option value="20">20</option><option value="22">22</option></select>');var b=a.getElementById("cm_font_size");K(),b.value=v,b.onchange=function(){v=this.value,K(),a.cookie="hesh_plugin_font_size="+v}},M=function(){b.send_to_editor_wp=b.send_to_editor;var a=function(a){h&&"content"===b.wpActiveEditor?(g.replaceSelection(a),g.save()):b.send_to_editor_wp(a)};b.send_to_editor=a};o&&n?l.onclick=F:(y(),o?m.onclick=E:a.body.className+=" visual-editor-is-disabled")}"complete"!==a.readyState?b.addEventListener?b.addEventListener("load",g,!1):b.attachEvent&&b.attachEvent("onload",g):g()}(document,window,window.CodeMirror,CodeMirrorCSS,window.wpLink,window.switchEditors);
|
readme.txt
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
=== HTML Editor Syntax Highlighter ===
|
2 |
-
Contributors: nixdns, arniebradfo, collinprice
|
3 |
Donate link: https://www.paypal.me/mukhortov/5
|
4 |
Tags: editor, html editor, text editor, post editor, syntax, highlighting, highlighter, syntax highlighting, syntax highlighter, codemirror, code, code highlighter, code coloring
|
5 |
Requires at least: 4.0.11
|
6 |
Tested up to: 4.5.2
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPL-2.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Add syntax highlighting to the HTML editor.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Add syntax highlighting
|
16 |
|
17 |
= Features =
|
18 |
|
@@ -34,6 +34,11 @@ If you would like to contribute to this plugin, view the [github repo](https://g
|
|
34 |
|
35 |
== Changelog ==
|
36 |
|
|
|
|
|
|
|
|
|
|
|
37 |
= 1.7.1 =
|
38 |
* fixed bug: return key would create two new lines and ignore indent
|
39 |
* fixed bug: wp native "Add Media" button was not working
|
1 |
=== HTML Editor Syntax Highlighter ===
|
2 |
+
Contributors: nixdns, arniebradfo, rraub, collinprice,
|
3 |
Donate link: https://www.paypal.me/mukhortov/5
|
4 |
Tags: editor, html editor, text editor, post editor, syntax, highlighting, highlighter, syntax highlighting, syntax highlighter, codemirror, code, code highlighter, code coloring
|
5 |
Requires at least: 4.0.11
|
6 |
Tested up to: 4.5.2
|
7 |
+
Stable tag: 1.7.2
|
8 |
License: GPL-2.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Add syntax highlighting to the HTML editor using Codemirror.js
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Add syntax highlighting in the WordPress Post & Page HTML/text editor using Codemirror.js
|
16 |
|
17 |
= Features =
|
18 |
|
34 |
|
35 |
== Changelog ==
|
36 |
|
37 |
+
= 1.7.2 =
|
38 |
+
* fixed bug: code mirror not initializing properly when new user tries to edit post for the first time
|
39 |
+
* fixed bug: CodeMirror no longer trying to load on "All Post" and "All Pages"
|
40 |
+
* fixed bug: Font and theme were reset to default when switching to the visual editor and back
|
41 |
+
|
42 |
= 1.7.1 =
|
43 |
* fixed bug: return key would create two new lines and ignore indent
|
44 |
* fixed bug: wp native "Add Media" button was not working
|