/*
生成一个随机的图片地址。

替代图片源
http://fpoimg.com/
参考自
http://rensanning.iteye.com/blog/1933310
http://code.tutsplus.com/articles/the-top-8-placeholders-for-web-designers--net-19485
765555
function (size, background, foreground, format, text) {
    // Random.image( size, background, foreground, text )
    if (arguments.length === 4) {
      text = format
      format = undefined
    }
    // Random.image( size, background, text )
    if (arguments.length === 3) {
      text = foreground
      foreground = undefined
    }
    // Random.image()
    if (!size) size = this.pick(this._adSize)

    if (background && ~background.indexOf('#')) background = background.slice(1)
    if (foreground && ~foreground.indexOf('#')) foreground = foreground.slice(1)

    // http://dummyimage.com/600x400/cc00cc/470047.png&text=hello
    return 'http://dummyimage.com/' + size +
            (background ? '/' + background : '') +
            (foreground ? '/' + foreground : '') +
            (format ? '.' + format : '') +
            (text ? '&text=' + text : '')
  }
393475
function(){
		// this.bodyが空の場合はEncode.jsの仕様により対象外
		// カンペンには以下のパズルは存在しないのでURL_KANPENPも対象外
		if(!this.body || (this.type!==URL_PZPRV3 && this.type!==URL_PZPRAPP)){ return;}
		
		switch(this.pid){
		case 'ichimaga':
			if     (this.pflag.indexOf('m')>=0){ this.pid = 'ichimagam';}
			else if(this.pflag.indexOf('x')>=0){ this.pid = 'ichimagax';}
			else                               { this.pid = 'ichimaga'; }
			break;
		case 'icelom':
			if(this.pflag.indexOf('a')<0){ this.pid = 'icelom2';}
			break;
		case 'pipelink':
			if(this.body.match(/[0-9]/)){ this.pid = 'pipelinkr';}
			break;
		case 'bonsan':
			if(this.pflag.indexOf('c')<0){
				var col = this.cols, row = this.rows;
				if(this.body.substr(0,((((col-1)*row+4)/5)|0)+(((col*(row-1)+4)/5)|0)||0).match(/[^0]/)){
					this.pid = 'heyabon';
				}
			}
			break;
		case 'kramma':
			if(this.pflag.indexOf('c')<0){
				var len=(this.cols-1)*(this.rows-1), cc=0;
				for(var i=0;i<this.body.length;i++){
					var ca = this.body.charAt(i);
					if(ca.match(/\w/)){
						cc += parseInt(ca,36);
						if(cc<len){ this.pid = 'kramman'; break;}
					}
					else if(ca === '.'){ cc+=36;}
					if(cc>=len){ break;}
				}
			}
			break;
		}
	}
464879
function () {
            var len = this.source.length,
                char,
                braceState,
                matched,
                result = '';
            if (this.position >= len) {
                return undefined;
            }
            for (; this.position < len; this.position++) {
                char = this.readNextChars(1);
                if (char === configure.symbol) {
                    throw new SakerError('In block scripts, please write scripts directly without prefix ' + configure.symbol + ' !', this.getStackString('In block scripts, please write scripts directly without prefix ' + configure.symbol + ' !', this.getLineNum(this.position)));
                }
                //引号的处理。Handle quotes.
                if ((char === '"' || char === "'") && this.readPrevChars(1) !== '\\') {
                    if (this.quotes.length === 0) {
                        this.quotes.push({
                            type: char === '"' ? quotesEnum.doubleQuotes : quotesEnum.singleQuotes,
                            position: this.position
                        });
                    } else if (this.quotes.length > 0) {
                        if (char === '"' && this.quotes[0].type === quotesEnum.doubleQuotes) {
                            this.quotes.pop();
                        } else if (char === "'" && this.quotes[0].type === quotesEnum.singleQuotes) {
                            this.quotes.pop();
                        }
                    }
                }
                //如果 '<' 不在括号内部，则认为是标记语言的开始，退出循环。If '<' is not in quotes, indicates it's the start of markup, break loop.
                if (char === '<' && this.quotes.length === 0 &&
                    (this.brackets.length === 0
                        || (this.brackets.length > 0
                        && this.brackets[this.brackets.length - 1] < this.braces[this.braces.length - 1].position)
                    )) {
                    break;
                }
                if (char === '(' && this.quotes.length === 0) {
                    this.brackets.push(this.position);
                } else if (char === ')' && this.quotes.length === 0) {
                    this.brackets.pop();
                }

                if (char === '{' && this.quotes.length === 0) {
                    this.braces.push({
                        type: this.readPrevChars(1) === configure.symbol ? bracesEnum.atOther : bracesEnum.noAt,
                        position: this.position
                    });
                } else if (char === '}' && this.quotes.length === 0) {
                    braceState = this.braces.pop();
                    //如果该 '}' 对应的是 '@{'。If the '}' matched '{' has prefix @.
                    if (braceState.type > 0) {
                        if (braceState.type === bracesEnum.atIf && (/(?:^}\s*?else\s*?\{)|(?:^}\s*?else\s+if\s*?\([\s\S]+?\)\s*?\{)/.test(this.readNextChars()))) {
                            //如果 '}' 后面是 'else {' 或者 'else if {'，依然识别为脚本语言，同时处理下braces。If it is 'else' behind '}', that's backend scripts, and handles braces.
                            matched = this.readNextChars().match(/(?:^}\s*?else\s*?\{)|(?:^}\s*?else\s+if\s*?\([\s\S]+?\)\s*?\{)/);
                            result += matched[0];
                            this.position += matched[0].length - 1;
                            this.braces.push({
                                type: bracesEnum.atIf,
                                position: this.position
                            });
                            continue;
                        } else if (braceState.type === bracesEnum.atDo && (/^}\s*?while\s*?\([\s\S]+?\)/.test(this.readNextChars()))) {
                            //如果 '}' 后面是 'while(...);'，依然识别为脚本语言。If it is 'while' behind '}', that's backend scripts.
                            matched = this.readNextChars().match(/^}\s*?while\s*?\([\s\S]+?\)/);
                            result += matched[0];
                            this.position += matched[0].length - 1;
                            continue;
                        } else if (braceState.type === bracesEnum.atTry && (/(?:^}\s*?catch\([\s\S]+?\)\s*?\{)|(?:^}\s*?finally\s*?\{)/.test(this.readNextChars()))) {
                            //如果 '}' 后面是 'catch(...){' 或者 'finally {'，依然识别为脚本语言，同时处理下braces。If it is 'catch' or 'finally', that's backend scripts, and handles braces.
                            matched = this.readNextChars().match(/(?:^}\s*?catch\([\s\S]+?\)\s*?\{)|(?:^}\s*?finally\s*?\{)/);
                            result += matched[0];
                            this.position += matched[0].length - 1;
                            this.braces.push({
                                type: bracesEnum.atTry,
                                position: this.position
                            });
                            continue;
                        } else {
                            //否则停止循环。Otherwise stop loop.
                            result += char;
                            this.position++;
                            break;
                        }
                    }
                }
                result += char;
            }
            //准备进入前端读取模式。Ready to switch to frontend read mode.
            this.state = stateEnum.client;
            return result;
        }
92848
public function CreateHomeReturnOrder()
        {

            // 參數初始化
            $ParamList = [
                'MerchantID' => '',
                'AllPayLogisticsID' => '',
                'LogisticsSubType' => '',
                'ServerReplyURL' => '',
                'SenderName' => '',
                'SenderPhone' => '',
                'SenderCellPhone' => '',
                'SenderZipCode' => '',
                'SenderAddress' => '',
                'ReceiverName' => '',
                'ReceiverPhone' => '',
                'ReceiverCellPhone' => '',
                'ReceiverZipCode' => '',
                'ReceiverAddress' => '',
                'GoodsAmount' => '',
                'GoodsName' => '',
                'Temperature' => Temperature::ROOM,
                'Distance' => Distance::SAME,
                'Specification' => Specification::CM_60,
                'ScheduledPickupTime' => ScheduledPickupTime::UNLIMITED,
                'ScheduledDeliveryTime' => '',
                'ScheduledDeliveryDate' => '',
                'PackageCount' => 0,
                'Remark' => '',
                'PlatformID' => '',
            ];
            $this->PostParams = $this->GetPostParams($this->Send, $ParamList);
            $this->PostParams['ScheduledPickupTime'] = ScheduledPickupTime::UNLIMITED; // 預定取件時段(ScheduledPickupTime)固定為不限時
            $IsAllpayLogisticsIdEmpty = false; // 物流交易編號(AllPayLogisticsID)是否為空
            $IsAllowEmpty = true;
            $MinAmount = 1; // 金額下限
            $MaxAmount = 20000; // 金額上限

            // 參數檢查
            $this->ValidateHashKey();
            $this->ValidateHashIV();
            $this->ValidateID('MerchantID', $this->PostParams['MerchantID'], 10);
            $this->ServiceURL = $this->GetURL('HOME_RETURN_ORDER');

            $this->ValidateID('AllPayLogisticsID', $this->PostParams['AllPayLogisticsID'], 20, true);

            $this->ValidateLogisticsSubType(true);

            // 物流交易編號(AllPayLogisticsID)與物流子類型(LogisticsSubType)擇一不可為空
            if (empty($this->PostParams['AllPayLogisticsID'])) {
                $IsAllpayLogisticsIdEmpty = true;
            }
            if ($IsAllpayLogisticsIdEmpty === true and empty($this->PostParams['LogisticsSubType'])) {
                throw new Exception('One of AllPayLogisticsID and LogisticsSubType is required.');
            }

            $this->ValidateURL('ServerReplyURL', $this->PostParams['ServerReplyURL']);

            // 物流交易編號(AllPayLogisticsID)為空值時，退貨人姓名(SenderName)不可為空。
            if ($IsAllpayLogisticsIdEmpty) {
                $IsAllowEmpty = false;
            }
            $this->ValidateString('SenderName', $this->PostParams['SenderName'], 10, $IsAllowEmpty);

            $this->ValidatePhoneNumber('SenderPhone', $this->PostParams['SenderPhone'], true);
            $this->ValidateCellphoneNumber('SenderCellPhone', $this->PostParams['SenderCellPhone'], true);
            // 物流交易編號(AllPayLogisticsID)為空值時，退貨人電話(SenderPhone)與退貨人手機(SenderCellPhone)擇一不可為空。
            if ($IsAllpayLogisticsIdEmpty) {
                if (empty($this->PostParams['SenderPhone']) and empty($this->PostParams['SenderCellPhone'])) {
                    throw new Exception('One of SenderPhone and SenderCellPhone is required.');
                }
            }

            // 物流交易編號(AllPayLogisticsID)為空值時，退貨人郵遞區號(SenderZipCode)不可為空。
            $this->ValidateZipCode('SenderZipCode', $this->PostParams['SenderZipCode'], $IsAllowEmpty);

            // 物流交易編號(AllPayLogisticsID)為空值時，SenderAddress(SenderAddress)不可為空。
            $this->ValidateAddress('SenderAddress', $this->PostParams['SenderAddress'], 6, 60, $IsAllowEmpty);

            // 若物流交易編號(AllPayLogisticsID)為空值時，收件人姓名(ReceiverName)不可為空。
            $this->ValidateString('ReceiverName', $this->PostParams['ReceiverName'], 10, $IsAllowEmpty);

            $this->ValidatePhoneNumber('ReceiverPhone', $this->PostParams['ReceiverPhone'], 20, true);
            $this->ValidateCellphoneNumber('ReceiverCellPhone', $this->PostParams['ReceiverCellPhone'], 20, true);
            // 物流交易編號(AllPayLogisticsID)為空值時，收件人電話(ReceiverPhone)與收件人手機(ReceiverCellPhone)擇一不可為空。
            if ($IsAllpayLogisticsIdEmpty) {
                if (empty($this->PostParams['ReceiverPhone']) and empty($this->PostParams['ReceiverCellPhone'])) {
                    throw new Exception('One of ReceiverPhone and ReceiverCellPhone is required.');
                }
            }

            // 若物流交易編號(AllPayLogisticsID)為空值時，收件人郵遞區號(ReceiverZipCode)不可為空。
            $this->ValidateZipCode('ReceiverZipCode', $this->PostParams['ReceiverZipCode'], $IsAllowEmpty);

            // 若物流交易編號(AllPayLogisticsID)為空值時，收件人地址(ReceiverAddress)不可為空。
            $this->ValidateAddress('ReceiverAddress', $this->PostParams['ReceiverAddress'], 6, 60, $IsAllowEmpty);

            if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::ECAN and $this->PostParams['Temperature'] !== Temperature::ROOM) {
                // 物流子類型為宅配通(ECAN)時，溫層(Temperature)只能用常溫(ROOM)
                throw new Exception('Temperature should be ROOM when LogisticsSubType is ECAN.');
            }

            if ($this->PostParams['LogisticsSubType'] == LogisticsSubType::ECAN and date('Ymd', strtotime($this->PostParams['ScheduledDeliveryDate'])) < date('Ymd', strtotime('+3 day'))) {
                // 指定送達日期為該訂單建立時間 + 3 天
                throw new Exception('ScheduledDeliveryDate should be the time that create order + 3 day.');
            }

            $this->ValidateAmount('GoodsAmount', $this->PostParams['GoodsAmount']);
            if ($this->PostParams['GoodsAmount'] < $MinAmount or $this->PostParams['GoodsAmount'] > $MaxAmount) {
                throw new Exception('Invalid GoodsAmount.');
            }
            $this->ValidateString('GoodsName', $this->PostParams['GoodsName'], 60, true);
            $this->ValidateTemperature();
            $this->ValidateDistance();
            $this->ValidateSpecification();
            $this->ValidateScheduledDeliveryTime(true);
            $this->ValidateString('Remark', $this->PostParams['Remark'], 200, true);

            $this->ValidateID('PlatformID', $this->PostParams['PlatformID'], 10, true);

            // 產生 CheckMacValue
            $this->PostParams['CheckMacValue'] = ECPay_CheckMacValue::generate($this->PostParams, $this->HashKey, $this->HashIV);

            // 解析回傳結果
            // 正確：1|OK
            // 錯誤：0|ErrorMessage
            $Feedback = ECPay_IO::ServerPost($this->PostParams, $this->ServiceURL);
            $Result = $this->ParseFeedback($Feedback);

            return $Result;
        }
596752
function createSVGElement(id, { viewBox, className }) {
    let code = ['<svg xmlns="http://www.w3.org/2000/svg"'];

    // 设置视口
    viewBox && code.push(` viewBox="${ viewBox }"`);

    // 设置样式
    code.push(` class="${ className ? [className, id].join(' ') : id }"`);

    // 添加内容
    code.push(`><use xlink:href="#${ id }"></use></svg>`);

    // 拼接代码
    return code.join('');
}
74110
function getUrlParam(par) {
  // 获取当前URL
  var local_url = document.location.href; // 获取要取得的get参数位置

  var get$$1 = local_url.indexOf(par + '=');

  if (get$$1 == -1) {
    return false;
  } // 截取字符串


  var get_par = local_url.slice(par.length + get$$1 + 1); // 判断截取后的字符串是否还有其他get参数

  var nextPar = get_par.indexOf('&');

  if (nextPar != -1) {
    get_par = get_par.slice(0, nextPar);
  }

  return get_par;
}
1069560
function createLocalRequire( baseId ) {
        var requiredCache = {};
        function req( requireId, callback ) {
            if ( typeof requireId === 'string' ) {
                if ( !requiredCache[ requireId ] ) {
                    requiredCache[ requireId ] =
                        nativeRequire( normalize( requireId, baseId ) );
                }

                return requiredCache[ requireId ];
            }
            else if ( requireId instanceof Array ) {
                // 分析是否有resource，取出pluginModule先
                var pluginModules = [];
                var pureModules = [];
                var normalizedIds = [];

                each(
                    requireId,
                    function ( id, i ) {
                        var idInfo = parseId( id );
                        var absId = normalize( idInfo.module, baseId );
                        pureModules.push( absId );
                        autoDefineModules[ absId ] = 1;
                        if ( idInfo.resource ) {
                            pluginModules.push( absId );
                            normalizedIds[ i ] = null;
                        }
                        else {
                            normalizedIds[ i ] = absId;
                        }
                    }
                );

                var noRequestModules = {};
                each(
                    pureModules,
                    function ( id ) {
                        var meet;
                        indexRetrieve(
                            id,
                            noRequestsIndex,
                            function ( value ) {
                                meet = value;
                            }
                        );

                        if ( meet ) {
                            if ( meet[ '*' ] ) {
                                noRequestModules[ id ] = 1;
                            }
                            else {
                                each( pureModules, function ( meetId ) {
                                    if ( meet[ meetId ] ) {
                                        noRequestModules[ id ] = 1;
                                        return false;
                                    }
                                } );
                            }
                        }
                    }
                );

                // 加载模块
                nativeRequire(
                    pureModules,
                    function () {
                        each( normalizedIds, function ( id, i ) {
                            if ( id == null ) {
                                normalizedIds[ i ] = normalize( requireId[ i ], baseId );
                            }
                        } );

                        nativeRequire( normalizedIds, callback, baseId );
                    },
                    baseId,
                    noRequestModules
                );
            }
        }

        /**
         * 将[module ID] + '.extension'格式的字符串转换成url
         *
         * @inner
         * @param {string} source 符合描述格式的源字符串
         * @return {string}
         */
        req.toUrl = function ( id ) {
            return toUrl( normalize( id, baseId ) );
        };

        return req;
    }
