14 lines
228 KiB
JavaScript
14 lines
228 KiB
JavaScript
|
;/*!node_modules/codemirror/lib/codemirror.js*/
|
||
|
amis.define("3e3270d",(function(e,t,r,n){var i,o;i=this,o=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),h=c&&+c[1],f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),v=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,a=!0);var S=b&&(u||f&&(null==C||C<12.11)),L=r||l&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var r=e.className,n=k(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return N(e).appendChild(t)}function A(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function D(e,t,r,n){var i=A(e,t,r,n);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function H(e){var t,r=e.ownerDocument||e;try{t=e.activeElement}catch(e){t=r.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function F(e,t){var r=e.className;k(t).test(r)||(e.className+=(r?" ":"")+t)}function P(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!k(r[n]).test(t)&&(t+=" "+r[n]);return t}T=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var E=function(e){e.select()};function R(e){return e.display.wrapper.ownerDocument}function z(e){return I(e.display.wrapper)}function I(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function B(e){return R(e).defaultView}function G(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function U(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function V(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}v?E=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(E=function(e){try{e.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=G(this.onTimeout,this)};function j(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var X={toString:function(){return"CodeMirror.Pass"}},Y={scroll:!1},$={origin:"*mouse"},_={origin:"+move"};function q(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Z=[""];function Q(e){for(;Z.length<=e;)Z.push(J(Z)+" ");return Z[e]}function J(e){return e[e.length-1]}function ee(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function te(){}function re(e,t){var r;return Object.create?r=Object.create(e):(te.prototype=e,r=new te),t&&U(t,r),r}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u
|
||
|
;/*!node_modules/codemirror/mode/javascript/javascript.js*/
|
||
|
amis.define("b567d52",(function(e,t,r,n){var a;a=function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,a,i=t.indentUnit,o=r.statementIndent,c=r.jsonld,s=r.json||c,u=!1!==r.trackScope,f=r.typescript,l=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e,t,r){return n=e,a=r,t}function k(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,a=!1;if(c&&"@"==e.peek()&&e.match(m))return t.tokenize=k,v("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.tokenize=k),v("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==n&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&e.eat(">"))return v("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):Ze(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==n)return t.tokenize=w,w(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==n&&e.eatWhile(l))return v("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?v("."):v("operator","operator",e.current());if(l.test(n)){e.eatWhile(l);var a=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(a)){var i=d[a];return v(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",a)}return v("variable","variable",a)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=k;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=k;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(f){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s="([{}])".indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(l.test(c))i=!0;else if(/["'\/`]/.test(c))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==c&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(t.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function h(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function g(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.n
|
||
|
;/*!node_modules/codemirror/mode/xml/xml.js*/
|
||
|
amis.define("9191e9d",(function(t,e,n,r){var o;o=function(t){"use strict";var e={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,o){var a,i,l=r.indentUnit,u={},c=o.htmlMode?e:n;for(var s in c)u[s]=c[s];for(var s in o)u[s]=o[s];function d(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(m("atom","]]>")):null:t.match("--")?n(m("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(g(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=m("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",e.tokenize=f,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(t,e){var n,r,o=t.next();if(">"==o||"/"==o&&t.eat(">"))return e.tokenize=d,a=">"==o?"endTag":"selfcloseTag","tag bracket";if("="==o)return a="equals",null;if("<"==o){e.tokenize=d,e.state=k,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(o)?(e.tokenize=(n=o,r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=f;break}return"string"},r.isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=d;break}n.next()}return t}}function g(t){return function(e,n){for(var r;null!=(r=e.next());){if("<"==r)return n.tokenize=g(t+1),n.tokenize(e,n);if(">"==r){if(1==t){n.tokenize=d;break}return n.tokenize=g(t-1),n.tokenize(e,n)}}return"meta"}}function p(t){return t&&t.toLowerCase()}function h(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function x(t){t.context&&(t.context=t.context.prev)}function b(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(p(n))||!u.contextGrabbers[p(n)].hasOwnProperty(p(e)))return;x(t)}}function k(t,e,n){return"openTag"==t?(n.tagStart=e.column(),w):"closeTag"==t?v:k}function w(t,e,n){return"word"==t?(n.tagName=e.current(),i="tag",y):u.allowMissingTagName&&"endTag"==t?(i="tag bracket",y(t,0,n)):(i="error",w)}function v(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(p(n.context.tagName))&&x(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(i="tag",T):(i="tag error",N)}return u.allowMissingTagName&&"endTag"==t?(i="tag bracket",T(t,0,n)):(i="error",N)}function T(t,e,n){return"endTag"!=t?(i="error",T):(x(n),k)}function N(t,e,n){return i="error",T(t,0,n)}function y(t,e,n){if("word"==t)return i="attribute",C;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(p(r))?b(n,r):(b(n,r),n.context=new h(n,r,o==n.indented)),k}return i="error",y}function C(t,e,n){return"equals"==t?z:(u.allowMissing||(i="error"),y(t,0,n))}function z(t,e,n){return"string"==t?M:"word"=
|
||
|
;/*!node_modules/codemirror/mode/css/css.js*/
|
||
|
amis.define("4d18ceb",(function(e,t,r,o){var i;i=function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,r){var o=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var i,a,n=t.indentUnit,l=r.tokenHooks,s=r.documentTypes||{},c=r.mediaTypes||{},d=r.mediaFeatures||{},p=r.mediaValueKeywords||{},u=r.propertyKeywords||{},m=r.nonStandardPropertyKeywords||{},g=r.fontProperties||{},b=r.counterDescriptors||{},h=r.colorKeywords||{},f=r.valueKeywords||{},k=r.allowNested,y=r.lineComment,w=!0===r.supportsAtComponent,v=!1!==t.highlightNonStandardPropertyKeywords;function x(e,t){return i=t,e}function z(e,t){var r=e.next();if(l[r]){var o=l[r](e,t);if(!1!==o)return o}return"@"==r?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?x(null,"compare"):'"'==r||"'"==r?(t.tokenize=j(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==r?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=P),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function j(e){return function(t,r){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(r.tokenize=null),x("string","string")}}function P(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=j(")"),x(null,"(")}function K(e,t,r){this.type=e,this.indent=t,this.prev=r}function q(e,t,r,o){return e.context=new K(r,t.indentation()+(!1===o?0:n),e.context),r}function C(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function B(e,t,r){return O[r.context.type](e,t,r)}function _(e,t,r,o){for(var i=o||1;i>0;i--)r.context=r.context.prev;return B(e,t,r)}function T(e){var t=e.current().toLowerCase();a=f.hasOwnProperty(t)?"atom":h.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,r){if("{"==e)return q(r,t,"block");if("}"==e&&r.context.prev)return C(r);if(w&&/@component/i.test(e))return q(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return q(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return q(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return q(r,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return q(r,t,"interpolation");if(":"==e)return"pseudo";if(k&&"("==e)return q(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var o=t.current().toLowerCase();return u.hasOwnProperty(o)?(a="property","maybeprop"):m.hasOwnProperty(o)?(a=v?"string-2":"property","maybeprop"):k?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")}return"meta"==e?"block":k||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(a="error","block")},maybeprop:function(e,t,r){return":"==e?q(r,t,"prop"):B(e,t,r)},prop:function(e,t,r){if(";"==e)return C(r);if("{"==e&&k)return q(r,t,"propBlock");if("}"==e||"{"==e)return _(e,t,r);if("("==e)return q(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current())){if("word"==e)T(t);else if("interpolation"==e)return q(r,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?C(r):"word"==e?(a="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?_(e,
|
||
|
;/*!node_modules/codemirror/mode/htmlmixed/htmlmixed.js*/
|
||
|
amis.define("1c51997",(function(t,e,a,n){var l;l=function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/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"]]},a={};function n(t,e){var n=t.match(function(t){return a[t]||(a[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function l(t,e){return new RegExp((e?"^":"")+"</\\s*"+t+"\\s*>","i")}function o(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;o>=0;o--)n.unshift(l[o])}t.defineMode("htmlmixed",(function(a,c){var i=t.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag,allowMissingTagName:c.allowMissingTagName}),r={},s=c&&c.tags,u=c&&c.scriptTypes;if(o(e,r),s&&o(s,r),u)for(var m=u.length-1;m>=0;m--)r.script.unshift(["type",u[m].matches,u[m].mode]);function d(e,o){var c,s=i.token(e,o.htmlState),u=/\btag\b/.test(s);if(u&&!/[<>\s\/]/.test(e.current())&&(c=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&r.hasOwnProperty(c))o.inTag=c+" ";else if(o.inTag&&u&&/>$/.test(e.current())){var m=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var g=">"==e.current()&&function(t,e){for(var a=0;a<t.length;a++){var l=t[a];if(!l[0]||l[1].test(n(e,l[0])))return l[2]}}(r[m[1]],m[2]),f=t.getMode(a,g),p=l(m[1],!0),h=l(m[1],!1);o.token=function(t,e){return t.match(p,!1)?(e.token=d,e.localState=e.localMode=null,null):function(t,e,a){var n=t.current(),l=n.search(e);return l>-1?t.backUp(n.length-l):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),a}(t,h,e.localMode.token(t,e.localState))},o.localMode=f,o.localState=t.startState(f,i.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=e.current(),e.eol()&&(o.inTag+=" "));return s}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:t.startState(i)}},copyState:function(e){var a;return e.localState&&(a=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(i,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a,n){return!e.localMode||/^\s*<\//.test(a)?i.indent(e.htmlState,a,n):e.localMode.indent?e.localMode.indent(e.localState,a,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||i}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")},"object"==typeof e&&"object"==typeof a?l(t("3e3270d"),t("9191e9d"),t("b567d52"),t("4d18ceb")):"function"==typeof n&&n.amd?n(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],l):l(CodeMirror)}));
|
||
|
;/*!node_modules/codemirror/addon/mode/simple.js*/
|
||
|
amis.define("ff85055",(function(t,e,n,a){var r;r=function(t){"use strict";function e(t,e){if(!t.hasOwnProperty(e))throw new Error("Undefined state "+e+" in simple mode")}function n(t,e){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t.unicode&&(n+="u"),t=t.source):t=String(t),new RegExp((!1===e?"":"^")+"(?:"+t+")",n)}function a(t,a){(t.next||t.push)&&e(a,t.next||t.push),this.regex=n(t.regex),this.token=function(t){if(!t)return null;if(t.apply)return t;if("string"==typeof t)return t.replace(/\./g," ");for(var e=[],n=0;n<t.length;n++)e.push(t[n]&&t[n].replace(/\./g," "));return e}(t.token),this.data=t}function r(t,e){return function(n,a){if(a.pending){var r=a.pending.shift();return 0==a.pending.length&&(a.pending=null),n.pos+=r.text.length,r.token}if(a.local){if(a.local.end&&n.match(a.local.end)){var o=a.local.endToken||null;return a.local=a.localState=null,o}var l;return o=a.local.mode.token(n,a.localState),a.local.endScan&&(l=a.local.endScan.exec(n.current()))&&(n.pos=n.start+l.index),o}for(var s=t[a.state],d=0;d<s.length;d++){var c=s[d],u=(!c.data.sol||n.sol())&&n.match(c.regex);if(u){c.data.next?a.state=c.data.next:c.data.push?((a.stack||(a.stack=[])).push(a.state),a.state=c.data.push):c.data.pop&&a.stack&&a.stack.length&&(a.state=a.stack.pop()),c.data.mode&&i(e,a,c.data.mode,c.token),c.data.indent&&a.indent.push(n.indentation()+e.indentUnit),c.data.dedent&&a.indent.pop();var p=c.token;if(p&&p.apply&&(p=p(u)),u.length>2&&c.token&&"string"!=typeof c.token){for(var f=2;f<u.length;f++)u[f]&&(a.pending||(a.pending=[])).push({text:u[f],token:c.token[f-1]});return n.backUp(u[0].length-(u[1]?u[1].length:0)),p[0]}return p&&p.join?p[0]:p}}return n.next(),null}}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;var n=0;for(var a in t)if(t.hasOwnProperty(a)){if(!e.hasOwnProperty(a)||!o(t[a],e[a]))return!1;n++}for(var a in e)e.hasOwnProperty(a)&&n--;return 0==n}function i(e,a,r,i){var l;if(r.persistent)for(var s=a.persistentStates;s&&!l;s=s.next)(r.spec?o(r.spec,s.spec):r.mode==s.mode)&&(l=s);var d=l?l.mode:r.mode||t.getMode(e,r.spec),c=l?l.state:t.startState(d);r.persistent&&!l&&(a.persistentStates={mode:d,spec:r.spec,state:c,next:a.persistentStates}),a.localState=c,a.local={mode:d,end:r.end&&n(r.end),endScan:r.end&&!1!==r.forceEnd&&n(r.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function l(e,n){return function(a,r,o){if(a.local&&a.local.mode.indent)return a.local.mode.indent(a.localState,r,o);if(null==a.indent||a.local||n.dontIndentStates&&function(t,e){for(var n=0;n<e.length;n++)if(e[n]===t)return!0}(a.state,n.dontIndentStates)>-1)return t.Pass;var i=a.indent.length-1,l=e[a.state];t:for(;;){for(var s=0;s<l.length;s++){var d=l[s];if(d.data.dedent&&!1!==d.data.dedentIfLineStart){var c=d.regex.exec(r);if(c&&c[0]){i--,(d.next||d.push)&&(l=e[d.next||d.push]),r=r.slice(c[0].length);continue t}}}break}return i<0?0:a.indent[i]}}t.defineSimpleMode=function(e,n){t.defineMode(e,(function(e){return t.simpleMode(e,n)}))},t.simpleMode=function(n,o){e(o,"start");var i={},s=o.meta||{},d=!1;for(var c in o)if(c!=s&&o.hasOwnProperty(c))for(var u=i[c]=[],p=o[c],f=0;f<p.length;f++){var h=p[f];u.push(new a(h,o)),(h.indent||h.dedent)&&(d=!0)}var g={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:d?[]:null}},copyState:function(e){var n={state:e.state,pending:e.pending,local:e.local,localState:null,indent:e.indent&&e.indent.slice(0)};e.localState&&(n.localState=t.copyState(e.local.mode,e.localState)),e.stack&&(n.stack=e.stack.slice(0));for(var a=e.persistentStates;a;a=a.next)n.persistentStates={mode:a.mode,spec:a.spec,state:a.state==e.localState?n.localState:t.copyState(a.mode,a.state),next:n.persistentStates};return n},token:r(i,n),innerMode:function(t){return t.local&&{mode:t.local.mode,state:t.localState}},indent:l(i,s)};if(s)for(var S in s)s.hasOwnProperty(S)&&(g[S]=s[S]);return g}},"object"==typeof e&&"object"==typeof n?r(t("3e3270d")):"function"==typeof a&&a.amd?a(["../../lib/codemirror"],r):r(CodeMirror)}));
|
||
|
;/*!node_modules/codemirror/addon/mode/multiplex.js*/
|
||
|
amis.define("245cfbb",(function(e,n,t,r){var i;i=function(e){"use strict";e.multiplexingMode=function(n){var t=Array.prototype.slice.call(arguments,1);function r(e,n,t,r){if("string"==typeof n){var i=e.indexOf(n,t);return r&&i>-1?i+n.length:i}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null,startingInner:!1}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner),startingInner:t.startingInner}},token:function(i,o){if(o.innerActive){var c=o.innerActive;if(a=i.string,!c.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((v=c.close&&!o.startingInner?r(a,c.close,i.pos,c.parseDelimiters):-1)==i.pos&&!c.parseDelimiters)return i.match(c.close),o.innerActive=o.inner=null,c.delimStyle&&c.delimStyle+" "+c.delimStyle+"-close";v>-1&&(i.string=a.slice(0,v));var l=c.mode.token(i,o.inner);return v>-1?i.string=a:i.pos>i.start&&(o.startingInner=!1),v==i.pos&&c.parseDelimiters&&(o.innerActive=o.inner=null),c.innerStyle&&(l=l?l+" "+c.innerStyle:c.innerStyle),l}for(var s=1/0,a=i.string,u=0;u<t.length;++u){var v,d=t[u];if((v=r(a,d.open,i.pos))==i.pos){d.parseDelimiters||i.match(d.open),o.startingInner=!!d.parseDelimiters,o.innerActive=d;var f=0;if(n.indent){var m=n.indent(o.outer,"","");m!==e.Pass&&(f=m)}return o.inner=e.startState(d.mode,f),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=v&&v<s&&(s=v)}s!=1/0&&(i.string=a.slice(0,s));var p=n.token(i,o.outer);return s!=1/0&&(i.string=a),p},indent:function(t,r,i){var o=t.innerActive?t.innerActive.mode:n;return o.indent?o.indent(t.innerActive?t.inner:t.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:n;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var o=0;o<t.length;++o){var c=t[o];"\n"===c.open&&(r.innerActive=c,r.inner=e.startState(c.mode,i.indent?i.indent(r.outer,"",""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}},"object"==typeof n&&"object"==typeof t?i(e("3e3270d")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],i):i(CodeMirror)}));
|