filesbox/web/dist/19362.2cd9dac6.async.js
2024-07-26 14:10:54 +08:00

2 lines
3.3 KiB
JavaScript

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[19362],{19362:function(I,p,b){"use strict";b.r(p),b.d(p,{tiki:function(){return C}});function c(e,t,n){return function(r,k){for(;!r.eol();){if(r.match(t)){k.tokenize=o;break}r.next()}return n&&(k.tokenize=n),e}}function f(e){return function(t,n){for(;!t.eol();)t.next();return n.tokenize=o,e}}function o(e,t){function n(z){return t.tokenize=z,z(e,t)}var r=e.sol(),k=e.next();switch(k){case"{":return e.eat("/"),e.eatSpace(),e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),t.tokenize=g,"tag";case"_":if(e.eat("_"))return n(c("strong","__",o));break;case"'":if(e.eat("'"))return n(c("em","''",o));break;case"(":if(e.eat("("))return n(c("link","))",o));break;case"[":return n(c("url","]",o));case"|":if(e.eat("|"))return n(c("comment","||"));break;case"-":if(e.eat("="))return n(c("header string","=-",o));if(e.eat("-"))return n(c("error tw-deleted","--",o));break;case"=":if(e.match("=="))return n(c("tw-underline","===",o));break;case":":if(e.eat(":"))return n(c("comment","::"));break;case"^":return n(c("tw-box","^"));case"~":if(e.match("np~"))return n(c("meta","~/np~"));break}if(r)switch(k){case"!":return e.match("!!!!!")||e.match("!!!!")||e.match("!!!")||e.match("!!"),n(f("header string"));case"*":case"#":case"+":return n(f("tw-listitem bracket"))}return null}var d,s;function g(e,t){var n=e.next(),r=e.peek();return n=="}"?(t.tokenize=o,"tag"):n=="("||n==")"?"bracket":n=="="?(s="equals",r==">"&&(e.next(),r=e.peek()),/[\'\"]/.test(r)||(t.tokenize=N()),"operator"):/[\'\"]/.test(n)?(t.tokenize=L(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function L(e){return function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=g;break}return"string"}}function N(){return function(e,t){for(;!e.eol();){var n=e.next(),r=e.peek();if(n==" "||n==","||/[ )}]/.test(r)){t.tokenize=g;break}}return"string"}}var i,l;function a(){for(var e=arguments.length-1;e>=0;e--)i.cc.push(arguments[e])}function u(){return a.apply(null,arguments),!0}function x(e,t){var n=i.context&&i.context.noIndent;i.context={prev:i.context,pluginName:e,indent:i.indented,startOfLine:t,noIndent:n}}function v(){i.context&&(i.context=i.context.prev)}function P(e){if(e=="openPlugin")return i.pluginName=d,u(h,_(i.startOfLine));if(e=="closePlugin"){var t=!1;return i.context?(t=i.context.pluginName!=d,v()):t=!0,t&&(l="error"),u(O(t))}else return e=="string"&&((!i.context||i.context.name!="!cdata")&&x("!cdata"),i.tokenize==o&&v()),u()}function _(e){return function(t){return t=="selfclosePlugin"||t=="endPlugin"||t=="endPlugin"&&x(i.pluginName,e),u()}}function O(e){return function(t){return e&&(l="error"),t=="endPlugin"?u():a()}}function h(e){return e=="keyword"?(l="attribute",u(h)):e=="equals"?u(S,h):a()}function S(e){return e=="keyword"?(l="string",u()):e=="string"?u(w):a()}function w(e){return e=="string"?u(w):a()}const C={name:"tiki",startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;l=s=d=null;var n=t.tokenize(e,t);if((n||s)&&n!="comment")for(i=t;;){var r=t.cc.pop()||P;if(r(s||n))break}return t.startOfLine=!1,l||n},indent:function(e,t,n){var r=e.context;if(r&&r.noIndent)return 0;for(r&&/^{\//.test(t)&&(r=r.prev);r&&!r.startOfLine;)r=r.prev;return r?r.indent+n.unit:0}}}}]);