486531
private function f1()
    {
        $_linkstr = "\n<p class=\"links\">\n"; //begin
        if ($this->totalpage < 2) {
            $nextpage = $this->cpage + 1;
            $_linkstr .= "<span class=\"disabled\">首页</span>" . " \n";
            $_linkstr .= "<span class=\"disabled\">上一页</span> \n";
            $_linkstr .= "<span class=\"disabled\">下一页</span> \n";
            $_linkstr .= "<span class=\"disabled\">尾页</span> \n";
        } elseif ($this->cpage < 2) {
            // 首页
            $nextpage = $this->cpage + 1;
            $_linkstr .= "<span class=\"disabled\">首页</span>" . " \n";
            $_linkstr .= "<span class=\"disabled\">上一页</span> \n";
            $_linkstr .= "<a href=\"" . $this->url ( $nextpage ) . "\">下一页</a> \n";
            $_linkstr .= "<a href=\"" . $this->url ( $this->totalpage ) . "\">尾页</a> \n";
        } elseif ($this->cpage >= $this->totalpage) {
            // ＝尾页
            $prepage = $this->cpage - 1;

            $_linkstr .= "<a href=\"" . $this->url ( 1 ) . "\">首页</a>\n";
            $_linkstr .= "<a href=\"" . $this->url ( $prepage ) . "\">上一页</a>\n";
            $_linkstr .= "\n<span class=\"disabled\">下一页</span>\n";
            $_linkstr .= "<span class=\"disabled\">尾页</span>" . "\n";
        } else {
            // 正常
            $prepage  = $this->cpage - 1;
            $nextpage = $this->cpage + 1;

            $_linkstr .= "<a href=\"" . $this->url ( 1 ) . "\">首页</a>\n";
            $_linkstr .= "<a href=\"" . $this->url ( $prepage ) . "\">上一页</a>\n";
            $_linkstr .= "\n<a href=\"" . $this->url ( $nextpage ) . "\">下一页</a>\n";
            $_linkstr .= "<a href=\"" . $this->url ( $this->totalpage ) . "\">尾页</a>\n";
        }
        $_linkstr .= "</p>\n"; //end div
        return $_linkstr;
    }
