<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Type; use Illuminate\Support\Str; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConstantUtil; class TypeUtil { public static function dumpJsFile($QgKeG) { goto mkPsi; Xgaqw: return Response::raw(join('
', $DTnPC), array('Content-Type' => 'text/plain')); goto IlnzJ; VR1H5: foreach ($aKdPn as $L1g9F => $bG1t2) { $DTnPC[] = "export const {$L1g9F} = " . json_encode($bG1t2, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . ';'; } goto Xgaqw; Eaowt: foreach ($QgKeG as $XcezL) { $aKdPn[class_basename($XcezL)] = TypeUtil::dump($XcezL); } goto KVsde; mkPsi: $aKdPn = array(); goto Eaowt; KVsde: $DTnPC = array(); goto vKXT6; vKXT6: $DTnPC[] = '// This file is created by ' . Request::currentPageUrl() . '
'; goto VR1H5; IlnzJ: } public static function name($sqwo8, $gwXrh) { goto qN2Fc; qN2Fc: $FZE6h = $sqwo8::getList(); goto KYEfU; IccYi: return null; goto ONMux; KYEfU: foreach ($FZE6h as $GBNIv => $VFelt) { if ($GBNIv == $gwXrh) { return $VFelt; } } goto IccYi; ONMux: } public static function filter($sqwo8, $i5Ynu) { goto bwsOY; RfD7C: foreach ($FZE6h as $GBNIv => $VFelt) { if (in_array($GBNIv, $i5Ynu)) { $CJNWc[$GBNIv] = $VFelt; } } goto T2kVG; T2kVG: return $CJNWc; goto Sq8H8; bwsOY: $FZE6h = $sqwo8::getList(); goto VY3ur; VY3ur: $CJNWc = array(); goto RfD7C; Sq8H8: } public static function dump($nsF6n) { goto zJFX1; zJFX1: $DLlCL = ConstantUtil::dump($nsF6n); goto yWAtY; yWAtY: $yW3Iq = $nsF6n::getList(); goto DqbI_; eXerX: return $i5Ynu; goto rqPAh; DqbI_: foreach ($DLlCL as $rvTrU => $gwXrh) { goto GfaEU; y3oC7: $i5Ynu[$rvTrU]['value'] = $gwXrh; goto U9EVb; U9EVb: $i5Ynu[$rvTrU]['name'] = isset($yW3Iq[$gwXrh]) ? $yW3Iq[$gwXrh] : null; goto LtMI3; GfaEU: $i5Ynu[$rvTrU]['key'] = $rvTrU; goto y3oC7; LtMI3: } goto eXerX; rqPAh: } public static function colorGuessMap($wszVW) { goto auz63; iYYUs: foreach (ConstantUtil::dump($wszVW) as $GBNIv => $VFelt) { $GBNIv = strtolower($GBNIv); foreach ($wy7K7 as $TvYeW => $ejcgf) { if (Str::contains($GBNIv, $TvYeW)) { $yW3Iq[$VFelt] = $ejcgf; break; } } } goto m601v; VkFxd: $yW3Iq = array(); goto aMgWR; auz63: static $zcFOH = array(); goto YzleL; YzleL: if (isset($zcFOH[$wszVW])) { return $zcFOH[$wszVW]; } goto VkFxd; YM66s: return $yW3Iq; goto WVv8y; m601v: $zcFOH[$wszVW] = $yW3Iq; goto YM66s; aMgWR: $wy7K7 = array('fail' => 'danger', 'error' => 'danger', 'wait_verify' => 'danger', 'wait_pay' => 'warning', 'danger' => 'warning', 'running' => 'warning', 'refund' => 'warning', 'success' => 'success', 'verified' => 'success', 'pass' => 'success', 'reject' => 'danger', 'wait' => 'muted', 'canceled' => 'muted', 'disabled' => 'muted', 'completed' => 'success', 'finish' => 'success', 'converting' => 'warning', 'sending' => 'warning', 'ignore' => 'muted', 'expired' => 'muted', 'info' => 'primary', 'unread' => 'danger', 'read' => 'muted', 'processed' => 'success', 'verifying' => 'warning', 'online' => 'success', 'payed' => 'success', 'wait_process' => 'warning', 'deleted' => 'muted', 'invalid' => 'warning', 'valid' => 'success'); goto iYYUs; WVv8y: } }