filesbox/web/dist/68493.463a3849.async.js

2 lines
2.2 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[68493],{68493:function(d,o,k){"use strict";k.r(o),k.d(o,{dtd:function(){return s}});var u;function r(e,n){return u=n,e}function t(e,n){var i=e.next();if(i=="<"&&e.eat("!")){if(e.eatWhile(/[\-]/))return n.tokenize=a,a(e,n);if(e.eatWhile(/[\w]/))return r("keyword","doindent")}else{if(i=="<"&&e.eat("?"))return n.tokenize=h("meta","?>"),r("meta",i);if(i=="#"&&e.eatWhile(/[\w]/))return r("atom","tag");if(i=="|")return r("keyword","separator");if(i.match(/[\(\)\[\]\-\.,\+\?>]/))return r(null,i);if(i.match(/[\[\]]/))return r("rule",i);if(i=='"'||i=="'")return n.tokenize=f(i),n.tokenize(e,n);if(e.eatWhile(/[a-zA-Z\?\+\d]/)){var l=e.current();return l.substr(l.length-1,l.length).match(/\?|\+/)!==null&&e.backUp(1),r("tag","tag")}else return i=="%"||i=="*"?r("number","number"):(e.eatWhile(/[\w\\\-_%.{,]/),r(null,null))}}function a(e,n){for(var i=0,l;(l=e.next())!=null;){if(i>=2&&l==">"){n.tokenize=t;break}i=l=="-"?i+1:0}return r("comment","comment")}function f(e){return function(n,i){for(var l=!1,c;(c=n.next())!=null;){if(c==e&&!l){i.tokenize=t;break}l=!l&&c=="\\"}return r("string","tag")}}function h(e,n){return function(i,l){for(;!i.eol();){if(i.match(n)){l.tokenize=t;break}i.next()}return e}}const s={name:"dtd",startState:function(){return{tokenize:t,baseIndent:0,stack:[]}},token:function(e,n){if(e.eatSpace())return null;var i=n.tokenize(e,n),l=n.stack[n.stack.length-1];return e.current()=="["||u==="doindent"||u=="["?n.stack.push("rule"):u==="endtag"?n.stack[n.stack.length-1]="endtag":e.current()=="]"||u=="]"||u==">"&&l=="rule"?n.stack.pop():u=="["&&n.stack.push("["),i},indent:function(e,n,i){var l=e.stack.length;return n.charAt(0)==="]"?l--:n.substr(n.length-1,n.length)===">"&&(n.substr(0,1)==="<"||u=="doindent"&&n.length>1||(u=="doindent"?l--:u==">"&&n.length>1||u=="tag"&&n!==">"||(u=="tag"&&e.stack[e.stack.length-1]=="rule"?l--:u=="tag"?l++:n===">"&&e.stack[e.stack.length-1]=="rule"&&u===">"?l--:n===">"&&e.stack[e.stack.length-1]=="rule"||(n.substr(0,1)!=="<"&&n.substr(0,1)===">"?l=l-1:n===">"||(l=l-1)))),(u==null||u=="]")&&l--),e.baseIndent+l*i.unit},languageData:{indentOnInput:/^\s*[\]>]$/}}}}]);