50590
function generateRouteConfig(mockConfig) {
    var routeConfig = {};

    var apiMockConifg = mockConfig.api;
    for (var routeKey in apiMockConifg) {
        var mock = apiMockConifg[routeKey];
        if (!mock) {
            console.warn(routeKey + ' is ' + mock);
            continue;
        }

        if (mock.disabled) {
            console.info(routeKey + ' disabled');
        } else {
            // 注意要使用闭包固定住 apiMockConifg 中的数据
            routeConfig[routeKey] = (function(mock) {
                if (typeof mock === 'function') { // 完全自定义处理 mock 请求
                    return function(request, response, next) {
                        var result = mock(request, response, next);
                        // 如果函数返回对象, 则会走原有的发送 mock 数据的逻辑
                        // 即可以实现动态地组装 mock 数据
                        if (result) {
                            sendMockData(request, response, result);
                        }
                    };
                } else if (mock.proxy) { // 代理接口
                    return function(request, response, next) {
                        // 必须每个 Mock 请求都使用一个新的 proxy
                        // 不然其他 mock 配置的 proxy 选项会影响到整个 proxy 实例
                        var proxy = httpProxy.createProxyServer({
                            // changes the host header to the target URL
                            changeOrigin: true
                        });

                        var proxyOption = typeof mock.proxy == 'string' ? {
                            target: mock.proxy
                        } : mock.proxy;

                        // 使用 http-proxy 来实现代理功能,
                        // 也可以使用 axio 来代理请求
                        proxy.web(request, response, proxyOption, function(error) {
                            response.send(error);
                        });
                    }
                } else { // Mock 接口
                    return function(request, response, next) {
                        validateRequest(request, response, mock.request, function() {
                            sendMockData(request, response, mock.response);
                        });
                    };
                }
            })(mock);

            // addOptionRoute(routeConfig, routeKey);
        }
    }

    return routeConfig;
}
942303
function () {

        var htmlFile = this.htmlFile;
        var htmlParser = this.htmlParser;
        var options = this.options;
        var resources = [];

        // 获取外链样式资源
        var cssFiles =  htmlParser.getCssFiles();

        // 获取 style 标签内容资源
        var cssContents =  htmlParser.getCssContents();


        cssFiles.forEach(function (cssFile, index) {

            if (!cssFile) {
                return;
            }

            var line = index + 1;
            var from = 'link:nth-of-type(' + line + ')';

            resources.push(
                new Resource(
                    cssFile,
                    null,
                    utils.options(options, {
                        cache: true,
                        from: from
                    })
                )
            );

        });


        cssContents.forEach(function (content, index) {

            if (!content) {
                return;
            }

            var line = index + 1;
            var from = 'style:nth-of-type(' + line + ')';
            var cssFile = htmlFile + '#' + from;
            resources.push(
                new Resource(
                    cssFile,
                    content,
                    utils.options(options, {
                        cache: false,
                        from: from
                    })
                )
            );
        });



        return Promise.all(resources.map(function (resource) {
            return new CssParser(resource);
        }))

        // 对二维数组扁平化处理
        .then(utils.reduce);
    }
