针对多级代理,返回最最最原始的那个对象
327002
public Interface getMostOriginalObject() {
        Interface origin = getOriginalTarget();
        while (Proxy.isProxyClass(origin.getClass())) {
            origin = (Interface) getProxyBuilder(origin.hashCode()).getOriginalTarget();
        }
        return origin;
    }
588531
def _filter(self):
        
        pattern = u"[\s+\.\!\-\/_,$%^*(+\"\']+|[+——！】【，。？?:、：~@#￥%……&*“”（）]+"
        self.m = re.sub(pattern, "", self.m)
1219383
function cascade(element, pseudo) {
    pseudo = normalizePseudo(pseudo);

    var cacheKey = '_cascade::' + pseudo;

    if (element[cacheKey]) {
        return element[cacheKey];
    }

    var document = element.ownerDocument;
    var cssStyleDeclarations = [];
    var style = new CSSStyleDeclaration();
    var importants = {};
    var forEach = Array.prototype.forEach;
    var pseudoRe = pseudo ? new RegExp('\\:+' + pseudo + '$', 'i') : null;

    // 行内样式
    cssStyleDeclarations.push(element.style);
    if (!element.style._specificity) {
        element.style._specificity = [1, 0, 0, 0];
    }

    // 非行内样式
    // StyleSheetList > CSSStyleSheet.cssRules > CSSStyleRule
    eachCssStyleRule(document, function(rule) {
        var selectorText = rule.selectorText;
        if (matches(element, selectorText)) {
            rule.style._specificity = getSpecificity(selectorText);
            cssStyleDeclarations.push(rule.style);
        }
    });


    // 优先级排序
    cssStyleDeclarations.sort(function(a, b) {
        return compareSpecificity(a._specificity, b._specificity);
    }).forEach(function(cssStyleDeclaration) {
        forEach.call(cssStyleDeclaration, cssStyleDeclarationForEach, cssStyleDeclaration);
    });


    function matches(element, selector) {
        if (pseudoRe) {
            // *::after
            // ::after
            // element::after
            selector = selector.replace(pseudoRe, '') || '*';
        }
        try {
            return element.matches(selector);
        } catch (e) {}
    }


    function cssStyleDeclarationForEach(key) {
        var cssStyleDeclaration = this;
        var important = cssStyleDeclaration.getPropertyPriority(key);

        // 当前样式属性覆盖规则，任意之一：
        // 1.当前声明了重要 2.之前没有声明重要 3.之前没有定义
        if (important || !importants[key] || !style[key]) {
            style[key] = cssStyleDeclaration[key];
        }

        importants[key] = important;
    }


    element[cacheKey] = style;

    return style;
}
1134331
function (template) {
        var code,
            nextChar,
            matchedText,
            processor = new ParseProcessor(template),
            contentProcessor = new ContentProcessor();

        while (processor.position < processor.source.length) {
            if (processor.state === stateEnum.client) {
                code = processor.readMarkup();
                contentProcessor.addSegment({
                    data: code,
                    type: modeEnum.markup
                });
            } else {
                nextChar = processor.readNextChars(1);
                //跳过@符号。Pass the @
                if (nextChar === configure.symbol) {
                    processor.position++;
                    nextChar = processor.readNextChars(1);
                    //@@
                    if (nextChar === configure.symbol) {
                        processor.position++;
                        processor.state = stateEnum.client;
                        contentProcessor.addSegment({
                            data: configure.symbol,
                            type: modeEnum.markup
                        });
                    }
                    //@//...
                    else if (nextChar === '/' && processor.readNextChars(2) === '//') {
                        matchedText = processor.readNextChars().match(/\/\/.*/)[0];
                        processor.position += matchedText.length;
                        processor.state = stateEnum.client;
                    }
                    //@*...*@
                    else if (nextChar === '*') {
                        if (new RegExp('\\*[\\s\\S]*?\\*' + configure.symbol).test(processor.readNextChars())) {
                            matchedText = processor.readNextChars().match(new RegExp('\\*[\\s\\S]*?\\*' + configure.symbol))[0];
                            processor.position += matchedText.length;
                            processor.state = stateEnum.client;
                        } else {
                            throw new SakerError('Comments ' + configure.symbol + '* not found the matched *' + configure.symbol + ' ！', processor.getStackString('Comments ' + configure.symbol + '* not found the matched *' + configure.symbol + ' ！', processor.getLineNum(processor.position)));
                        }
                    }
                    //@(...)
                    else if (nextChar === '(') {
                        code = processor.readBracketCode();
                        if (/^\(\s*\)$/.test(code)) {
                            code = '';
                        }
                        contentProcessor.addSegment({
                            data: code,
                            type: modeEnum.expression
                        });
                    }
                    //@{...}
                    else if (nextChar === '{') {
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: code,
                            type: modeEnum.script
                        });
                    }
                    //@if(){...}
                    else if (nextChar === 'i' && processor.readNextChars(2) === 'if' && /^if\s*?\([\s\S]+?\)\s*\{/.test(processor.readNextChars())) {
                        matchedText = processor.readNextChars().match(/^if\s*?\([\s\S]+?\)\s*\{/)[0];
                        processor.position += matchedText.length;
                        processor.braces.push({
                            type: bracesEnum.atIf,
                            position: processor.position
                        });
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: matchedText + code,
                            type: modeEnum.script
                        });
                    }
                    //@for(){...}
                    else if (nextChar === 'f' && processor.readNextChars(3) === 'for' && /^for\s*?\([\s\S]+?\)\s*\{/.test(processor.readNextChars())) {
                        matchedText = processor.readNextChars().match(/^for\s*?\([\s\S]+?\)\s*\{/)[0];
                        processor.position += matchedText.length;
                        processor.braces.push({
                            type: bracesEnum.atFor,
                            position: processor.position
                        });
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: matchedText + code,
                            type: modeEnum.script
                        });
                    }
                    //@while(){...}
                    else if (nextChar === 'w' && processor.readNextChars(5) === 'while' && /^while\s*?\([\s\S]+?\)\s*\{/.test(processor.readNextChars())) {
                        matchedText = processor.readNextChars().match(/^while\s*?\([\s\S]+?\)\s*\{/)[0];
                        processor.position += matchedText.length;
                        processor.braces.push({
                            type: bracesEnum.atWhile,
                            position: processor.position
                        });
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: matchedText + code,
                            type: modeEnum.script
                        });
                    }
                    //@do{}
                    else if (nextChar === 'd' && processor.readNextChars(2) === 'do' && /^do\s*?\{/.test(processor.readNextChars())) {
                        matchedText = processor.readNextChars().match(/^do\s*?\{/)[0];
                        processor.position += matchedText.length;
                        processor.braces.push({
                            type: bracesEnum.atDo,
                            position: processor.position
                        });
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: matchedText + code,
                            type: modeEnum.script
                        });
                    }
                    //@switch(){...}
                    else if (nextChar === 's' && processor.readNextChars(6) === 'switch' && /^switch\s*?\([\s\S]+?\)\s*\{/.test(processor.readNextChars())) {
                        matchedText = processor.readNextChars().match(/^switch\s*?\([\s\S]+?\)\s*\{/)[0];
                        processor.position += matchedText.length;
                        processor.braces.push({
                            type: bracesEnum.atSwitch,
                            position: processor.position
                        });
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: matchedText + code,
                            type: modeEnum.script
                        });
                    }
                    //@try{}
                    else if (nextChar === 't' && processor.readNextChars(3) === 'try' && /^try\s*?\{/.test(processor.readNextChars())) {
                        matchedText = processor.readNextChars().match(/^try\s*?\{/)[0];
                        processor.position += matchedText.length;
                        processor.braces.push({
                            type: bracesEnum.atTry,
                            position: processor.position
                        });
                        code = processor.readBlockServerCode();
                        contentProcessor.addSegment({
                            data: matchedText + code,
                            type: modeEnum.script
                        });
                    }
                    //@abc, @_a, @[1,2], @!true
                    else if (/[A-Za-z_[!]/.test(nextChar)) {
                        code = processor.readLineServerCode();
                        contentProcessor.addSegment({
                            data: code,
                            type: modeEnum.expression
                        });
                    }
                    //@ abc, @", @?等其他特殊字符
                    else {
                        throw new SakerError('Illegal character after ' + configure.symbol + ' ! ', processor.getStackString('Illegal character after ' + configure.symbol + ' ! ', processor.getLineNum(processor.position)));
                    }
                } else {
                    code = processor.readBlockServerCode();
                    contentProcessor.addSegment({
                        data: code,
                        type: modeEnum.script
                    });
                }
            }
        }
        //匹配情况检查。Check match.
        if (processor.tags.length > 0) {
            throw new SakerError('There exists unclosed tags！', processor.getStackString('There exists unclosed tags！', processor.getLineNum(processor.tags[processor.tags.length - 1].position)));
        }
        if (processor.braces.length > 0) {
            throw new SakerError('There exists unmatched braces！', processor.getStackString('There exists unmatched braces！', processor.getLineNum(processor.braces[processor.braces.length - 1].position)));
        }
        if (processor.brackets.length > 0) {
            throw new SakerError('There exits unmatched brackets！', processor.getStackString('There exits unmatched brackets！', processor.getLineNum(processor.brackets[processor.brackets.length - 1])));
        }
        return contentProcessor;
    }
192040
function getNextVisibleNode(self) {
        var children = self.get('children'), n, parent;
        if (self.get('expanded') && children.length) {
            return children[0];
        }    // 没有展开或者根本没有儿子节点
             // 深度遍历的下一个
        // 没有展开或者根本没有儿子节点
        // 深度遍历的下一个
        n = self.next();
        parent = self;
        while (!n && (parent = parent.get('parent'))) {
            n = parent.next();
        }
        return n;
    }
182569
function __init()
    {
        #DEBUG
        if (defined('DEBUG') and strtolower(DEBUG) == 'on')
        {
            //记录运行时间和内存占用情况
            $this->env['runtime']['start'] = microtime(true);
            $this->env['runtime']['mem'] = memory_get_usage();
            //使用whoops美化错误页面
            if (class_exists('\\Whoops\\Run'))
            {
                $whoops = new \Whoops\Run;
                if ($this->env['sapi_name'] == 'cli')
                {
                    $whoops->pushHandler(new \Whoops\Handler\PlainTextHandler());
                }
                else
                {
                    $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
                }
                $whoops->register();
            }
        }
        $this->callHook(self::HOOK_INIT);
    }
323830
function(ctx, frame, cb) {
                // ... 如果是 .render(function () {})
                if (typeof ctx === 'function') {
                    cb = ctx;
                    ctx = {};
                } 
                // ...? 什么场景使用了frame
                else if (typeof frame === 'function') {
                    cb = frame;
                    frame = null;
                }

                return lib.withPrettyErrors(this.path, this.env.dev, function() {
                    // debugger;
                    this.compile();

                    // ... 当前作用域不是简单的Object对象，是Context类的实例，并且整合了blocks对象
                    // ...todo 整合了blocks对象的情景分析
                    var context = new Context(ctx || {}, this.blocks);
                    var syncResult = null;

                    frame = frame || new Frame()

                    this.rootRenderFunc(this.env, context, frame, runtime, cb || function(err, res) {
                        if (err) {
                            throw err;
                        }
                        syncResult = res;
                    });

                    return syncResult;
                }.bind(this));
            }
1074728
function () {
        var fileList = [];
        /*获取原文件列表*/
        Object.keys(src).forEach(function(key){
            fileList.push(src[key]);
        });
        return fileList;
    }
980174
function (withWhitespace) {
                var tok;

                // 如果已经有缓存的预读
                if (this.peeked) {
                    if (!withWhitespace && this.peeked.type == lexer.TOKEN_WHITESPACE) {
                        this.peeked = null;
                    } else {
                        tok = this.peeked;
                        this.peeked = null;
                        return tok;
                    }
                }

                tok = this.tokens.nextToken();

                // ... 默认如果下一个tokens是空白字符 则返回下下个token
                // ... 当withWhitespace为true时 即nextToken(true) 则不考虑是否是空白字符
                if (!withWhitespace) {
                    while (tok && tok.type == lexer.TOKEN_WHITESPACE) {
                        tok = this.tokens.nextToken();
                    }
                }

                return tok;
            }
1062284
function(node, frame) {
                var children = node.children;
                for (var i = 0, l = children.length; i < l; i++) {
                    // TemplateData is a special case because it is never
                    // autoescaped, so simply output it for optimization
                    // ... 原字符串部分
                    if (children[i] instanceof nodes.TemplateData) {
                        if (children[i].value) {
                            this.emit(this.buffer + ' += ');
                            this.compileLiteral(children[i], frame);
                            this.emitLine(';');
                        }
                    } 
                    // ... 变量值
                    else {
                        // ...? 这是取变量的方法吗
                        this.emit(this.buffer + ' += runtime.suppressValue(');
                        this.compile(children[i], frame);
                        this.emit(', env.autoesc);\n');
                    }
                }
            }
115244
function (source) {
        //要解析的源码。To be parsed template source string.
        this.source = source;

        //当前处理的位置。Current parsed position of source.
        this.position = 0;

        //当前读取状态。Current read state, server or client.
        this.state = stateEnum.client;

        //标签计数器，规则：遇到开始标签 '<' push，遇到结束标签 '</' pop。Counter for tags, rule: if '<' push, if '</' pop.
        this.tags = [];

        //引号计数器，规则：当遇到了引号，且引号之前不是'\'时，若数组为空则push，若数组不为空且值与它相同则pop，push类型：{type: quotesEnum.xxx, position: xxx}。Counter for quotes.
        this.quotes = [];

        //左大括号计数器，规则：遇到 '{' push，遇到 '}' pop，push类型：{type: bracesEnum.xxx, position: xxx}。Counter for braces.
        this.braces = [];

        //左小括号计数器，规则：遇到 '(' push，遇到 ')' pop，push类型：position。Counter for brackets.
        this.brackets = [];
    }
875001
private static Object getFieldValue(Class<?> cls, String fieldName, String strValue) {
		try {
			Class<?> type = Reflections.getDeclaredField(cls, fieldName).getType();
			// 是数字类型
			if (Number.class.isAssignableFrom(type)) {
				return type.getMethod("valueOf", String.class).invoke(null, strValue);
			}
			// 字符类型
			if (Character.class.isAssignableFrom(type)) {
				return strValue.charAt(0);
			}
			// 字符串类型
			if (String.class.isAssignableFrom(type)) {
				return strValue;
			}
			// 日期类型
			if (Date.class.isAssignableFrom(type)) {
				// TODO 日期类型处理
				return null;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		return null;
	}
648247
function wrapMethod(obj, name, app) {
    var method = obj[name];

    // 保存原始内容
    wrappers.push({
        obj: obj,
        name: name,
        method: method
    });

    obj[name] = function (callback) {
        var args = [];
        for (var i = 1; i < arguments.length; i++) {
            args.push(arguments[i]);
        }

        var ctx = app.getContext();
        args.unshift(function () {
            app.revertContext(ctx);
            ctx = null;
            callback.apply(null, arguments);
        });

        return method.apply(this, args);
    };
}
1010244
function cleanSVG(svgDom, x, y) {
            function getTransformToElement(target, source) {
                var matrix;
                try {
                    matrix = source.getScreenCTM().inverse();
                } catch (e) {
                    throw new Error("Can not inverse source element' ctm.");
                }
                return matrix.multiply(target.getScreenCTM());
            }
            function dealWithPath(d, dealWithPattern) {
                if (!(dealWithPattern instanceof Function)) {
                    dealWithPattern = function() {};
                }
                var strArr = [], pattern = [], cache = [];
                for (var i = 0, l = d.length; i < l; i++) {
                    switch (d[i]) {
                      case "M":
                      case "L":
                      case "T":
                      case "S":
                      case "A":
                      case "C":
                      case "H":
                      case "V":
                      case "Q":
                        {
                            if (cache.length) {
                                pattern.push(cache.join(""));
                                cache = [];
                            }
                            // 脑图的path格式真奇怪...偶尔就给我蹦出来一个"..V123 C..", 那空格几个意思 - -
                            if (pattern[pattern.length - 1] === ",") {
                                pattern.pop();
                            }
                            if (pattern.length) {
                                dealWithPattern(pattern);
                                strArr.push(pattern.join(""));
                                pattern = [];
                            }
                            pattern.push(d[i]);
                            break;
                        }

                      case "Z":
                      case "z":
                        {
                            pattern.push(cache.join(""), d[i]);
                            dealWithPattern(pattern);
                            strArr.push(pattern.join(""));
                            cache = [];
                            pattern = [];
                            break;
                        }

                      case ".":
                      case "e":
                        {
                            cache.push(d[i]);
                            break;
                        }

                      case "-":
                        {
                            if (d[i - 1] !== "e") {
                                if (cache.length) {
                                    pattern.push(cache.join(""), ",");
                                }
                                cache = [];
                            }
                            cache.push("-");
                            break;
                        }

                      case " ":
                      case ",":
                        {
                            if (cache.length) {
                                pattern.push(cache.join(""), ",");
                                cache = [];
                            }
                            break;
                        }

                      default:
                        {
                            if (/\d/.test(d[i])) {
                                cache.push(d[i]);
                            } else {
                                // m a c s q h v l t z情况
                                if (cache.length) {
                                    pattern.push(cache.join(""), d[i]);
                                    cache = [];
                                } else {
                                    // 脑图的path格式真奇怪...偶尔就给我蹦出来一个"..V123 c..", 那空格几个意思 - -
                                    if (pattern[pattern.length - 1] === ",") {
                                        pattern.pop();
                                    }
                                    pattern.push(d[i]);
                                }
                            }
                            if (i + 1 === l) {
                                if (cache.length) {
                                    pattern.push(cache.join(""));
                                }
                                dealWithPattern(pattern);
                                strArr.push(pattern.join(""));
                                cache = null;
                                pattern = null;
                            }
                        }
                    }
                }
                return strArr.join("");
            }
            function replaceWithNode(svgNode, parentX, parentY) {
                if (!svgNode) {
                    return;
                }
                if (svgNode.tagName === "defs") {
                    return;
                }
                if (svgNode.getAttribute("fill") === "transparent") {
                    svgNode.setAttribute("fill", "none");
                }
                if (svgNode.getAttribute("marker-end")) {
                    svgNode.removeAttribute("marker-end");
                }
                parentX = parentX || 0;
                parentY = parentY || 0;
                if (svgNode.getAttribute("transform")) {
                    var ctm = getTransformToElement(svgNode, svgNode.parentElement);
                    parentX -= ctm.e;
                    parentY -= ctm.f;
                    svgNode.removeAttribute("transform");
                }
                switch (svgNode.tagName.toLowerCase()) {
                  case "g":
                    break;

                  case "path":
                    {
                        var d = svgNode.getAttribute("d");
                        if (d) {
                            d = dealWithPath(d, function(pattern) {
                                switch (pattern[0]) {
                                  case "V":
                                    {
                                        pattern[1] = +pattern[1] - parentY;
                                        break;
                                    }

                                  case "H":
                                    {
                                        pattern[1] = +pattern[1] - parentX;
                                        break;
                                    }

                                  case "M":
                                  case "L":
                                  case "T":
                                    {
                                        pattern[1] = +pattern[1] - parentX;
                                        pattern[3] = +pattern[3] - parentY;
                                        break;
                                    }

                                  case "Q":
                                  case "S":
                                    {
                                        pattern[1] = +pattern[1] - parentX;
                                        pattern[3] = +pattern[3] - parentY;
                                        pattern[5] = +pattern[5] - parentX;
                                        pattern[7] = +pattern[7] - parentY;
                                        break;
                                    }

                                  case "A":
                                    {
                                        pattern[11] = +pattern[11] - parentX;
                                        pattern[13] = +pattern[13] - parentY;
                                        break;
                                    }

                                  case "C":
                                    {
                                        pattern[1] = +pattern[1] - parentX;
                                        pattern[3] = +pattern[3] - parentY;
                                        pattern[5] = +pattern[5] - parentX;
                                        pattern[7] = +pattern[7] - parentY;
                                        pattern[9] = +pattern[9] - parentX;
                                        pattern[11] = +pattern[11] - parentY;
                                    }
                                }
                            });
                            svgNode.setAttribute("d", d);
                            svgNode.removeAttribute("transform");
                        }
                        return;
                    }

                  case "image":
                  case "text":
                    {
                        if (parentX && parentY) {
                            var x = +svgNode.getAttribute("x") || 0, y = +svgNode.getAttribute("y") || 0;
                            svgNode.setAttribute("x", x - parentX);
                            svgNode.setAttribute("y", y - parentY);
                        }
                        if (svgNode.getAttribute("dominant-baseline")) {
                            svgNode.removeAttribute("dominant-baseline");
                            svgNode.setAttribute("dy", ".8em");
                        }
                        svgNode.removeAttribute("transform");
                        return;
                    }
                }
                if (svgNode.children) {
                    for (var i = 0, l = svgNode.children.length; i < l; i++) {
                        replaceWithNode(svgNode.children[i], parentX, parentY);
                    }
                }
            }
            svgDom.style.visibility = "hidden";
            replaceWithNode(svgDom, x || 0, y || 0);
            svgDom.style.visibility = "visible";
        }
359775
function compileVariable(source, engine, forText) {
        var code = [];
        var options = engine.options;

        var toStringHead = '';
        var toStringFoot = '';
        var wrapHead = '';
        var wrapFoot = '';

        // 默认的filter，当forText模式时有效
        var defaultFilter;

        if (forText) {
            toStringHead = 'ts(';
            toStringFoot = ')';
            wrapHead = RENDER_STRING_ADD_START;
            wrapFoot = RENDER_STRING_ADD_END;
            defaultFilter = options.defaultFilter;
        }

        parseTextBlock(
            source, options.variableOpen, options.variableClose, 1,

            function (text) {
                // 加入默认filter
                // 只有当处理forText时，需要加入默认filter
                // 处理if/var/use等command时，不需要加入默认filter
                if (forText && text.indexOf('|') < 0 && defaultFilter) {
                    text += '|' + defaultFilter;
                }

                // variableCode是一个gv调用，然后通过循环，在外面包filter的调用
                // 形成filter["b"](filter["a"](gv(...)))
                //
                // 当forText模式，处理的是文本中的变量替换时
                // 传递给filter的需要是字符串形式，所以gv外需要包一层ts调用
                // 形成filter["b"](filter["a"](ts(gv(...))))
                //
                // 当variableName以*起始时，忽略ts调用，直接传递原值给filter
                var filterCharIndex = text.indexOf('|');
                var variableName = (
                        filterCharIndex > 0
                        ? text.slice(0, filterCharIndex)
                        : text
                    ).replace(/^\s+/, '').replace(/\s+$/, '');
                var filterSource = filterCharIndex > 0
                    ? text.slice(filterCharIndex + 1)
                    : '';

                var variableRawValue = variableName.indexOf('*') === 0;
                var variableCode = [
                    variableRawValue ? '' : toStringHead,
                    toGetVariableLiteral(variableName),
                    variableRawValue ? '' : toStringFoot
                ];

                if (filterSource) {
                    filterSource = compileVariable(filterSource, engine);
                    var filterSegs = filterSource.split('|');
                    for (var i = 0, len = filterSegs.length; i < len; i++) {
                        var seg = filterSegs[i];
                        var segMatch = seg.match(/^\s*([a-z0-9_-]+)(\((.*)\))?\s*$/i);
                        if (segMatch) {
                            variableCode.unshift('fs["' + segMatch[1] + '"](');

                            if (segMatch[3]) {
                                variableCode.push(',', segMatch[3]);
                            }

                            variableCode.push(')');
                        }
                    }
                }

                code.push(
                    wrapHead,
                    variableCode.join(''),
                    wrapFoot
                );
            },

            function (text) {
                code.push(
                    wrapHead,
                    forText ? stringLiteralize(text) : text,
                    wrapFoot
                );
            }
        );

        return code.join('');
    }
916799
public function ShowTime()
    {
        //循环输出css内容
        ob_start(function ($css) {
            $css = preg_replace('#\/\*[^*]*\*+([^/][^*]*\*+)*\/#isU', '', $css);  // 清除块级注释
            $css = str_replace(array('<!--', '-->'), '', $css);
            $css = str_replace(array("\r", "\r", "", "\t"), '', $css); // 清除换行、缩进
            $css = preg_replace("/\s(?=\s)/", '', $css); // 连续的空格替换为一个空格
            $css = preg_replace("#\s*(:|;|\{|\})\s*#", "$1", $css); // 清除一些特定字符前后的空格，这里是可以扩展的，可以根据你的实际情况，添加或删除某些字符
            if ($css) {
                return "\n<style>" . $css . "</style>\n";
            } else {
                return '';
            }
        });
        foreach (self::$Component[self::CSS] as $cssfile) {
            ob_start();
            include $cssfile;
            $css_contents = ob_get_clean();
            //加上名字作为css的前缀,防止冲突
            $basename = current(explode('vue.', basename($cssfile)));
            $csss = explode("\n", $css_contents);
            foreach ($csss as $key => $css_contents) {
                $line = trim($css_contents);
                if ($line && substr($line, -1) == '{') {
                    //$csss[$key] = "[css-{$basename}] " . $line;
                    $csss[$key] =  $line;
                }
            }
            echo join("\n", $csss);
        }
        ob_end_flush();

        //输出定制的js代码
        foreach (self::$Component[self::JS_FILE] as $jsfile) {
            ?>
            <script type="application/javascript">
                <?php
                ob_start();
                include $jsfile;
                echo (new JavaScriptPacker(ob_get_clean(), 'none', true, false))
                    ->pack();
                ?>
            </script>
            <?php
        }
        //输出组件js的内容
        foreach (self::$Component[self::JS] as $jscode) {
            if ($jscode) {
                echo $jscode . "\n";
            }
        }
        ?>
        <script type="application/javascript"> var VUE_CONFIG={};var <?=$this->getAppid()?> =new Vue({data:{VUE_CONFIG:VUE_CONFIG,}, mixins: [<?=join(',', $this->getmixins())?>],}).$mount('#<?=$this->getAppid()?>');window.<?=$this->getAppid()?> = <?=$this->getAppid()?>;</script>
        <?php
    }
1367014
private function parse_fun_var(& $str)
    {
        // 变量： 点号变量转为数组式变量  $a.b.c   =>  $a[b][c] 
        $str = preg_replace('/\$(\w+)\.(\w+)\.(\w+)\.(\w+)/is','$\\1[\'\\2\'][\'\\3\'][\'\\4\']',$str);
        $str = preg_replace('/\$(\w+)\.(\w+)\.(\w+)/is','$\\1[\'\\2\'][\'\\3\']',$str);
        $str = preg_replace('/\$(\w+)\.(\w+)/is','$\\1[\'\\2\']',$str);
        
        // 方法: {function()}}
        $str = preg_replace("/\{(\!?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff:\\-\>$]*\(([^{}]*)\))\s*\}/", "<?php print_r(\\1); ?>", $str );
        
        // 方法: {function a=a1 b=b1}
        $str = \preg_replace_callback("/\{(\w+)\s+([^}]+)\}/i", array($this,'func_arr_params_callback'), $str);
        
        // 常量: {XXXX}
        $str = preg_replace ( "/\{([A-Z_\x7f-\xff][A-Z0-9_\x7f-\xff]*)\}/s", "<?php print_r(\\1); ?>", $str );
        
        // 变量: {$varname[]}, {$varname}
        //$str = preg_replace("/\{(\\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff\[\]\'\"]*)\}/", "<?php print_r(isset(\\1) ? \\1 : '');\?\>", $str );
        
        // 其他: {$var...} to directly output, {$var||'abd'} or {$var}
        $str = preg_replace("/\{(\\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff:]*(?:[^{}]*))\|\|\s*([^}]+)\s*\}/s", "<?php print_r(isset(\\1) && \\1 ? \\1 : \\2); ?>", $str );
        $str = preg_replace("/\{(\\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff:]*(?:[^{}]*))\}/s", "<?php print_r(isset(\\1) ? \\1 : ''); ?>", $str );

        // 转义变量，放在后边
        /*
         * $str = preg_replace("/\{(\\$[a-zA-Z0-9_\[\]\'\"\$\x7f-\xff]+)\}/es", "\$this->addquote('<?php echo \\1; ?>')", $str);
         */
        $str = preg_replace_callback ("/\{(\\$[a-zA-Z0-9_\[\]\'\"\$\x7f-\xff]+)\}/s", array($this,'addquote_callback'), $str);
        
        return $str;
    }