709406
public function numberPageBtn()
    {
        $numBtnPage = '';
        $page = (int)$this->getOption('page', 1);

        for ($i = $this->firstNumBtn; $i <= $this->lastNumBtn; $i++) {
            if ($i === $page) {
                //给当前页按钮设置额外样式
                // $numBtnPage .='<a href="'.$this->getUrl($i).'" class="number current" title="'.$i.'">'.$i.'</a>';
                $a = Html::a($i, '', ['title' => $i]);
                $numBtnPage .= $this->hasListElement($a, ['class' => $this->elements['list']['currentClass']]);
            } else {
                // $numBtnPage .='<a href="'.$this->getUrl($i).'" class="number" title="'.$i.'">'.$i.'</a>';
                $a = Html::a($i, $this->getUrl($i), ['title' => $i]);
                $numBtnPage .= $this->hasListElement($a);
            }
        }

        $this->html['numbers'] = $numBtnPage;

        return $this;
    }
724329
function computeStripX() {
      if (this.hideHorizontal) {
        // 没有开启横向滚动条
        return;
      }
      var clientEle = this.$refs['happy-scroll'];
      var slotEle = this.$slots.default[0]['elm'];
      this.$refs.stripX.computeStrip(slotEle.scrollWidth, clientEle.clientWidth);
    }
1211216
function StyleSheet(el) {
        /**
     * style/link element or selector
     * @cfg {HTMLElement|String} el
     */
        /**
     * style/link element
     * @type {HTMLElement}
     * @property el
     */
        if (el.el) {
            el = el.el;
        }
        el = this.el = Dom.get(el);    // http://msdn.microsoft.com/en-us/library/ie/ms535871(v=vs.85).aspx
                                       // firefox 跨域时抛出异常
        // http://msdn.microsoft.com/en-us/library/ie/ms535871(v=vs.85).aspx
        // firefox 跨域时抛出异常
        var sheet = el.sheet || el.styleSheet;
        this.sheet = sheet;
        var cssRules = {};
        this.cssRules = cssRules;
        var rulesName = sheet && 'cssRules' in sheet ? 'cssRules' : 'rules';
        this.rulesName = rulesName;
        var domCssRules = sheet[rulesName];
        var i, rule, selectorText, styleDeclaration;
        for (i = domCssRules.length - 1; i >= 0; i--) {
            rule = domCssRules[i];
            selectorText = rule.selectorText;    // 去重
            // 去重
            if (styleDeclaration = cssRules[selectorText]) {
                styleDeclaration.style.cssText += ';' + styleDeclaration.style.cssText;
                deleteRule(sheet, i);
            } else {
                cssRules[selectorText] = rule;
            }
        }
    }
20674
function wrap(genFn) {
  // 包装 generator 函数
  const fn = genFnToPromise(genFn);
  // 保留函数名和参数信息
  let info;
  if (genFn.length > 0) {
    info = genFn.toString().match(/\*((.*?)\(\s*([^)]+?)\s*\))/);
  } else {
    info = genFn.toString().match(/\*((.*?)\(\s*(\s*)\s*\))/);
  }
  const sign = info && info[1] ? info[1] : '()';
  const code =
`(function ${ sign } {
  return fn.apply(this, arguments);
})`;
  const ret = eval(code);
  ret.__generatorFunction__ = genFn;
  ret.__sourceLocation__ = getSourceLocation(3);
  return ret;
}
1245425
function() {
			if (this.createGridFlag) {
				return;
			}
			// 为避免重复渲染，在开始清空里面内容
			if($('#' + this.options.id)[0])
				$('#' + this.options.id)[0].innerHTML = '';
			var htmlStr = '<div id="' + this.options.id + '_grid" class="u-grid-grid">';
				htmlStr += this.createColumnMenu();
				htmlStr += this.createHeader();
			htmlStr += this.createContent();
			htmlStr += '</div>';
			if($('#' + this.options.id)[0])
				$('#' + this.options.id).html(htmlStr);
			this.headerFirstClassFun();
			this.initGridEventFun();
			this.showType = 'grid';
			this.afterGridDivsCreate();
			this.createGridFlag = true;
			this.realtimeTableRows = null;
		}
173684
def gen_pager_purecss(cat_slug, page_num, current):
    '''
    
    '''
    if page_num == 1:
        return ''

    pager_shouye = '''<li class="pure-menu-item {0}">
    <a class="pure-menu-link" href="{1}">&lt;&lt; 首页</a></li>'''.format(
        'hidden' if current <= 1 else '', cat_slug
    )

    pager_pre = '''<li class="pure-menu-item {0}">
                <a class="pure-menu-link" href="{1}/{2}">&lt; 前页</a>
                </li>'''.format('hidden' if current <= 1 else '',
                                cat_slug,
                                current - 1)
    pager_mid = ''
    for ind in range(0, page_num):
        tmp_mid = '''<li class="pure-menu-item {0}">
                <a class="pure-menu-link" href="{1}/{2}">{2}</a></li>
                '''.format('selected' if ind + 1 == current else '',
                           cat_slug,
                           ind + 1)
        pager_mid += tmp_mid
    pager_next = '''<li class="pure-menu-item {0}">
                <a class="pure-menu-link" href="{1}/{2}">后页 &gt;</a>
                </li> '''.format('hidden' if current >= page_num else '',
                                 cat_slug,
                                 current + 1)
    pager_last = '''<li class="pure-menu-item {0}">
                <a hclass="pure-menu-link" ref="{1}/{2}">末页
                &gt;&gt;</a>
                </li> '''.format('hidden' if current >= page_num else '',
                                 cat_slug,
                                 page_num)
    pager = pager_shouye + pager_pre + pager_mid + pager_next + pager_last
    return pager
806725
@RequestMapping(value = "/site/**")
	public Object site(HttpServletRequest req, HttpServletResponse resp, AuthorizationEngine ap,
			PsnRuleEngine psnEngine, @RequestHeader(value = "X-Url-Prefix", required = false) String urlPrefix) {
		String path = req.getServletPath().substring(5);

		try {
			Branch branch = getBranch(ap, getContextRoot(req));
			if (branch == null) {
				return pageNotFound;
			}

			if (branch.isStatic()) { // 静态分支，直接返回要访问的资源
				if (path.equals("/cfg.cfg")) // 不允许访问cfg.cfg
					path = "";

				return returnFile(branch, path);
			} else {
				Page page = branch.findPage(path, ap);
				if (page == null)
					return pageNotFound;

				if (page.getLink() != null)
					return "redirect:" + page.getLink();

				if (page.isStatic()) {
					if (path.equals(page.getFullPath() + "cfg.cfg")) // 不允许访问cfg.cfg
						return pageNotFound;

					return returnFile(branch, path.replace(page.getFullPath(), page.getFullDir()));
				} else {
					SiteContext sc = new SiteContext(req, page, urlPrefix);
					req.setAttribute(SiteContext.SITE_CONTEXT_KEY, sc);
					req.setAttribute(PAGE_PATH, sc.getPageUrl(page.getFullPath()));
					req.setAttribute(PAGE_DATA, page.getDataMap());
					if (page.isExpand() && !page.getFullPath().equals(path) && path.startsWith(page.getFullPath()))
						req.setAttribute(PATH_EXPAND, path.substring(page.getFullPath().length()));

					return isSpringBoot ? "/WEB-INF/templates/" + page.getPsnTemplate(psnEngine) + ".jsp"
							: "/WEB-INF/site/template/" + page.getPsnTemplate(psnEngine) + ".jsp";
				}
			}
		} catch (Exception e) {
			return pageNotFound;
		}
	}