diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 0000000..6a780c4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contribution Guidelines + +Please submit all issues and pull requests to the [laravel/framework](http://github.com/laravel/framework) repository! diff --git a/app/commands/.gitkeep b/app/commands/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/app/config/app.php b/app/config/app.php new file mode 100644 index 0000000..f90bc9a --- /dev/null +++ b/app/config/app.php @@ -0,0 +1,194 @@ + true, + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => 'http://localhost', + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'UTC', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => 'zizhXzUmeJ9pFX885QuWCsN0eCBsHCUC', + + 'cipher' => MCRYPT_RIJNDAEL_128, + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => array( + + 'Illuminate\Foundation\Providers\ArtisanServiceProvider', + 'Illuminate\Auth\AuthServiceProvider', + 'Illuminate\Cache\CacheServiceProvider', + 'Illuminate\Session\CommandsServiceProvider', + 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', + 'Illuminate\Routing\ControllerServiceProvider', + 'Illuminate\Cookie\CookieServiceProvider', + 'Illuminate\Database\DatabaseServiceProvider', + 'Illuminate\Encryption\EncryptionServiceProvider', + 'Illuminate\Filesystem\FilesystemServiceProvider', + 'Illuminate\Hashing\HashServiceProvider', + 'Illuminate\Html\HtmlServiceProvider', + 'Illuminate\Log\LogServiceProvider', + 'Illuminate\Mail\MailServiceProvider', + 'Illuminate\Database\MigrationServiceProvider', + 'Illuminate\Pagination\PaginationServiceProvider', + 'Illuminate\Queue\QueueServiceProvider', + 'Illuminate\Redis\RedisServiceProvider', + 'Illuminate\Remote\RemoteServiceProvider', + 'Illuminate\Auth\Reminders\ReminderServiceProvider', + 'Illuminate\Database\SeedServiceProvider', + 'Illuminate\Session\SessionServiceProvider', + 'Illuminate\Translation\TranslationServiceProvider', + 'Illuminate\Validation\ValidationServiceProvider', + 'Illuminate\View\ViewServiceProvider', + 'Illuminate\Workbench\WorkbenchServiceProvider', + + ), + + /* + |-------------------------------------------------------------------------- + | Service Provider Manifest + |-------------------------------------------------------------------------- + | + | The service provider manifest is used by Laravel to lazy load service + | providers which are not needed for each request, as well to keep a + | list of all of the services. Here, you may set its storage spot. + | + */ + + 'manifest' => storage_path().'/meta', + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => array( + + 'App' => 'Illuminate\Support\Facades\App', + 'Artisan' => 'Illuminate\Support\Facades\Artisan', + 'Auth' => 'Illuminate\Support\Facades\Auth', + 'Blade' => 'Illuminate\Support\Facades\Blade', + 'Cache' => 'Illuminate\Support\Facades\Cache', + 'ClassLoader' => 'Illuminate\Support\ClassLoader', + 'Config' => 'Illuminate\Support\Facades\Config', + 'Controller' => 'Illuminate\Routing\Controller', + 'Cookie' => 'Illuminate\Support\Facades\Cookie', + 'Crypt' => 'Illuminate\Support\Facades\Crypt', + 'DB' => 'Illuminate\Support\Facades\DB', + 'Eloquent' => 'Illuminate\Database\Eloquent\Model', + 'Event' => 'Illuminate\Support\Facades\Event', + 'File' => 'Illuminate\Support\Facades\File', + 'Form' => 'Illuminate\Support\Facades\Form', + 'Hash' => 'Illuminate\Support\Facades\Hash', + 'HTML' => 'Illuminate\Support\Facades\HTML', + 'Input' => 'Illuminate\Support\Facades\Input', + 'Lang' => 'Illuminate\Support\Facades\Lang', + 'Log' => 'Illuminate\Support\Facades\Log', + 'Mail' => 'Illuminate\Support\Facades\Mail', + 'Paginator' => 'Illuminate\Support\Facades\Paginator', + 'Password' => 'Illuminate\Support\Facades\Password', + 'Queue' => 'Illuminate\Support\Facades\Queue', + 'Redirect' => 'Illuminate\Support\Facades\Redirect', + 'Redis' => 'Illuminate\Support\Facades\Redis', + 'Request' => 'Illuminate\Support\Facades\Request', + 'Response' => 'Illuminate\Support\Facades\Response', + 'Route' => 'Illuminate\Support\Facades\Route', + 'Schema' => 'Illuminate\Support\Facades\Schema', + 'Seeder' => 'Illuminate\Database\Seeder', + 'Session' => 'Illuminate\Support\Facades\Session', + 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', + 'SSH' => 'Illuminate\Support\Facades\SSH', + 'Str' => 'Illuminate\Support\Str', + 'URL' => 'Illuminate\Support\Facades\URL', + 'Validator' => 'Illuminate\Support\Facades\Validator', + 'View' => 'Illuminate\Support\Facades\View', + + ), + +); diff --git a/app/config/auth.php b/app/config/auth.php new file mode 100644 index 0000000..eacbbfa --- /dev/null +++ b/app/config/auth.php @@ -0,0 +1,71 @@ + 'eloquent', + + /* + |-------------------------------------------------------------------------- + | Authentication Model + |-------------------------------------------------------------------------- + | + | When using the "Eloquent" authentication driver, we need to know which + | Eloquent model should be used to retrieve your users. Of course, it + | is often just the "User" model but you may use whatever you like. + | + */ + + 'model' => 'User', + + /* + |-------------------------------------------------------------------------- + | Authentication Table + |-------------------------------------------------------------------------- + | + | When using the "Database" authentication driver, we need to know which + | table should be used to retrieve your users. We have chosen a basic + | default value but you may easily change it to any table you like. + | + */ + + 'table' => 'users', + + /* + |-------------------------------------------------------------------------- + | Password Reminder Settings + |-------------------------------------------------------------------------- + | + | Here you may set the settings for password reminders, including a view + | that should be used as your password reminder e-mail. You will also + | be able to set the name of the table that holds the reset tokens. + | + | The "expire" time is the number of minutes that the reminder should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'reminder' => array( + + 'email' => 'emails.auth.reminder', + + 'table' => 'password_reminders', + + 'expire' => 60, + + ), + +); diff --git a/app/config/cache.php b/app/config/cache.php new file mode 100644 index 0000000..ce89842 --- /dev/null +++ b/app/config/cache.php @@ -0,0 +1,89 @@ + 'file', + + /* + |-------------------------------------------------------------------------- + | File Cache Location + |-------------------------------------------------------------------------- + | + | When using the "file" cache driver, we need a location where the cache + | files may be stored. A sensible default has been specified, but you + | are free to change it to any other place on disk that you desire. + | + */ + + 'path' => storage_path().'/cache', + + /* + |-------------------------------------------------------------------------- + | Database Cache Connection + |-------------------------------------------------------------------------- + | + | When using the "database" cache driver you may specify the connection + | that should be used to store the cached items. When this option is + | null the default database connection will be utilized for cache. + | + */ + + 'connection' => null, + + /* + |-------------------------------------------------------------------------- + | Database Cache Table + |-------------------------------------------------------------------------- + | + | When using the "database" cache driver we need to know the table that + | should be used to store the cached items. A default table name has + | been provided but you're free to change it however you deem fit. + | + */ + + 'table' => 'cache', + + /* + |-------------------------------------------------------------------------- + | Memcached Servers + |-------------------------------------------------------------------------- + | + | Now you may specify an array of your Memcached servers that should be + | used when utilizing the Memcached cache driver. All of the servers + | should contain a value for "host", "port", and "weight" options. + | + */ + + 'memcached' => array( + + array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), + + ), + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | + */ + + 'prefix' => 'laravel', + +); diff --git a/app/config/compile.php b/app/config/compile.php new file mode 100644 index 0000000..d5e5518 --- /dev/null +++ b/app/config/compile.php @@ -0,0 +1,18 @@ + PDO::FETCH_CLASS, + + /* + |-------------------------------------------------------------------------- + | Default Database Connection Name + |-------------------------------------------------------------------------- + | + | Here you may specify which of the database connections below you wish + | to use as your default connection for all database work. Of course + | you may use many connections at once using the Database library. + | + */ + + 'default' => 'mysql', + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => array( + + 'sqlite' => array( + 'driver' => 'sqlite', + 'database' => __DIR__.'/../database/production.sqlite', + 'prefix' => '', + ), + + 'mysql' => array( + 'driver' => 'mysql', + 'host' => '127.0.0.1', + 'database' => 'modules', + 'username' => 'root', + 'password' => '', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + ), + + 'pgsql' => array( + 'driver' => 'pgsql', + 'host' => 'localhost', + 'database' => 'forge', + 'username' => 'forge', + 'password' => '', + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + ), + + 'sqlsrv' => array( + 'driver' => 'sqlsrv', + 'host' => 'localhost', + 'database' => 'database', + 'username' => 'root', + 'password' => '', + 'prefix' => '', + ), + + ), + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer set of commands than a typical key-value systems + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => array( + + 'cluster' => false, + + 'default' => array( + 'host' => '127.0.0.1', + 'port' => 6379, + 'database' => 0, + ), + + ), + +); diff --git a/app/config/local/app.php b/app/config/local/app.php new file mode 100644 index 0000000..c56fcb9 --- /dev/null +++ b/app/config/local/app.php @@ -0,0 +1,18 @@ + true, + +); diff --git a/app/config/local/database.php b/app/config/local/database.php new file mode 100644 index 0000000..fbcb95a --- /dev/null +++ b/app/config/local/database.php @@ -0,0 +1,47 @@ + array( + + 'mysql' => array( + 'driver' => 'mysql', + 'host' => 'localhost', + 'database' => 'homestead', + 'username' => 'homestead', + 'password' => 'secret', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + ), + + 'pgsql' => array( + 'driver' => 'pgsql', + 'host' => 'localhost', + 'database' => 'homestead', + 'username' => 'homestead', + 'password' => 'secret', + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + ), + + ), + +); diff --git a/app/config/mail.php b/app/config/mail.php new file mode 100644 index 0000000..76fd9e4 --- /dev/null +++ b/app/config/mail.php @@ -0,0 +1,124 @@ + 'smtp', + + /* + |-------------------------------------------------------------------------- + | SMTP Host Address + |-------------------------------------------------------------------------- + | + | Here you may provide the host address of the SMTP server used by your + | applications. A default option is provided that is compatible with + | the Mailgun mail service which will provide reliable deliveries. + | + */ + + 'host' => 'smtp.mailgun.org', + + /* + |-------------------------------------------------------------------------- + | SMTP Host Port + |-------------------------------------------------------------------------- + | + | This is the SMTP port used by your application to deliver e-mails to + | users of the application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail application by default. + | + */ + + 'port' => 587, + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => array('address' => null, 'name' => null), + + /* + |-------------------------------------------------------------------------- + | E-Mail Encryption Protocol + |-------------------------------------------------------------------------- + | + | Here you may specify the encryption protocol that should be used when + | the application send e-mail messages. A sensible default using the + | transport layer security protocol should provide great security. + | + */ + + 'encryption' => 'tls', + + /* + |-------------------------------------------------------------------------- + | SMTP Server Username + |-------------------------------------------------------------------------- + | + | If your SMTP server requires a username for authentication, you should + | set it here. This will get used to authenticate with your server on + | connection. You may also set the "password" value below this one. + | + */ + + 'username' => null, + + /* + |-------------------------------------------------------------------------- + | SMTP Server Password + |-------------------------------------------------------------------------- + | + | Here you may set the password required by your SMTP server to send out + | messages from your application. This will be given to the server on + | connection so that the application will be able to send messages. + | + */ + + 'password' => null, + + /* + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | + */ + + 'sendmail' => '/usr/sbin/sendmail -bs', + + /* + |-------------------------------------------------------------------------- + | Mail "Pretend" + |-------------------------------------------------------------------------- + | + | When this option is enabled, e-mail will not actually be sent over the + | web and will instead be written to your application's logs files so + | you may inspect the message. This is great for local development. + | + */ + + 'pretend' => false, + +); diff --git a/app/config/packages/.gitkeep b/app/config/packages/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/config/queue.php b/app/config/queue.php new file mode 100755 index 0000000..940a4cd --- /dev/null +++ b/app/config/queue.php @@ -0,0 +1,85 @@ + 'sync', + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + */ + + 'connections' => array( + + 'sync' => array( + 'driver' => 'sync', + ), + + 'beanstalkd' => array( + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'ttr' => 60, + ), + + 'sqs' => array( + 'driver' => 'sqs', + 'key' => 'your-public-key', + 'secret' => 'your-secret-key', + 'queue' => 'your-queue-url', + 'region' => 'us-east-1', + ), + + 'iron' => array( + 'driver' => 'iron', + 'host' => 'mq-aws-us-east-1.iron.io', + 'token' => 'your-token', + 'project' => 'your-project-id', + 'queue' => 'your-queue-name', + 'encrypt' => true, + ), + + 'redis' => array( + 'driver' => 'redis', + 'queue' => 'default', + ), + + ), + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => array( + + 'database' => 'mysql', 'table' => 'failed_jobs', + + ), + +); diff --git a/app/config/remote.php b/app/config/remote.php new file mode 100644 index 0000000..2169c43 --- /dev/null +++ b/app/config/remote.php @@ -0,0 +1,59 @@ + 'production', + + /* + |-------------------------------------------------------------------------- + | Remote Server Connections + |-------------------------------------------------------------------------- + | + | These are the servers that will be accessible via the SSH task runner + | facilities of Laravel. This feature radically simplifies executing + | tasks on your servers, such as deploying out these applications. + | + */ + + 'connections' => array( + + 'production' => array( + 'host' => '', + 'username' => '', + 'password' => '', + 'key' => '', + 'keyphrase' => '', + 'root' => '/var/www', + ), + + ), + + /* + |-------------------------------------------------------------------------- + | Remote Server Groups + |-------------------------------------------------------------------------- + | + | Here you may list connections under a single group name, which allows + | you to easily access all of the servers at once using a short name + | that is extremely easy to remember, such as "web" or "database". + | + */ + + 'groups' => array( + + 'web' => array('production') + + ), + +); diff --git a/app/config/services.php b/app/config/services.php new file mode 100644 index 0000000..c8aba2a --- /dev/null +++ b/app/config/services.php @@ -0,0 +1,31 @@ + array( + 'domain' => '', + 'secret' => '', + ), + + 'mandrill' => array( + 'secret' => '', + ), + + 'stripe' => array( + 'model' => 'User', + 'secret' => '', + ), + +); diff --git a/app/config/session.php b/app/config/session.php new file mode 100644 index 0000000..ae34302 --- /dev/null +++ b/app/config/session.php @@ -0,0 +1,140 @@ + 'file', + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => 120, + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path().'/sessions', + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => null, + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => array(2, 100), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => 'laravel_session', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => null, + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you if it can not be done securely. + | + */ + + 'secure' => false, + +); diff --git a/app/config/testing/cache.php b/app/config/testing/cache.php new file mode 100644 index 0000000..66a8a39 --- /dev/null +++ b/app/config/testing/cache.php @@ -0,0 +1,20 @@ + 'array', + +); diff --git a/app/config/testing/session.php b/app/config/testing/session.php new file mode 100644 index 0000000..0364b63 --- /dev/null +++ b/app/config/testing/session.php @@ -0,0 +1,21 @@ + 'array', + +); diff --git a/app/config/view.php b/app/config/view.php new file mode 100644 index 0000000..34b8f38 --- /dev/null +++ b/app/config/view.php @@ -0,0 +1,31 @@ + array(__DIR__.'/../views'), + + /* + |-------------------------------------------------------------------------- + | Pagination View + |-------------------------------------------------------------------------- + | + | This view will be used to render the pagination link output, and can + | be easily customized here to show any view you like. A clean view + | compatible with Twitter's Bootstrap is given to you by default. + | + */ + + 'pagination' => 'pagination::slider-3', + +); diff --git a/app/config/workbench.php b/app/config/workbench.php new file mode 100644 index 0000000..87c5e38 --- /dev/null +++ b/app/config/workbench.php @@ -0,0 +1,31 @@ + '', + + /* + |-------------------------------------------------------------------------- + | Workbench Author E-Mail Address + |-------------------------------------------------------------------------- + | + | Like the option above, your e-mail address is used when generating new + | workbench packages. The e-mail is placed in your composer.json file + | automatically after the package is created by the workbench tool. + | + */ + + 'email' => '', + +); diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php new file mode 100644 index 0000000..7a1a9d2 --- /dev/null +++ b/app/controllers/AccountController.php @@ -0,0 +1,222 @@ + 'required|email', + 'password' => 'required' + ) + ); + + if($validator->fails()) { + //Redirect to sign in page + return Redirect::route('account-sign-in') + ->withErrors($validator) + ->withInput(); + } else { + // Attempt user sign in + + $remember = (Input::has('remember')) ? true : false; + + $auth = Auth::attempt(array( + 'email' => Input::get('email'), + 'password' => Input::get('password'), + 'active' => 1 + ), $remember); + + if($auth){ + //Redirect to the intended page + return Redirect::intended('/'); + } else { + return Redirect::route('account-sign-in') + ->with('global', 'Email or Password incorrect, or account not activated.'); + } + } + + return Redirect::route('account-sign-in') + ->with('global', 'There was a problem signing you in.'); + } + + public function getSignOut(){ + Auth::logout(); + return Redirect::route('home'); + } + + public function getCreate(){ + return View::make('account.create'); + } + + public function postCreate(){ + $validator = Validator::make(Input::all(), + array( + 'email' => 'required|max:50|email|unique:users', + 'username' => 'required|max:20|min:3|unique:users', + 'password' => 'required|min:6', + 'password_again' => 'required|same:password' + ) + ); + + if($validator->fails()){ + return Redirect::route('account-create') + ->withErrors($validator) + ->withInput(); + } else { + + $email = Input::get('email'); + $username = Input::get('username'); + $password = Input::get('password'); + + // Activation code + $code = str_random(60); + + $user = User::create(array( + 'email' => $email, + 'username' => $username, + 'password' => Hash::make($password), + 'code' => $code, + 'active' => 0 + )); + + if($user){ + + Mail::send('emails.auth.activate', array('link' => URL::route('account-activate', $code), 'username' => $username), function($message) use ($user) { + $message->to($user->email, $user->username)->subject('Activate your account'); + }); + + return Redirect::route('home') + ->with('global', 'Your account has been created! We have sent you an email to activate your acount.'); + } + } + } + + public function getActivate($code){ + $user = User::where('code', '=', $code); + + if($user->count()){ + $user = $user -> first(); + + //Update user active to 1 instead of 0 + $user->active = 1; + $user->code = ''; + + if($user->save()){ + return Redirect::route('home') + ->with('global', 'Activated! You can now sign in'); + } + } + + return Redirect::route('home') + ->with('global', 'We could not activate your account. Try again later.'); + } + + public function getChangePassword(){ + return View::make('account.password'); + } + + public function postChangePassword(){ + $validator = Validator::make(Input::all(), + array( + 'old_password' => 'required', + 'password' => 'required|min:6', + 'password_again' => 'required|same:password' + )); + + if($validator->fails()){ + return Redirect::route('account-change-password') + ->withErrors($validator); + } else { + + $user = User::find(Auth::user()->id); + + $old_password = Input::get('old_password'); + $password = Input::get('password'); + + if(Hash::check($old_password, $user->getAuthPassword())){ + //Password user provided matches + $user->password = Hash::make($password); + + if($user->save()){ + return Redirect::route('home') + ->with('global', 'Your password has been changed.'); + } + } else { + return Redirect::route('account-change-password') + ->with('global', 'Your old password is incorrect.'); + } + + } + + return Redirect::route('account-change-password') + ->with('global', 'Your password could not be changed'); + } + + public function getForgotPassword(){ + return View::make('account.forgot'); + } + + public function postForgotPassword(){ + $validator = Validator::make(Input::all(), + array( + 'email' => 'required|email' + ) + ); + + if($validator->fails()){ + return Redirect::route('account-forgot-password') + ->withErrors($validator) + ->withInput(); + } else { + + $user = User::where('email', '=', Input::get('email')); + + if($user->count()) { + $user = $user->first(); + + //Generate a new random code and password + $code = str_random(60); + $password = str_random(10); + + $user->code = $code; + $user->password_temp = Hash::make($password); + + if($user->save()){ + Mail::send('emails.auth.forgot', array('link' => URL::route('account-recover', $code), 'username' => $user->username, 'password' => $password), function($message) use ($user){ + $message->to($user->email, $user->username)->subject('Your new password!'); + }); + + return Redirect::route('home') + ->with('global', 'We have sent you a new password to your email.'); + } + } + } + return Redirect::route('account-forgot-password') + ->with('global', 'Could not request new password'); + } + + public function getRecover($code){ + $user = User::where('code', '=', $code) + ->where('password_temp', '!=', ''); + + if($user->count()) { + $user = $user->first(); + + $user->password = $user->password_temp; + $user->password_temp = ''; + $user->code = ''; + if($user->save()){ + return Redirect::route('home') + ->with('global', 'Your account has been recovered and you can sign in with your new password.'); + } + } + + return Redirect::route('home') + ->with('global', 'Could not recover your account.'); + + } + +} \ No newline at end of file diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php new file mode 100755 index 0000000..2bee464 --- /dev/null +++ b/app/controllers/BaseController.php @@ -0,0 +1,18 @@ +layout)) + { + $this->layout = View::make($this->layout); + } + } + +} diff --git a/app/controllers/CommunityController.php b/app/controllers/CommunityController.php new file mode 100644 index 0000000..eb3732e --- /dev/null +++ b/app/controllers/CommunityController.php @@ -0,0 +1,64 @@ +id); + $community = Community::where('communityname', '=', $name); + + if($user){ + $people = array(); + $people = json_decode($community->people); + + $user->community = $community->communityid; + array_push($people, array("userid" => $user->id)); + + json_encode($people); + $community->people = $people; + $community->save(); + } + } + + public function queueUser($name){ + $user = User::find(Auth::user()->id); + $community = Community::where('communityname', '=', $name); + + if($user){ + //find out if there is other people in the queue + if($community->queue->size > 0){ + //check if the queue is less than 50 + if($community->queue->size < 50){ + $people = array(); + $people = json_decode($community->queue->people); + + $user->community = $community->communityid; + array_push($people, array("userid" => $user->id)); + } + } elseif ($community->queue->size == 0) { + // Start the song straight away. + } + } + } + public function nextSong($name){ + sleep(400); + $stack = array("orange", "banana", "apple", "raspberry"); + $fruit = array_shift($stack); //Pointless setting it + print_r($stack); + } + + public function unqueue($id){ + for ($i=0; $i userid == $id){ + unset($array[i]); + } + } + } + +} \ No newline at end of file diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php new file mode 100755 index 0000000..cbae16c --- /dev/null +++ b/app/controllers/HomeController.php @@ -0,0 +1,13 @@ +position = $position; + $position++; + $currSong->save(); + } + } + } + + public function updatePlaylist(){ + $user = User::find(Auth::user()->id); + + if($user){ + // checks if user is logged in + $playlist = Playlist::find($user->id)->songs; + return View::make('account.playlist')->with('playlist', $playlist); + } + else + { + return Redirect::route('home') + ->with('global', 'You need to sign in first.'); + } + } + + public function addToPlaylist(){ + if(Request::ajax()){ + + $url = Input::get('url'); + $name = Input::get('title'); + $img = Input::get('img'); + + $user = User::find(Auth::user()->id); + + if($user){ + $id = $user->id; + + $id = $user->id; + $pos = intval(Playlist::find(1)->songs->count()); + $pos++; + $song = Song::create(array( + 'songname' => $name, + 'songurl' => $url, + 'songimg' => $img, + 'playlistid' => $id, + 'position' => $pos + )); + } + + } + } +} \ No newline at end of file diff --git a/app/controllers/ProfileController.php b/app/controllers/ProfileController.php new file mode 100644 index 0000000..f49daa2 --- /dev/null +++ b/app/controllers/ProfileController.php @@ -0,0 +1,15 @@ +count()) { + $user = $user->first(); + + return View::make('profile.user') + ->with('user', $user); + } + + returnApp::abort(404); + } +} \ No newline at end of file diff --git a/app/database/.gitignore b/app/database/.gitignore new file mode 100755 index 0000000..9b1dffd --- /dev/null +++ b/app/database/.gitignore @@ -0,0 +1 @@ +*.sqlite diff --git a/app/database/migrations/.gitkeep b/app/database/migrations/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/app/database/seeds/.gitkeep b/app/database/seeds/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/app/database/seeds/DatabaseSeeder.php b/app/database/seeds/DatabaseSeeder.php new file mode 100755 index 0000000..1989252 --- /dev/null +++ b/app/database/seeds/DatabaseSeeder.php @@ -0,0 +1,17 @@ +call('UserTableSeeder'); + } + +} diff --git a/app/filters.php b/app/filters.php new file mode 100755 index 0000000..f57859b --- /dev/null +++ b/app/filters.php @@ -0,0 +1,87 @@ + '« Previous', + + 'next' => 'Next »', + +); diff --git a/app/lang/en/reminders.php b/app/lang/en/reminders.php new file mode 100755 index 0000000..e2e24e5 --- /dev/null +++ b/app/lang/en/reminders.php @@ -0,0 +1,26 @@ + "Passwords must be at least six characters and match the confirmation.", + + "user" => "We can't find a user with that e-mail address.", + + "token" => "This password reset token is invalid.", + + "sent" => "Password reminder sent!", + + "reset" => "Password has been reset!", + +); diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php new file mode 100755 index 0000000..648516e --- /dev/null +++ b/app/lang/en/validation.php @@ -0,0 +1,106 @@ + "The :attribute must be accepted.", + "active_url" => "The :attribute is not a valid URL.", + "after" => "The :attribute must be a date after :date.", + "alpha" => "The :attribute may only contain letters.", + "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", + "alpha_num" => "The :attribute may only contain letters and numbers.", + "array" => "The :attribute must be an array.", + "before" => "The :attribute must be a date before :date.", + "between" => array( + "numeric" => "The :attribute must be between :min and :max.", + "file" => "The :attribute must be between :min and :max kilobytes.", + "string" => "The :attribute must be between :min and :max characters.", + "array" => "The :attribute must have between :min and :max items.", + ), + "boolean" => "The :attribute field must be true or false.", + "confirmed" => "The :attribute confirmation does not match.", + "date" => "The :attribute is not a valid date.", + "date_format" => "The :attribute does not match the format :format.", + "different" => "The :attribute and :other must be different.", + "digits" => "The :attribute must be :digits digits.", + "digits_between" => "The :attribute must be between :min and :max digits.", + "email" => "The :attribute must be a valid email address.", + "exists" => "The selected :attribute is invalid.", + "image" => "The :attribute must be an image.", + "in" => "The selected :attribute is invalid.", + "integer" => "The :attribute must be an integer.", + "ip" => "The :attribute must be a valid IP address.", + "max" => array( + "numeric" => "The :attribute may not be greater than :max.", + "file" => "The :attribute may not be greater than :max kilobytes.", + "string" => "The :attribute may not be greater than :max characters.", + "array" => "The :attribute may not have more than :max items.", + ), + "mimes" => "The :attribute must be a file of type: :values.", + "min" => array( + "numeric" => "The :attribute must be at least :min.", + "file" => "The :attribute must be at least :min kilobytes.", + "string" => "The :attribute must be at least :min characters.", + "array" => "The :attribute must have at least :min items.", + ), + "not_in" => "The selected :attribute is invalid.", + "numeric" => "The :attribute must be a number.", + "regex" => "The :attribute format is invalid.", + "required" => "The :attribute field is required.", + "required_if" => "The :attribute field is required when :other is :value.", + "required_with" => "The :attribute field is required when :values is present.", + "required_with_all" => "The :attribute field is required when :values is present.", + "required_without" => "The :attribute field is required when :values is not present.", + "required_without_all" => "The :attribute field is required when none of :values are present.", + "same" => "The :attribute and :other must match.", + "size" => array( + "numeric" => "The :attribute must be :size.", + "file" => "The :attribute must be :size kilobytes.", + "string" => "The :attribute must be :size characters.", + "array" => "The :attribute must contain :size items.", + ), + "unique" => "The :attribute has already been taken.", + "url" => "The :attribute format is invalid.", + "timezone" => "The :attribute must be a valid zone.", + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => array( + 'attribute-name' => array( + 'rule-name' => 'custom-message', + ), + ), + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => array(), + +); diff --git a/app/models/Classes.php b/app/models/Classes.php new file mode 100644 index 0000000..0f497a5 --- /dev/null +++ b/app/models/Classes.php @@ -0,0 +1,30 @@ +belongsTo('Module', 'moduleid'); + } + + public function fromLecturer($lecturer) + { + return $this->where('lecturername', '=', $lecturer); + } +} \ No newline at end of file diff --git a/app/models/Departments.php b/app/models/Departments.php new file mode 100644 index 0000000..bba8d4f --- /dev/null +++ b/app/models/Departments.php @@ -0,0 +1,33 @@ +hasMany('Modules', 'departmentid'); + } + public function faculty() + { + return $this->belongsTo('Faculty', 'facultyid'); + } + public function name() + { + return $this->departmentname; + } +} \ No newline at end of file diff --git a/app/models/Faculty.php b/app/models/Faculty.php new file mode 100644 index 0000000..7dc7a49 --- /dev/null +++ b/app/models/Faculty.php @@ -0,0 +1,28 @@ +hasMany('Departments', 'facultyid'); + } + + public function short() + { + return $this->facultyshort; + } +} \ No newline at end of file diff --git a/app/models/Modules.php b/app/models/Modules.php new file mode 100644 index 0000000..31fc60d --- /dev/null +++ b/app/models/Modules.php @@ -0,0 +1,31 @@ +belongsTo('Departments', 'departmentid'); + } + + public function classes() + { + return $this->hasMany('Classes', 'moduleid')->orderBy('classid', 'ASC'); + } +} \ No newline at end of file diff --git a/app/models/User.php b/app/models/User.php new file mode 100755 index 0000000..f05cd19 --- /dev/null +++ b/app/models/User.php @@ -0,0 +1,28 @@ + 'home', + 'uses' => 'HomeController@home' +)); + +Route::get('/test', array( + 'as' => 'test', + 'uses' => 'HomeController@test' +)); + + +Route::get('/user/{username}', array( + 'as' => 'profile-user', + 'uses' => 'ProfileController@user' +)); + +/* +| Authenticated group +*/ + +Route::group(array('before' => 'auth'), function() { + + /* + | CSRF protection group + */ + Route::group(array('before' => 'csrf'), function(){ + + /* + | Change Password (POST) + */ + + Route::post('/account/change-password', array( + 'as' => 'account-change-password-post', + 'uses' => 'AccountController@postChangePassword' + )); + + }); + + /* + | Change Password (GET) + */ + + Route::get('/account/change-password', array( + 'as' => 'account-change-password', + 'uses' => 'AccountController@getChangePassword' + )); + + /* + | Sign out (GET) + */ + + Route::get('/account/sign-out', array( + 'as' => 'account-sign-out', + 'uses' => 'AccountController@getSignOut' + )); + + + +}); + +/* +| Unauthenticated group +*/ + +Route::group(array('before' => 'guest'), function() { + + /* + | CSRF protection group + */ + Route::group(array('before' => 'csrf'), function(){ + /* + | Create account (POST) + */ + + Route::post('/account/create', array( + 'as' => 'account-create-post', + 'uses' => 'AccountController@postCreate' + )); + + /* + | Sign in (POST) + */ + + Route::post('/account/signin', array( + 'as' => 'account-sign-in-post', + 'uses' => 'AccountController@postSignIn' + )); + + /* + | Forgot Password (POST) + */ + + Route::post('/account/forgot', array( + 'as' => 'account-forgot-password-post', + 'uses' => 'AccountController@postForgotPassword' + )); + }); + + /* + | Forgot Password (GET) + */ + + Route::get('/account/forgot', array( + 'as' => 'account-forgot-password', + 'uses' => 'AccountController@getForgotPassword' + )); + + Route::get('/account/recover/{code}', array( + 'as' => 'account-recover', + 'uses' => 'AccountController@getRecover' + )); + + + /* + | Sign in (GET) + */ + + Route::get('/account/signin', array( + 'as' => 'account-sign-in', + 'uses' => 'AccountController@getSignIn' + )); + + /* + | Create account (GET) + */ + + Route::get('/account/create', array( + 'as' => 'account-create', + 'uses' => 'AccountController@getCreate' + )); + + /* + | Activation (GET) + */ + Route::get('/account/activate/{code}', array( + 'as' => 'account-activate', + 'uses' => 'AccountController@getActivate' + )); +}); \ No newline at end of file diff --git a/app/start/artisan.php b/app/start/artisan.php new file mode 100755 index 0000000..1df850b --- /dev/null +++ b/app/start/artisan.php @@ -0,0 +1,13 @@ +client->request('GET', '/'); + + $this->assertTrue($this->client->getResponse()->isOk()); + } + +} diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php new file mode 100755 index 0000000..d367fe5 --- /dev/null +++ b/app/tests/TestCase.php @@ -0,0 +1,19 @@ + + +
+ Email: + @if($errors->has('email')) + {{$errors->first('email')}} + @endif +
+ +
+ Name: + @if($errors->has('username')) + {{$errors->first('username')}} + @endif +
+ +
+ Password: + @if($errors->has('password')) + {{$errors->first('password')}} + @endif +
+ +
+ Password Again: + @if($errors->has('password_again')) + {{$errors->first('password_again')}} + @endif +
+ + + {{Form::token()}} + +@stop \ No newline at end of file diff --git a/app/views/account/forgot.blade.php b/app/views/account/forgot.blade.php new file mode 100644 index 0000000..c70c69e --- /dev/null +++ b/app/views/account/forgot.blade.php @@ -0,0 +1,14 @@ +@extends('layout.main') + +@section('content') +
+
+ Email: + @if($errors->has('email')) + {{ $errors->first('email') }} + @endif +
+ + {{ Form::token() }} +
+@stop \ No newline at end of file diff --git a/app/views/account/password.blade.php b/app/views/account/password.blade.php new file mode 100644 index 0000000..167a8d3 --- /dev/null +++ b/app/views/account/password.blade.php @@ -0,0 +1,27 @@ +@extends('layout.main') + +@section('content') +
+ +
+ Old Password: + @if($errors->has('old_password')) + {{ $errors->first('old_password') }} + @endif +
+
+ New Password: + @if($errors->has('password')) + {{ $errors->first('password') }} + @endif +
+
+ New Password again: + @if($errors->has('password_again')) + {{ $errors->first('password_again') }} + @endif +
+ + {{Form::token()}} +
+@stop \ No newline at end of file diff --git a/app/views/account/signin.blade.php b/app/views/account/signin.blade.php new file mode 100644 index 0000000..3f53475 --- /dev/null +++ b/app/views/account/signin.blade.php @@ -0,0 +1,56 @@ + + + CIT Modules :: Module System Login! + + + + + + + + + + + +
+
+
+ +
+

+ [Username] + (not you?) +

+

CIT Module System

+
+ + +
+
+ {{ Form::token()}} +
+ + + +
+
+
+
+
+ + myCIT homepage + +
+
+ +
+ + + \ No newline at end of file diff --git a/app/views/community.blade.php b/app/views/community.blade.php new file mode 100644 index 0000000..7e58a48 --- /dev/null +++ b/app/views/community.blade.php @@ -0,0 +1,10 @@ +@extends('layout.main') +@section('content') + + +@if(Auth::check()) + +@endif + + +@stop \ No newline at end of file diff --git a/app/views/emails/auth/activate.blade.php b/app/views/emails/auth/activate.blade.php new file mode 100755 index 0000000..21af6f9 --- /dev/null +++ b/app/views/emails/auth/activate.blade.php @@ -0,0 +1,7 @@ +Hello {{ $username }},

+ +Please activate your account using the following link.

+ +---
+{{$link}}
+--- \ No newline at end of file diff --git a/app/views/emails/auth/forgot.blade.php b/app/views/emails/auth/forgot.blade.php new file mode 100644 index 0000000..9dada46 --- /dev/null +++ b/app/views/emails/auth/forgot.blade.php @@ -0,0 +1,9 @@ +Hello {{ $username }}, + +It looks like you requested a new password. You'll need to use the following link to activate it. If you didn't request a new password, please ignore this email.

+ +New password: {{ $password }}

+ +---
+{{ $link }}
+--- \ No newline at end of file diff --git a/app/views/home.blade.php b/app/views/home.blade.php new file mode 100644 index 0000000..672e594 --- /dev/null +++ b/app/views/home.blade.php @@ -0,0 +1,5 @@ +@if(Auth::check()) + +@else + @extends('account.signin') +@endif \ No newline at end of file diff --git a/app/views/layout/main.blade.php b/app/views/layout/main.blade.php new file mode 100644 index 0000000..612fb54 --- /dev/null +++ b/app/views/layout/main.blade.php @@ -0,0 +1,820 @@ + + + + + + + QuickMetro | Responsive Metro Style Template + + + + + + + + {{ HTML::style('http://fonts.googleapis.com/css?family=Quicksand') }} + {{ HTML::style('http://fonts.googleapis.com/css?family=Open+Sans') }} + {{ HTML::style('css/font-awesome.min.css') }} + {{ HTML::style('css/bootstrap.min.css') }} + {{ HTML::style('css/style.css') }} + + + {{ HTML::script('js/jquery-1.10.2.min.js') }} + {{ HTML::script('js/modernizr.custom.97074.js') }} + {{ HTML::script('http://maps.googleapis.com/maps/api/js?sensor=true') }} + + + + + + + + + + + + + +
+ +
+ + + +
+ +
+ +
+ +
+
+

Modules

+
+
+ + +
+
    + @foreach(Modules::where('melective', 1)->get() as $mod) +
  • + portfolio +
    {{ $mod->mshorttitle }}
    +
    + +
  • + @endforeach +
  • + +
+
+
+ +
+ + +
+
+

About

+ +
+ +
+ +
+ +
+
+

Our Skills

+
+

HTML/CSS

+
+
9.0
+
+
+
+

Photoshop

+
+
8.0
+
+
+
+

WordPress

+
+
9.5
+
+
+
+

SEO

+
+
7.5
+
+
+
+

Enaugh for you?

+ +
+
+
+ +
+ +
+
+
+

Our philosophy

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived not only five centuries.

+
+
+
+
+

Our goal

+

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. + The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, + as opposed to using \'Content here, content here\', making it look like readable English.

+
+
+
+ +
+
+ + +
+
+

Services

+ +
+
+
+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book.

+
+ +
+
+ +
+
+
+
+
Save your time for pleasure!
+

Save On Cloud

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book.

+
+
+
+
+
+
Create your individual website look!
+

Print Your Document

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book.

+
+
+
+
+
+
Lorem Ipsum is simply dummy text!
+

Magic is in Your Hand

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book.

+
+
+
+ +
+
+

Our Features

+
+
+
+
+

Twitter

+

Justo a urna dolor et lorem vulputate.

+
+
+
+
+
+

FontAwesome Icons

+

Justo a urna dolor et lorem vulputate.

+
+
+
+
+
+

Google Fonts

+

Class aptent taciti sociosqu torquent.

+
+
+
+
+
+
+
+

Bootstrap

+

Justo a urna dolor et lorem vulputate.

+
+
+
+
+
+

HTML 5 / CSS 3

+

Duis rutrum faucibus massa sagittis.

+
+
+
+
+
+

Modern

+

Justo a urna dolor et lorem vulputate.

+
+
+
+
+
+
+
+

CrossBrowser

+

Justo a urna dolor et lorem vulputate.

+
+
+
+
+
+

FontAwesome Icons

+

Justo a urna dolor et lorem vulputate.

+
+
+
+
+
+

Google Fonts

+

Class aptent taciti sociosqu torquent.

+
+
+
+
+
+ +
+
+ + +
+
+

Creative Team

+
+
+
+ team_member +

Tom Smith

+
Founder
+
    +
  • +
  • +
  • +
+
+
+
+
+ team_member +

Tom Smith

+
Founder
+
    +
  • +
  • +
  • +
+
+
+
+
+ team_member +

Sam Peterson

+
Developer
+
    +
  • +
  • +
  • +
+
+
+
+
+ team_member +

John Smith

+
Developer
+
    +
  • +
  • +
  • +
+
+
+
+
+ team_member +

Natasha Smith

+
Project Manager
+
    +
  • +
  • +
  • +
+
+
+
+
+ team_member +

Jessica Doe

+
Designer
+
    +
  • +
  • +
  • +
+
+
+
+
+
+ + +
+
+
+

Happy Clients

+

What they say about our Services.

+
+
+
+
+
    +
  • Tom Smith - Founder
  • +
  • Sarah Doe - Designer
  • +
  • Sam Peterson - Developer
  • +
  • John Smith - Developer
  • +
  • Natasha Smith - Project Manager
  • +
  • Jessica Doe - Designer
  • +
+
+
+
+
+
    +
  • +

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. + Lorem Ipsum has been the industry's standard dummy text ever since the 1500s

    +
  • +
  • +

    when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, + but also the leap into electronic typesetting, remaining essentially unchanged.

    +
  • +
  • +

    It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, + and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    +
  • +
  • +

    Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, + when an unknown printer took a galley of type and scrambled it to make a type specimen book.

    +
  • +
  • +

    It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, + and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

    +
  • +
  • +

    It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. + The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters

    +
  • +
+
+
+
+
+
+
+ + +
+
+

Our Blog

+
+ +
+
+
+ blog-article +
+
+

Example Blog Post

+ + + +

when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived when an unknown printer type and specimen book.

+ +
Read More + 08 +
+
+
+
+
+
+
+ blog-article +
+
+

Example Blog Post

+ + + +

when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived when an unknown printer type and specimen book.

+ +
Read More + 08 +
+
+
+
+
+
+
+ blog-article +
+
+

Example Blog Post

+ + + +

when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived when an unknown printer type and specimen book.

+ +
Read More + 08 +
+
+
+
+ +
+
+
+ blog-article +
+
+

Example Blog Post

+ + + +

when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived when an unknown printer type and specimen book.

+ +
Read More + 08 +
+
+
+
+
+
+
+ blog-article +
+
+

Example Blog Post

+ + + +

when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived when an unknown printer type and specimen book.

+ +
Read More + 08 +
+
+
+
+
+
+
+ blog-article +
+
+

Example Blog Post

+ + + +

when an unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived when an unknown printer type and specimen book.

+ +
Read More + 08 +
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ +
+
+

Think we might help?

+

We’d love to hear from you.

+ Write for us +
+
+

Where we are

+
+ ThemeArt
+ 33 Street Name
+ New York, NY 12345
+
+
+ P: (123) 456-789 +
+ +
+ Contact :
+ info@quickmetro.com +
+ +
+
+ + + +
+
+
+
+
+
+ + + + + +
+ + +
+ + + {{ HTML::script('js/jquery.ascensor.js') }} + {{ HTML::script('js/bootstrap.min.js') }} + {{ HTML::script('js/jquery.mixitup.min.js') }} + {{ HTML::script('js/jquery.hoverdir.js') }} + {{ HTML::script('js/jquery.placeholder.min.js') }} + {{ HTML::script('js/main.js') }} + + + \ No newline at end of file diff --git a/app/views/layout/navigation.blade.php b/app/views/layout/navigation.blade.php new file mode 100644 index 0000000..cc1fe2e --- /dev/null +++ b/app/views/layout/navigation.blade.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/app/views/profile/user.blade.php b/app/views/profile/user.blade.php new file mode 100644 index 0000000..df0e717 --- /dev/null +++ b/app/views/profile/user.blade.php @@ -0,0 +1,5 @@ +@extends('layout.main') + +@section('content') +

{{ e($user ->username) }} ({{ e($user ->email) }})

+@stop \ No newline at end of file diff --git a/app/views/test.blade.php b/app/views/test.blade.php new file mode 100644 index 0000000..9537640 --- /dev/null +++ b/app/views/test.blade.php @@ -0,0 +1,9 @@ + + + +

Testing

+ @foreach(Modules::where('melective', 1)->get() as $mod) + {{$mod->mshorttitle}} belongs to department: {{ $mod->department->name() }} + @endforeach + + \ No newline at end of file diff --git a/artisan b/artisan new file mode 100755 index 0000000..5c408ad --- /dev/null +++ b/artisan @@ -0,0 +1,74 @@ +#!/usr/bin/env php +setRequestForConsoleEnvironment(); + +$artisan = Illuminate\Console\Application::start($app); + +/* +|-------------------------------------------------------------------------- +| Run The Artisan Application +|-------------------------------------------------------------------------- +| +| When we run the console application, the current CLI command will be +| executed in this console and the response sent back to a terminal +| or another output device for the developers. Here goes nothing! +| +*/ + +$status = $artisan->run(); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running. We will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$app->shutdown(); + +exit($status); diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php new file mode 100755 index 0000000..6b32931 --- /dev/null +++ b/bootstrap/autoload.php @@ -0,0 +1,75 @@ +bound($abstract) || $this->isAlias($abstract); + } + public function bound($abstract) + { + return isset($this->bindings[$abstract]) || isset($this->instances[$abstract]); + } + public function resolved($abstract) + { + return isset($this->resolved[$abstract]) || isset($this->instances[$abstract]); + } + public function isAlias($name) + { + return isset($this->aliases[$name]); + } + public function bind($abstract, $concrete = null, $shared = false) + { + if (is_array($abstract)) { + list($abstract, $alias) = $this->extractAlias($abstract); + $this->alias($abstract, $alias); + } + $this->dropStaleInstances($abstract); + if (is_null($concrete)) { + $concrete = $abstract; + } + if (!$concrete instanceof Closure) { + $concrete = $this->getClosure($abstract, $concrete); + } + $this->bindings[$abstract] = compact('concrete', 'shared'); + if ($this->resolved($abstract)) { + $this->rebound($abstract); + } + } + protected function getClosure($abstract, $concrete) + { + return function ($c, $parameters = array()) use($abstract, $concrete) { + $method = $abstract == $concrete ? 'build' : 'make'; + return $c->{$method}($concrete, $parameters); + }; + } + public function bindIf($abstract, $concrete = null, $shared = false) + { + if (!$this->bound($abstract)) { + $this->bind($abstract, $concrete, $shared); + } + } + public function singleton($abstract, $concrete = null) + { + $this->bind($abstract, $concrete, true); + } + public function share(Closure $closure) + { + return function ($container) use($closure) { + static $object; + if (is_null($object)) { + $object = $closure($container); + } + return $object; + }; + } + public function bindShared($abstract, Closure $closure) + { + $this->bind($abstract, $this->share($closure), true); + } + public function extend($abstract, Closure $closure) + { + if (!isset($this->bindings[$abstract])) { + throw new \InvalidArgumentException("Type {$abstract} is not bound."); + } + if (isset($this->instances[$abstract])) { + $this->instances[$abstract] = $closure($this->instances[$abstract], $this); + $this->rebound($abstract); + } else { + $extender = $this->getExtender($abstract, $closure); + $this->bind($abstract, $extender, $this->isShared($abstract)); + } + } + protected function getExtender($abstract, Closure $closure) + { + $resolver = $this->bindings[$abstract]['concrete']; + return function ($container) use($resolver, $closure) { + return $closure($resolver($container), $container); + }; + } + public function instance($abstract, $instance) + { + if (is_array($abstract)) { + list($abstract, $alias) = $this->extractAlias($abstract); + $this->alias($abstract, $alias); + } + unset($this->aliases[$abstract]); + $bound = $this->bound($abstract); + $this->instances[$abstract] = $instance; + if ($bound) { + $this->rebound($abstract); + } + } + public function alias($abstract, $alias) + { + $this->aliases[$alias] = $abstract; + } + protected function extractAlias(array $definition) + { + return array(key($definition), current($definition)); + } + public function rebinding($abstract, Closure $callback) + { + $this->reboundCallbacks[$abstract][] = $callback; + if ($this->bound($abstract)) { + return $this->make($abstract); + } + } + public function refresh($abstract, $target, $method) + { + return $this->rebinding($abstract, function ($app, $instance) use($target, $method) { + $target->{$method}($instance); + }); + } + protected function rebound($abstract) + { + $instance = $this->make($abstract); + foreach ($this->getReboundCallbacks($abstract) as $callback) { + call_user_func($callback, $this, $instance); + } + } + protected function getReboundCallbacks($abstract) + { + if (isset($this->reboundCallbacks[$abstract])) { + return $this->reboundCallbacks[$abstract]; + } + return array(); + } + public function make($abstract, $parameters = array()) + { + $abstract = $this->getAlias($abstract); + if (isset($this->instances[$abstract])) { + return $this->instances[$abstract]; + } + $concrete = $this->getConcrete($abstract); + if ($this->isBuildable($concrete, $abstract)) { + $object = $this->build($concrete, $parameters); + } else { + $object = $this->make($concrete, $parameters); + } + if ($this->isShared($abstract)) { + $this->instances[$abstract] = $object; + } + $this->fireResolvingCallbacks($abstract, $object); + $this->resolved[$abstract] = true; + return $object; + } + protected function getConcrete($abstract) + { + if (!isset($this->bindings[$abstract])) { + if ($this->missingLeadingSlash($abstract) && isset($this->bindings['\\' . $abstract])) { + $abstract = '\\' . $abstract; + } + return $abstract; + } + return $this->bindings[$abstract]['concrete']; + } + protected function missingLeadingSlash($abstract) + { + return is_string($abstract) && strpos($abstract, '\\') !== 0; + } + public function build($concrete, $parameters = array()) + { + if ($concrete instanceof Closure) { + return $concrete($this, $parameters); + } + $reflector = new ReflectionClass($concrete); + if (!$reflector->isInstantiable()) { + $message = "Target [{$concrete}] is not instantiable."; + throw new BindingResolutionException($message); + } + $constructor = $reflector->getConstructor(); + if (is_null($constructor)) { + return new $concrete(); + } + $dependencies = $constructor->getParameters(); + $parameters = $this->keyParametersByArgument($dependencies, $parameters); + $instances = $this->getDependencies($dependencies, $parameters); + return $reflector->newInstanceArgs($instances); + } + protected function getDependencies($parameters, array $primitives = array()) + { + $dependencies = array(); + foreach ($parameters as $parameter) { + $dependency = $parameter->getClass(); + if (array_key_exists($parameter->name, $primitives)) { + $dependencies[] = $primitives[$parameter->name]; + } elseif (is_null($dependency)) { + $dependencies[] = $this->resolveNonClass($parameter); + } else { + $dependencies[] = $this->resolveClass($parameter); + } + } + return (array) $dependencies; + } + protected function resolveNonClass(ReflectionParameter $parameter) + { + if ($parameter->isDefaultValueAvailable()) { + return $parameter->getDefaultValue(); + } + $message = "Unresolvable dependency resolving [{$parameter}] in class {$parameter->getDeclaringClass()->getName()}"; + throw new BindingResolutionException($message); + } + protected function resolveClass(ReflectionParameter $parameter) + { + try { + return $this->make($parameter->getClass()->name); + } catch (BindingResolutionException $e) { + if ($parameter->isOptional()) { + return $parameter->getDefaultValue(); + } + throw $e; + } + } + protected function keyParametersByArgument(array $dependencies, array $parameters) + { + foreach ($parameters as $key => $value) { + if (is_numeric($key)) { + unset($parameters[$key]); + $parameters[$dependencies[$key]->name] = $value; + } + } + return $parameters; + } + public function resolving($abstract, Closure $callback) + { + $this->resolvingCallbacks[$abstract][] = $callback; + } + public function resolvingAny(Closure $callback) + { + $this->globalResolvingCallbacks[] = $callback; + } + protected function fireResolvingCallbacks($abstract, $object) + { + if (isset($this->resolvingCallbacks[$abstract])) { + $this->fireCallbackArray($object, $this->resolvingCallbacks[$abstract]); + } + $this->fireCallbackArray($object, $this->globalResolvingCallbacks); + } + protected function fireCallbackArray($object, array $callbacks) + { + foreach ($callbacks as $callback) { + call_user_func($callback, $object, $this); + } + } + public function isShared($abstract) + { + if (isset($this->bindings[$abstract]['shared'])) { + $shared = $this->bindings[$abstract]['shared']; + } else { + $shared = false; + } + return isset($this->instances[$abstract]) || $shared === true; + } + protected function isBuildable($concrete, $abstract) + { + return $concrete === $abstract || $concrete instanceof Closure; + } + protected function getAlias($abstract) + { + return isset($this->aliases[$abstract]) ? $this->aliases[$abstract] : $abstract; + } + public function getBindings() + { + return $this->bindings; + } + protected function dropStaleInstances($abstract) + { + unset($this->instances[$abstract], $this->aliases[$abstract]); + } + public function forgetInstance($abstract) + { + unset($this->instances[$abstract]); + } + public function forgetInstances() + { + $this->instances = array(); + } + public function offsetExists($key) + { + return isset($this->bindings[$key]); + } + public function offsetGet($key) + { + return $this->make($key); + } + public function offsetSet($key, $value) + { + if (!$value instanceof Closure) { + $value = function () use($value) { + return $value; + }; + } + $this->bind($key, $value); + } + public function offsetUnset($key) + { + unset($this->bindings[$key], $this->instances[$key]); + } + public function __get($key) + { + return $this[$key]; + } + public function __set($key, $value) + { + $this[$key] = $value; + } +} +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +interface HttpKernelInterface +{ + const MASTER_REQUEST = 1; + const SUB_REQUEST = 2; + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); +} +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +interface TerminableInterface +{ + public function terminate(Request $request, Response $response); +} +namespace Illuminate\Support\Contracts; + +interface ResponsePreparerInterface +{ + public function prepareResponse($value); + public function readyForResponses(); +} +namespace Illuminate\Foundation; + +use Closure; +use Stack\Builder; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Illuminate\Config\FileLoader; +use Illuminate\Container\Container; +use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Facades\Facade; +use Illuminate\Events\EventServiceProvider; +use Illuminate\Routing\RoutingServiceProvider; +use Illuminate\Exception\ExceptionServiceProvider; +use Illuminate\Config\FileEnvironmentVariablesLoader; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\TerminableInterface; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Illuminate\Support\Contracts\ResponsePreparerInterface; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +use Symfony\Component\HttpFoundation\Response as SymfonyResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +class Application extends Container implements HttpKernelInterface, TerminableInterface, ResponsePreparerInterface +{ + const VERSION = '4.2.16'; + protected $booted = false; + protected $bootingCallbacks = array(); + protected $bootedCallbacks = array(); + protected $finishCallbacks = array(); + protected $shutdownCallbacks = array(); + protected $middlewares = array(); + protected $serviceProviders = array(); + protected $loadedProviders = array(); + protected $deferredServices = array(); + protected static $requestClass = 'Illuminate\\Http\\Request'; + public function __construct(Request $request = null) + { + $this->registerBaseBindings($request ?: $this->createNewRequest()); + $this->registerBaseServiceProviders(); + $this->registerBaseMiddlewares(); + } + protected function createNewRequest() + { + return forward_static_call(array(static::$requestClass, 'createFromGlobals')); + } + protected function registerBaseBindings($request) + { + $this->instance('request', $request); + $this->instance('Illuminate\\Container\\Container', $this); + } + protected function registerBaseServiceProviders() + { + foreach (array('Event', 'Exception', 'Routing') as $name) { + $this->{"register{$name}Provider"}(); + } + } + protected function registerExceptionProvider() + { + $this->register(new ExceptionServiceProvider($this)); + } + protected function registerRoutingProvider() + { + $this->register(new RoutingServiceProvider($this)); + } + protected function registerEventProvider() + { + $this->register(new EventServiceProvider($this)); + } + public function bindInstallPaths(array $paths) + { + $this->instance('path', realpath($paths['app'])); + foreach (array_except($paths, array('app')) as $key => $value) { + $this->instance("path.{$key}", realpath($value)); + } + } + public static function getBootstrapFile() + { + return '/Applications/XAMPP/xamppfiles/htdocs/playdj/vendor/laravel/framework/src/Illuminate/Foundation' . '/start.php'; + } + public function startExceptionHandling() + { + $this['exception']->register($this->environment()); + $this['exception']->setDebug($this['config']['app.debug']); + } + public function environment() + { + if (count(func_get_args()) > 0) { + return in_array($this['env'], func_get_args()); + } + return $this['env']; + } + public function isLocal() + { + return $this['env'] == 'local'; + } + public function detectEnvironment($envs) + { + $args = isset($_SERVER['argv']) ? $_SERVER['argv'] : null; + return $this['env'] = (new EnvironmentDetector())->detect($envs, $args); + } + public function runningInConsole() + { + return php_sapi_name() == 'cli'; + } + public function runningUnitTests() + { + return $this['env'] == 'testing'; + } + public function forceRegister($provider, $options = array()) + { + return $this->register($provider, $options, true); + } + public function register($provider, $options = array(), $force = false) + { + if ($registered = $this->getRegistered($provider) && !$force) { + return $registered; + } + if (is_string($provider)) { + $provider = $this->resolveProviderClass($provider); + } + $provider->register(); + foreach ($options as $key => $value) { + $this[$key] = $value; + } + $this->markAsRegistered($provider); + if ($this->booted) { + $provider->boot(); + } + return $provider; + } + public function getRegistered($provider) + { + $name = is_string($provider) ? $provider : get_class($provider); + if (array_key_exists($name, $this->loadedProviders)) { + return array_first($this->serviceProviders, function ($key, $value) use($name) { + return get_class($value) == $name; + }); + } + } + public function resolveProviderClass($provider) + { + return new $provider($this); + } + protected function markAsRegistered($provider) + { + $this['events']->fire($class = get_class($provider), array($provider)); + $this->serviceProviders[] = $provider; + $this->loadedProviders[$class] = true; + } + public function loadDeferredProviders() + { + foreach ($this->deferredServices as $service => $provider) { + $this->loadDeferredProvider($service); + } + $this->deferredServices = array(); + } + protected function loadDeferredProvider($service) + { + $provider = $this->deferredServices[$service]; + if (!isset($this->loadedProviders[$provider])) { + $this->registerDeferredProvider($provider, $service); + } + } + public function registerDeferredProvider($provider, $service = null) + { + if ($service) { + unset($this->deferredServices[$service]); + } + $this->register($instance = new $provider($this)); + if (!$this->booted) { + $this->booting(function () use($instance) { + $instance->boot(); + }); + } + } + public function make($abstract, $parameters = array()) + { + $abstract = $this->getAlias($abstract); + if (isset($this->deferredServices[$abstract])) { + $this->loadDeferredProvider($abstract); + } + return parent::make($abstract, $parameters); + } + public function bound($abstract) + { + return isset($this->deferredServices[$abstract]) || parent::bound($abstract); + } + public function extend($abstract, Closure $closure) + { + $abstract = $this->getAlias($abstract); + if (isset($this->deferredServices[$abstract])) { + $this->loadDeferredProvider($abstract); + } + return parent::extend($abstract, $closure); + } + public function before($callback) + { + return $this['router']->before($callback); + } + public function after($callback) + { + return $this['router']->after($callback); + } + public function finish($callback) + { + $this->finishCallbacks[] = $callback; + } + public function shutdown(callable $callback = null) + { + if (is_null($callback)) { + $this->fireAppCallbacks($this->shutdownCallbacks); + } else { + $this->shutdownCallbacks[] = $callback; + } + } + public function useArraySessions(Closure $callback) + { + $this->bind('session.reject', function () use($callback) { + return $callback; + }); + } + public function isBooted() + { + return $this->booted; + } + public function boot() + { + if ($this->booted) { + return; + } + array_walk($this->serviceProviders, function ($p) { + $p->boot(); + }); + $this->bootApplication(); + } + protected function bootApplication() + { + $this->fireAppCallbacks($this->bootingCallbacks); + $this->booted = true; + $this->fireAppCallbacks($this->bootedCallbacks); + } + public function booting($callback) + { + $this->bootingCallbacks[] = $callback; + } + public function booted($callback) + { + $this->bootedCallbacks[] = $callback; + if ($this->isBooted()) { + $this->fireAppCallbacks(array($callback)); + } + } + public function run(SymfonyRequest $request = null) + { + $request = $request ?: $this['request']; + $response = with($stack = $this->getStackedClient())->handle($request); + $response->send(); + $stack->terminate($request, $response); + } + protected function getStackedClient() + { + $sessionReject = $this->bound('session.reject') ? $this['session.reject'] : null; + $client = (new Builder())->push('Illuminate\\Cookie\\Guard', $this['encrypter'])->push('Illuminate\\Cookie\\Queue', $this['cookie'])->push('Illuminate\\Session\\Middleware', $this['session'], $sessionReject); + $this->mergeCustomMiddlewares($client); + return $client->resolve($this); + } + protected function mergeCustomMiddlewares(Builder $stack) + { + foreach ($this->middlewares as $middleware) { + list($class, $parameters) = array_values($middleware); + array_unshift($parameters, $class); + call_user_func_array(array($stack, 'push'), $parameters); + } + } + protected function registerBaseMiddlewares() + { + + } + public function middleware($class, array $parameters = array()) + { + $this->middlewares[] = compact('class', 'parameters'); + return $this; + } + public function forgetMiddleware($class) + { + $this->middlewares = array_filter($this->middlewares, function ($m) use($class) { + return $m['class'] != $class; + }); + } + public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + try { + $this->refreshRequest($request = Request::createFromBase($request)); + $this->boot(); + return $this->dispatch($request); + } catch (\Exception $e) { + if (!$catch || $this->runningUnitTests()) { + throw $e; + } + return $this['exception']->handleException($e); + } + } + public function dispatch(Request $request) + { + if ($this->isDownForMaintenance()) { + $response = $this['events']->until('illuminate.app.down'); + if (!is_null($response)) { + return $this->prepareResponse($response, $request); + } + } + if ($this->runningUnitTests() && !$this['session']->isStarted()) { + $this['session']->start(); + } + return $this['router']->dispatch($this->prepareRequest($request)); + } + public function terminate(SymfonyRequest $request, SymfonyResponse $response) + { + $this->callFinishCallbacks($request, $response); + $this->shutdown(); + } + protected function refreshRequest(Request $request) + { + $this->instance('request', $request); + Facade::clearResolvedInstance('request'); + } + public function callFinishCallbacks(SymfonyRequest $request, SymfonyResponse $response) + { + foreach ($this->finishCallbacks as $callback) { + call_user_func($callback, $request, $response); + } + } + protected function fireAppCallbacks(array $callbacks) + { + foreach ($callbacks as $callback) { + call_user_func($callback, $this); + } + } + public function prepareRequest(Request $request) + { + if (!is_null($this['config']['session.driver']) && !$request->hasSession()) { + $request->setSession($this['session']->driver()); + } + return $request; + } + public function prepareResponse($value) + { + if (!$value instanceof SymfonyResponse) { + $value = new Response($value); + } + return $value->prepare($this['request']); + } + public function readyForResponses() + { + return $this->booted; + } + public function isDownForMaintenance() + { + return file_exists($this['config']['app.manifest'] . '/down'); + } + public function down(Closure $callback) + { + $this['events']->listen('illuminate.app.down', $callback); + } + public function abort($code, $message = '', array $headers = array()) + { + if ($code == 404) { + throw new NotFoundHttpException($message); + } + throw new HttpException($code, $message, null, $headers); + } + public function missing(Closure $callback) + { + $this->error(function (NotFoundHttpException $e) use($callback) { + return call_user_func($callback, $e); + }); + } + public function error(Closure $callback) + { + $this['exception']->error($callback); + } + public function pushError(Closure $callback) + { + $this['exception']->pushError($callback); + } + public function fatal(Closure $callback) + { + $this->error(function (FatalErrorException $e) use($callback) { + return call_user_func($callback, $e); + }); + } + public function getConfigLoader() + { + return new FileLoader(new Filesystem(), $this['path'] . '/config'); + } + public function getEnvironmentVariablesLoader() + { + return new FileEnvironmentVariablesLoader(new Filesystem(), $this['path.base']); + } + public function getProviderRepository() + { + $manifest = $this['config']['app.manifest']; + return new ProviderRepository(new Filesystem(), $manifest); + } + public function getLoadedProviders() + { + return $this->loadedProviders; + } + public function setDeferredServices(array $services) + { + $this->deferredServices = $services; + } + public function isDeferredService($service) + { + return isset($this->deferredServices[$service]); + } + public static function requestClass($class = null) + { + if (!is_null($class)) { + static::$requestClass = $class; + } + return static::$requestClass; + } + public function setRequestForConsoleEnvironment() + { + $url = $this['config']->get('app.url', 'http://localhost'); + $parameters = array($url, 'GET', array(), array(), array(), $_SERVER); + $this->refreshRequest(static::onRequest('create', $parameters)); + } + public static function onRequest($method, $parameters = array()) + { + return forward_static_call_array(array(static::requestClass(), $method), $parameters); + } + public function getLocale() + { + return $this['config']->get('app.locale'); + } + public function setLocale($locale) + { + $this['config']->set('app.locale', $locale); + $this['translator']->setLocale($locale); + $this['events']->fire('locale.changed', array($locale)); + } + public function registerCoreContainerAliases() + { + $aliases = array('app' => 'Illuminate\\Foundation\\Application', 'artisan' => 'Illuminate\\Console\\Application', 'auth' => 'Illuminate\\Auth\\AuthManager', 'auth.reminder.repository' => 'Illuminate\\Auth\\Reminders\\ReminderRepositoryInterface', 'blade.compiler' => 'Illuminate\\View\\Compilers\\BladeCompiler', 'cache' => 'Illuminate\\Cache\\CacheManager', 'cache.store' => 'Illuminate\\Cache\\Repository', 'config' => 'Illuminate\\Config\\Repository', 'cookie' => 'Illuminate\\Cookie\\CookieJar', 'encrypter' => 'Illuminate\\Encryption\\Encrypter', 'db' => 'Illuminate\\Database\\DatabaseManager', 'events' => 'Illuminate\\Events\\Dispatcher', 'files' => 'Illuminate\\Filesystem\\Filesystem', 'form' => 'Illuminate\\Html\\FormBuilder', 'hash' => 'Illuminate\\Hashing\\HasherInterface', 'html' => 'Illuminate\\Html\\HtmlBuilder', 'translator' => 'Illuminate\\Translation\\Translator', 'log' => 'Illuminate\\Log\\Writer', 'mailer' => 'Illuminate\\Mail\\Mailer', 'paginator' => 'Illuminate\\Pagination\\Factory', 'auth.reminder' => 'Illuminate\\Auth\\Reminders\\PasswordBroker', 'queue' => 'Illuminate\\Queue\\QueueManager', 'redirect' => 'Illuminate\\Routing\\Redirector', 'redis' => 'Illuminate\\Redis\\Database', 'request' => 'Illuminate\\Http\\Request', 'router' => 'Illuminate\\Routing\\Router', 'session' => 'Illuminate\\Session\\SessionManager', 'session.store' => 'Illuminate\\Session\\Store', 'remote' => 'Illuminate\\Remote\\RemoteManager', 'url' => 'Illuminate\\Routing\\UrlGenerator', 'validator' => 'Illuminate\\Validation\\Factory', 'view' => 'Illuminate\\View\\Factory'); + foreach ($aliases as $key => $alias) { + $this->alias($key, $alias); + } + } +} +namespace Illuminate\Foundation; + +use Closure; +class EnvironmentDetector +{ + public function detect($environments, $consoleArgs = null) + { + if ($consoleArgs) { + return $this->detectConsoleEnvironment($environments, $consoleArgs); + } + return $this->detectWebEnvironment($environments); + } + protected function detectWebEnvironment($environments) + { + if ($environments instanceof Closure) { + return call_user_func($environments); + } + foreach ($environments as $environment => $hosts) { + foreach ((array) $hosts as $host) { + if ($this->isMachine($host)) { + return $environment; + } + } + } + return 'production'; + } + protected function detectConsoleEnvironment($environments, array $args) + { + if (!is_null($value = $this->getEnvironmentArgument($args))) { + return head(array_slice(explode('=', $value), 1)); + } + return $this->detectWebEnvironment($environments); + } + protected function getEnvironmentArgument(array $args) + { + return array_first($args, function ($k, $v) { + return starts_with($v, '--env'); + }); + } + public function isMachine($name) + { + return str_is($name, gethostname()); + } +} +namespace Illuminate\Http; + +use SplFileInfo; +use Symfony\Component\HttpFoundation\ParameterBag; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +class Request extends SymfonyRequest +{ + protected $json; + protected $sessionStore; + public function instance() + { + return $this; + } + public function method() + { + return $this->getMethod(); + } + public function root() + { + return rtrim($this->getSchemeAndHttpHost() . $this->getBaseUrl(), '/'); + } + public function url() + { + return rtrim(preg_replace('/\\?.*/', '', $this->getUri()), '/'); + } + public function fullUrl() + { + $query = $this->getQueryString(); + return $query ? $this->url() . '?' . $query : $this->url(); + } + public function path() + { + $pattern = trim($this->getPathInfo(), '/'); + return $pattern == '' ? '/' : $pattern; + } + public function decodedPath() + { + return rawurldecode($this->path()); + } + public function segment($index, $default = null) + { + return array_get($this->segments(), $index - 1, $default); + } + public function segments() + { + $segments = explode('/', $this->path()); + return array_values(array_filter($segments, function ($v) { + return $v != ''; + })); + } + public function is() + { + foreach (func_get_args() as $pattern) { + if (str_is($pattern, urldecode($this->path()))) { + return true; + } + } + return false; + } + public function ajax() + { + return $this->isXmlHttpRequest(); + } + public function secure() + { + return $this->isSecure(); + } + public function ip() + { + return $this->getClientIp(); + } + public function ips() + { + return $this->getClientIps(); + } + public function exists($key) + { + $keys = is_array($key) ? $key : func_get_args(); + $input = $this->all(); + foreach ($keys as $value) { + if (!array_key_exists($value, $input)) { + return false; + } + } + return true; + } + public function has($key) + { + $keys = is_array($key) ? $key : func_get_args(); + foreach ($keys as $value) { + if ($this->isEmptyString($value)) { + return false; + } + } + return true; + } + protected function isEmptyString($key) + { + $boolOrArray = is_bool($this->input($key)) || is_array($this->input($key)); + return !$boolOrArray && trim((string) $this->input($key)) === ''; + } + public function all() + { + return array_replace_recursive($this->input(), $this->files->all()); + } + public function input($key = null, $default = null) + { + $input = $this->getInputSource()->all() + $this->query->all(); + return array_get($input, $key, $default); + } + public function only($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + $results = array(); + $input = $this->all(); + foreach ($keys as $key) { + array_set($results, $key, array_get($input, $key)); + } + return $results; + } + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + $results = $this->all(); + array_forget($results, $keys); + return $results; + } + public function query($key = null, $default = null) + { + return $this->retrieveItem('query', $key, $default); + } + public function hasCookie($key) + { + return !is_null($this->cookie($key)); + } + public function cookie($key = null, $default = null) + { + return $this->retrieveItem('cookies', $key, $default); + } + public function file($key = null, $default = null) + { + return array_get($this->files->all(), $key, $default); + } + public function hasFile($key) + { + if (!is_array($files = $this->file($key))) { + $files = array($files); + } + foreach ($files as $file) { + if ($this->isValidFile($file)) { + return true; + } + } + return false; + } + protected function isValidFile($file) + { + return $file instanceof SplFileInfo && $file->getPath() != ''; + } + public function header($key = null, $default = null) + { + return $this->retrieveItem('headers', $key, $default); + } + public function server($key = null, $default = null) + { + return $this->retrieveItem('server', $key, $default); + } + public function old($key = null, $default = null) + { + return $this->session()->getOldInput($key, $default); + } + public function flash($filter = null, $keys = array()) + { + $flash = !is_null($filter) ? $this->{$filter}($keys) : $this->input(); + $this->session()->flashInput($flash); + } + public function flashOnly($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + return $this->flash('only', $keys); + } + public function flashExcept($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + return $this->flash('except', $keys); + } + public function flush() + { + $this->session()->flashInput(array()); + } + protected function retrieveItem($source, $key, $default) + { + if (is_null($key)) { + return $this->{$source}->all(); + } + return $this->{$source}->get($key, $default, true); + } + public function merge(array $input) + { + $this->getInputSource()->add($input); + } + public function replace(array $input) + { + $this->getInputSource()->replace($input); + } + public function json($key = null, $default = null) + { + if (!isset($this->json)) { + $this->json = new ParameterBag((array) json_decode($this->getContent(), true)); + } + if (is_null($key)) { + return $this->json; + } + return array_get($this->json->all(), $key, $default); + } + protected function getInputSource() + { + if ($this->isJson()) { + return $this->json(); + } + return $this->getMethod() == 'GET' ? $this->query : $this->request; + } + public function isJson() + { + return str_contains($this->header('CONTENT_TYPE'), '/json'); + } + public function wantsJson() + { + $acceptable = $this->getAcceptableContentTypes(); + return isset($acceptable[0]) && $acceptable[0] == 'application/json'; + } + public function format($default = 'html') + { + foreach ($this->getAcceptableContentTypes() as $type) { + if ($format = $this->getFormat($type)) { + return $format; + } + } + return $default; + } + public static function createFromBase(SymfonyRequest $request) + { + if ($request instanceof static) { + return $request; + } + return (new static())->duplicate($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all()); + } + public function session() + { + if (!$this->hasSession()) { + throw new \RuntimeException('Session store not set on request.'); + } + return $this->getSession(); + } +} +namespace Illuminate\Http; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +class FrameGuard implements HttpKernelInterface +{ + protected $app; + public function __construct(HttpKernelInterface $app) + { + $this->app = $app; + } + public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $response = $this->app->handle($request, $type, $catch); + $response->headers->set('X-Frame-Options', 'SAMEORIGIN', false); + return $response; + } +} +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\Session\SessionInterface; +class Request +{ + const HEADER_CLIENT_IP = 'client_ip'; + const HEADER_CLIENT_HOST = 'client_host'; + const HEADER_CLIENT_PROTO = 'client_proto'; + const HEADER_CLIENT_PORT = 'client_port'; + protected static $trustedProxies = array(); + protected static $trustedHostPatterns = array(); + protected static $trustedHosts = array(); + protected static $trustedHeaders = array(self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT'); + protected static $httpMethodParameterOverride = false; + public $attributes; + public $request; + public $query; + public $server; + public $files; + public $cookies; + public $headers; + protected $content; + protected $languages; + protected $charsets; + protected $encodings; + protected $acceptableContentTypes; + protected $pathInfo; + protected $requestUri; + protected $baseUrl; + protected $basePath; + protected $method; + protected $format; + protected $session; + protected $locale; + protected $defaultLocale = 'en'; + protected static $formats; + protected static $requestFactory; + public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); + } + public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + $this->request = new ParameterBag($request); + $this->query = new ParameterBag($query); + $this->attributes = new ParameterBag($attributes); + $this->cookies = new ParameterBag($cookies); + $this->files = new FileBag($files); + $this->server = new ServerBag($server); + $this->headers = new HeaderBag($this->server->getHeaders()); + $this->content = $content; + $this->languages = null; + $this->charsets = null; + $this->encodings = null; + $this->acceptableContentTypes = null; + $this->pathInfo = null; + $this->requestUri = null; + $this->baseUrl = null; + $this->basePath = null; + $this->method = null; + $this->format = null; + } + public static function createFromGlobals() + { + $server = $_SERVER; + if ('cli-server' === php_sapi_name()) { + if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) { + $server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH']; + } + if (array_key_exists('HTTP_CONTENT_TYPE', $_SERVER)) { + $server['CONTENT_TYPE'] = $_SERVER['HTTP_CONTENT_TYPE']; + } + } + $request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $server); + if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))) { + parse_str($request->getContent(), $data); + $request->request = new ParameterBag($data); + } + return $request; + } + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + { + $server = array_replace(array('SERVER_NAME' => 'localhost', 'SERVER_PORT' => 80, 'HTTP_HOST' => 'localhost', 'HTTP_USER_AGENT' => 'Symfony/2.X', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'REMOTE_ADDR' => '127.0.0.1', 'SCRIPT_NAME' => '', 'SCRIPT_FILENAME' => '', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_TIME' => time()), $server); + $server['PATH_INFO'] = ''; + $server['REQUEST_METHOD'] = strtoupper($method); + $components = parse_url($uri); + if (isset($components['host'])) { + $server['SERVER_NAME'] = $components['host']; + $server['HTTP_HOST'] = $components['host']; + } + if (isset($components['scheme'])) { + if ('https' === $components['scheme']) { + $server['HTTPS'] = 'on'; + $server['SERVER_PORT'] = 443; + } else { + unset($server['HTTPS']); + $server['SERVER_PORT'] = 80; + } + } + if (isset($components['port'])) { + $server['SERVER_PORT'] = $components['port']; + $server['HTTP_HOST'] = $server['HTTP_HOST'] . ':' . $components['port']; + } + if (isset($components['user'])) { + $server['PHP_AUTH_USER'] = $components['user']; + } + if (isset($components['pass'])) { + $server['PHP_AUTH_PW'] = $components['pass']; + } + if (!isset($components['path'])) { + $components['path'] = '/'; + } + switch (strtoupper($method)) { + case 'POST': + case 'PUT': + case 'DELETE': + if (!isset($server['CONTENT_TYPE'])) { + $server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + } + case 'PATCH': + $request = $parameters; + $query = array(); + break; + default: + $request = array(); + $query = $parameters; + break; + } + $queryString = ''; + if (isset($components['query'])) { + parse_str(html_entity_decode($components['query']), $qs); + if ($query) { + $query = array_replace($qs, $query); + $queryString = http_build_query($query, '', '&'); + } else { + $query = $qs; + $queryString = $components['query']; + } + } elseif ($query) { + $queryString = http_build_query($query, '', '&'); + } + $server['REQUEST_URI'] = $components['path'] . ('' !== $queryString ? '?' . $queryString : ''); + $server['QUERY_STRING'] = $queryString; + return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content); + } + public static function setFactory($callable) + { + self::$requestFactory = $callable; + } + public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) + { + $dup = clone $this; + if ($query !== null) { + $dup->query = new ParameterBag($query); + } + if ($request !== null) { + $dup->request = new ParameterBag($request); + } + if ($attributes !== null) { + $dup->attributes = new ParameterBag($attributes); + } + if ($cookies !== null) { + $dup->cookies = new ParameterBag($cookies); + } + if ($files !== null) { + $dup->files = new FileBag($files); + } + if ($server !== null) { + $dup->server = new ServerBag($server); + $dup->headers = new HeaderBag($dup->server->getHeaders()); + } + $dup->languages = null; + $dup->charsets = null; + $dup->encodings = null; + $dup->acceptableContentTypes = null; + $dup->pathInfo = null; + $dup->requestUri = null; + $dup->baseUrl = null; + $dup->basePath = null; + $dup->method = null; + $dup->format = null; + if (!$dup->get('_format') && $this->get('_format')) { + $dup->attributes->set('_format', $this->get('_format')); + } + if (!$dup->getRequestFormat(null)) { + $dup->setRequestFormat($format = $this->getRequestFormat(null)); + } + return $dup; + } + public function __clone() + { + $this->query = clone $this->query; + $this->request = clone $this->request; + $this->attributes = clone $this->attributes; + $this->cookies = clone $this->cookies; + $this->files = clone $this->files; + $this->server = clone $this->server; + $this->headers = clone $this->headers; + } + public function __toString() + { + return sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL')) . ' +' . $this->headers . ' +' . $this->getContent(); + } + public function overrideGlobals() + { + $this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), null, '&'))); + $_GET = $this->query->all(); + $_POST = $this->request->all(); + $_SERVER = $this->server->all(); + $_COOKIE = $this->cookies->all(); + foreach ($this->headers->all() as $key => $value) { + $key = strtoupper(str_replace('-', '_', $key)); + if (in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { + $_SERVER[$key] = implode(', ', $value); + } else { + $_SERVER['HTTP_' . $key] = implode(', ', $value); + } + } + $request = array('g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE); + $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); + $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; + $_REQUEST = array(); + foreach (str_split($requestOrder) as $order) { + $_REQUEST = array_merge($_REQUEST, $request[$order]); + } + } + public static function setTrustedProxies(array $proxies) + { + self::$trustedProxies = $proxies; + } + public static function getTrustedProxies() + { + return self::$trustedProxies; + } + public static function setTrustedHosts(array $hostPatterns) + { + self::$trustedHostPatterns = array_map(function ($hostPattern) { + return sprintf('{%s}i', str_replace('}', '\\}', $hostPattern)); + }, $hostPatterns); + self::$trustedHosts = array(); + } + public static function getTrustedHosts() + { + return self::$trustedHostPatterns; + } + public static function setTrustedHeaderName($key, $value) + { + if (!array_key_exists($key, self::$trustedHeaders)) { + throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key)); + } + self::$trustedHeaders[$key] = $value; + } + public static function getTrustedHeaderName($key) + { + if (!array_key_exists($key, self::$trustedHeaders)) { + throw new \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key)); + } + return self::$trustedHeaders[$key]; + } + public static function normalizeQueryString($qs) + { + if ('' == $qs) { + return ''; + } + $parts = array(); + $order = array(); + foreach (explode('&', $qs) as $param) { + if ('' === $param || '=' === $param[0]) { + continue; + } + $keyValuePair = explode('=', $param, 2); + $parts[] = isset($keyValuePair[1]) ? rawurlencode(urldecode($keyValuePair[0])) . '=' . rawurlencode(urldecode($keyValuePair[1])) : rawurlencode(urldecode($keyValuePair[0])); + $order[] = urldecode($keyValuePair[0]); + } + array_multisort($order, SORT_ASC, $parts); + return implode('&', $parts); + } + public static function enableHttpMethodParameterOverride() + { + self::$httpMethodParameterOverride = true; + } + public static function getHttpMethodParameterOverride() + { + return self::$httpMethodParameterOverride; + } + public function get($key, $default = null, $deep = false) + { + if ($this !== ($result = $this->query->get($key, $this, $deep))) { + return $result; + } + if ($this !== ($result = $this->attributes->get($key, $this, $deep))) { + return $result; + } + if ($this !== ($result = $this->request->get($key, $this, $deep))) { + return $result; + } + return $default; + } + public function getSession() + { + return $this->session; + } + public function hasPreviousSession() + { + return $this->hasSession() && $this->cookies->has($this->session->getName()); + } + public function hasSession() + { + return null !== $this->session; + } + public function setSession(SessionInterface $session) + { + $this->session = $session; + } + public function getClientIps() + { + $ip = $this->server->get('REMOTE_ADDR'); + if (!self::$trustedProxies) { + return array($ip); + } + if (!self::$trustedHeaders[self::HEADER_CLIENT_IP] || !$this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) { + return array($ip); + } + $clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP]))); + $clientIps[] = $ip; + $ip = $clientIps[0]; + foreach ($clientIps as $key => $clientIp) { + if (preg_match('{((?:\\d+\\.){3}\\d+)\\:\\d+}', $clientIp, $match)) { + $clientIps[$key] = $clientIp = $match[1]; + } + if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { + unset($clientIps[$key]); + } + } + return $clientIps ? array_reverse($clientIps) : array($ip); + } + public function getClientIp() + { + $ipAddresses = $this->getClientIps(); + return $ipAddresses[0]; + } + public function getScriptName() + { + return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', '')); + } + public function getPathInfo() + { + if (null === $this->pathInfo) { + $this->pathInfo = $this->preparePathInfo(); + } + return $this->pathInfo; + } + public function getBasePath() + { + if (null === $this->basePath) { + $this->basePath = $this->prepareBasePath(); + } + return $this->basePath; + } + public function getBaseUrl() + { + if (null === $this->baseUrl) { + $this->baseUrl = $this->prepareBaseUrl(); + } + return $this->baseUrl; + } + public function getScheme() + { + return $this->isSecure() ? 'https' : 'http'; + } + public function getPort() + { + if (self::$trustedProxies) { + if (self::$trustedHeaders[self::HEADER_CLIENT_PORT] && ($port = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PORT]))) { + return $port; + } + if (self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && 'https' === $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO], 'http')) { + return 443; + } + } + if ($host = $this->headers->get('HOST')) { + if ($host[0] === '[') { + $pos = strpos($host, ':', strrpos($host, ']')); + } else { + $pos = strrpos($host, ':'); + } + if (false !== $pos) { + return intval(substr($host, $pos + 1)); + } + return 'https' === $this->getScheme() ? 443 : 80; + } + return $this->server->get('SERVER_PORT'); + } + public function getUser() + { + return $this->headers->get('PHP_AUTH_USER'); + } + public function getPassword() + { + return $this->headers->get('PHP_AUTH_PW'); + } + public function getUserInfo() + { + $userinfo = $this->getUser(); + $pass = $this->getPassword(); + if ('' != $pass) { + $userinfo .= ":{$pass}"; + } + return $userinfo; + } + public function getHttpHost() + { + $scheme = $this->getScheme(); + $port = $this->getPort(); + if ('http' == $scheme && $port == 80 || 'https' == $scheme && $port == 443) { + return $this->getHost(); + } + return $this->getHost() . ':' . $port; + } + public function getRequestUri() + { + if (null === $this->requestUri) { + $this->requestUri = $this->prepareRequestUri(); + } + return $this->requestUri; + } + public function getSchemeAndHttpHost() + { + return $this->getScheme() . '://' . $this->getHttpHost(); + } + public function getUri() + { + if (null !== ($qs = $this->getQueryString())) { + $qs = '?' . $qs; + } + return $this->getSchemeAndHttpHost() . $this->getBaseUrl() . $this->getPathInfo() . $qs; + } + public function getUriForPath($path) + { + return $this->getSchemeAndHttpHost() . $this->getBaseUrl() . $path; + } + public function getQueryString() + { + $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); + return '' === $qs ? null : $qs; + } + public function isSecure() + { + if (self::$trustedProxies && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && ($proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO]))) { + return in_array(strtolower(current(explode(',', $proto))), array('https', 'on', 'ssl', '1')); + } + $https = $this->server->get('HTTPS'); + return !empty($https) && 'off' !== strtolower($https); + } + public function getHost() + { + if (self::$trustedProxies && self::$trustedHeaders[self::HEADER_CLIENT_HOST] && ($host = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_HOST]))) { + $elements = explode(',', $host); + $host = $elements[count($elements) - 1]; + } elseif (!($host = $this->headers->get('HOST'))) { + if (!($host = $this->server->get('SERVER_NAME'))) { + $host = $this->server->get('SERVER_ADDR', ''); + } + } + $host = strtolower(preg_replace('/:\\d+$/', '', trim($host))); + if ($host && '' !== preg_replace('/(?:^\\[)?[a-zA-Z0-9-:\\]_]+\\.?/', '', $host)) { + throw new \UnexpectedValueException(sprintf('Invalid Host "%s"', $host)); + } + if (count(self::$trustedHostPatterns) > 0) { + if (in_array($host, self::$trustedHosts)) { + return $host; + } + foreach (self::$trustedHostPatterns as $pattern) { + if (preg_match($pattern, $host)) { + self::$trustedHosts[] = $host; + return $host; + } + } + throw new \UnexpectedValueException(sprintf('Untrusted Host "%s"', $host)); + } + return $host; + } + public function setMethod($method) + { + $this->method = null; + $this->server->set('REQUEST_METHOD', $method); + } + public function getMethod() + { + if (null === $this->method) { + $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + if ('POST' === $this->method) { + if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) { + $this->method = strtoupper($method); + } elseif (self::$httpMethodParameterOverride) { + $this->method = strtoupper($this->request->get('_method', $this->query->get('_method', 'POST'))); + } + } + } + return $this->method; + } + public function getRealMethod() + { + return strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + } + public function getMimeType($format) + { + if (null === static::$formats) { + static::initializeFormats(); + } + return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; + } + public function getFormat($mimeType) + { + if (false !== ($pos = strpos($mimeType, ';'))) { + $mimeType = substr($mimeType, 0, $pos); + } + if (null === static::$formats) { + static::initializeFormats(); + } + foreach (static::$formats as $format => $mimeTypes) { + if (in_array($mimeType, (array) $mimeTypes)) { + return $format; + } + } + } + public function setFormat($format, $mimeTypes) + { + if (null === static::$formats) { + static::initializeFormats(); + } + static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); + } + public function getRequestFormat($default = 'html') + { + if (null === $this->format) { + $this->format = $this->get('_format', $default); + } + return $this->format; + } + public function setRequestFormat($format) + { + $this->format = $format; + } + public function getContentType() + { + return $this->getFormat($this->headers->get('CONTENT_TYPE')); + } + public function setDefaultLocale($locale) + { + $this->defaultLocale = $locale; + if (null === $this->locale) { + $this->setPhpDefaultLocale($locale); + } + } + public function getDefaultLocale() + { + return $this->defaultLocale; + } + public function setLocale($locale) + { + $this->setPhpDefaultLocale($this->locale = $locale); + } + public function getLocale() + { + return null === $this->locale ? $this->defaultLocale : $this->locale; + } + public function isMethod($method) + { + return $this->getMethod() === strtoupper($method); + } + public function isMethodSafe() + { + return in_array($this->getMethod(), array('GET', 'HEAD')); + } + public function getContent($asResource = false) + { + if (false === $this->content || true === $asResource && null !== $this->content) { + throw new \LogicException('getContent() can only be called once when using the resource return type.'); + } + if (true === $asResource) { + $this->content = false; + return fopen('php://input', 'rb'); + } + if (null === $this->content) { + $this->content = file_get_contents('php://input'); + } + return $this->content; + } + public function getETags() + { + return preg_split('/\\s*,\\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY); + } + public function isNoCache() + { + return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma'); + } + public function getPreferredLanguage(array $locales = null) + { + $preferredLanguages = $this->getLanguages(); + if (empty($locales)) { + return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null; + } + if (!$preferredLanguages) { + return $locales[0]; + } + $extendedPreferredLanguages = array(); + foreach ($preferredLanguages as $language) { + $extendedPreferredLanguages[] = $language; + if (false !== ($position = strpos($language, '_'))) { + $superLanguage = substr($language, 0, $position); + if (!in_array($superLanguage, $preferredLanguages)) { + $extendedPreferredLanguages[] = $superLanguage; + } + } + } + $preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); + return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $locales[0]; + } + public function getLanguages() + { + if (null !== $this->languages) { + return $this->languages; + } + $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); + $this->languages = array(); + foreach (array_keys($languages) as $lang) { + if (strstr($lang, '-')) { + $codes = explode('-', $lang); + if ($codes[0] == 'i') { + if (count($codes) > 1) { + $lang = $codes[1]; + } + } else { + for ($i = 0, $max = count($codes); $i < $max; $i++) { + if ($i == 0) { + $lang = strtolower($codes[0]); + } else { + $lang .= '_' . strtoupper($codes[$i]); + } + } + } + } + $this->languages[] = $lang; + } + return $this->languages; + } + public function getCharsets() + { + if (null !== $this->charsets) { + return $this->charsets; + } + return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); + } + public function getEncodings() + { + if (null !== $this->encodings) { + return $this->encodings; + } + return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); + } + public function getAcceptableContentTypes() + { + if (null !== $this->acceptableContentTypes) { + return $this->acceptableContentTypes; + } + return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); + } + public function isXmlHttpRequest() + { + return 'XMLHttpRequest' == $this->headers->get('X-Requested-With'); + } + protected function prepareRequestUri() + { + $requestUri = ''; + if ($this->headers->has('X_ORIGINAL_URL')) { + $requestUri = $this->headers->get('X_ORIGINAL_URL'); + $this->headers->remove('X_ORIGINAL_URL'); + $this->server->remove('HTTP_X_ORIGINAL_URL'); + $this->server->remove('UNENCODED_URL'); + $this->server->remove('IIS_WasUrlRewritten'); + } elseif ($this->headers->has('X_REWRITE_URL')) { + $requestUri = $this->headers->get('X_REWRITE_URL'); + $this->headers->remove('X_REWRITE_URL'); + } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') { + $requestUri = $this->server->get('UNENCODED_URL'); + $this->server->remove('UNENCODED_URL'); + $this->server->remove('IIS_WasUrlRewritten'); + } elseif ($this->server->has('REQUEST_URI')) { + $requestUri = $this->server->get('REQUEST_URI'); + $schemeAndHttpHost = $this->getSchemeAndHttpHost(); + if (strpos($requestUri, $schemeAndHttpHost) === 0) { + $requestUri = substr($requestUri, strlen($schemeAndHttpHost)); + } + } elseif ($this->server->has('ORIG_PATH_INFO')) { + $requestUri = $this->server->get('ORIG_PATH_INFO'); + if ('' != $this->server->get('QUERY_STRING')) { + $requestUri .= '?' . $this->server->get('QUERY_STRING'); + } + $this->server->remove('ORIG_PATH_INFO'); + } + $this->server->set('REQUEST_URI', $requestUri); + return $requestUri; + } + protected function prepareBaseUrl() + { + $filename = basename($this->server->get('SCRIPT_FILENAME')); + if (basename($this->server->get('SCRIPT_NAME')) === $filename) { + $baseUrl = $this->server->get('SCRIPT_NAME'); + } elseif (basename($this->server->get('PHP_SELF')) === $filename) { + $baseUrl = $this->server->get('PHP_SELF'); + } elseif (basename($this->server->get('ORIG_SCRIPT_NAME')) === $filename) { + $baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); + } else { + $path = $this->server->get('PHP_SELF', ''); + $file = $this->server->get('SCRIPT_FILENAME', ''); + $segs = explode('/', trim($file, '/')); + $segs = array_reverse($segs); + $index = 0; + $last = count($segs); + $baseUrl = ''; + do { + $seg = $segs[$index]; + $baseUrl = '/' . $seg . $baseUrl; + ++$index; + } while ($last > $index && false !== ($pos = strpos($path, $baseUrl)) && 0 != $pos); + } + $requestUri = $this->getRequestUri(); + if ($baseUrl && false !== ($prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl))) { + return $prefix; + } + if ($baseUrl && false !== ($prefix = $this->getUrlencodedPrefix($requestUri, dirname($baseUrl)))) { + return rtrim($prefix, '/'); + } + $truncatedRequestUri = $requestUri; + if (false !== ($pos = strpos($requestUri, '?'))) { + $truncatedRequestUri = substr($requestUri, 0, $pos); + } + $basename = basename($baseUrl); + if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { + return ''; + } + if (strlen($requestUri) >= strlen($baseUrl) && false !== ($pos = strpos($requestUri, $baseUrl)) && $pos !== 0) { + $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); + } + return rtrim($baseUrl, '/'); + } + protected function prepareBasePath() + { + $filename = basename($this->server->get('SCRIPT_FILENAME')); + $baseUrl = $this->getBaseUrl(); + if (empty($baseUrl)) { + return ''; + } + if (basename($baseUrl) === $filename) { + $basePath = dirname($baseUrl); + } else { + $basePath = $baseUrl; + } + if ('\\' === DIRECTORY_SEPARATOR) { + $basePath = str_replace('\\', '/', $basePath); + } + return rtrim($basePath, '/'); + } + protected function preparePathInfo() + { + $baseUrl = $this->getBaseUrl(); + if (null === ($requestUri = $this->getRequestUri())) { + return '/'; + } + $pathInfo = '/'; + if ($pos = strpos($requestUri, '?')) { + $requestUri = substr($requestUri, 0, $pos); + } + if (null !== $baseUrl && false === ($pathInfo = substr($requestUri, strlen($baseUrl)))) { + return '/'; + } elseif (null === $baseUrl) { + return $requestUri; + } + return (string) $pathInfo; + } + protected static function initializeFormats() + { + static::$formats = array('html' => array('text/html', 'application/xhtml+xml'), 'txt' => array('text/plain'), 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), 'css' => array('text/css'), 'json' => array('application/json', 'application/x-json'), 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), 'rdf' => array('application/rdf+xml'), 'atom' => array('application/atom+xml'), 'rss' => array('application/rss+xml')); + } + private function setPhpDefaultLocale($locale) + { + try { + if (class_exists('Locale', false)) { + \Locale::setDefault($locale); + } + } catch (\Exception $e) { + + } + } + private function getUrlencodedPrefix($string, $prefix) + { + if (0 !== strpos(rawurldecode($string), $prefix)) { + return false; + } + $len = strlen($prefix); + if (preg_match("#^(%[[:xdigit:]]{2}|.){{$len}}#", $string, $match)) { + return $match[0]; + } + return false; + } + private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + if (self::$requestFactory) { + $request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); + if (!$request instanceof Request) { + throw new \LogicException('The Request factory must return an instance of Symfony\\Component\\HttpFoundation\\Request.'); + } + return $request; + } + return new static($query, $request, $attributes, $cookies, $files, $server, $content); + } +} +namespace Symfony\Component\HttpFoundation; + +class ParameterBag implements \IteratorAggregate, \Countable +{ + protected $parameters; + public function __construct(array $parameters = array()) + { + $this->parameters = $parameters; + } + public function all() + { + return $this->parameters; + } + public function keys() + { + return array_keys($this->parameters); + } + public function replace(array $parameters = array()) + { + $this->parameters = $parameters; + } + public function add(array $parameters = array()) + { + $this->parameters = array_replace($this->parameters, $parameters); + } + public function get($path, $default = null, $deep = false) + { + if (!$deep || false === ($pos = strpos($path, '['))) { + return array_key_exists($path, $this->parameters) ? $this->parameters[$path] : $default; + } + $root = substr($path, 0, $pos); + if (!array_key_exists($root, $this->parameters)) { + return $default; + } + $value = $this->parameters[$root]; + $currentKey = null; + for ($i = $pos, $c = strlen($path); $i < $c; $i++) { + $char = $path[$i]; + if ('[' === $char) { + if (null !== $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "[" at position %d.', $i)); + } + $currentKey = ''; + } elseif (']' === $char) { + if (null === $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "]" at position %d.', $i)); + } + if (!is_array($value) || !array_key_exists($currentKey, $value)) { + return $default; + } + $value = $value[$currentKey]; + $currentKey = null; + } else { + if (null === $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "%s" at position %d.', $char, $i)); + } + $currentKey .= $char; + } + } + if (null !== $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Path must end with "]".')); + } + return $value; + } + public function set($key, $value) + { + $this->parameters[$key] = $value; + } + public function has($key) + { + return array_key_exists($key, $this->parameters); + } + public function remove($key) + { + unset($this->parameters[$key]); + } + public function getAlpha($key, $default = '', $deep = false) + { + return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default, $deep)); + } + public function getAlnum($key, $default = '', $deep = false) + { + return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default, $deep)); + } + public function getDigits($key, $default = '', $deep = false) + { + return str_replace(array('-', '+'), '', $this->filter($key, $default, $deep, FILTER_SANITIZE_NUMBER_INT)); + } + public function getInt($key, $default = 0, $deep = false) + { + return (int) $this->get($key, $default, $deep); + } + public function filter($key, $default = null, $deep = false, $filter = FILTER_DEFAULT, $options = array()) + { + $value = $this->get($key, $default, $deep); + if (!is_array($options) && $options) { + $options = array('flags' => $options); + } + if (is_array($value) && !isset($options['flags'])) { + $options['flags'] = FILTER_REQUIRE_ARRAY; + } + return filter_var($value, $filter, $options); + } + public function getIterator() + { + return new \ArrayIterator($this->parameters); + } + public function count() + { + return count($this->parameters); + } +} +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\File\UploadedFile; +class FileBag extends ParameterBag +{ + private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + public function __construct(array $parameters = array()) + { + $this->replace($parameters); + } + public function replace(array $files = array()) + { + $this->parameters = array(); + $this->add($files); + } + public function set($key, $value) + { + if (!is_array($value) && !$value instanceof UploadedFile) { + throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); + } + parent::set($key, $this->convertFileInformation($value)); + } + public function add(array $files = array()) + { + foreach ($files as $key => $file) { + $this->set($key, $file); + } + } + protected function convertFileInformation($file) + { + if ($file instanceof UploadedFile) { + return $file; + } + $file = $this->fixPhpFilesArray($file); + if (is_array($file)) { + $keys = array_keys($file); + sort($keys); + if ($keys == self::$fileKeys) { + if (UPLOAD_ERR_NO_FILE == $file['error']) { + $file = null; + } else { + $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); + } + } else { + $file = array_map(array($this, 'convertFileInformation'), $file); + } + } + return $file; + } + protected function fixPhpFilesArray($data) + { + if (!is_array($data)) { + return $data; + } + $keys = array_keys($data); + sort($keys); + if (self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) { + return $data; + } + $files = $data; + foreach (self::$fileKeys as $k) { + unset($files[$k]); + } + foreach (array_keys($data['name']) as $key) { + $files[$key] = $this->fixPhpFilesArray(array('error' => $data['error'][$key], 'name' => $data['name'][$key], 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], 'size' => $data['size'][$key])); + } + return $files; + } +} +namespace Symfony\Component\HttpFoundation; + +class ServerBag extends ParameterBag +{ + public function getHeaders() + { + $headers = array(); + $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true); + foreach ($this->parameters as $key => $value) { + if (0 === strpos($key, 'HTTP_')) { + $headers[substr($key, 5)] = $value; + } elseif (isset($contentHeaders[$key])) { + $headers[$key] = $value; + } + } + if (isset($this->parameters['PHP_AUTH_USER'])) { + $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; + $headers['PHP_AUTH_PW'] = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] : ''; + } else { + $authorizationHeader = null; + if (isset($this->parameters['HTTP_AUTHORIZATION'])) { + $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; + } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { + $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; + } + if (null !== $authorizationHeader) { + if (0 === stripos($authorizationHeader, 'basic ')) { + $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); + if (count($exploded) == 2) { + list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded; + } + } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && 0 === stripos($authorizationHeader, 'digest ')) { + $headers['PHP_AUTH_DIGEST'] = $authorizationHeader; + $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; + } + } + } + if (isset($headers['PHP_AUTH_USER'])) { + $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']); + } elseif (isset($headers['PHP_AUTH_DIGEST'])) { + $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; + } + return $headers; + } +} +namespace Symfony\Component\HttpFoundation; + +class HeaderBag implements \IteratorAggregate, \Countable +{ + protected $headers = array(); + protected $cacheControl = array(); + public function __construct(array $headers = array()) + { + foreach ($headers as $key => $values) { + $this->set($key, $values); + } + } + public function __toString() + { + if (!$this->headers) { + return ''; + } + $max = max(array_map('strlen', array_keys($this->headers))) + 1; + $content = ''; + ksort($this->headers); + foreach ($this->headers as $name => $values) { + $name = implode('-', array_map('ucfirst', explode('-', $name))); + foreach ($values as $value) { + $content .= sprintf("%-{$max}s %s\r\n", $name . ':', $value); + } + } + return $content; + } + public function all() + { + return $this->headers; + } + public function keys() + { + return array_keys($this->headers); + } + public function replace(array $headers = array()) + { + $this->headers = array(); + $this->add($headers); + } + public function add(array $headers) + { + foreach ($headers as $key => $values) { + $this->set($key, $values); + } + } + public function get($key, $default = null, $first = true) + { + $key = strtr(strtolower($key), '_', '-'); + if (!array_key_exists($key, $this->headers)) { + if (null === $default) { + return $first ? null : array(); + } + return $first ? $default : array($default); + } + if ($first) { + return count($this->headers[$key]) ? $this->headers[$key][0] : $default; + } + return $this->headers[$key]; + } + public function set($key, $values, $replace = true) + { + $key = strtr(strtolower($key), '_', '-'); + $values = array_values((array) $values); + if (true === $replace || !isset($this->headers[$key])) { + $this->headers[$key] = $values; + } else { + $this->headers[$key] = array_merge($this->headers[$key], $values); + } + if ('cache-control' === $key) { + $this->cacheControl = $this->parseCacheControl($values[0]); + } + } + public function has($key) + { + return array_key_exists(strtr(strtolower($key), '_', '-'), $this->headers); + } + public function contains($key, $value) + { + return in_array($value, $this->get($key, null, false)); + } + public function remove($key) + { + $key = strtr(strtolower($key), '_', '-'); + unset($this->headers[$key]); + if ('cache-control' === $key) { + $this->cacheControl = array(); + } + } + public function getDate($key, \DateTime $default = null) + { + if (null === ($value = $this->get($key))) { + return $default; + } + if (false === ($date = \DateTime::createFromFormat(DATE_RFC2822, $value))) { + throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value)); + } + return $date; + } + public function addCacheControlDirective($key, $value = true) + { + $this->cacheControl[$key] = $value; + $this->set('Cache-Control', $this->getCacheControlHeader()); + } + public function hasCacheControlDirective($key) + { + return array_key_exists($key, $this->cacheControl); + } + public function getCacheControlDirective($key) + { + return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; + } + public function removeCacheControlDirective($key) + { + unset($this->cacheControl[$key]); + $this->set('Cache-Control', $this->getCacheControlHeader()); + } + public function getIterator() + { + return new \ArrayIterator($this->headers); + } + public function count() + { + return count($this->headers); + } + protected function getCacheControlHeader() + { + $parts = array(); + ksort($this->cacheControl); + foreach ($this->cacheControl as $key => $value) { + if (true === $value) { + $parts[] = $key; + } else { + if (preg_match('#[^a-zA-Z0-9._-]#', $value)) { + $value = '"' . $value . '"'; + } + $parts[] = "{$key}={$value}"; + } + } + return implode(', ', $parts); + } + protected function parseCacheControl($header) + { + $cacheControl = array(); + preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\\s*(?:=(?:"([^"]*)"|([^ \\t",;]*)))?#', $header, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true); + } + return $cacheControl; + } +} +namespace Symfony\Component\HttpFoundation\Session; + +use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; +interface SessionInterface +{ + public function start(); + public function getId(); + public function setId($id); + public function getName(); + public function setName($name); + public function invalidate($lifetime = null); + public function migrate($destroy = false, $lifetime = null); + public function save(); + public function has($name); + public function get($name, $default = null); + public function set($name, $value); + public function all(); + public function replace(array $attributes); + public function remove($name); + public function clear(); + public function isStarted(); + public function registerBag(SessionBagInterface $bag); + public function getBag($name); + public function getMetadataBag(); +} +namespace Symfony\Component\HttpFoundation\Session; + +interface SessionBagInterface +{ + public function getName(); + public function initialize(array &$array); + public function getStorageKey(); + public function clear(); +} +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +interface AttributeBagInterface extends SessionBagInterface +{ + public function has($name); + public function get($name, $default = null); + public function set($name, $value); + public function all(); + public function replace(array $attributes); + public function remove($name); +} +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable +{ + private $name = 'attributes'; + private $storageKey; + protected $attributes = array(); + public function __construct($storageKey = '_sf2_attributes') + { + $this->storageKey = $storageKey; + } + public function getName() + { + return $this->name; + } + public function setName($name) + { + $this->name = $name; + } + public function initialize(array &$attributes) + { + $this->attributes =& $attributes; + } + public function getStorageKey() + { + return $this->storageKey; + } + public function has($name) + { + return array_key_exists($name, $this->attributes); + } + public function get($name, $default = null) + { + return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + } + public function set($name, $value) + { + $this->attributes[$name] = $value; + } + public function all() + { + return $this->attributes; + } + public function replace(array $attributes) + { + $this->attributes = array(); + foreach ($attributes as $key => $value) { + $this->set($key, $value); + } + } + public function remove($name) + { + $retval = null; + if (array_key_exists($name, $this->attributes)) { + $retval = $this->attributes[$name]; + unset($this->attributes[$name]); + } + return $retval; + } + public function clear() + { + $return = $this->attributes; + $this->attributes = array(); + return $return; + } + public function getIterator() + { + return new \ArrayIterator($this->attributes); + } + public function count() + { + return count($this->attributes); + } +} +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +class MetadataBag implements SessionBagInterface +{ + const CREATED = 'c'; + const UPDATED = 'u'; + const LIFETIME = 'l'; + private $name = '__metadata'; + private $storageKey; + protected $meta = array(self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0); + private $lastUsed; + private $updateThreshold; + public function __construct($storageKey = '_sf2_meta', $updateThreshold = 0) + { + $this->storageKey = $storageKey; + $this->updateThreshold = $updateThreshold; + } + public function initialize(array &$array) + { + $this->meta =& $array; + if (isset($array[self::CREATED])) { + $this->lastUsed = $this->meta[self::UPDATED]; + $timeStamp = time(); + if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) { + $this->meta[self::UPDATED] = $timeStamp; + } + } else { + $this->stampCreated(); + } + } + public function getLifetime() + { + return $this->meta[self::LIFETIME]; + } + public function stampNew($lifetime = null) + { + $this->stampCreated($lifetime); + } + public function getStorageKey() + { + return $this->storageKey; + } + public function getCreated() + { + return $this->meta[self::CREATED]; + } + public function getLastUsed() + { + return $this->lastUsed; + } + public function clear() + { + + } + public function getName() + { + return $this->name; + } + public function setName($name) + { + $this->name = $name; + } + private function stampCreated($lifetime = null) + { + $timeStamp = time(); + $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; + $this->meta[self::LIFETIME] = null === $lifetime ? ini_get('session.cookie_lifetime') : $lifetime; + } +} +namespace Symfony\Component\HttpFoundation; + +class AcceptHeaderItem +{ + private $value; + private $quality = 1.0; + private $index = 0; + private $attributes = array(); + public function __construct($value, array $attributes = array()) + { + $this->value = $value; + foreach ($attributes as $name => $value) { + $this->setAttribute($name, $value); + } + } + public static function fromString($itemValue) + { + $bits = preg_split('/\\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\\s*/', $itemValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $value = array_shift($bits); + $attributes = array(); + $lastNullAttribute = null; + foreach ($bits as $bit) { + if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) && ($start === '"' || $start === '\'')) { + $attributes[$lastNullAttribute] = substr($bit, 1, -1); + } elseif ('=' === $end) { + $lastNullAttribute = $bit = substr($bit, 0, -1); + $attributes[$bit] = null; + } else { + $parts = explode('=', $bit); + $attributes[$parts[0]] = isset($parts[1]) && strlen($parts[1]) > 0 ? $parts[1] : ''; + } + } + return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) && ($start === '"' || $start === '\'') ? substr($value, 1, -1) : $value, $attributes); + } + public function __toString() + { + $string = $this->value . ($this->quality < 1 ? ';q=' . $this->quality : ''); + if (count($this->attributes) > 0) { + $string .= ';' . implode(';', array_map(function ($name, $value) { + return sprintf(preg_match('/[,;=]/', $value) ? '%s="%s"' : '%s=%s', $name, $value); + }, array_keys($this->attributes), $this->attributes)); + } + return $string; + } + public function setValue($value) + { + $this->value = $value; + return $this; + } + public function getValue() + { + return $this->value; + } + public function setQuality($quality) + { + $this->quality = $quality; + return $this; + } + public function getQuality() + { + return $this->quality; + } + public function setIndex($index) + { + $this->index = $index; + return $this; + } + public function getIndex() + { + return $this->index; + } + public function hasAttribute($name) + { + return isset($this->attributes[$name]); + } + public function getAttribute($name, $default = null) + { + return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + } + public function getAttributes() + { + return $this->attributes; + } + public function setAttribute($name, $value) + { + if ('q' === $name) { + $this->quality = (double) $value; + } else { + $this->attributes[$name] = (string) $value; + } + return $this; + } +} +namespace Symfony\Component\HttpFoundation; + +class AcceptHeader +{ + private $items = array(); + private $sorted = true; + public function __construct(array $items) + { + foreach ($items as $item) { + $this->add($item); + } + } + public static function fromString($headerValue) + { + $index = 0; + return new self(array_map(function ($itemValue) use(&$index) { + $item = AcceptHeaderItem::fromString($itemValue); + $item->setIndex($index++); + return $item; + }, preg_split('/\\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\\s*/', $headerValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE))); + } + public function __toString() + { + return implode(',', $this->items); + } + public function has($value) + { + return isset($this->items[$value]); + } + public function get($value) + { + return isset($this->items[$value]) ? $this->items[$value] : null; + } + public function add(AcceptHeaderItem $item) + { + $this->items[$item->getValue()] = $item; + $this->sorted = false; + return $this; + } + public function all() + { + $this->sort(); + return $this->items; + } + public function filter($pattern) + { + return new self(array_filter($this->items, function (AcceptHeaderItem $item) use($pattern) { + return preg_match($pattern, $item->getValue()); + })); + } + public function first() + { + $this->sort(); + return !empty($this->items) ? reset($this->items) : null; + } + private function sort() + { + if (!$this->sorted) { + uasort($this->items, function ($a, $b) { + $qA = $a->getQuality(); + $qB = $b->getQuality(); + if ($qA === $qB) { + return $a->getIndex() > $b->getIndex() ? 1 : -1; + } + return $qA > $qB ? -1 : 1; + }); + $this->sorted = true; + } + } +} +namespace Symfony\Component\Debug; + +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +class ExceptionHandler +{ + private $debug; + private $charset; + private $handler; + private $caughtBuffer; + private $caughtLength; + public function __construct($debug = true, $charset = 'UTF-8') + { + $this->debug = $debug; + $this->charset = $charset; + } + public static function register($debug = true) + { + $handler = new static($debug); + set_exception_handler(array($handler, 'handle')); + return $handler; + } + public function setHandler($handler) + { + if (null !== $handler && !is_callable($handler)) { + throw new \LogicException('The exception handler must be a valid PHP callable.'); + } + $old = $this->handler; + $this->handler = $handler; + return $old; + } + public function handle(\Exception $exception) + { + if (null === $this->handler || $exception instanceof OutOfMemoryException) { + $this->failSafeHandle($exception); + return; + } + $caughtLength = $this->caughtLength = 0; + ob_start(array($this, 'catchOutput')); + $this->failSafeHandle($exception); + while (null === $this->caughtBuffer && ob_end_flush()) { + + } + if (isset($this->caughtBuffer[0])) { + ob_start(array($this, 'cleanOutput')); + echo $this->caughtBuffer; + $caughtLength = ob_get_length(); + } + $this->caughtBuffer = null; + try { + call_user_func($this->handler, $exception); + $this->caughtLength = $caughtLength; + } catch (\Exception $e) { + if (!$caughtLength) { + throw $exception; + } + } + } + private function failSafeHandle(\Exception $exception) + { + if (class_exists('Symfony\\Component\\HttpFoundation\\Response', false)) { + $response = $this->createResponse($exception); + $response->sendHeaders(); + $response->sendContent(); + } else { + $this->sendPhpResponse($exception); + } + } + public function sendPhpResponse($exception) + { + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + if (!headers_sent()) { + header(sprintf('HTTP/1.0 %s', $exception->getStatusCode())); + foreach ($exception->getHeaders() as $name => $value) { + header($name . ': ' . $value, false); + } + } + echo $this->decorate($this->getContent($exception), $this->getStylesheet($exception)); + } + public function createResponse($exception) + { + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + return new Response($this->decorate($this->getContent($exception), $this->getStylesheet($exception)), $exception->getStatusCode(), $exception->getHeaders()); + } + public function getContent(FlattenException $exception) + { + switch ($exception->getStatusCode()) { + case 404: + $title = 'Sorry, the page you are looking for could not be found.'; + break; + default: + $title = 'Whoops, looks like something went wrong.'; + } + $content = ''; + if ($this->debug) { + try { + $count = count($exception->getAllPrevious()); + $total = $count + 1; + foreach ($exception->toArray() as $position => $e) { + $ind = $count - $position + 1; + $class = $this->abbrClass($e['class']); + $message = nl2br($e['message']); + $content .= sprintf('
+

%d/%d %s: %s

+
+
+
    ', $ind, $total, $class, $message); + foreach ($e['trace'] as $trace) { + $content .= '
  1. '; + if ($trace['function']) { + $content .= sprintf('at %s%s%s(%s)', $this->abbrClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args'])); + } + if (isset($trace['file']) && isset($trace['line'])) { + if ($linkFormat = ini_get('xdebug.file_link_format')) { + $link = str_replace(array('%f', '%l'), array($trace['file'], $trace['line']), $linkFormat); + $content .= sprintf(' in %s line %s', $link, $trace['file'], $trace['line']); + } else { + $content .= sprintf(' in %s line %s', $trace['file'], $trace['line']); + } + } + $content .= '
  2. +'; + } + $content .= '
+
+'; + } + } catch (\Exception $e) { + if ($this->debug) { + $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $e->getMessage()); + } else { + $title = 'Whoops, looks like something went wrong.'; + } + } + } + return "
\n

{$title}

\n {$content}\n
"; + } + public function getStylesheet(FlattenException $exception) + { + return ' .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 } + .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; } + .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; } + .sf-reset .clear_fix { display:inline-block; } + .sf-reset * html .clear_fix { height:1%; } + .sf-reset .clear_fix { display:block; } + .sf-reset, .sf-reset .block { margin: auto } + .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } + .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px } + .sf-reset strong { font-weight:bold; } + .sf-reset a { color:#6c6159; } + .sf-reset a img { border:none; } + .sf-reset a:hover { text-decoration:underline; } + .sf-reset em { font-style:italic; } + .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif } + .sf-reset h2 span { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; } + .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; } + .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px; + -webkit-border-bottom-right-radius: 16px; + -webkit-border-bottom-left-radius: 16px; + -moz-border-radius-bottomright: 16px; + -moz-border-radius-bottomleft: 16px; + border-bottom-right-radius: 16px; + border-bottom-left-radius: 16px; + border-bottom:1px solid #ccc; + border-right:1px solid #ccc; + border-left:1px solid #ccc; + } + .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px; + -webkit-border-top-left-radius: 16px; + -webkit-border-top-right-radius: 16px; + -moz-border-radius-topleft: 16px; + -moz-border-radius-topright: 16px; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-top:1px solid #ccc; + border-right:1px solid #ccc; + border-left:1px solid #ccc; + overflow: hidden; + word-wrap: break-word; + } + .sf-reset li a { background:none; color:#868686; text-decoration:none; } + .sf-reset li a:hover { background:none; color:#313131; text-decoration:underline; } + .sf-reset ol { padding: 10px 0; } + .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + border: 1px solid #ccc; + }'; + } + private function decorate($content, $css) + { + return "\n\n \n \n \n \n \n \n {$content}\n \n"; + } + private function abbrClass($class) + { + $parts = explode('\\', $class); + return sprintf('%s', $class, array_pop($parts)); + } + private function formatArgs(array $args) + { + if (PHP_VERSION_ID >= 50400) { + $flags = ENT_QUOTES | ENT_SUBSTITUTE; + } else { + $flags = ENT_QUOTES; + } + $result = array(); + foreach ($args as $key => $item) { + if ('object' === $item[0]) { + $formattedValue = sprintf('object(%s)', $this->abbrClass($item[1])); + } elseif ('array' === $item[0]) { + $formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); + } elseif ('string' === $item[0]) { + $formattedValue = sprintf('\'%s\'', htmlspecialchars($item[1], $flags, $this->charset)); + } elseif ('null' === $item[0]) { + $formattedValue = 'null'; + } elseif ('boolean' === $item[0]) { + $formattedValue = '' . strtolower(var_export($item[1], true)) . ''; + } elseif ('resource' === $item[0]) { + $formattedValue = 'resource'; + } else { + $formattedValue = str_replace(' +', '', var_export(htmlspecialchars((string) $item[1], $flags, $this->charset), true)); + } + $result[] = is_int($key) ? $formattedValue : sprintf('\'%s\' => %s', $key, $formattedValue); + } + return implode(', ', $result); + } + public function catchOutput($buffer) + { + $this->caughtBuffer = $buffer; + return ''; + } + public function cleanOutput($buffer) + { + if ($this->caughtLength) { + $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength); + if (isset($cleanBuffer[0])) { + $buffer = $cleanBuffer; + } + } + return $buffer; + } +} +namespace Illuminate\Support; + +use ReflectionClass; +abstract class ServiceProvider +{ + protected $app; + protected $defer = false; + public function __construct($app) + { + $this->app = $app; + } + public function boot() + { + + } + public abstract function register(); + public function package($package, $namespace = null, $path = null) + { + $namespace = $this->getPackageNamespace($package, $namespace); + $path = $path ?: $this->guessPackagePath(); + $config = $path . '/config'; + if ($this->app['files']->isDirectory($config)) { + $this->app['config']->package($package, $config, $namespace); + } + $lang = $path . '/lang'; + if ($this->app['files']->isDirectory($lang)) { + $this->app['translator']->addNamespace($namespace, $lang); + } + $appView = $this->getAppViewPath($package); + if ($this->app['files']->isDirectory($appView)) { + $this->app['view']->addNamespace($namespace, $appView); + } + $view = $path . '/views'; + if ($this->app['files']->isDirectory($view)) { + $this->app['view']->addNamespace($namespace, $view); + } + } + public function guessPackagePath() + { + $path = (new ReflectionClass($this))->getFileName(); + return realpath(dirname($path) . '/../../'); + } + protected function getPackageNamespace($package, $namespace) + { + if (is_null($namespace)) { + list($vendor, $namespace) = explode('/', $package); + } + return $namespace; + } + public function commands($commands) + { + $commands = is_array($commands) ? $commands : func_get_args(); + $events = $this->app['events']; + $events->listen('artisan.start', function ($artisan) use($commands) { + $artisan->resolveCommands($commands); + }); + } + protected function getAppViewPath($package) + { + return $this->app['path'] . "/views/packages/{$package}"; + } + public function provides() + { + return array(); + } + public function when() + { + return array(); + } + public function isDeferred() + { + return $this->defer; + } +} +namespace Illuminate\Exception; + +use Whoops\Run; +use Whoops\Handler\PrettyPageHandler; +use Whoops\Handler\JsonResponseHandler; +use Illuminate\Support\ServiceProvider; +class ExceptionServiceProvider extends ServiceProvider +{ + public function register() + { + $this->registerDisplayers(); + $this->registerHandler(); + } + protected function registerDisplayers() + { + $this->registerPlainDisplayer(); + $this->registerDebugDisplayer(); + } + protected function registerHandler() + { + $this->app['exception'] = $this->app->share(function ($app) { + return new Handler($app, $app['exception.plain'], $app['exception.debug']); + }); + } + protected function registerPlainDisplayer() + { + $this->app['exception.plain'] = $this->app->share(function ($app) { + if ($app->runningInConsole()) { + return $app['exception.debug']; + } else { + return new PlainDisplayer(); + } + }); + } + protected function registerDebugDisplayer() + { + $this->registerWhoops(); + $this->app['exception.debug'] = $this->app->share(function ($app) { + return new WhoopsDisplayer($app['whoops'], $app->runningInConsole()); + }); + } + protected function registerWhoops() + { + $this->registerWhoopsHandler(); + $this->app['whoops'] = $this->app->share(function ($app) { + with($whoops = new Run())->allowQuit(false); + $whoops->writeToOutput(false); + return $whoops->pushHandler($app['whoops.handler']); + }); + } + protected function registerWhoopsHandler() + { + if ($this->shouldReturnJson()) { + $this->app['whoops.handler'] = $this->app->share(function () { + return new JsonResponseHandler(); + }); + } else { + $this->registerPrettyWhoopsHandler(); + } + } + protected function shouldReturnJson() + { + return $this->app->runningInConsole() || $this->requestWantsJson(); + } + protected function requestWantsJson() + { + return $this->app['request']->ajax() || $this->app['request']->wantsJson(); + } + protected function registerPrettyWhoopsHandler() + { + $this->app['whoops.handler'] = $this->app->share(function () { + with($handler = new PrettyPageHandler())->setEditor('sublime'); + return $handler; + }); + } +} +namespace Illuminate\Routing; + +use Illuminate\Support\ServiceProvider; +class RoutingServiceProvider extends ServiceProvider +{ + public function register() + { + $this->registerRouter(); + $this->registerUrlGenerator(); + $this->registerRedirector(); + } + protected function registerRouter() + { + $this->app['router'] = $this->app->share(function ($app) { + $router = new Router($app['events'], $app); + if ($app['env'] == 'testing') { + $router->disableFilters(); + } + return $router; + }); + } + protected function registerUrlGenerator() + { + $this->app['url'] = $this->app->share(function ($app) { + $routes = $app['router']->getRoutes(); + return new UrlGenerator($routes, $app->rebinding('request', function ($app, $request) { + $app['url']->setRequest($request); + })); + }); + } + protected function registerRedirector() + { + $this->app['redirect'] = $this->app->share(function ($app) { + $redirector = new Redirector($app['url']); + if (isset($app['session.store'])) { + $redirector->setSession($app['session.store']); + } + return $redirector; + }); + } +} +namespace Illuminate\Events; + +use Illuminate\Support\ServiceProvider; +class EventServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app['events'] = $this->app->share(function ($app) { + return new Dispatcher($app); + }); + } +} +namespace Illuminate\Support\Facades; + +use Mockery\MockInterface; +abstract class Facade +{ + protected static $app; + protected static $resolvedInstance; + public static function swap($instance) + { + static::$resolvedInstance[static::getFacadeAccessor()] = $instance; + static::$app->instance(static::getFacadeAccessor(), $instance); + } + public static function shouldReceive() + { + $name = static::getFacadeAccessor(); + if (static::isMock()) { + $mock = static::$resolvedInstance[$name]; + } else { + $mock = static::createFreshMockInstance($name); + } + return call_user_func_array(array($mock, 'shouldReceive'), func_get_args()); + } + protected static function createFreshMockInstance($name) + { + static::$resolvedInstance[$name] = $mock = static::createMockByName($name); + if (isset(static::$app)) { + static::$app->instance($name, $mock); + } + return $mock; + } + protected static function createMockByName($name) + { + $class = static::getMockableClass($name); + return $class ? \Mockery::mock($class) : \Mockery::mock(); + } + protected static function isMock() + { + $name = static::getFacadeAccessor(); + return isset(static::$resolvedInstance[$name]) && static::$resolvedInstance[$name] instanceof MockInterface; + } + protected static function getMockableClass() + { + if ($root = static::getFacadeRoot()) { + return get_class($root); + } + } + public static function getFacadeRoot() + { + return static::resolveFacadeInstance(static::getFacadeAccessor()); + } + protected static function getFacadeAccessor() + { + throw new \RuntimeException('Facade does not implement getFacadeAccessor method.'); + } + protected static function resolveFacadeInstance($name) + { + if (is_object($name)) { + return $name; + } + if (isset(static::$resolvedInstance[$name])) { + return static::$resolvedInstance[$name]; + } + return static::$resolvedInstance[$name] = static::$app[$name]; + } + public static function clearResolvedInstance($name) + { + unset(static::$resolvedInstance[$name]); + } + public static function clearResolvedInstances() + { + static::$resolvedInstance = array(); + } + public static function getFacadeApplication() + { + return static::$app; + } + public static function setFacadeApplication($app) + { + static::$app = $app; + } + public static function __callStatic($method, $args) + { + $instance = static::getFacadeRoot(); + switch (count($args)) { + case 0: + return $instance->{$method}(); + case 1: + return $instance->{$method}($args[0]); + case 2: + return $instance->{$method}($args[0], $args[1]); + case 3: + return $instance->{$method}($args[0], $args[1], $args[2]); + case 4: + return $instance->{$method}($args[0], $args[1], $args[2], $args[3]); + default: + return call_user_func_array(array($instance, $method), $args); + } + } +} +namespace Illuminate\Support\Traits; + +trait MacroableTrait +{ + protected static $macros = array(); + public static function macro($name, callable $macro) + { + static::$macros[$name] = $macro; + } + public static function hasMacro($name) + { + return isset(static::$macros[$name]); + } + public static function __callStatic($method, $parameters) + { + if (static::hasMacro($method)) { + return call_user_func_array(static::$macros[$method], $parameters); + } + throw new \BadMethodCallException("Method {$method} does not exist."); + } + public function __call($method, $parameters) + { + return static::__callStatic($method, $parameters); + } +} +namespace Illuminate\Support; + +use Closure; +use Illuminate\Support\Traits\MacroableTrait; +class Arr +{ + use MacroableTrait; + public static function add($array, $key, $value) + { + if (is_null(static::get($array, $key))) { + static::set($array, $key, $value); + } + return $array; + } + public static function build($array, Closure $callback) + { + $results = array(); + foreach ($array as $key => $value) { + list($innerKey, $innerValue) = call_user_func($callback, $key, $value); + $results[$innerKey] = $innerValue; + } + return $results; + } + public static function divide($array) + { + return array(array_keys($array), array_values($array)); + } + public static function dot($array, $prepend = '') + { + $results = array(); + foreach ($array as $key => $value) { + if (is_array($value)) { + $results = array_merge($results, static::dot($value, $prepend . $key . '.')); + } else { + $results[$prepend . $key] = $value; + } + } + return $results; + } + public static function except($array, $keys) + { + return array_diff_key($array, array_flip((array) $keys)); + } + public static function fetch($array, $key) + { + foreach (explode('.', $key) as $segment) { + $results = array(); + foreach ($array as $value) { + if (array_key_exists($segment, $value = (array) $value)) { + $results[] = $value[$segment]; + } + } + $array = array_values($results); + } + return array_values($results); + } + public static function first($array, $callback, $default = null) + { + foreach ($array as $key => $value) { + if (call_user_func($callback, $key, $value)) { + return $value; + } + } + return value($default); + } + public static function last($array, $callback, $default = null) + { + return static::first(array_reverse($array), $callback, $default); + } + public static function flatten($array) + { + $return = array(); + array_walk_recursive($array, function ($x) use(&$return) { + $return[] = $x; + }); + return $return; + } + public static function forget(&$array, $keys) + { + $original =& $array; + foreach ((array) $keys as $key) { + $parts = explode('.', $key); + while (count($parts) > 1) { + $part = array_shift($parts); + if (isset($array[$part]) && is_array($array[$part])) { + $array =& $array[$part]; + } + } + unset($array[array_shift($parts)]); + $array =& $original; + } + } + public static function get($array, $key, $default = null) + { + if (is_null($key)) { + return $array; + } + if (isset($array[$key])) { + return $array[$key]; + } + foreach (explode('.', $key) as $segment) { + if (!is_array($array) || !array_key_exists($segment, $array)) { + return value($default); + } + $array = $array[$segment]; + } + return $array; + } + public static function has($array, $key) + { + if (empty($array) || is_null($key)) { + return false; + } + if (array_key_exists($key, $array)) { + return true; + } + foreach (explode('.', $key) as $segment) { + if (!is_array($array) || !array_key_exists($segment, $array)) { + return false; + } + $array = $array[$segment]; + } + return true; + } + public static function only($array, $keys) + { + return array_intersect_key($array, array_flip((array) $keys)); + } + public static function pluck($array, $value, $key = null) + { + $results = array(); + foreach ($array as $item) { + $itemValue = is_object($item) ? $item->{$value} : $item[$value]; + if (is_null($key)) { + $results[] = $itemValue; + } else { + $itemKey = is_object($item) ? $item->{$key} : $item[$key]; + $results[$itemKey] = $itemValue; + } + } + return $results; + } + public static function pull(&$array, $key, $default = null) + { + $value = static::get($array, $key, $default); + static::forget($array, $key); + return $value; + } + public static function set(&$array, $key, $value) + { + if (is_null($key)) { + return $array = $value; + } + $keys = explode('.', $key); + while (count($keys) > 1) { + $key = array_shift($keys); + if (!isset($array[$key]) || !is_array($array[$key])) { + $array[$key] = array(); + } + $array =& $array[$key]; + } + $array[array_shift($keys)] = $value; + return $array; + } + public static function sort($array, Closure $callback) + { + return Collection::make($array)->sortBy($callback)->all(); + } + public static function where($array, Closure $callback) + { + $filtered = array(); + foreach ($array as $key => $value) { + if (call_user_func($callback, $key, $value)) { + $filtered[$key] = $value; + } + } + return $filtered; + } +} +namespace Illuminate\Support; + +use Patchwork\Utf8; +use Illuminate\Support\Traits\MacroableTrait; +class Str +{ + use MacroableTrait; + protected static $snakeCache = array(); + protected static $camelCache = array(); + protected static $studlyCache = array(); + public static function ascii($value) + { + return Utf8::toAscii($value); + } + public static function camel($value) + { + if (isset(static::$camelCache[$value])) { + return static::$camelCache[$value]; + } + return static::$camelCache[$value] = lcfirst(static::studly($value)); + } + public static function contains($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle != '' && strpos($haystack, $needle) !== false) { + return true; + } + } + return false; + } + public static function endsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ((string) $needle === substr($haystack, -strlen($needle))) { + return true; + } + } + return false; + } + public static function finish($value, $cap) + { + $quoted = preg_quote($cap, '/'); + return preg_replace('/(?:' . $quoted . ')+$/', '', $value) . $cap; + } + public static function is($pattern, $value) + { + if ($pattern == $value) { + return true; + } + $pattern = preg_quote($pattern, '#'); + $pattern = str_replace('\\*', '.*', $pattern) . '\\z'; + return (bool) preg_match('#^' . $pattern . '#', $value); + } + public static function length($value) + { + return mb_strlen($value); + } + public static function limit($value, $limit = 100, $end = '...') + { + if (mb_strlen($value) <= $limit) { + return $value; + } + return rtrim(mb_substr($value, 0, $limit, 'UTF-8')) . $end; + } + public static function lower($value) + { + return mb_strtolower($value); + } + public static function words($value, $words = 100, $end = '...') + { + preg_match('/^\\s*+(?:\\S++\\s*+){1,' . $words . '}/u', $value, $matches); + if (!isset($matches[0]) || strlen($value) === strlen($matches[0])) { + return $value; + } + return rtrim($matches[0]) . $end; + } + public static function parseCallback($callback, $default) + { + return static::contains($callback, '@') ? explode('@', $callback, 2) : array($callback, $default); + } + public static function plural($value, $count = 2) + { + return Pluralizer::plural($value, $count); + } + public static function random($length = 16) + { + if (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($length * 2); + if ($bytes === false) { + throw new \RuntimeException('Unable to generate random string.'); + } + return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length); + } + return static::quickRandom($length); + } + public static function quickRandom($length = 16) + { + $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); + } + public static function upper($value) + { + return mb_strtoupper($value); + } + public static function title($value) + { + return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); + } + public static function singular($value) + { + return Pluralizer::singular($value); + } + public static function slug($title, $separator = '-') + { + $title = static::ascii($title); + $flip = $separator == '-' ? '_' : '-'; + $title = preg_replace('![' . preg_quote($flip) . ']+!u', $separator, $title); + $title = preg_replace('![^' . preg_quote($separator) . '\\pL\\pN\\s]+!u', '', mb_strtolower($title)); + $title = preg_replace('![' . preg_quote($separator) . '\\s]+!u', $separator, $title); + return trim($title, $separator); + } + public static function snake($value, $delimiter = '_') + { + if (isset(static::$snakeCache[$value . $delimiter])) { + return static::$snakeCache[$value . $delimiter]; + } + if (!ctype_lower($value)) { + $replace = '$1' . $delimiter . '$2'; + $value = strtolower(preg_replace('/(.)([A-Z])/', $replace, $value)); + } + return static::$snakeCache[$value . $delimiter] = $value; + } + public static function startsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle != '' && strpos($haystack, $needle) === 0) { + return true; + } + } + return false; + } + public static function studly($value) + { + if (isset(static::$studlyCache[$value])) { + return static::$studlyCache[$value]; + } + $value = ucwords(str_replace(array('-', '_'), ' ', $value)); + return static::$studlyCache[$value] = str_replace(' ', '', $value); + } +} +namespace Symfony\Component\Debug; + +use Psr\Log\LogLevel; +use Psr\Log\LoggerInterface; +use Symfony\Component\Debug\Exception\ContextErrorException; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; +class ErrorHandler +{ + const TYPE_DEPRECATION = -100; + private $levels = array(E_WARNING => 'Warning', E_NOTICE => 'Notice', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_STRICT => 'Runtime Notice', E_RECOVERABLE_ERROR => 'Catchable Fatal Error', E_DEPRECATED => 'Deprecated', E_USER_DEPRECATED => 'User Deprecated', E_ERROR => 'Error', E_CORE_ERROR => 'Core Error', E_COMPILE_ERROR => 'Compile Error', E_PARSE => 'Parse Error'); + private $level; + private $reservedMemory; + private $displayErrors; + private static $loggers = array(); + private static $stackedErrors = array(); + private static $stackedErrorLevels = array(); + public static function register($level = null, $displayErrors = true) + { + $handler = new static(); + $handler->setLevel($level); + $handler->setDisplayErrors($displayErrors); + ini_set('display_errors', 0); + set_error_handler(array($handler, 'handle')); + register_shutdown_function(array($handler, 'handleFatal')); + $handler->reservedMemory = str_repeat('x', 10240); + return $handler; + } + public function setLevel($level) + { + $this->level = null === $level ? error_reporting() : $level; + } + public function setDisplayErrors($displayErrors) + { + $this->displayErrors = $displayErrors; + } + public static function setLogger(LoggerInterface $logger, $channel = 'deprecation') + { + self::$loggers[$channel] = $logger; + } + public function handle($level, $message, $file = 'unknown', $line = 0, $context = array()) + { + if ($level & (E_USER_DEPRECATED | E_DEPRECATED)) { + if (isset(self::$loggers['deprecation'])) { + if (self::$stackedErrorLevels) { + self::$stackedErrors[] = func_get_args(); + } else { + if (PHP_VERSION_ID < 50400) { + $stack = array_map(function ($row) { + unset($row['args']); + return $row; + }, array_slice(debug_backtrace(false), 0, 10)); + } else { + $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10); + } + self::$loggers['deprecation']->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack)); + } + return true; + } + } elseif ($this->displayErrors && error_reporting() & $level && $this->level & $level) { + if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) { + $c = $context; + unset($c['GLOBALS'], $context); + $context = $c; + } + $exception = sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line); + if ($context && class_exists('Symfony\\Component\\Debug\\Exception\\ContextErrorException')) { + $exception = new ContextErrorException($exception, 0, $level, $file, $line, $context); + } else { + $exception = new \ErrorException($exception, 0, $level, $file, $line); + } + if (PHP_VERSION_ID <= 50407 && (PHP_VERSION_ID >= 50400 || PHP_VERSION_ID <= 50317)) { + $exception->errorHandlerCanary = new ErrorHandlerCanary(); + } + throw $exception; + } + if (isset(self::$loggers['scream']) && !(error_reporting() & $level)) { + if (self::$stackedErrorLevels) { + self::$stackedErrors[] = func_get_args(); + } else { + switch ($level) { + case E_USER_ERROR: + case E_RECOVERABLE_ERROR: + $logLevel = LogLevel::ERROR; + break; + case E_WARNING: + case E_USER_WARNING: + $logLevel = LogLevel::WARNING; + break; + default: + $logLevel = LogLevel::NOTICE; + break; + } + self::$loggers['scream']->log($logLevel, $message, array('type' => $level, 'file' => $file, 'line' => $line, 'scream' => error_reporting())); + } + } + return false; + } + public static function stackErrors() + { + self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); + } + public static function unstackErrors() + { + $level = array_pop(self::$stackedErrorLevels); + if (null !== $level) { + $e = error_reporting($level); + if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { + error_reporting($e); + } + } + if (empty(self::$stackedErrorLevels)) { + $errors = self::$stackedErrors; + self::$stackedErrors = array(); + $errorHandler = set_error_handler('var_dump'); + restore_error_handler(); + if ($errorHandler) { + foreach ($errors as $e) { + call_user_func_array($errorHandler, $e); + } + } + } + } + public function handleFatal() + { + $this->reservedMemory = ''; + gc_collect_cycles(); + $error = error_get_last(); + $exceptionHandler = set_exception_handler('var_dump'); + restore_exception_handler(); + try { + while (self::$stackedErrorLevels) { + static::unstackErrors(); + } + } catch (\Exception $exception) { + if ($exceptionHandler) { + call_user_func($exceptionHandler, $exception); + return; + } + if ($this->displayErrors) { + ini_set('display_errors', 1); + } + throw $exception; + } + if (!$error || !$this->level || !($error['type'] & (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_PARSE))) { + return; + } + if (isset(self::$loggers['emergency'])) { + $fatal = array('type' => $error['type'], 'file' => $error['file'], 'line' => $error['line']); + self::$loggers['emergency']->emergency($error['message'], $fatal); + } + if ($this->displayErrors && $exceptionHandler) { + $this->handleFatalError($exceptionHandler, $error); + } + } + protected function getFatalErrorHandlers() + { + return array(new UndefinedFunctionFatalErrorHandler(), new UndefinedMethodFatalErrorHandler(), new ClassNotFoundFatalErrorHandler()); + } + private function handleFatalError($exceptionHandler, array $error) + { + set_error_handler('var_dump', 0); + ini_set('display_errors', 1); + $level = isset($this->levels[$error['type']]) ? $this->levels[$error['type']] : $error['type']; + $message = sprintf('%s: %s in %s line %d', $level, $error['message'], $error['file'], $error['line']); + if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) { + $exception = new OutOfMemoryException($message, 0, $error['type'], $error['file'], $error['line'], 3, false); + } else { + $exception = new FatalErrorException($message, 0, $error['type'], $error['file'], $error['line'], 3, true); + foreach ($this->getFatalErrorHandlers() as $handler) { + if ($e = $handler->handleError($error, $exception)) { + $exception = $e; + break; + } + } + } + try { + call_user_func($exceptionHandler, $exception); + } catch (\Exception $e) { + throw $exception; + } + } +} +class ErrorHandlerCanary +{ + private static $displayErrors = null; + public function __construct() + { + if (null === self::$displayErrors) { + self::$displayErrors = ini_set('display_errors', 1); + } + } + public function __destruct() + { + if (null !== self::$displayErrors) { + ini_set('display_errors', self::$displayErrors); + self::$displayErrors = null; + } + } +} +namespace Symfony\Component\HttpKernel\Debug; + +use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler; +class ErrorHandler extends DebugErrorHandler +{ + +} +namespace Illuminate\Config; + +use Closure; +use ArrayAccess; +use Illuminate\Support\NamespacedItemResolver; +class Repository extends NamespacedItemResolver implements ArrayAccess +{ + protected $loader; + protected $environment; + protected $items = array(); + protected $packages = array(); + protected $afterLoad = array(); + public function __construct(LoaderInterface $loader, $environment) + { + $this->loader = $loader; + $this->environment = $environment; + } + public function has($key) + { + $default = microtime(true); + return $this->get($key, $default) !== $default; + } + public function hasGroup($key) + { + list($namespace, $group, $item) = $this->parseKey($key); + return $this->loader->exists($group, $namespace); + } + public function get($key, $default = null) + { + list($namespace, $group, $item) = $this->parseKey($key); + $collection = $this->getCollection($group, $namespace); + $this->load($group, $namespace, $collection); + return array_get($this->items[$collection], $item, $default); + } + public function set($key, $value) + { + list($namespace, $group, $item) = $this->parseKey($key); + $collection = $this->getCollection($group, $namespace); + $this->load($group, $namespace, $collection); + if (is_null($item)) { + $this->items[$collection] = $value; + } else { + array_set($this->items[$collection], $item, $value); + } + } + protected function load($group, $namespace, $collection) + { + $env = $this->environment; + if (isset($this->items[$collection])) { + return; + } + $items = $this->loader->load($env, $group, $namespace); + if (isset($this->afterLoad[$namespace])) { + $items = $this->callAfterLoad($namespace, $group, $items); + } + $this->items[$collection] = $items; + } + protected function callAfterLoad($namespace, $group, $items) + { + $callback = $this->afterLoad[$namespace]; + return call_user_func($callback, $this, $group, $items); + } + protected function parseNamespacedSegments($key) + { + list($namespace, $item) = explode('::', $key); + if (in_array($namespace, $this->packages)) { + return $this->parsePackageSegments($key, $namespace, $item); + } + return parent::parseNamespacedSegments($key); + } + protected function parsePackageSegments($key, $namespace, $item) + { + $itemSegments = explode('.', $item); + if (!$this->loader->exists($itemSegments[0], $namespace)) { + return array($namespace, 'config', $item); + } + return parent::parseNamespacedSegments($key); + } + public function package($package, $hint, $namespace = null) + { + $namespace = $this->getPackageNamespace($package, $namespace); + $this->packages[] = $namespace; + $this->addNamespace($namespace, $hint); + $this->afterLoading($namespace, function ($me, $group, $items) use($package) { + $env = $me->getEnvironment(); + $loader = $me->getLoader(); + return $loader->cascadePackage($env, $package, $group, $items); + }); + } + protected function getPackageNamespace($package, $namespace) + { + if (is_null($namespace)) { + list($vendor, $namespace) = explode('/', $package); + } + return $namespace; + } + public function afterLoading($namespace, Closure $callback) + { + $this->afterLoad[$namespace] = $callback; + } + protected function getCollection($group, $namespace = null) + { + $namespace = $namespace ?: '*'; + return $namespace . '::' . $group; + } + public function addNamespace($namespace, $hint) + { + $this->loader->addNamespace($namespace, $hint); + } + public function getNamespaces() + { + return $this->loader->getNamespaces(); + } + public function getLoader() + { + return $this->loader; + } + public function setLoader(LoaderInterface $loader) + { + $this->loader = $loader; + } + public function getEnvironment() + { + return $this->environment; + } + public function getAfterLoadCallbacks() + { + return $this->afterLoad; + } + public function getItems() + { + return $this->items; + } + public function offsetExists($key) + { + return $this->has($key); + } + public function offsetGet($key) + { + return $this->get($key); + } + public function offsetSet($key, $value) + { + $this->set($key, $value); + } + public function offsetUnset($key) + { + $this->set($key, null); + } +} +namespace Illuminate\Support; + +class NamespacedItemResolver +{ + protected $parsed = array(); + public function parseKey($key) + { + if (isset($this->parsed[$key])) { + return $this->parsed[$key]; + } + if (strpos($key, '::') === false) { + $segments = explode('.', $key); + $parsed = $this->parseBasicSegments($segments); + } else { + $parsed = $this->parseNamespacedSegments($key); + } + return $this->parsed[$key] = $parsed; + } + protected function parseBasicSegments(array $segments) + { + $group = $segments[0]; + if (count($segments) == 1) { + return array(null, $group, null); + } else { + $item = implode('.', array_slice($segments, 1)); + return array(null, $group, $item); + } + } + protected function parseNamespacedSegments($key) + { + list($namespace, $item) = explode('::', $key); + $itemSegments = explode('.', $item); + $groupAndItem = array_slice($this->parseBasicSegments($itemSegments), 1); + return array_merge(array($namespace), $groupAndItem); + } + public function setParsedKey($key, $parsed) + { + $this->parsed[$key] = $parsed; + } +} +namespace Illuminate\Config; + +use Illuminate\Filesystem\Filesystem; +class FileLoader implements LoaderInterface +{ + protected $files; + protected $defaultPath; + protected $hints = array(); + protected $exists = array(); + public function __construct(Filesystem $files, $defaultPath) + { + $this->files = $files; + $this->defaultPath = $defaultPath; + } + public function load($environment, $group, $namespace = null) + { + $items = array(); + $path = $this->getPath($namespace); + if (is_null($path)) { + return $items; + } + $file = "{$path}/{$group}.php"; + if ($this->files->exists($file)) { + $items = $this->getRequire($file); + } + $file = "{$path}/{$environment}/{$group}.php"; + if ($this->files->exists($file)) { + $items = $this->mergeEnvironment($items, $file); + } + return $items; + } + protected function mergeEnvironment(array $items, $file) + { + return array_replace_recursive($items, $this->getRequire($file)); + } + public function exists($group, $namespace = null) + { + $key = $group . $namespace; + if (isset($this->exists[$key])) { + return $this->exists[$key]; + } + $path = $this->getPath($namespace); + if (is_null($path)) { + return $this->exists[$key] = false; + } + $file = "{$path}/{$group}.php"; + $exists = $this->files->exists($file); + return $this->exists[$key] = $exists; + } + public function cascadePackage($env, $package, $group, $items) + { + $file = "packages/{$package}/{$group}.php"; + if ($this->files->exists($path = $this->defaultPath . '/' . $file)) { + $items = array_merge($items, $this->getRequire($path)); + } + $path = $this->getPackagePath($env, $package, $group); + if ($this->files->exists($path)) { + $items = array_merge($items, $this->getRequire($path)); + } + return $items; + } + protected function getPackagePath($env, $package, $group) + { + $file = "packages/{$package}/{$env}/{$group}.php"; + return $this->defaultPath . '/' . $file; + } + protected function getPath($namespace) + { + if (is_null($namespace)) { + return $this->defaultPath; + } elseif (isset($this->hints[$namespace])) { + return $this->hints[$namespace]; + } + } + public function addNamespace($namespace, $hint) + { + $this->hints[$namespace] = $hint; + } + public function getNamespaces() + { + return $this->hints; + } + protected function getRequire($path) + { + return $this->files->getRequire($path); + } + public function getFilesystem() + { + return $this->files; + } +} +namespace Illuminate\Config; + +interface LoaderInterface +{ + public function load($environment, $group, $namespace = null); + public function exists($group, $namespace = null); + public function addNamespace($namespace, $hint); + public function getNamespaces(); + public function cascadePackage($environment, $package, $group, $items); +} +namespace Illuminate\Config; + +interface EnvironmentVariablesLoaderInterface +{ + public function load($environment = null); +} +namespace Illuminate\Config; + +use Illuminate\Filesystem\Filesystem; +class FileEnvironmentVariablesLoader implements EnvironmentVariablesLoaderInterface +{ + protected $files; + protected $path; + public function __construct(Filesystem $files, $path = null) + { + $this->files = $files; + $this->path = $path ?: base_path(); + } + public function load($environment = null) + { + if ($environment == 'production') { + $environment = null; + } + if (!$this->files->exists($path = $this->getFile($environment))) { + return array(); + } + return array_dot($this->files->getRequire($path)); + } + protected function getFile($environment) + { + if ($environment) { + return $this->path . '/.env.' . $environment . '.php'; + } + return $this->path . '/.env.php'; + } +} +namespace Illuminate\Config; + +class EnvironmentVariables +{ + protected $loader; + public function __construct(EnvironmentVariablesLoaderInterface $loader) + { + $this->loader = $loader; + } + public function load($environment = null) + { + foreach ($this->loader->load($environment) as $key => $value) { + $_ENV[$key] = $value; + $_SERVER[$key] = $value; + putenv("{$key}={$value}"); + } + } +} +namespace Illuminate\Filesystem; + +use FilesystemIterator; +use Symfony\Component\Finder\Finder; +class Filesystem +{ + public function exists($path) + { + return file_exists($path); + } + public function get($path) + { + if ($this->isFile($path)) { + return file_get_contents($path); + } + throw new FileNotFoundException("File does not exist at path {$path}"); + } + public function getRequire($path) + { + if ($this->isFile($path)) { + return require $path; + } + throw new FileNotFoundException("File does not exist at path {$path}"); + } + public function requireOnce($file) + { + require_once $file; + } + public function put($path, $contents) + { + return file_put_contents($path, $contents); + } + public function prepend($path, $data) + { + if ($this->exists($path)) { + return $this->put($path, $data . $this->get($path)); + } + return $this->put($path, $data); + } + public function append($path, $data) + { + return file_put_contents($path, $data, FILE_APPEND); + } + public function delete($paths) + { + $paths = is_array($paths) ? $paths : func_get_args(); + $success = true; + foreach ($paths as $path) { + if (!@unlink($path)) { + $success = false; + } + } + return $success; + } + public function move($path, $target) + { + return rename($path, $target); + } + public function copy($path, $target) + { + return copy($path, $target); + } + public function name($path) + { + return pathinfo($path, PATHINFO_FILENAME); + } + public function extension($path) + { + return pathinfo($path, PATHINFO_EXTENSION); + } + public function type($path) + { + return filetype($path); + } + public function size($path) + { + return filesize($path); + } + public function lastModified($path) + { + return filemtime($path); + } + public function isDirectory($directory) + { + return is_dir($directory); + } + public function isWritable($path) + { + return is_writable($path); + } + public function isFile($file) + { + return is_file($file); + } + public function glob($pattern, $flags = 0) + { + return glob($pattern, $flags); + } + public function files($directory) + { + $glob = glob($directory . '/*'); + if ($glob === false) { + return array(); + } + return array_filter($glob, function ($file) { + return filetype($file) == 'file'; + }); + } + public function allFiles($directory) + { + return iterator_to_array(Finder::create()->files()->in($directory), false); + } + public function directories($directory) + { + $directories = array(); + foreach (Finder::create()->in($directory)->directories()->depth(0) as $dir) { + $directories[] = $dir->getPathname(); + } + return $directories; + } + public function makeDirectory($path, $mode = 493, $recursive = false, $force = false) + { + if ($force) { + return @mkdir($path, $mode, $recursive); + } + return mkdir($path, $mode, $recursive); + } + public function copyDirectory($directory, $destination, $options = null) + { + if (!$this->isDirectory($directory)) { + return false; + } + $options = $options ?: FilesystemIterator::SKIP_DOTS; + if (!$this->isDirectory($destination)) { + $this->makeDirectory($destination, 511, true); + } + $items = new FilesystemIterator($directory, $options); + foreach ($items as $item) { + $target = $destination . '/' . $item->getBasename(); + if ($item->isDir()) { + $path = $item->getPathname(); + if (!$this->copyDirectory($path, $target, $options)) { + return false; + } + } else { + if (!$this->copy($item->getPathname(), $target)) { + return false; + } + } + } + return true; + } + public function deleteDirectory($directory, $preserve = false) + { + if (!$this->isDirectory($directory)) { + return false; + } + $items = new FilesystemIterator($directory); + foreach ($items as $item) { + if ($item->isDir()) { + $this->deleteDirectory($item->getPathname()); + } else { + $this->delete($item->getPathname()); + } + } + if (!$preserve) { + @rmdir($directory); + } + return true; + } + public function cleanDirectory($directory) + { + return $this->deleteDirectory($directory, true); + } +} +namespace Illuminate\Foundation; + +class AliasLoader +{ + protected $aliases; + protected $registered = false; + protected static $instance; + public function __construct(array $aliases = array()) + { + $this->aliases = $aliases; + } + public static function getInstance(array $aliases = array()) + { + if (is_null(static::$instance)) { + return static::$instance = new static($aliases); + } + $aliases = array_merge(static::$instance->getAliases(), $aliases); + static::$instance->setAliases($aliases); + return static::$instance; + } + public function load($alias) + { + if (isset($this->aliases[$alias])) { + return class_alias($this->aliases[$alias], $alias); + } + } + public function alias($class, $alias) + { + $this->aliases[$class] = $alias; + } + public function register() + { + if (!$this->registered) { + $this->prependToLoaderStack(); + $this->registered = true; + } + } + protected function prependToLoaderStack() + { + spl_autoload_register(array($this, 'load'), true, true); + } + public function getAliases() + { + return $this->aliases; + } + public function setAliases(array $aliases) + { + $this->aliases = $aliases; + } + public function isRegistered() + { + return $this->registered; + } + public function setRegistered($value) + { + $this->registered = $value; + } + public static function setInstance($loader) + { + static::$instance = $loader; + } +} +namespace Illuminate\Foundation; + +use Illuminate\Filesystem\Filesystem; +class ProviderRepository +{ + protected $files; + protected $manifestPath; + protected $default = array('when' => array()); + public function __construct(Filesystem $files, $manifestPath) + { + $this->files = $files; + $this->manifestPath = $manifestPath; + } + public function load(Application $app, array $providers) + { + $manifest = $this->loadManifest(); + if ($this->shouldRecompile($manifest, $providers)) { + $manifest = $this->compileManifest($app, $providers); + } + if ($app->runningInConsole()) { + $manifest['eager'] = $manifest['providers']; + } + foreach ($manifest['when'] as $provider => $events) { + $this->registerLoadEvents($app, $provider, $events); + } + foreach ($manifest['eager'] as $provider) { + $app->register($this->createProvider($app, $provider)); + } + $app->setDeferredServices($manifest['deferred']); + } + protected function registerLoadEvents(Application $app, $provider, array $events) + { + if (count($events) < 1) { + return; + } + $app->make('events')->listen($events, function () use($app, $provider) { + $app->register($provider); + }); + } + protected function compileManifest(Application $app, $providers) + { + $manifest = $this->freshManifest($providers); + foreach ($providers as $provider) { + $instance = $this->createProvider($app, $provider); + if ($instance->isDeferred()) { + foreach ($instance->provides() as $service) { + $manifest['deferred'][$service] = $provider; + } + $manifest['when'][$provider] = $instance->when(); + } else { + $manifest['eager'][] = $provider; + } + } + return $this->writeManifest($manifest); + } + public function createProvider(Application $app, $provider) + { + return new $provider($app); + } + public function shouldRecompile($manifest, $providers) + { + return is_null($manifest) || $manifest['providers'] != $providers; + } + public function loadManifest() + { + $path = $this->manifestPath . '/services.json'; + if ($this->files->exists($path)) { + $manifest = json_decode($this->files->get($path), true); + return array_merge($this->default, $manifest); + } + } + public function writeManifest($manifest) + { + $path = $this->manifestPath . '/services.json'; + $this->files->put($path, json_encode($manifest, JSON_PRETTY_PRINT)); + return $manifest; + } + protected function freshManifest(array $providers) + { + list($eager, $deferred) = array(array(), array()); + return compact('providers', 'eager', 'deferred'); + } + public function getFilesystem() + { + return $this->files; + } +} +namespace Illuminate\Cookie; + +use Illuminate\Support\ServiceProvider; +class CookieServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app->bindShared('cookie', function ($app) { + $config = $app['config']['session']; + return (new CookieJar())->setDefaultPathAndDomain($config['path'], $config['domain']); + }); + } +} +namespace Illuminate\Database; + +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\ServiceProvider; +use Illuminate\Database\Connectors\ConnectionFactory; +class DatabaseServiceProvider extends ServiceProvider +{ + public function boot() + { + Model::setConnectionResolver($this->app['db']); + Model::setEventDispatcher($this->app['events']); + } + public function register() + { + $this->app->bindShared('db.factory', function ($app) { + return new ConnectionFactory($app); + }); + $this->app->bindShared('db', function ($app) { + return new DatabaseManager($app, $app['db.factory']); + }); + } +} +namespace Illuminate\Encryption; + +use Illuminate\Support\ServiceProvider; +class EncryptionServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app->bindShared('encrypter', function ($app) { + $encrypter = new Encrypter($app['config']['app.key']); + if ($app['config']->has('app.cipher')) { + $encrypter->setCipher($app['config']['app.cipher']); + } + return $encrypter; + }); + } +} +namespace Illuminate\Filesystem; + +use Illuminate\Support\ServiceProvider; +class FilesystemServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app->bindShared('files', function () { + return new Filesystem(); + }); + } +} +namespace Illuminate\Session; + +use Illuminate\Support\ServiceProvider; +class SessionServiceProvider extends ServiceProvider +{ + public function register() + { + $this->setupDefaultDriver(); + $this->registerSessionManager(); + $this->registerSessionDriver(); + } + protected function setupDefaultDriver() + { + if ($this->app->runningInConsole()) { + $this->app['config']['session.driver'] = 'array'; + } + } + protected function registerSessionManager() + { + $this->app->bindShared('session', function ($app) { + return new SessionManager($app); + }); + } + protected function registerSessionDriver() + { + $this->app->bindShared('session.store', function ($app) { + $manager = $app['session']; + return $manager->driver(); + }); + } +} +namespace Illuminate\View; + +use Illuminate\Support\ViewErrorBag; +use Illuminate\View\Engines\PhpEngine; +use Illuminate\Support\ServiceProvider; +use Illuminate\View\Engines\CompilerEngine; +use Illuminate\View\Engines\EngineResolver; +use Illuminate\View\Compilers\BladeCompiler; +class ViewServiceProvider extends ServiceProvider +{ + public function register() + { + $this->registerEngineResolver(); + $this->registerViewFinder(); + $this->registerFactory(); + $this->registerSessionBinder(); + } + public function registerEngineResolver() + { + $this->app->bindShared('view.engine.resolver', function () { + $resolver = new EngineResolver(); + foreach (array('php', 'blade') as $engine) { + $this->{'register' . ucfirst($engine) . 'Engine'}($resolver); + } + return $resolver; + }); + } + public function registerPhpEngine($resolver) + { + $resolver->register('php', function () { + return new PhpEngine(); + }); + } + public function registerBladeEngine($resolver) + { + $app = $this->app; + $app->bindShared('blade.compiler', function ($app) { + $cache = $app['path.storage'] . '/views'; + return new BladeCompiler($app['files'], $cache); + }); + $resolver->register('blade', function () use($app) { + return new CompilerEngine($app['blade.compiler'], $app['files']); + }); + } + public function registerViewFinder() + { + $this->app->bindShared('view.finder', function ($app) { + $paths = $app['config']['view.paths']; + return new FileViewFinder($app['files'], $paths); + }); + } + public function registerFactory() + { + $this->app->bindShared('view', function ($app) { + $resolver = $app['view.engine.resolver']; + $finder = $app['view.finder']; + $env = new Factory($resolver, $finder, $app['events']); + $env->setContainer($app); + $env->share('app', $app); + return $env; + }); + } + protected function registerSessionBinder() + { + list($app, $me) = array($this->app, $this); + $app->booted(function () use($app, $me) { + if ($me->sessionHasErrors($app)) { + $errors = $app['session.store']->get('errors'); + $app['view']->share('errors', $errors); + } else { + $app['view']->share('errors', new ViewErrorBag()); + } + }); + } + public function sessionHasErrors($app) + { + $config = $app['config']['session']; + if (isset($app['session.store']) && !is_null($config['driver'])) { + return $app['session.store']->has('errors'); + } + } +} +namespace Illuminate\Routing; + +interface RouteFiltererInterface +{ + public function filter($name, $callback); + public function callRouteFilter($filter, $parameters, $route, $request, $response = null); +} +namespace Illuminate\Routing; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Illuminate\Events\Dispatcher; +use Illuminate\Container\Container; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +use Symfony\Component\HttpFoundation\Response as SymfonyResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +class Router implements HttpKernelInterface, RouteFiltererInterface +{ + protected $events; + protected $container; + protected $routes; + protected $current; + protected $currentRequest; + protected $controllerDispatcher; + protected $inspector; + protected $filtering = true; + protected $patternFilters = array(); + protected $regexFilters = array(); + protected $binders = array(); + protected $patterns = array(); + protected $groupStack = array(); + public static $verbs = array('GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'); + protected $resourceDefaults = array('index', 'create', 'store', 'show', 'edit', 'update', 'destroy'); + public function __construct(Dispatcher $events, Container $container = null) + { + $this->events = $events; + $this->routes = new RouteCollection(); + $this->container = $container ?: new Container(); + $this->bind('_missing', function ($v) { + return explode('/', $v); + }); + } + public function get($uri, $action) + { + return $this->addRoute(array('GET', 'HEAD'), $uri, $action); + } + public function post($uri, $action) + { + return $this->addRoute('POST', $uri, $action); + } + public function put($uri, $action) + { + return $this->addRoute('PUT', $uri, $action); + } + public function patch($uri, $action) + { + return $this->addRoute('PATCH', $uri, $action); + } + public function delete($uri, $action) + { + return $this->addRoute('DELETE', $uri, $action); + } + public function options($uri, $action) + { + return $this->addRoute('OPTIONS', $uri, $action); + } + public function any($uri, $action) + { + $verbs = array('GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE'); + return $this->addRoute($verbs, $uri, $action); + } + public function match($methods, $uri, $action) + { + return $this->addRoute(array_map('strtoupper', (array) $methods), $uri, $action); + } + public function controllers(array $controllers) + { + foreach ($controllers as $uri => $name) { + $this->controller($uri, $name); + } + } + public function controller($uri, $controller, $names = array()) + { + $prepended = $controller; + if (!empty($this->groupStack)) { + $prepended = $this->prependGroupUses($controller); + } + $routable = $this->getInspector()->getRoutable($prepended, $uri); + foreach ($routable as $method => $routes) { + foreach ($routes as $route) { + $this->registerInspected($route, $controller, $method, $names); + } + } + $this->addFallthroughRoute($controller, $uri); + } + protected function registerInspected($route, $controller, $method, &$names) + { + $action = array('uses' => $controller . '@' . $method); + $action['as'] = array_get($names, $method); + $this->{$route['verb']}($route['uri'], $action); + } + protected function addFallthroughRoute($controller, $uri) + { + $missing = $this->any($uri . '/{_missing}', $controller . '@missingMethod'); + $missing->where('_missing', '(.*)'); + } + public function resource($name, $controller, array $options = array()) + { + if (str_contains($name, '/')) { + $this->prefixedResource($name, $controller, $options); + return; + } + $base = $this->getResourceWildcard(last(explode('.', $name))); + $defaults = $this->resourceDefaults; + foreach ($this->getResourceMethods($defaults, $options) as $m) { + $this->{'addResource' . ucfirst($m)}($name, $base, $controller, $options); + } + } + protected function prefixedResource($name, $controller, array $options) + { + list($name, $prefix) = $this->getResourcePrefix($name); + $callback = function ($me) use($name, $controller, $options) { + $me->resource($name, $controller, $options); + }; + return $this->group(compact('prefix'), $callback); + } + protected function getResourcePrefix($name) + { + $segments = explode('/', $name); + $prefix = implode('/', array_slice($segments, 0, -1)); + return array(end($segments), $prefix); + } + protected function getResourceMethods($defaults, $options) + { + if (isset($options['only'])) { + return array_intersect($defaults, (array) $options['only']); + } elseif (isset($options['except'])) { + return array_diff($defaults, (array) $options['except']); + } + return $defaults; + } + public function getResourceUri($resource) + { + if (!str_contains($resource, '.')) { + return $resource; + } + $segments = explode('.', $resource); + $uri = $this->getNestedResourceUri($segments); + return str_replace('/{' . $this->getResourceWildcard(last($segments)) . '}', '', $uri); + } + protected function getNestedResourceUri(array $segments) + { + return implode('/', array_map(function ($s) { + return $s . '/{' . $this->getResourceWildcard($s) . '}'; + }, $segments)); + } + protected function getResourceAction($resource, $controller, $method, $options) + { + $name = $this->getResourceName($resource, $method, $options); + return array('as' => $name, 'uses' => $controller . '@' . $method); + } + protected function getResourceName($resource, $method, $options) + { + if (isset($options['names'][$method])) { + return $options['names'][$method]; + } + $prefix = isset($options['as']) ? $options['as'] . '.' : ''; + if (empty($this->groupStack)) { + return $prefix . $resource . '.' . $method; + } + return $this->getGroupResourceName($prefix, $resource, $method); + } + protected function getGroupResourceName($prefix, $resource, $method) + { + $group = str_replace('/', '.', $this->getLastGroupPrefix()); + return trim("{$prefix}{$group}.{$resource}.{$method}", '.'); + } + public function getResourceWildcard($value) + { + return str_replace('-', '_', $value); + } + protected function addResourceIndex($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name); + $action = $this->getResourceAction($name, $controller, 'index', $options); + return $this->get($uri, $action); + } + protected function addResourceCreate($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/create'; + $action = $this->getResourceAction($name, $controller, 'create', $options); + return $this->get($uri, $action); + } + protected function addResourceStore($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name); + $action = $this->getResourceAction($name, $controller, 'store', $options); + return $this->post($uri, $action); + } + protected function addResourceShow($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + $action = $this->getResourceAction($name, $controller, 'show', $options); + return $this->get($uri, $action); + } + protected function addResourceEdit($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}/edit'; + $action = $this->getResourceAction($name, $controller, 'edit', $options); + return $this->get($uri, $action); + } + protected function addResourceUpdate($name, $base, $controller, $options) + { + $this->addPutResourceUpdate($name, $base, $controller, $options); + return $this->addPatchResourceUpdate($name, $base, $controller); + } + protected function addPutResourceUpdate($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + $action = $this->getResourceAction($name, $controller, 'update', $options); + return $this->put($uri, $action); + } + protected function addPatchResourceUpdate($name, $base, $controller) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + $this->patch($uri, $controller . '@update'); + } + protected function addResourceDestroy($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + $action = $this->getResourceAction($name, $controller, 'destroy', $options); + return $this->delete($uri, $action); + } + public function group(array $attributes, Closure $callback) + { + $this->updateGroupStack($attributes); + call_user_func($callback, $this); + array_pop($this->groupStack); + } + protected function updateGroupStack(array $attributes) + { + if (!empty($this->groupStack)) { + $attributes = $this->mergeGroup($attributes, last($this->groupStack)); + } + $this->groupStack[] = $attributes; + } + public function mergeWithLastGroup($new) + { + return $this->mergeGroup($new, last($this->groupStack)); + } + public static function mergeGroup($new, $old) + { + $new['namespace'] = static::formatUsesPrefix($new, $old); + $new['prefix'] = static::formatGroupPrefix($new, $old); + if (isset($new['domain'])) { + unset($old['domain']); + } + $new['where'] = array_merge(array_get($old, 'where', array()), array_get($new, 'where', array())); + return array_merge_recursive(array_except($old, array('namespace', 'prefix', 'where')), $new); + } + protected static function formatUsesPrefix($new, $old) + { + if (isset($new['namespace']) && isset($old['namespace'])) { + return trim(array_get($old, 'namespace'), '\\') . '\\' . trim($new['namespace'], '\\'); + } elseif (isset($new['namespace'])) { + return trim($new['namespace'], '\\'); + } + return array_get($old, 'namespace'); + } + protected static function formatGroupPrefix($new, $old) + { + if (isset($new['prefix'])) { + return trim(array_get($old, 'prefix'), '/') . '/' . trim($new['prefix'], '/'); + } + return array_get($old, 'prefix'); + } + protected function getLastGroupPrefix() + { + if (!empty($this->groupStack)) { + $last = end($this->groupStack); + return isset($last['prefix']) ? $last['prefix'] : ''; + } + return ''; + } + protected function addRoute($methods, $uri, $action) + { + return $this->routes->add($this->createRoute($methods, $uri, $action)); + } + protected function createRoute($methods, $uri, $action) + { + if ($this->routingToController($action)) { + $action = $this->getControllerAction($action); + } + $route = $this->newRoute($methods, $uri = $this->prefix($uri), $action); + if (!empty($this->groupStack)) { + $this->mergeController($route); + } + $this->addWhereClausesToRoute($route); + return $route; + } + protected function newRoute($methods, $uri, $action) + { + return new Route($methods, $uri, $action); + } + protected function prefix($uri) + { + return trim(trim($this->getLastGroupPrefix(), '/') . '/' . trim($uri, '/'), '/') ?: '/'; + } + protected function addWhereClausesToRoute($route) + { + $route->where(array_merge($this->patterns, array_get($route->getAction(), 'where', array()))); + return $route; + } + protected function mergeController($route) + { + $action = $this->mergeWithLastGroup($route->getAction()); + $route->setAction($action); + } + protected function routingToController($action) + { + if ($action instanceof Closure) { + return false; + } + return is_string($action) || is_string(array_get($action, 'uses')); + } + protected function getControllerAction($action) + { + if (is_string($action)) { + $action = array('uses' => $action); + } + if (!empty($this->groupStack)) { + $action['uses'] = $this->prependGroupUses($action['uses']); + } + $action['controller'] = $action['uses']; + $closure = $this->getClassClosure($action['uses']); + return array_set($action, 'uses', $closure); + } + protected function getClassClosure($controller) + { + $d = $this->getControllerDispatcher(); + return function () use($d, $controller) { + $route = $this->current(); + $request = $this->getCurrentRequest(); + list($class, $method) = explode('@', $controller); + return $d->dispatch($route, $request, $class, $method); + }; + } + protected function prependGroupUses($uses) + { + $group = last($this->groupStack); + return isset($group['namespace']) ? $group['namespace'] . '\\' . $uses : $uses; + } + public function dispatch(Request $request) + { + $this->currentRequest = $request; + $response = $this->callFilter('before', $request); + if (is_null($response)) { + $response = $this->dispatchToRoute($request); + } + $response = $this->prepareResponse($request, $response); + $this->callFilter('after', $request, $response); + return $response; + } + public function dispatchToRoute(Request $request) + { + $route = $this->findRoute($request); + $this->events->fire('router.matched', array($route, $request)); + $response = $this->callRouteBefore($route, $request); + if (is_null($response)) { + $response = $route->run($request); + } + $response = $this->prepareResponse($request, $response); + $this->callRouteAfter($route, $request, $response); + return $response; + } + protected function findRoute($request) + { + $this->current = $route = $this->routes->match($request); + return $this->substituteBindings($route); + } + protected function substituteBindings($route) + { + foreach ($route->parameters() as $key => $value) { + if (isset($this->binders[$key])) { + $route->setParameter($key, $this->performBinding($key, $value, $route)); + } + } + return $route; + } + protected function performBinding($key, $value, $route) + { + return call_user_func($this->binders[$key], $value, $route); + } + public function matched($callback) + { + $this->events->listen('router.matched', $callback); + } + public function before($callback) + { + $this->addGlobalFilter('before', $callback); + } + public function after($callback) + { + $this->addGlobalFilter('after', $callback); + } + protected function addGlobalFilter($filter, $callback) + { + $this->events->listen('router.' . $filter, $this->parseFilter($callback)); + } + public function filter($name, $callback) + { + $this->events->listen('router.filter: ' . $name, $this->parseFilter($callback)); + } + protected function parseFilter($callback) + { + if (is_string($callback) && !str_contains($callback, '@')) { + return $callback . '@filter'; + } + return $callback; + } + public function when($pattern, $name, $methods = null) + { + if (!is_null($methods)) { + $methods = array_map('strtoupper', (array) $methods); + } + $this->patternFilters[$pattern][] = compact('name', 'methods'); + } + public function whenRegex($pattern, $name, $methods = null) + { + if (!is_null($methods)) { + $methods = array_map('strtoupper', (array) $methods); + } + $this->regexFilters[$pattern][] = compact('name', 'methods'); + } + public function model($key, $class, Closure $callback = null) + { + $this->bind($key, function ($value) use($class, $callback) { + if (is_null($value)) { + return null; + } + if ($model = (new $class())->find($value)) { + return $model; + } + if ($callback instanceof Closure) { + return call_user_func($callback); + } + throw new NotFoundHttpException(); + }); + } + public function bind($key, $binder) + { + if (is_string($binder)) { + $binder = $this->createClassBinding($binder); + } + $this->binders[str_replace('-', '_', $key)] = $binder; + } + public function createClassBinding($binding) + { + return function ($value, $route) use($binding) { + $segments = explode('@', $binding); + $method = count($segments) == 2 ? $segments[1] : 'bind'; + $callable = array($this->container->make($segments[0]), $method); + return call_user_func($callable, $value, $route); + }; + } + public function pattern($key, $pattern) + { + $this->patterns[$key] = $pattern; + } + public function patterns($patterns) + { + foreach ($patterns as $key => $pattern) { + $this->pattern($key, $pattern); + } + } + protected function callFilter($filter, $request, $response = null) + { + if (!$this->filtering) { + return null; + } + return $this->events->until('router.' . $filter, array($request, $response)); + } + public function callRouteBefore($route, $request) + { + $response = $this->callPatternFilters($route, $request); + return $response ?: $this->callAttachedBefores($route, $request); + } + protected function callPatternFilters($route, $request) + { + foreach ($this->findPatternFilters($request) as $filter => $parameters) { + $response = $this->callRouteFilter($filter, $parameters, $route, $request); + if (!is_null($response)) { + return $response; + } + } + } + public function findPatternFilters($request) + { + $results = array(); + list($path, $method) = array($request->path(), $request->getMethod()); + foreach ($this->patternFilters as $pattern => $filters) { + if (str_is($pattern, $path)) { + $merge = $this->patternsByMethod($method, $filters); + $results = array_merge($results, $merge); + } + } + foreach ($this->regexFilters as $pattern => $filters) { + if (preg_match($pattern, $path)) { + $merge = $this->patternsByMethod($method, $filters); + $results = array_merge($results, $merge); + } + } + return $results; + } + protected function patternsByMethod($method, $filters) + { + $results = array(); + foreach ($filters as $filter) { + if ($this->filterSupportsMethod($filter, $method)) { + $parsed = Route::parseFilters($filter['name']); + $results = array_merge($results, $parsed); + } + } + return $results; + } + protected function filterSupportsMethod($filter, $method) + { + $methods = $filter['methods']; + return is_null($methods) || in_array($method, $methods); + } + protected function callAttachedBefores($route, $request) + { + foreach ($route->beforeFilters() as $filter => $parameters) { + $response = $this->callRouteFilter($filter, $parameters, $route, $request); + if (!is_null($response)) { + return $response; + } + } + } + public function callRouteAfter($route, $request, $response) + { + foreach ($route->afterFilters() as $filter => $parameters) { + $this->callRouteFilter($filter, $parameters, $route, $request, $response); + } + } + public function callRouteFilter($filter, $parameters, $route, $request, $response = null) + { + if (!$this->filtering) { + return null; + } + $data = array_merge(array($route, $request, $response), $parameters); + return $this->events->until('router.filter: ' . $filter, $this->cleanFilterParameters($data)); + } + protected function cleanFilterParameters(array $parameters) + { + return array_filter($parameters, function ($p) { + return !is_null($p) && $p !== ''; + }); + } + protected function prepareResponse($request, $response) + { + if (!$response instanceof SymfonyResponse) { + $response = new Response($response); + } + return $response->prepare($request); + } + public function withoutFilters(callable $callback) + { + $this->disableFilters(); + call_user_func($callback); + $this->enableFilters(); + } + public function enableFilters() + { + $this->filtering = true; + } + public function disableFilters() + { + $this->filtering = false; + } + public function input($key, $default = null) + { + return $this->current()->parameter($key, $default); + } + public function getCurrentRoute() + { + return $this->current(); + } + public function current() + { + return $this->current; + } + public function has($name) + { + return $this->routes->hasNamedRoute($name); + } + public function currentRouteName() + { + return $this->current() ? $this->current()->getName() : null; + } + public function is() + { + foreach (func_get_args() as $pattern) { + if (str_is($pattern, $this->currentRouteName())) { + return true; + } + } + return false; + } + public function currentRouteNamed($name) + { + return $this->current() ? $this->current()->getName() == $name : false; + } + public function currentRouteAction() + { + if (!$this->current()) { + return; + } + $action = $this->current()->getAction(); + return isset($action['controller']) ? $action['controller'] : null; + } + public function uses() + { + foreach (func_get_args() as $pattern) { + if (str_is($pattern, $this->currentRouteAction())) { + return true; + } + } + return false; + } + public function currentRouteUses($action) + { + return $this->currentRouteAction() == $action; + } + public function getCurrentRequest() + { + return $this->currentRequest; + } + public function getRoutes() + { + return $this->routes; + } + public function getControllerDispatcher() + { + if (is_null($this->controllerDispatcher)) { + $this->controllerDispatcher = new ControllerDispatcher($this, $this->container); + } + return $this->controllerDispatcher; + } + public function setControllerDispatcher(ControllerDispatcher $dispatcher) + { + $this->controllerDispatcher = $dispatcher; + } + public function getInspector() + { + return $this->inspector ?: ($this->inspector = new ControllerInspector()); + } + public function getPatterns() + { + return $this->patterns; + } + public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + return $this->dispatch(Request::createFromBase($request)); + } +} +namespace Illuminate\Routing; + +use Illuminate\Http\Request; +use Illuminate\Routing\Matching\UriValidator; +use Illuminate\Routing\Matching\HostValidator; +use Illuminate\Routing\Matching\MethodValidator; +use Illuminate\Routing\Matching\SchemeValidator; +use Symfony\Component\Routing\Route as SymfonyRoute; +class Route +{ + protected $uri; + protected $methods; + protected $action; + protected $defaults = array(); + protected $wheres = array(); + protected $parameters; + protected $parameterNames; + protected $compiled; + protected static $validators; + public function __construct($methods, $uri, $action) + { + $this->uri = $uri; + $this->methods = (array) $methods; + $this->action = $this->parseAction($action); + if (in_array('GET', $this->methods) && !in_array('HEAD', $this->methods)) { + $this->methods[] = 'HEAD'; + } + if (isset($this->action['prefix'])) { + $this->prefix($this->action['prefix']); + } + } + public function run() + { + $parameters = array_filter($this->parameters(), function ($p) { + return isset($p); + }); + return call_user_func_array($this->action['uses'], $parameters); + } + public function matches(Request $request, $includingMethod = true) + { + $this->compileRoute(); + foreach ($this->getValidators() as $validator) { + if (!$includingMethod && $validator instanceof MethodValidator) { + continue; + } + if (!$validator->matches($this, $request)) { + return false; + } + } + return true; + } + protected function compileRoute() + { + $optionals = $this->extractOptionalParameters(); + $uri = preg_replace('/\\{(\\w+?)\\?\\}/', '{$1}', $this->uri); + $this->compiled = with(new SymfonyRoute($uri, $optionals, $this->wheres, array(), $this->domain() ?: ''))->compile(); + } + protected function extractOptionalParameters() + { + preg_match_all('/\\{(\\w+?)\\?\\}/', $this->uri, $matches); + return isset($matches[1]) ? array_fill_keys($matches[1], null) : array(); + } + public function beforeFilters() + { + if (!isset($this->action['before'])) { + return array(); + } + return $this->parseFilters($this->action['before']); + } + public function afterFilters() + { + if (!isset($this->action['after'])) { + return array(); + } + return $this->parseFilters($this->action['after']); + } + public static function parseFilters($filters) + { + return array_build(static::explodeFilters($filters), function ($key, $value) { + return Route::parseFilter($value); + }); + } + protected static function explodeFilters($filters) + { + if (is_array($filters)) { + return static::explodeArrayFilters($filters); + } + return array_map('trim', explode('|', $filters)); + } + protected static function explodeArrayFilters(array $filters) + { + $results = array(); + foreach ($filters as $filter) { + $results = array_merge($results, array_map('trim', explode('|', $filter))); + } + return $results; + } + public static function parseFilter($filter) + { + if (!str_contains($filter, ':')) { + return array($filter, array()); + } + return static::parseParameterFilter($filter); + } + protected static function parseParameterFilter($filter) + { + list($name, $parameters) = explode(':', $filter, 2); + return array($name, explode(',', $parameters)); + } + public function getParameter($name, $default = null) + { + return $this->parameter($name, $default); + } + public function parameter($name, $default = null) + { + return array_get($this->parameters(), $name, $default); + } + public function setParameter($name, $value) + { + $this->parameters(); + $this->parameters[$name] = $value; + } + public function forgetParameter($name) + { + $this->parameters(); + unset($this->parameters[$name]); + } + public function parameters() + { + if (isset($this->parameters)) { + return array_map(function ($value) { + return is_string($value) ? rawurldecode($value) : $value; + }, $this->parameters); + } + throw new \LogicException('Route is not bound.'); + } + public function parametersWithoutNulls() + { + return array_filter($this->parameters(), function ($p) { + return !is_null($p); + }); + } + public function parameterNames() + { + if (isset($this->parameterNames)) { + return $this->parameterNames; + } + return $this->parameterNames = $this->compileParameterNames(); + } + protected function compileParameterNames() + { + preg_match_all('/\\{(.*?)\\}/', $this->domain() . $this->uri, $matches); + return array_map(function ($m) { + return trim($m, '?'); + }, $matches[1]); + } + public function bind(Request $request) + { + $this->compileRoute(); + $this->bindParameters($request); + return $this; + } + public function bindParameters(Request $request) + { + $params = $this->matchToKeys(array_slice($this->bindPathParameters($request), 1)); + if (!is_null($this->compiled->getHostRegex())) { + $params = $this->bindHostParameters($request, $params); + } + return $this->parameters = $this->replaceDefaults($params); + } + protected function bindPathParameters(Request $request) + { + preg_match($this->compiled->getRegex(), '/' . $request->decodedPath(), $matches); + return $matches; + } + protected function bindHostParameters(Request $request, $parameters) + { + preg_match($this->compiled->getHostRegex(), $request->getHost(), $matches); + return array_merge($this->matchToKeys(array_slice($matches, 1)), $parameters); + } + protected function matchToKeys(array $matches) + { + if (count($this->parameterNames()) == 0) { + return array(); + } + $parameters = array_intersect_key($matches, array_flip($this->parameterNames())); + return array_filter($parameters, function ($value) { + return is_string($value) && strlen($value) > 0; + }); + } + protected function replaceDefaults(array $parameters) + { + foreach ($parameters as $key => &$value) { + $value = isset($value) ? $value : array_get($this->defaults, $key); + } + return $parameters; + } + protected function parseAction($action) + { + if (is_callable($action)) { + return array('uses' => $action); + } elseif (!isset($action['uses'])) { + $action['uses'] = $this->findClosure($action); + } + return $action; + } + protected function findClosure(array $action) + { + return array_first($action, function ($key, $value) { + return is_callable($value); + }); + } + public static function getValidators() + { + if (isset(static::$validators)) { + return static::$validators; + } + return static::$validators = array(new MethodValidator(), new SchemeValidator(), new HostValidator(), new UriValidator()); + } + public function before($filters) + { + return $this->addFilters('before', $filters); + } + public function after($filters) + { + return $this->addFilters('after', $filters); + } + protected function addFilters($type, $filters) + { + $filters = static::explodeFilters($filters); + if (isset($this->action[$type])) { + $existing = static::explodeFilters($this->action[$type]); + $this->action[$type] = array_merge($existing, $filters); + } else { + $this->action[$type] = $filters; + } + return $this; + } + public function defaults($key, $value) + { + $this->defaults[$key] = $value; + return $this; + } + public function where($name, $expression = null) + { + foreach ($this->parseWhere($name, $expression) as $name => $expression) { + $this->wheres[$name] = $expression; + } + return $this; + } + protected function parseWhere($name, $expression) + { + return is_array($name) ? $name : array($name => $expression); + } + protected function whereArray(array $wheres) + { + foreach ($wheres as $name => $expression) { + $this->where($name, $expression); + } + return $this; + } + public function prefix($prefix) + { + $this->uri = trim($prefix, '/') . '/' . trim($this->uri, '/'); + return $this; + } + public function getPath() + { + return $this->uri(); + } + public function uri() + { + return $this->uri; + } + public function getMethods() + { + return $this->methods(); + } + public function methods() + { + return $this->methods; + } + public function httpOnly() + { + return in_array('http', $this->action, true); + } + public function httpsOnly() + { + return $this->secure(); + } + public function secure() + { + return in_array('https', $this->action, true); + } + public function domain() + { + return isset($this->action['domain']) ? $this->action['domain'] : null; + } + public function getUri() + { + return $this->uri; + } + public function setUri($uri) + { + $this->uri = $uri; + return $this; + } + public function getPrefix() + { + return isset($this->action['prefix']) ? $this->action['prefix'] : null; + } + public function getName() + { + return isset($this->action['as']) ? $this->action['as'] : null; + } + public function getActionName() + { + return isset($this->action['controller']) ? $this->action['controller'] : 'Closure'; + } + public function getAction() + { + return $this->action; + } + public function setAction(array $action) + { + $this->action = $action; + return $this; + } + public function getCompiled() + { + return $this->compiled; + } +} +namespace Illuminate\Routing; + +use Countable; +use ArrayIterator; +use IteratorAggregate; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +class RouteCollection implements Countable, IteratorAggregate +{ + protected $routes = array(); + protected $allRoutes = array(); + protected $nameList = array(); + protected $actionList = array(); + public function add(Route $route) + { + $this->addToCollections($route); + $this->addLookups($route); + return $route; + } + protected function addToCollections($route) + { + $domainAndUri = $route->domain() . $route->getUri(); + foreach ($route->methods() as $method) { + $this->routes[$method][$domainAndUri] = $route; + } + $this->allRoutes[$method . $domainAndUri] = $route; + } + protected function addLookups($route) + { + $action = $route->getAction(); + if (isset($action['as'])) { + $this->nameList[$action['as']] = $route; + } + if (isset($action['controller'])) { + $this->addToActionList($action, $route); + } + } + protected function addToActionList($action, $route) + { + if (!isset($this->actionList[$action['controller']])) { + $this->actionList[$action['controller']] = $route; + } + } + public function match(Request $request) + { + $routes = $this->get($request->getMethod()); + $route = $this->check($routes, $request); + if (!is_null($route)) { + return $route->bind($request); + } + $others = $this->checkForAlternateVerbs($request); + if (count($others) > 0) { + return $this->getOtherMethodsRoute($request, $others); + } + throw new NotFoundHttpException(); + } + protected function checkForAlternateVerbs($request) + { + $methods = array_diff(Router::$verbs, array($request->getMethod())); + $others = array(); + foreach ($methods as $method) { + if (!is_null($this->check($this->get($method), $request, false))) { + $others[] = $method; + } + } + return $others; + } + protected function getOtherMethodsRoute($request, array $others) + { + if ($request->method() == 'OPTIONS') { + return (new Route('OPTIONS', $request->path(), function () use($others) { + return new Response('', 200, array('Allow' => implode(',', $others))); + }))->bind($request); + } + $this->methodNotAllowed($others); + } + protected function methodNotAllowed(array $others) + { + throw new MethodNotAllowedHttpException($others); + } + protected function check(array $routes, $request, $includingMethod = true) + { + return array_first($routes, function ($key, $value) use($request, $includingMethod) { + return $value->matches($request, $includingMethod); + }); + } + protected function get($method = null) + { + if (is_null($method)) { + return $this->getRoutes(); + } + return array_get($this->routes, $method, array()); + } + public function hasNamedRoute($name) + { + return !is_null($this->getByName($name)); + } + public function getByName($name) + { + return isset($this->nameList[$name]) ? $this->nameList[$name] : null; + } + public function getByAction($action) + { + return isset($this->actionList[$action]) ? $this->actionList[$action] : null; + } + public function getRoutes() + { + return array_values($this->allRoutes); + } + public function getIterator() + { + return new ArrayIterator($this->getRoutes()); + } + public function count() + { + return count($this->getRoutes()); + } +} +namespace Illuminate\Routing; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Container\Container; +class ControllerDispatcher +{ + protected $filterer; + protected $container; + public function __construct(RouteFiltererInterface $filterer, Container $container = null) + { + $this->filterer = $filterer; + $this->container = $container; + } + public function dispatch(Route $route, Request $request, $controller, $method) + { + $instance = $this->makeController($controller); + $this->assignAfter($instance, $route, $request, $method); + $response = $this->before($instance, $route, $request, $method); + if (is_null($response)) { + $response = $this->call($instance, $route, $method); + } + return $response; + } + protected function makeController($controller) + { + Controller::setFilterer($this->filterer); + return $this->container->make($controller); + } + protected function call($instance, $route, $method) + { + $parameters = $route->parametersWithoutNulls(); + return $instance->callAction($method, $parameters); + } + protected function before($instance, $route, $request, $method) + { + foreach ($instance->getBeforeFilters() as $filter) { + if ($this->filterApplies($filter, $request, $method)) { + $response = $this->callFilter($filter, $route, $request); + if (!is_null($response)) { + return $response; + } + } + } + } + protected function assignAfter($instance, $route, $request, $method) + { + foreach ($instance->getAfterFilters() as $filter) { + if ($this->filterApplies($filter, $request, $method)) { + $route->after($this->getAssignableAfter($filter)); + } + } + } + protected function getAssignableAfter($filter) + { + return $filter['original'] instanceof Closure ? $filter['filter'] : $filter['original']; + } + protected function filterApplies($filter, $request, $method) + { + foreach (array('Only', 'Except', 'On') as $type) { + if ($this->{"filterFails{$type}"}($filter, $request, $method)) { + return false; + } + } + return true; + } + protected function filterFailsOnly($filter, $request, $method) + { + if (!isset($filter['options']['only'])) { + return false; + } + return !in_array($method, (array) $filter['options']['only']); + } + protected function filterFailsExcept($filter, $request, $method) + { + if (!isset($filter['options']['except'])) { + return false; + } + return in_array($method, (array) $filter['options']['except']); + } + protected function filterFailsOn($filter, $request, $method) + { + $on = array_get($filter, 'options.on'); + if (is_null($on)) { + return false; + } + if (is_string($on)) { + $on = explode('|', $on); + } + return !in_array(strtolower($request->getMethod()), $on); + } + protected function callFilter($filter, $route, $request) + { + extract($filter); + return $this->filterer->callRouteFilter($filter, $parameters, $route, $request); + } +} +namespace Illuminate\Routing; + +use Illuminate\Http\Request; +use InvalidArgumentException; +class UrlGenerator +{ + protected $routes; + protected $request; + protected $forcedRoot; + protected $forceSchema; + protected $dontEncode = array('%2F' => '/', '%40' => '@', '%3A' => ':', '%3B' => ';', '%2C' => ',', '%3D' => '=', '%2B' => '+', '%21' => '!', '%2A' => '*', '%7C' => '|'); + public function __construct(RouteCollection $routes, Request $request) + { + $this->routes = $routes; + $this->setRequest($request); + } + public function full() + { + return $this->request->fullUrl(); + } + public function current() + { + return $this->to($this->request->getPathInfo()); + } + public function previous() + { + return $this->to($this->request->headers->get('referer')); + } + public function to($path, $extra = array(), $secure = null) + { + if ($this->isValidUrl($path)) { + return $path; + } + $scheme = $this->getScheme($secure); + $tail = implode('/', array_map('rawurlencode', (array) $extra)); + $root = $this->getRootUrl($scheme); + return $this->trimUrl($root, $path, $tail); + } + public function secure($path, $parameters = array()) + { + return $this->to($path, $parameters, true); + } + public function asset($path, $secure = null) + { + if ($this->isValidUrl($path)) { + return $path; + } + $root = $this->getRootUrl($this->getScheme($secure)); + return $this->removeIndex($root) . '/' . trim($path, '/'); + } + protected function removeIndex($root) + { + $i = 'index.php'; + return str_contains($root, $i) ? str_replace('/' . $i, '', $root) : $root; + } + public function secureAsset($path) + { + return $this->asset($path, true); + } + protected function getScheme($secure) + { + if (is_null($secure)) { + return $this->forceSchema ?: $this->request->getScheme() . '://'; + } + return $secure ? 'https://' : 'http://'; + } + public function forceSchema($schema) + { + $this->forceSchema = $schema . '://'; + } + public function route($name, $parameters = array(), $absolute = true, $route = null) + { + $route = $route ?: $this->routes->getByName($name); + $parameters = (array) $parameters; + if (!is_null($route)) { + return $this->toRoute($route, $parameters, $absolute); + } + throw new InvalidArgumentException("Route [{$name}] not defined."); + } + protected function toRoute($route, array $parameters, $absolute) + { + $domain = $this->getRouteDomain($route, $parameters); + $uri = strtr(rawurlencode($this->trimUrl($root = $this->replaceRoot($route, $domain, $parameters), $this->replaceRouteParameters($route->uri(), $parameters))), $this->dontEncode) . $this->getRouteQueryString($parameters); + return $absolute ? $uri : '/' . ltrim(str_replace($root, '', $uri), '/'); + } + protected function replaceRoot($route, $domain, &$parameters) + { + return $this->replaceRouteParameters($this->getRouteRoot($route, $domain), $parameters); + } + protected function replaceRouteParameters($path, array &$parameters) + { + if (count($parameters)) { + $path = preg_replace_sub('/\\{.*?\\}/', $parameters, $this->replaceNamedParameters($path, $parameters)); + } + return trim(preg_replace('/\\{.*?\\?\\}/', '', $path), '/'); + } + protected function replaceNamedParameters($path, &$parameters) + { + return preg_replace_callback('/\\{(.*?)\\??\\}/', function ($m) use(&$parameters) { + return isset($parameters[$m[1]]) ? array_pull($parameters, $m[1]) : $m[0]; + }, $path); + } + protected function getRouteQueryString(array $parameters) + { + if (count($parameters) == 0) { + return ''; + } + $query = http_build_query($keyed = $this->getStringParameters($parameters)); + if (count($keyed) < count($parameters)) { + $query .= '&' . implode('&', $this->getNumericParameters($parameters)); + } + return '?' . trim($query, '&'); + } + protected function getStringParameters(array $parameters) + { + return array_where($parameters, function ($k, $v) { + return is_string($k); + }); + } + protected function getNumericParameters(array $parameters) + { + return array_where($parameters, function ($k, $v) { + return is_numeric($k); + }); + } + protected function getRouteDomain($route, &$parameters) + { + return $route->domain() ? $this->formatDomain($route, $parameters) : null; + } + protected function formatDomain($route, &$parameters) + { + return $this->addPortToDomain($this->getDomainAndScheme($route)); + } + protected function getDomainAndScheme($route) + { + return $this->getRouteScheme($route) . $route->domain(); + } + protected function addPortToDomain($domain) + { + if (in_array($this->request->getPort(), array('80', '443'))) { + return $domain; + } + return $domain . ':' . $this->request->getPort(); + } + protected function getRouteRoot($route, $domain) + { + return $this->getRootUrl($this->getRouteScheme($route), $domain); + } + protected function getRouteScheme($route) + { + if ($route->httpOnly()) { + return $this->getScheme(false); + } elseif ($route->httpsOnly()) { + return $this->getScheme(true); + } + return $this->getScheme(null); + } + public function action($action, $parameters = array(), $absolute = true) + { + return $this->route($action, $parameters, $absolute, $this->routes->getByAction($action)); + } + protected function getRootUrl($scheme, $root = null) + { + if (is_null($root)) { + $root = $this->forcedRoot ?: $this->request->root(); + } + $start = starts_with($root, 'http://') ? 'http://' : 'https://'; + return preg_replace('~' . $start . '~', $scheme, $root, 1); + } + public function forceRootUrl($root) + { + $this->forcedRoot = $root; + } + public function isValidUrl($path) + { + if (starts_with($path, array('#', '//', 'mailto:', 'tel:', 'http://', 'https://'))) { + return true; + } + return filter_var($path, FILTER_VALIDATE_URL) !== false; + } + protected function trimUrl($root, $path, $tail = '') + { + return trim($root . '/' . trim($path . '/' . $tail, '/'), '/'); + } + public function getRequest() + { + return $this->request; + } + public function setRequest(Request $request) + { + $this->request = $request; + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +interface ValidatorInterface +{ + public function matches(Route $route, Request $request); +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class HostValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + if (is_null($route->getCompiled()->getHostRegex())) { + return true; + } + return preg_match($route->getCompiled()->getHostRegex(), $request->getHost()); + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class MethodValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + return in_array($request->getMethod(), $route->methods()); + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class SchemeValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + if ($route->httpOnly()) { + return !$request->secure(); + } elseif ($route->secure()) { + return $request->secure(); + } + return true; + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class UriValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + $path = $request->path() == '/' ? '/' : '/' . $request->path(); + return preg_match($route->getCompiled()->getRegex(), rawurldecode($path)); + } +} +namespace Illuminate\Workbench; + +use Illuminate\Support\ServiceProvider; +use Illuminate\Workbench\Console\WorkbenchMakeCommand; +class WorkbenchServiceProvider extends ServiceProvider +{ + protected $defer = false; + public function register() + { + $this->app->bindShared('package.creator', function ($app) { + return new PackageCreator($app['files']); + }); + $this->app->bindShared('command.workbench', function ($app) { + return new WorkbenchMakeCommand($app['package.creator']); + }); + $this->commands('command.workbench'); + } + public function provides() + { + return array('package.creator', 'command.workbench'); + } +} +namespace Illuminate\Events; + +use Illuminate\Container\Container; +class Dispatcher +{ + protected $container; + protected $listeners = array(); + protected $wildcards = array(); + protected $sorted = array(); + protected $firing = array(); + public function __construct(Container $container = null) + { + $this->container = $container ?: new Container(); + } + public function listen($events, $listener, $priority = 0) + { + foreach ((array) $events as $event) { + if (str_contains($event, '*')) { + $this->setupWildcardListen($event, $listener); + } else { + $this->listeners[$event][$priority][] = $this->makeListener($listener); + unset($this->sorted[$event]); + } + } + } + protected function setupWildcardListen($event, $listener) + { + $this->wildcards[$event][] = $this->makeListener($listener); + } + public function hasListeners($eventName) + { + return isset($this->listeners[$eventName]); + } + public function queue($event, $payload = array()) + { + $this->listen($event . '_queue', function () use($event, $payload) { + $this->fire($event, $payload); + }); + } + public function subscribe($subscriber) + { + $subscriber = $this->resolveSubscriber($subscriber); + $subscriber->subscribe($this); + } + protected function resolveSubscriber($subscriber) + { + if (is_string($subscriber)) { + return $this->container->make($subscriber); + } + return $subscriber; + } + public function until($event, $payload = array()) + { + return $this->fire($event, $payload, true); + } + public function flush($event) + { + $this->fire($event . '_queue'); + } + public function firing() + { + return last($this->firing); + } + public function fire($event, $payload = array(), $halt = false) + { + $responses = array(); + if (!is_array($payload)) { + $payload = array($payload); + } + $this->firing[] = $event; + foreach ($this->getListeners($event) as $listener) { + $response = call_user_func_array($listener, $payload); + if (!is_null($response) && $halt) { + array_pop($this->firing); + return $response; + } + if ($response === false) { + break; + } + $responses[] = $response; + } + array_pop($this->firing); + return $halt ? null : $responses; + } + public function getListeners($eventName) + { + $wildcards = $this->getWildcardListeners($eventName); + if (!isset($this->sorted[$eventName])) { + $this->sortListeners($eventName); + } + return array_merge($this->sorted[$eventName], $wildcards); + } + protected function getWildcardListeners($eventName) + { + $wildcards = array(); + foreach ($this->wildcards as $key => $listeners) { + if (str_is($key, $eventName)) { + $wildcards = array_merge($wildcards, $listeners); + } + } + return $wildcards; + } + protected function sortListeners($eventName) + { + $this->sorted[$eventName] = array(); + if (isset($this->listeners[$eventName])) { + krsort($this->listeners[$eventName]); + $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]); + } + } + public function makeListener($listener) + { + if (is_string($listener)) { + $listener = $this->createClassListener($listener); + } + return $listener; + } + public function createClassListener($listener) + { + $container = $this->container; + return function () use($listener, $container) { + $segments = explode('@', $listener); + $method = count($segments) == 2 ? $segments[1] : 'handle'; + $callable = array($container->make($segments[0]), $method); + $data = func_get_args(); + return call_user_func_array($callable, $data); + }; + } + public function forget($event) + { + unset($this->listeners[$event], $this->sorted[$event]); + } + public function forgetQueued() + { + foreach ($this->listeners as $key => $value) { + if (ends_with($key, '_queue')) { + $this->forget($key); + } + } + } +} +namespace Illuminate\Database\Eloquent; + +use DateTime; +use ArrayAccess; +use Carbon\Carbon; +use LogicException; +use JsonSerializable; +use Illuminate\Events\Dispatcher; +use Illuminate\Database\Eloquent\Relations\Pivot; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; +use Illuminate\Database\Eloquent\Relations\Relation; +use Illuminate\Database\Eloquent\Relations\MorphOne; +use Illuminate\Database\Eloquent\Relations\MorphMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Query\Builder as QueryBuilder; +use Illuminate\Database\Eloquent\Relations\MorphToMany; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; +use Illuminate\Database\Eloquent\Relations\HasManyThrough; +use Illuminate\Database\ConnectionResolverInterface as Resolver; +abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface, JsonSerializable +{ + protected $connection; + protected $table; + protected $primaryKey = 'id'; + protected $perPage = 15; + public $incrementing = true; + public $timestamps = true; + protected $attributes = array(); + protected $original = array(); + protected $relations = array(); + protected $hidden = array(); + protected $visible = array(); + protected $appends = array(); + protected $fillable = array(); + protected $guarded = array('*'); + protected $dates = array(); + protected $touches = array(); + protected $observables = array(); + protected $with = array(); + protected $morphClass; + public $exists = false; + public static $snakeAttributes = true; + protected static $resolver; + protected static $dispatcher; + protected static $booted = array(); + protected static $globalScopes = array(); + protected static $unguarded = false; + protected static $mutatorCache = array(); + public static $manyMethods = array('belongsToMany', 'morphToMany', 'morphedByMany'); + const CREATED_AT = 'created_at'; + const UPDATED_AT = 'updated_at'; + public function __construct(array $attributes = array()) + { + $this->bootIfNotBooted(); + $this->syncOriginal(); + $this->fill($attributes); + } + protected function bootIfNotBooted() + { + $class = get_class($this); + if (!isset(static::$booted[$class])) { + static::$booted[$class] = true; + $this->fireModelEvent('booting', false); + static::boot(); + $this->fireModelEvent('booted', false); + } + } + protected static function boot() + { + $class = get_called_class(); + static::$mutatorCache[$class] = array(); + foreach (get_class_methods($class) as $method) { + if (preg_match('/^get(.+)Attribute$/', $method, $matches)) { + if (static::$snakeAttributes) { + $matches[1] = snake_case($matches[1]); + } + static::$mutatorCache[$class][] = lcfirst($matches[1]); + } + } + static::bootTraits(); + } + protected static function bootTraits() + { + foreach (class_uses_recursive(get_called_class()) as $trait) { + if (method_exists(get_called_class(), $method = 'boot' . class_basename($trait))) { + forward_static_call(array(get_called_class(), $method)); + } + } + } + public static function addGlobalScope(ScopeInterface $scope) + { + static::$globalScopes[get_called_class()][get_class($scope)] = $scope; + } + public static function hasGlobalScope($scope) + { + return !is_null(static::getGlobalScope($scope)); + } + public static function getGlobalScope($scope) + { + return array_first(static::$globalScopes[get_called_class()], function ($key, $value) use($scope) { + return $scope instanceof $value; + }); + } + public function getGlobalScopes() + { + return array_get(static::$globalScopes, get_class($this), array()); + } + public static function observe($class) + { + $instance = new static(); + $className = get_class($class); + foreach ($instance->getObservableEvents() as $event) { + if (method_exists($class, $event)) { + static::registerModelEvent($event, $className . '@' . $event); + } + } + } + public function fill(array $attributes) + { + $totallyGuarded = $this->totallyGuarded(); + foreach ($this->fillableFromArray($attributes) as $key => $value) { + $key = $this->removeTableFromKey($key); + if ($this->isFillable($key)) { + $this->setAttribute($key, $value); + } elseif ($totallyGuarded) { + throw new MassAssignmentException($key); + } + } + return $this; + } + protected function fillableFromArray(array $attributes) + { + if (count($this->fillable) > 0 && !static::$unguarded) { + return array_intersect_key($attributes, array_flip($this->fillable)); + } + return $attributes; + } + public function newInstance($attributes = array(), $exists = false) + { + $model = new static((array) $attributes); + $model->exists = $exists; + return $model; + } + public function newFromBuilder($attributes = array()) + { + $instance = $this->newInstance(array(), true); + $instance->setRawAttributes((array) $attributes, true); + return $instance; + } + public static function hydrate(array $items, $connection = null) + { + $collection = with($instance = new static())->newCollection(); + foreach ($items as $item) { + $model = $instance->newFromBuilder($item); + if (!is_null($connection)) { + $model->setConnection($connection); + } + $collection->push($model); + } + return $collection; + } + public static function hydrateRaw($query, $bindings = array(), $connection = null) + { + $instance = new static(); + if (!is_null($connection)) { + $instance->setConnection($connection); + } + $items = $instance->getConnection()->select($query, $bindings); + return static::hydrate($items, $connection); + } + public static function create(array $attributes) + { + $model = new static($attributes); + $model->save(); + return $model; + } + public static function firstOrCreate(array $attributes) + { + if (!is_null($instance = static::where($attributes)->first())) { + return $instance; + } + return static::create($attributes); + } + public static function firstOrNew(array $attributes) + { + if (!is_null($instance = static::where($attributes)->first())) { + return $instance; + } + return new static($attributes); + } + public static function updateOrCreate(array $attributes, array $values = array()) + { + $instance = static::firstOrNew($attributes); + $instance->fill($values)->save(); + return $instance; + } + protected static function firstByAttributes($attributes) + { + return static::where($attributes)->first(); + } + public static function query() + { + return (new static())->newQuery(); + } + public static function on($connection = null) + { + $instance = new static(); + $instance->setConnection($connection); + return $instance->newQuery(); + } + public static function onWriteConnection() + { + $instance = new static(); + return $instance->newQuery()->useWritePdo(); + } + public static function all($columns = array('*')) + { + $instance = new static(); + return $instance->newQuery()->get($columns); + } + public static function find($id, $columns = array('*')) + { + if (is_array($id) && empty($id)) { + return new Collection(); + } + $instance = new static(); + return $instance->newQuery()->find($id, $columns); + } + public static function findOrNew($id, $columns = array('*')) + { + if (!is_null($model = static::find($id, $columns))) { + return $model; + } + return new static(); + } + public static function findOrFail($id, $columns = array('*')) + { + if (!is_null($model = static::find($id, $columns))) { + return $model; + } + throw (new ModelNotFoundException())->setModel(get_called_class()); + } + public function load($relations) + { + if (is_string($relations)) { + $relations = func_get_args(); + } + $query = $this->newQuery()->with($relations); + $query->eagerLoadRelations(array($this)); + return $this; + } + public static function with($relations) + { + if (is_string($relations)) { + $relations = func_get_args(); + } + $instance = new static(); + return $instance->newQuery()->with($relations); + } + public function hasOne($related, $foreignKey = null, $localKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $instance = new $related(); + $localKey = $localKey ?: $this->getKeyName(); + return new HasOne($instance->newQuery(), $this, $instance->getTable() . '.' . $foreignKey, $localKey); + } + public function morphOne($related, $name, $type = null, $id = null, $localKey = null) + { + $instance = new $related(); + list($type, $id) = $this->getMorphs($name, $type, $id); + $table = $instance->getTable(); + $localKey = $localKey ?: $this->getKeyName(); + return new MorphOne($instance->newQuery(), $this, $table . '.' . $type, $table . '.' . $id, $localKey); + } + public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null) + { + if (is_null($relation)) { + list(, $caller) = debug_backtrace(false, 2); + $relation = $caller['function']; + } + if (is_null($foreignKey)) { + $foreignKey = snake_case($relation) . '_id'; + } + $instance = new $related(); + $query = $instance->newQuery(); + $otherKey = $otherKey ?: $instance->getKeyName(); + return new BelongsTo($query, $this, $foreignKey, $otherKey, $relation); + } + public function morphTo($name = null, $type = null, $id = null) + { + if (is_null($name)) { + list(, $caller) = debug_backtrace(false, 2); + $name = snake_case($caller['function']); + } + list($type, $id) = $this->getMorphs($name, $type, $id); + if (is_null($class = $this->{$type})) { + return new MorphTo($this->newQuery(), $this, $id, null, $type, $name); + } else { + $instance = new $class(); + return new MorphTo($instance->newQuery(), $this, $id, $instance->getKeyName(), $type, $name); + } + } + public function hasMany($related, $foreignKey = null, $localKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $instance = new $related(); + $localKey = $localKey ?: $this->getKeyName(); + return new HasMany($instance->newQuery(), $this, $instance->getTable() . '.' . $foreignKey, $localKey); + } + public function hasManyThrough($related, $through, $firstKey = null, $secondKey = null) + { + $through = new $through(); + $firstKey = $firstKey ?: $this->getForeignKey(); + $secondKey = $secondKey ?: $through->getForeignKey(); + return new HasManyThrough((new $related())->newQuery(), $this, $through, $firstKey, $secondKey); + } + public function morphMany($related, $name, $type = null, $id = null, $localKey = null) + { + $instance = new $related(); + list($type, $id) = $this->getMorphs($name, $type, $id); + $table = $instance->getTable(); + $localKey = $localKey ?: $this->getKeyName(); + return new MorphMany($instance->newQuery(), $this, $table . '.' . $type, $table . '.' . $id, $localKey); + } + public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null) + { + if (is_null($relation)) { + $relation = $this->getBelongsToManyCaller(); + } + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $instance = new $related(); + $otherKey = $otherKey ?: $instance->getForeignKey(); + if (is_null($table)) { + $table = $this->joiningTable($related); + } + $query = $instance->newQuery(); + return new BelongsToMany($query, $this, $table, $foreignKey, $otherKey, $relation); + } + public function morphToMany($related, $name, $table = null, $foreignKey = null, $otherKey = null, $inverse = false) + { + $caller = $this->getBelongsToManyCaller(); + $foreignKey = $foreignKey ?: $name . '_id'; + $instance = new $related(); + $otherKey = $otherKey ?: $instance->getForeignKey(); + $query = $instance->newQuery(); + $table = $table ?: str_plural($name); + return new MorphToMany($query, $this, $name, $table, $foreignKey, $otherKey, $caller, $inverse); + } + public function morphedByMany($related, $name, $table = null, $foreignKey = null, $otherKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $otherKey = $otherKey ?: $name . '_id'; + return $this->morphToMany($related, $name, $table, $foreignKey, $otherKey, true); + } + protected function getBelongsToManyCaller() + { + $self = __FUNCTION__; + $caller = array_first(debug_backtrace(false), function ($key, $trace) use($self) { + $caller = $trace['function']; + return !in_array($caller, Model::$manyMethods) && $caller != $self; + }); + return !is_null($caller) ? $caller['function'] : null; + } + public function joiningTable($related) + { + $base = snake_case(class_basename($this)); + $related = snake_case(class_basename($related)); + $models = array($related, $base); + sort($models); + return strtolower(implode('_', $models)); + } + public static function destroy($ids) + { + $count = 0; + $ids = is_array($ids) ? $ids : func_get_args(); + $instance = new static(); + $key = $instance->getKeyName(); + foreach ($instance->whereIn($key, $ids)->get() as $model) { + if ($model->delete()) { + $count++; + } + } + return $count; + } + public function delete() + { + if (is_null($this->primaryKey)) { + throw new \Exception('No primary key defined on model.'); + } + if ($this->exists) { + if ($this->fireModelEvent('deleting') === false) { + return false; + } + $this->touchOwners(); + $this->performDeleteOnModel(); + $this->exists = false; + $this->fireModelEvent('deleted', false); + return true; + } + } + public function forceDelete() + { + return $this->delete(); + } + protected function performDeleteOnModel() + { + $this->newQuery()->where($this->getKeyName(), $this->getKey())->delete(); + } + public static function saving($callback) + { + static::registerModelEvent('saving', $callback); + } + public static function saved($callback) + { + static::registerModelEvent('saved', $callback); + } + public static function updating($callback) + { + static::registerModelEvent('updating', $callback); + } + public static function updated($callback) + { + static::registerModelEvent('updated', $callback); + } + public static function creating($callback) + { + static::registerModelEvent('creating', $callback); + } + public static function created($callback) + { + static::registerModelEvent('created', $callback); + } + public static function deleting($callback) + { + static::registerModelEvent('deleting', $callback); + } + public static function deleted($callback) + { + static::registerModelEvent('deleted', $callback); + } + public static function flushEventListeners() + { + if (!isset(static::$dispatcher)) { + return; + } + $instance = new static(); + foreach ($instance->getObservableEvents() as $event) { + static::$dispatcher->forget("eloquent.{$event}: " . get_called_class()); + } + } + protected static function registerModelEvent($event, $callback) + { + if (isset(static::$dispatcher)) { + $name = get_called_class(); + static::$dispatcher->listen("eloquent.{$event}: {$name}", $callback); + } + } + public function getObservableEvents() + { + return array_merge(array('creating', 'created', 'updating', 'updated', 'deleting', 'deleted', 'saving', 'saved', 'restoring', 'restored'), $this->observables); + } + public function setObservableEvents(array $observables) + { + $this->observables = $observables; + } + public function addObservableEvents($observables) + { + $observables = is_array($observables) ? $observables : func_get_args(); + $this->observables = array_unique(array_merge($this->observables, $observables)); + } + public function removeObservableEvents($observables) + { + $observables = is_array($observables) ? $observables : func_get_args(); + $this->observables = array_diff($this->observables, $observables); + } + protected function increment($column, $amount = 1) + { + return $this->incrementOrDecrement($column, $amount, 'increment'); + } + protected function decrement($column, $amount = 1) + { + return $this->incrementOrDecrement($column, $amount, 'decrement'); + } + protected function incrementOrDecrement($column, $amount, $method) + { + $query = $this->newQuery(); + if (!$this->exists) { + return $query->{$method}($column, $amount); + } + $this->incrementOrDecrementAttributeValue($column, $amount, $method); + return $query->where($this->getKeyName(), $this->getKey())->{$method}($column, $amount); + } + protected function incrementOrDecrementAttributeValue($column, $amount, $method) + { + $this->{$column} = $this->{$column} + ($method == 'increment' ? $amount : $amount * -1); + $this->syncOriginalAttribute($column); + } + public function update(array $attributes = array()) + { + if (!$this->exists) { + return $this->newQuery()->update($attributes); + } + return $this->fill($attributes)->save(); + } + public function push() + { + if (!$this->save()) { + return false; + } + foreach ($this->relations as $models) { + foreach (Collection::make($models) as $model) { + if (!$model->push()) { + return false; + } + } + } + return true; + } + public function save(array $options = array()) + { + $query = $this->newQueryWithoutScopes(); + if ($this->fireModelEvent('saving') === false) { + return false; + } + if ($this->exists) { + $saved = $this->performUpdate($query, $options); + } else { + $saved = $this->performInsert($query, $options); + } + if ($saved) { + $this->finishSave($options); + } + return $saved; + } + protected function finishSave(array $options) + { + $this->fireModelEvent('saved', false); + $this->syncOriginal(); + if (array_get($options, 'touch', true)) { + $this->touchOwners(); + } + } + protected function performUpdate(Builder $query, array $options = array()) + { + $dirty = $this->getDirty(); + if (count($dirty) > 0) { + if ($this->fireModelEvent('updating') === false) { + return false; + } + if ($this->timestamps && array_get($options, 'timestamps', true)) { + $this->updateTimestamps(); + } + $dirty = $this->getDirty(); + if (count($dirty) > 0) { + $this->setKeysForSaveQuery($query)->update($dirty); + $this->fireModelEvent('updated', false); + } + } + return true; + } + protected function performInsert(Builder $query, array $options = array()) + { + if ($this->fireModelEvent('creating') === false) { + return false; + } + if ($this->timestamps && array_get($options, 'timestamps', true)) { + $this->updateTimestamps(); + } + $attributes = $this->attributes; + if ($this->incrementing) { + $this->insertAndSetId($query, $attributes); + } else { + $query->insert($attributes); + } + $this->exists = true; + $this->fireModelEvent('created', false); + return true; + } + protected function insertAndSetId(Builder $query, $attributes) + { + $id = $query->insertGetId($attributes, $keyName = $this->getKeyName()); + $this->setAttribute($keyName, $id); + } + public function touchOwners() + { + foreach ($this->touches as $relation) { + $this->{$relation}()->touch(); + if (!is_null($this->{$relation})) { + $this->{$relation}->touchOwners(); + } + } + } + public function touches($relation) + { + return in_array($relation, $this->touches); + } + protected function fireModelEvent($event, $halt = true) + { + if (!isset(static::$dispatcher)) { + return true; + } + $event = "eloquent.{$event}: " . get_class($this); + $method = $halt ? 'until' : 'fire'; + return static::$dispatcher->{$method}($event, $this); + } + protected function setKeysForSaveQuery(Builder $query) + { + $query->where($this->getKeyName(), '=', $this->getKeyForSaveQuery()); + return $query; + } + protected function getKeyForSaveQuery() + { + if (isset($this->original[$this->getKeyName()])) { + return $this->original[$this->getKeyName()]; + } + return $this->getAttribute($this->getKeyName()); + } + public function touch() + { + $this->updateTimestamps(); + return $this->save(); + } + protected function updateTimestamps() + { + $time = $this->freshTimestamp(); + if (!$this->isDirty(static::UPDATED_AT)) { + $this->setUpdatedAt($time); + } + if (!$this->exists && !$this->isDirty(static::CREATED_AT)) { + $this->setCreatedAt($time); + } + } + public function setCreatedAt($value) + { + $this->{static::CREATED_AT} = $value; + } + public function setUpdatedAt($value) + { + $this->{static::UPDATED_AT} = $value; + } + public function getCreatedAtColumn() + { + return static::CREATED_AT; + } + public function getUpdatedAtColumn() + { + return static::UPDATED_AT; + } + public function freshTimestamp() + { + return new Carbon(); + } + public function freshTimestampString() + { + return $this->fromDateTime($this->freshTimestamp()); + } + public function newQuery() + { + $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder()); + $builder->setModel($this)->with($this->with); + return $this->applyGlobalScopes($builder); + } + public function newQueryWithoutScope($scope) + { + $this->getGlobalScope($scope)->remove($builder = $this->newQuery(), $this); + return $builder; + } + public function newQueryWithoutScopes() + { + return $this->removeGlobalScopes($this->newQuery()); + } + public function applyGlobalScopes($builder) + { + foreach ($this->getGlobalScopes() as $scope) { + $scope->apply($builder, $this); + } + return $builder; + } + public function removeGlobalScopes($builder) + { + foreach ($this->getGlobalScopes() as $scope) { + $scope->remove($builder, $this); + } + return $builder; + } + public function newEloquentBuilder($query) + { + return new Builder($query); + } + protected function newBaseQueryBuilder() + { + $conn = $this->getConnection(); + $grammar = $conn->getQueryGrammar(); + return new QueryBuilder($conn, $grammar, $conn->getPostProcessor()); + } + public function newCollection(array $models = array()) + { + return new Collection($models); + } + public function newPivot(Model $parent, array $attributes, $table, $exists) + { + return new Pivot($parent, $attributes, $table, $exists); + } + public function getTable() + { + if (isset($this->table)) { + return $this->table; + } + return str_replace('\\', '', snake_case(str_plural(class_basename($this)))); + } + public function setTable($table) + { + $this->table = $table; + } + public function getKey() + { + return $this->getAttribute($this->getKeyName()); + } + public function getKeyName() + { + return $this->primaryKey; + } + public function setKeyName($key) + { + $this->primaryKey = $key; + } + public function getQualifiedKeyName() + { + return $this->getTable() . '.' . $this->getKeyName(); + } + public function usesTimestamps() + { + return $this->timestamps; + } + protected function getMorphs($name, $type, $id) + { + $type = $type ?: $name . '_type'; + $id = $id ?: $name . '_id'; + return array($type, $id); + } + public function getMorphClass() + { + return $this->morphClass ?: get_class($this); + } + public function getPerPage() + { + return $this->perPage; + } + public function setPerPage($perPage) + { + $this->perPage = $perPage; + } + public function getForeignKey() + { + return snake_case(class_basename($this)) . '_id'; + } + public function getHidden() + { + return $this->hidden; + } + public function setHidden(array $hidden) + { + $this->hidden = $hidden; + } + public function setVisible(array $visible) + { + $this->visible = $visible; + } + public function setAppends(array $appends) + { + $this->appends = $appends; + } + public function getFillable() + { + return $this->fillable; + } + public function fillable(array $fillable) + { + $this->fillable = $fillable; + return $this; + } + public function getGuarded() + { + return $this->guarded; + } + public function guard(array $guarded) + { + $this->guarded = $guarded; + return $this; + } + public static function unguard() + { + static::$unguarded = true; + } + public static function reguard() + { + static::$unguarded = false; + } + public static function setUnguardState($state) + { + static::$unguarded = $state; + } + public function isFillable($key) + { + if (static::$unguarded) { + return true; + } + if (in_array($key, $this->fillable)) { + return true; + } + if ($this->isGuarded($key)) { + return false; + } + return empty($this->fillable) && !starts_with($key, '_'); + } + public function isGuarded($key) + { + return in_array($key, $this->guarded) || $this->guarded == array('*'); + } + public function totallyGuarded() + { + return count($this->fillable) == 0 && $this->guarded == array('*'); + } + protected function removeTableFromKey($key) + { + if (!str_contains($key, '.')) { + return $key; + } + return last(explode('.', $key)); + } + public function getTouchedRelations() + { + return $this->touches; + } + public function setTouchedRelations(array $touches) + { + $this->touches = $touches; + } + public function getIncrementing() + { + return $this->incrementing; + } + public function setIncrementing($value) + { + $this->incrementing = $value; + } + public function toJson($options = 0) + { + return json_encode($this->toArray(), $options); + } + public function jsonSerialize() + { + return $this->toArray(); + } + public function toArray() + { + $attributes = $this->attributesToArray(); + return array_merge($attributes, $this->relationsToArray()); + } + public function attributesToArray() + { + $attributes = $this->getArrayableAttributes(); + foreach ($this->getDates() as $key) { + if (!isset($attributes[$key])) { + continue; + } + $attributes[$key] = (string) $this->asDateTime($attributes[$key]); + } + foreach ($this->getMutatedAttributes() as $key) { + if (!array_key_exists($key, $attributes)) { + continue; + } + $attributes[$key] = $this->mutateAttributeForArray($key, $attributes[$key]); + } + foreach ($this->getArrayableAppends() as $key) { + $attributes[$key] = $this->mutateAttributeForArray($key, null); + } + return $attributes; + } + protected function getArrayableAttributes() + { + return $this->getArrayableItems($this->attributes); + } + protected function getArrayableAppends() + { + if (!count($this->appends)) { + return array(); + } + return $this->getArrayableItems(array_combine($this->appends, $this->appends)); + } + public function relationsToArray() + { + $attributes = array(); + foreach ($this->getArrayableRelations() as $key => $value) { + if (in_array($key, $this->hidden)) { + continue; + } + if ($value instanceof ArrayableInterface) { + $relation = $value->toArray(); + } elseif (is_null($value)) { + $relation = $value; + } + if (static::$snakeAttributes) { + $key = snake_case($key); + } + if (isset($relation) || is_null($value)) { + $attributes[$key] = $relation; + } + unset($relation); + } + return $attributes; + } + protected function getArrayableRelations() + { + return $this->getArrayableItems($this->relations); + } + protected function getArrayableItems(array $values) + { + if (count($this->visible) > 0) { + return array_intersect_key($values, array_flip($this->visible)); + } + return array_diff_key($values, array_flip($this->hidden)); + } + public function getAttribute($key) + { + $inAttributes = array_key_exists($key, $this->attributes); + if ($inAttributes || $this->hasGetMutator($key)) { + return $this->getAttributeValue($key); + } + if (array_key_exists($key, $this->relations)) { + return $this->relations[$key]; + } + $camelKey = camel_case($key); + if (method_exists($this, $camelKey)) { + return $this->getRelationshipFromMethod($key, $camelKey); + } + } + protected function getAttributeValue($key) + { + $value = $this->getAttributeFromArray($key); + if ($this->hasGetMutator($key)) { + return $this->mutateAttribute($key, $value); + } elseif (in_array($key, $this->getDates())) { + if ($value) { + return $this->asDateTime($value); + } + } + return $value; + } + protected function getAttributeFromArray($key) + { + if (array_key_exists($key, $this->attributes)) { + return $this->attributes[$key]; + } + } + protected function getRelationshipFromMethod($key, $camelKey) + { + $relations = $this->{$camelKey}(); + if (!$relations instanceof Relation) { + throw new LogicException('Relationship method must return an object of type ' . 'Illuminate\\Database\\Eloquent\\Relations\\Relation'); + } + return $this->relations[$key] = $relations->getResults(); + } + public function hasGetMutator($key) + { + return method_exists($this, 'get' . studly_case($key) . 'Attribute'); + } + protected function mutateAttribute($key, $value) + { + return $this->{'get' . studly_case($key) . 'Attribute'}($value); + } + protected function mutateAttributeForArray($key, $value) + { + $value = $this->mutateAttribute($key, $value); + return $value instanceof ArrayableInterface ? $value->toArray() : $value; + } + public function setAttribute($key, $value) + { + if ($this->hasSetMutator($key)) { + $method = 'set' . studly_case($key) . 'Attribute'; + return $this->{$method}($value); + } elseif (in_array($key, $this->getDates()) && $value) { + $value = $this->fromDateTime($value); + } + $this->attributes[$key] = $value; + } + public function hasSetMutator($key) + { + return method_exists($this, 'set' . studly_case($key) . 'Attribute'); + } + public function getDates() + { + $defaults = array(static::CREATED_AT, static::UPDATED_AT); + return array_merge($this->dates, $defaults); + } + public function fromDateTime($value) + { + $format = $this->getDateFormat(); + if ($value instanceof DateTime) { + + } elseif (is_numeric($value)) { + $value = Carbon::createFromTimestamp($value); + } elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $value)) { + $value = Carbon::createFromFormat('Y-m-d', $value)->startOfDay(); + } else { + $value = Carbon::createFromFormat($format, $value); + } + return $value->format($format); + } + protected function asDateTime($value) + { + if (is_numeric($value)) { + return Carbon::createFromTimestamp($value); + } elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $value)) { + return Carbon::createFromFormat('Y-m-d', $value)->startOfDay(); + } elseif (!$value instanceof DateTime) { + $format = $this->getDateFormat(); + return Carbon::createFromFormat($format, $value); + } + return Carbon::instance($value); + } + protected function getDateFormat() + { + return $this->getConnection()->getQueryGrammar()->getDateFormat(); + } + public function replicate(array $except = null) + { + $except = $except ?: array($this->getKeyName(), $this->getCreatedAtColumn(), $this->getUpdatedAtColumn()); + $attributes = array_except($this->attributes, $except); + with($instance = new static())->setRawAttributes($attributes); + return $instance->setRelations($this->relations); + } + public function getAttributes() + { + return $this->attributes; + } + public function setRawAttributes(array $attributes, $sync = false) + { + $this->attributes = $attributes; + if ($sync) { + $this->syncOriginal(); + } + } + public function getOriginal($key = null, $default = null) + { + return array_get($this->original, $key, $default); + } + public function syncOriginal() + { + $this->original = $this->attributes; + return $this; + } + public function syncOriginalAttribute($attribute) + { + $this->original[$attribute] = $this->attributes[$attribute]; + return $this; + } + public function isDirty($attributes = null) + { + $dirty = $this->getDirty(); + if (is_null($attributes)) { + return count($dirty) > 0; + } + if (!is_array($attributes)) { + $attributes = func_get_args(); + } + foreach ($attributes as $attribute) { + if (array_key_exists($attribute, $dirty)) { + return true; + } + } + return false; + } + public function getDirty() + { + $dirty = array(); + foreach ($this->attributes as $key => $value) { + if (!array_key_exists($key, $this->original)) { + $dirty[$key] = $value; + } elseif ($value !== $this->original[$key] && !$this->originalIsNumericallyEquivalent($key)) { + $dirty[$key] = $value; + } + } + return $dirty; + } + protected function originalIsNumericallyEquivalent($key) + { + $current = $this->attributes[$key]; + $original = $this->original[$key]; + return is_numeric($current) && is_numeric($original) && strcmp((string) $current, (string) $original) === 0; + } + public function getRelations() + { + return $this->relations; + } + public function getRelation($relation) + { + return $this->relations[$relation]; + } + public function setRelation($relation, $value) + { + $this->relations[$relation] = $value; + return $this; + } + public function setRelations(array $relations) + { + $this->relations = $relations; + return $this; + } + public function getConnection() + { + return static::resolveConnection($this->connection); + } + public function getConnectionName() + { + return $this->connection; + } + public function setConnection($name) + { + $this->connection = $name; + return $this; + } + public static function resolveConnection($connection = null) + { + return static::$resolver->connection($connection); + } + public static function getConnectionResolver() + { + return static::$resolver; + } + public static function setConnectionResolver(Resolver $resolver) + { + static::$resolver = $resolver; + } + public static function unsetConnectionResolver() + { + static::$resolver = null; + } + public static function getEventDispatcher() + { + return static::$dispatcher; + } + public static function setEventDispatcher(Dispatcher $dispatcher) + { + static::$dispatcher = $dispatcher; + } + public static function unsetEventDispatcher() + { + static::$dispatcher = null; + } + public function getMutatedAttributes() + { + $class = get_class($this); + if (isset(static::$mutatorCache[$class])) { + return static::$mutatorCache[$class]; + } + return array(); + } + public function __get($key) + { + return $this->getAttribute($key); + } + public function __set($key, $value) + { + $this->setAttribute($key, $value); + } + public function offsetExists($offset) + { + return isset($this->{$offset}); + } + public function offsetGet($offset) + { + return $this->{$offset}; + } + public function offsetSet($offset, $value) + { + $this->{$offset} = $value; + } + public function offsetUnset($offset) + { + unset($this->{$offset}); + } + public function __isset($key) + { + return isset($this->attributes[$key]) || isset($this->relations[$key]) || $this->hasGetMutator($key) && !is_null($this->getAttributeValue($key)); + } + public function __unset($key) + { + unset($this->attributes[$key], $this->relations[$key]); + } + public function __call($method, $parameters) + { + if (in_array($method, array('increment', 'decrement'))) { + return call_user_func_array(array($this, $method), $parameters); + } + $query = $this->newQuery(); + return call_user_func_array(array($query, $method), $parameters); + } + public static function __callStatic($method, $parameters) + { + $instance = new static(); + return call_user_func_array(array($instance, $method), $parameters); + } + public function __toString() + { + return $this->toJson(); + } + public function __wakeup() + { + $this->bootIfNotBooted(); + } +} +namespace Illuminate\Support\Contracts; + +interface ArrayableInterface +{ + public function toArray(); +} +namespace Illuminate\Support\Contracts; + +interface JsonableInterface +{ + public function toJson($options = 0); +} +namespace Illuminate\Database; + +use Illuminate\Support\Str; +use Illuminate\Database\Connectors\ConnectionFactory; +class DatabaseManager implements ConnectionResolverInterface +{ + protected $app; + protected $factory; + protected $connections = array(); + protected $extensions = array(); + public function __construct($app, ConnectionFactory $factory) + { + $this->app = $app; + $this->factory = $factory; + } + public function connection($name = null) + { + list($name, $type) = $this->parseConnectionName($name); + if (!isset($this->connections[$name])) { + $connection = $this->makeConnection($name); + $this->setPdoForType($connection, $type); + $this->connections[$name] = $this->prepare($connection); + } + return $this->connections[$name]; + } + protected function parseConnectionName($name) + { + $name = $name ?: $this->getDefaultConnection(); + return Str::endsWith($name, array('::read', '::write')) ? explode('::', $name, 2) : array($name, null); + } + public function purge($name = null) + { + $this->disconnect($name); + unset($this->connections[$name]); + } + public function disconnect($name = null) + { + if (isset($this->connections[$name = $name ?: $this->getDefaultConnection()])) { + $this->connections[$name]->disconnect(); + } + } + public function reconnect($name = null) + { + $this->disconnect($name = $name ?: $this->getDefaultConnection()); + if (!isset($this->connections[$name])) { + return $this->connection($name); + } + return $this->refreshPdoConnections($name); + } + protected function refreshPdoConnections($name) + { + $fresh = $this->makeConnection($name); + return $this->connections[$name]->setPdo($fresh->getPdo())->setReadPdo($fresh->getReadPdo()); + } + protected function makeConnection($name) + { + $config = $this->getConfig($name); + if (isset($this->extensions[$name])) { + return call_user_func($this->extensions[$name], $config, $name); + } + $driver = $config['driver']; + if (isset($this->extensions[$driver])) { + return call_user_func($this->extensions[$driver], $config, $name); + } + return $this->factory->make($config, $name); + } + protected function prepare(Connection $connection) + { + $connection->setFetchMode($this->app['config']['database.fetch']); + if ($this->app->bound('events')) { + $connection->setEventDispatcher($this->app['events']); + } + $app = $this->app; + $connection->setCacheManager(function () use($app) { + return $app['cache']; + }); + $connection->setPaginator(function () use($app) { + return $app['paginator']; + }); + $connection->setReconnector(function ($connection) { + $this->reconnect($connection->getName()); + }); + return $connection; + } + protected function setPdoForType(Connection $connection, $type = null) + { + if ($type == 'read') { + $connection->setPdo($connection->getReadPdo()); + } elseif ($type == 'write') { + $connection->setReadPdo($connection->getPdo()); + } + return $connection; + } + protected function getConfig($name) + { + $name = $name ?: $this->getDefaultConnection(); + $connections = $this->app['config']['database.connections']; + if (is_null($config = array_get($connections, $name))) { + throw new \InvalidArgumentException("Database [{$name}] not configured."); + } + return $config; + } + public function getDefaultConnection() + { + return $this->app['config']['database.default']; + } + public function setDefaultConnection($name) + { + $this->app['config']['database.default'] = $name; + } + public function extend($name, callable $resolver) + { + $this->extensions[$name] = $resolver; + } + public function getConnections() + { + return $this->connections; + } + public function __call($method, $parameters) + { + return call_user_func_array(array($this->connection(), $method), $parameters); + } +} +namespace Illuminate\Database; + +interface ConnectionResolverInterface +{ + public function connection($name = null); + public function getDefaultConnection(); + public function setDefaultConnection($name); +} +namespace Illuminate\Database\Connectors; + +use PDO; +use Illuminate\Container\Container; +use Illuminate\Database\MySqlConnection; +use Illuminate\Database\SQLiteConnection; +use Illuminate\Database\PostgresConnection; +use Illuminate\Database\SqlServerConnection; +class ConnectionFactory +{ + protected $container; + public function __construct(Container $container) + { + $this->container = $container; + } + public function make(array $config, $name = null) + { + $config = $this->parseConfig($config, $name); + if (isset($config['read'])) { + return $this->createReadWriteConnection($config); + } + return $this->createSingleConnection($config); + } + protected function createSingleConnection(array $config) + { + $pdo = $this->createConnector($config)->connect($config); + return $this->createConnection($config['driver'], $pdo, $config['database'], $config['prefix'], $config); + } + protected function createReadWriteConnection(array $config) + { + $connection = $this->createSingleConnection($this->getWriteConfig($config)); + return $connection->setReadPdo($this->createReadPdo($config)); + } + protected function createReadPdo(array $config) + { + $readConfig = $this->getReadConfig($config); + return $this->createConnector($readConfig)->connect($readConfig); + } + protected function getReadConfig(array $config) + { + $readConfig = $this->getReadWriteConfig($config, 'read'); + return $this->mergeReadWriteConfig($config, $readConfig); + } + protected function getWriteConfig(array $config) + { + $writeConfig = $this->getReadWriteConfig($config, 'write'); + return $this->mergeReadWriteConfig($config, $writeConfig); + } + protected function getReadWriteConfig(array $config, $type) + { + if (isset($config[$type][0])) { + return $config[$type][array_rand($config[$type])]; + } + return $config[$type]; + } + protected function mergeReadWriteConfig(array $config, array $merge) + { + return array_except(array_merge($config, $merge), array('read', 'write')); + } + protected function parseConfig(array $config, $name) + { + return array_add(array_add($config, 'prefix', ''), 'name', $name); + } + public function createConnector(array $config) + { + if (!isset($config['driver'])) { + throw new \InvalidArgumentException('A driver must be specified.'); + } + if ($this->container->bound($key = "db.connector.{$config['driver']}")) { + return $this->container->make($key); + } + switch ($config['driver']) { + case 'mysql': + return new MySqlConnector(); + case 'pgsql': + return new PostgresConnector(); + case 'sqlite': + return new SQLiteConnector(); + case 'sqlsrv': + return new SqlServerConnector(); + } + throw new \InvalidArgumentException("Unsupported driver [{$config['driver']}]"); + } + protected function createConnection($driver, PDO $connection, $database, $prefix = '', array $config = array()) + { + if ($this->container->bound($key = "db.connection.{$driver}")) { + return $this->container->make($key, array($connection, $database, $prefix, $config)); + } + switch ($driver) { + case 'mysql': + return new MySqlConnection($connection, $database, $prefix, $config); + case 'pgsql': + return new PostgresConnection($connection, $database, $prefix, $config); + case 'sqlite': + return new SQLiteConnection($connection, $database, $prefix, $config); + case 'sqlsrv': + return new SqlServerConnection($connection, $database, $prefix, $config); + } + throw new \InvalidArgumentException("Unsupported driver [{$driver}]"); + } +} +namespace Illuminate\Session; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\SessionInterface as BaseSessionInterface; +interface SessionInterface extends BaseSessionInterface +{ + public function getHandler(); + public function handlerNeedsRequest(); + public function setRequestOnHandler(Request $request); +} +namespace Illuminate\Session; + +use Closure; +use Carbon\Carbon; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Middleware implements HttpKernelInterface +{ + protected $app; + protected $manager; + protected $reject; + public function __construct(HttpKernelInterface $app, SessionManager $manager, Closure $reject = null) + { + $this->app = $app; + $this->reject = $reject; + $this->manager = $manager; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $this->checkRequestForArraySessions($request); + if ($this->sessionConfigured()) { + $session = $this->startSession($request); + $request->setSession($session); + } + $response = $this->app->handle($request, $type, $catch); + if ($this->sessionConfigured()) { + $this->closeSession($session); + $this->addCookieToResponse($response, $session); + } + return $response; + } + public function checkRequestForArraySessions(Request $request) + { + if (is_null($this->reject)) { + return; + } + if (call_user_func($this->reject, $request)) { + $this->manager->setDefaultDriver('array'); + } + } + protected function startSession(Request $request) + { + with($session = $this->getSession($request))->setRequestOnHandler($request); + $session->start(); + return $session; + } + protected function closeSession(SessionInterface $session) + { + $session->save(); + $this->collectGarbage($session); + } + protected function getUrl(Request $request) + { + $url = rtrim(preg_replace('/\\?.*/', '', $request->getUri()), '/'); + return $request->getQueryString() ? $url . '?' . $request->getQueryString() : $url; + } + protected function collectGarbage(SessionInterface $session) + { + $config = $this->manager->getSessionConfig(); + if ($this->configHitsLottery($config)) { + $session->getHandler()->gc($this->getLifetimeSeconds()); + } + } + protected function configHitsLottery(array $config) + { + return mt_rand(1, $config['lottery'][1]) <= $config['lottery'][0]; + } + protected function addCookieToResponse(Response $response, SessionInterface $session) + { + $s = $session; + if ($this->sessionIsPersistent($c = $this->manager->getSessionConfig())) { + $secure = array_get($c, 'secure', false); + $response->headers->setCookie(new Cookie($s->getName(), $s->getId(), $this->getCookieLifetime(), $c['path'], $c['domain'], $secure)); + } + } + protected function getLifetimeSeconds() + { + return array_get($this->manager->getSessionConfig(), 'lifetime') * 60; + } + protected function getCookieLifetime() + { + $config = $this->manager->getSessionConfig(); + return $config['expire_on_close'] ? 0 : Carbon::now()->addMinutes($config['lifetime']); + } + protected function sessionConfigured() + { + return !is_null(array_get($this->manager->getSessionConfig(), 'driver')); + } + protected function sessionIsPersistent(array $config = null) + { + $config = $config ?: $this->manager->getSessionConfig(); + return !in_array($config['driver'], array(null, 'array')); + } + public function getSession(Request $request) + { + $session = $this->manager->driver(); + $session->setId($request->cookies->get($session->getName())); + return $session; + } +} +namespace Illuminate\Session; + +use SessionHandlerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; +class Store implements SessionInterface +{ + protected $id; + protected $name; + protected $attributes = array(); + protected $bags = array(); + protected $metaBag; + protected $bagData = array(); + protected $handler; + protected $started = false; + public function __construct($name, SessionHandlerInterface $handler, $id = null) + { + $this->setId($id); + $this->name = $name; + $this->handler = $handler; + $this->metaBag = new MetadataBag(); + } + public function start() + { + $this->loadSession(); + if (!$this->has('_token')) { + $this->regenerateToken(); + } + return $this->started = true; + } + protected function loadSession() + { + $this->attributes = $this->readFromHandler(); + foreach (array_merge($this->bags, array($this->metaBag)) as $bag) { + $this->initializeLocalBag($bag); + $bag->initialize($this->bagData[$bag->getStorageKey()]); + } + } + protected function readFromHandler() + { + $data = $this->handler->read($this->getId()); + return $data ? unserialize($data) : array(); + } + protected function initializeLocalBag($bag) + { + $this->bagData[$bag->getStorageKey()] = $this->pull($bag->getStorageKey(), array()); + } + public function getId() + { + return $this->id; + } + public function setId($id) + { + if (!$this->isValidId($id)) { + $id = $this->generateSessionId(); + } + $this->id = $id; + } + public function isValidId($id) + { + return is_string($id) && preg_match('/^[a-f0-9]{40}$/', $id); + } + protected function generateSessionId() + { + return sha1(uniqid('', true) . str_random(25) . microtime(true)); + } + public function getName() + { + return $this->name; + } + public function setName($name) + { + $this->name = $name; + } + public function invalidate($lifetime = null) + { + $this->attributes = array(); + $this->migrate(); + return true; + } + public function migrate($destroy = false, $lifetime = null) + { + if ($destroy) { + $this->handler->destroy($this->getId()); + } + $this->setExists(false); + $this->id = $this->generateSessionId(); + return true; + } + public function regenerate($destroy = false) + { + return $this->migrate($destroy); + } + public function save() + { + $this->addBagDataToSession(); + $this->ageFlashData(); + $this->handler->write($this->getId(), serialize($this->attributes)); + $this->started = false; + } + protected function addBagDataToSession() + { + foreach (array_merge($this->bags, array($this->metaBag)) as $bag) { + $this->put($bag->getStorageKey(), $this->bagData[$bag->getStorageKey()]); + } + } + public function ageFlashData() + { + foreach ($this->get('flash.old', array()) as $old) { + $this->forget($old); + } + $this->put('flash.old', $this->get('flash.new', array())); + $this->put('flash.new', array()); + } + public function has($name) + { + return !is_null($this->get($name)); + } + public function get($name, $default = null) + { + return array_get($this->attributes, $name, $default); + } + public function pull($key, $default = null) + { + return array_pull($this->attributes, $key, $default); + } + public function hasOldInput($key = null) + { + $old = $this->getOldInput($key); + return is_null($key) ? count($old) > 0 : !is_null($old); + } + public function getOldInput($key = null, $default = null) + { + $input = $this->get('_old_input', array()); + return array_get($input, $key, $default); + } + public function set($name, $value) + { + array_set($this->attributes, $name, $value); + } + public function put($key, $value = null) + { + if (!is_array($key)) { + $key = array($key => $value); + } + foreach ($key as $arrayKey => $arrayValue) { + $this->set($arrayKey, $arrayValue); + } + } + public function push($key, $value) + { + $array = $this->get($key, array()); + $array[] = $value; + $this->put($key, $array); + } + public function flash($key, $value) + { + $this->put($key, $value); + $this->push('flash.new', $key); + $this->removeFromOldFlashData(array($key)); + } + public function flashInput(array $value) + { + $this->flash('_old_input', $value); + } + public function reflash() + { + $this->mergeNewFlashes($this->get('flash.old', array())); + $this->put('flash.old', array()); + } + public function keep($keys = null) + { + $keys = is_array($keys) ? $keys : func_get_args(); + $this->mergeNewFlashes($keys); + $this->removeFromOldFlashData($keys); + } + protected function mergeNewFlashes(array $keys) + { + $values = array_unique(array_merge($this->get('flash.new', array()), $keys)); + $this->put('flash.new', $values); + } + protected function removeFromOldFlashData(array $keys) + { + $this->put('flash.old', array_diff($this->get('flash.old', array()), $keys)); + } + public function all() + { + return $this->attributes; + } + public function replace(array $attributes) + { + foreach ($attributes as $key => $value) { + $this->put($key, $value); + } + } + public function remove($name) + { + return array_pull($this->attributes, $name); + } + public function forget($key) + { + array_forget($this->attributes, $key); + } + public function clear() + { + $this->attributes = array(); + foreach ($this->bags as $bag) { + $bag->clear(); + } + } + public function flush() + { + $this->clear(); + } + public function isStarted() + { + return $this->started; + } + public function registerBag(SessionBagInterface $bag) + { + $this->bags[$bag->getStorageKey()] = $bag; + } + public function getBag($name) + { + return array_get($this->bags, $name, function () { + throw new \InvalidArgumentException('Bag not registered.'); + }); + } + public function getMetadataBag() + { + return $this->metaBag; + } + public function getBagData($name) + { + return array_get($this->bagData, $name, array()); + } + public function token() + { + return $this->get('_token'); + } + public function getToken() + { + return $this->token(); + } + public function regenerateToken() + { + $this->put('_token', str_random(40)); + } + public function setExists($value) + { + if ($this->handler instanceof ExistenceAwareInterface) { + $this->handler->setExists($value); + } + } + public function getHandler() + { + return $this->handler; + } + public function handlerNeedsRequest() + { + return $this->handler instanceof CookieSessionHandler; + } + public function setRequestOnHandler(Request $request) + { + if ($this->handlerNeedsRequest()) { + $this->handler->setRequest($request); + } + } +} +namespace Illuminate\Session; + +use Illuminate\Support\Manager; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; +class SessionManager extends Manager +{ + protected function callCustomCreator($driver) + { + return $this->buildSession(parent::callCustomCreator($driver)); + } + protected function createArrayDriver() + { + return new Store($this->app['config']['session.cookie'], new NullSessionHandler()); + } + protected function createCookieDriver() + { + $lifetime = $this->app['config']['session.lifetime']; + return $this->buildSession(new CookieSessionHandler($this->app['cookie'], $lifetime)); + } + protected function createFileDriver() + { + return $this->createNativeDriver(); + } + protected function createNativeDriver() + { + $path = $this->app['config']['session.files']; + return $this->buildSession(new FileSessionHandler($this->app['files'], $path)); + } + protected function createDatabaseDriver() + { + $connection = $this->getDatabaseConnection(); + $table = $this->app['config']['session.table']; + return $this->buildSession(new DatabaseSessionHandler($connection, $table)); + } + protected function getDatabaseConnection() + { + $connection = $this->app['config']['session.connection']; + return $this->app['db']->connection($connection); + } + protected function createApcDriver() + { + return $this->createCacheBased('apc'); + } + protected function createMemcachedDriver() + { + return $this->createCacheBased('memcached'); + } + protected function createWincacheDriver() + { + return $this->createCacheBased('wincache'); + } + protected function createRedisDriver() + { + $handler = $this->createCacheHandler('redis'); + $handler->getCache()->getStore()->setConnection($this->app['config']['session.connection']); + return $this->buildSession($handler); + } + protected function createCacheBased($driver) + { + return $this->buildSession($this->createCacheHandler($driver)); + } + protected function createCacheHandler($driver) + { + $minutes = $this->app['config']['session.lifetime']; + return new CacheBasedSessionHandler($this->app['cache']->driver($driver), $minutes); + } + protected function buildSession($handler) + { + return new Store($this->app['config']['session.cookie'], $handler); + } + public function getSessionConfig() + { + return $this->app['config']['session']; + } + public function getDefaultDriver() + { + return $this->app['config']['session.driver']; + } + public function setDefaultDriver($name) + { + $this->app['config']['session.driver'] = $name; + } +} +namespace Illuminate\Support; + +use Closure; +abstract class Manager +{ + protected $app; + protected $customCreators = array(); + protected $drivers = array(); + public function __construct($app) + { + $this->app = $app; + } + public abstract function getDefaultDriver(); + public function driver($driver = null) + { + $driver = $driver ?: $this->getDefaultDriver(); + if (!isset($this->drivers[$driver])) { + $this->drivers[$driver] = $this->createDriver($driver); + } + return $this->drivers[$driver]; + } + protected function createDriver($driver) + { + $method = 'create' . ucfirst($driver) . 'Driver'; + if (isset($this->customCreators[$driver])) { + return $this->callCustomCreator($driver); + } elseif (method_exists($this, $method)) { + return $this->{$method}(); + } + throw new \InvalidArgumentException("Driver [{$driver}] not supported."); + } + protected function callCustomCreator($driver) + { + return $this->customCreators[$driver]($this->app); + } + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + return $this; + } + public function getDrivers() + { + return $this->drivers; + } + public function __call($method, $parameters) + { + return call_user_func_array(array($this->driver(), $method), $parameters); + } +} +namespace Illuminate\Cookie; + +use Symfony\Component\HttpFoundation\Cookie; +class CookieJar +{ + protected $path = '/'; + protected $domain = null; + protected $queued = array(); + public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true) + { + list($path, $domain) = $this->getPathAndDomain($path, $domain); + $time = $minutes == 0 ? 0 : time() + $minutes * 60; + return new Cookie($name, $value, $time, $path, $domain, $secure, $httpOnly); + } + public function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true) + { + return $this->make($name, $value, 2628000, $path, $domain, $secure, $httpOnly); + } + public function forget($name, $path = null, $domain = null) + { + return $this->make($name, null, -2628000, $path, $domain); + } + public function hasQueued($key) + { + return !is_null($this->queued($key)); + } + public function queued($key, $default = null) + { + return array_get($this->queued, $key, $default); + } + public function queue() + { + if (head(func_get_args()) instanceof Cookie) { + $cookie = head(func_get_args()); + } else { + $cookie = call_user_func_array(array($this, 'make'), func_get_args()); + } + $this->queued[$cookie->getName()] = $cookie; + } + public function unqueue($name) + { + unset($this->queued[$name]); + } + protected function getPathAndDomain($path, $domain) + { + return array($path ?: $this->path, $domain ?: $this->domain); + } + public function setDefaultPathAndDomain($path, $domain) + { + list($this->path, $this->domain) = array($path, $domain); + return $this; + } + public function getQueuedCookies() + { + return $this->queued; + } +} +namespace Illuminate\Cookie; + +use Illuminate\Encryption\Encrypter; +use Illuminate\Encryption\DecryptException; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Guard implements HttpKernelInterface +{ + protected $app; + protected $encrypter; + public function __construct(HttpKernelInterface $app, Encrypter $encrypter) + { + $this->app = $app; + $this->encrypter = $encrypter; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + return $this->encrypt($this->app->handle($this->decrypt($request), $type, $catch)); + } + protected function decrypt(Request $request) + { + foreach ($request->cookies as $key => $c) { + try { + $request->cookies->set($key, $this->decryptCookie($c)); + } catch (DecryptException $e) { + $request->cookies->set($key, null); + } + } + return $request; + } + protected function decryptCookie($cookie) + { + return is_array($cookie) ? $this->decryptArray($cookie) : $this->encrypter->decrypt($cookie); + } + protected function decryptArray(array $cookie) + { + $decrypted = array(); + foreach ($cookie as $key => $value) { + $decrypted[$key] = $this->encrypter->decrypt($value); + } + return $decrypted; + } + protected function encrypt(Response $response) + { + foreach ($response->headers->getCookies() as $key => $c) { + $encrypted = $this->encrypter->encrypt($c->getValue()); + $response->headers->setCookie($this->duplicate($c, $encrypted)); + } + return $response; + } + protected function duplicate(Cookie $c, $value) + { + return new Cookie($c->getName(), $value, $c->getExpiresTime(), $c->getPath(), $c->getDomain(), $c->isSecure(), $c->isHttpOnly()); + } +} +namespace Illuminate\Cookie; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Queue implements HttpKernelInterface +{ + protected $app; + protected $cookies; + public function __construct(HttpKernelInterface $app, CookieJar $cookies) + { + $this->app = $app; + $this->cookies = $cookies; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $response = $this->app->handle($request, $type, $catch); + foreach ($this->cookies->getQueuedCookies() as $cookie) { + $response->headers->setCookie($cookie); + } + return $response; + } +} +namespace Illuminate\Encryption; + +use Symfony\Component\Security\Core\Util\StringUtils; +use Symfony\Component\Security\Core\Util\SecureRandom; +class Encrypter +{ + protected $key; + protected $cipher = MCRYPT_RIJNDAEL_128; + protected $mode = MCRYPT_MODE_CBC; + protected $block = 16; + public function __construct($key) + { + $this->key = (string) $key; + } + public function encrypt($value) + { + $iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer()); + $value = base64_encode($this->padAndMcrypt($value, $iv)); + $mac = $this->hash($iv = base64_encode($iv), $value); + return base64_encode(json_encode(compact('iv', 'value', 'mac'))); + } + protected function padAndMcrypt($value, $iv) + { + $value = $this->addPadding(serialize($value)); + return mcrypt_encrypt($this->cipher, $this->key, $value, $this->mode, $iv); + } + public function decrypt($payload) + { + $payload = $this->getJsonPayload($payload); + $value = base64_decode($payload['value']); + $iv = base64_decode($payload['iv']); + return unserialize($this->stripPadding($this->mcryptDecrypt($value, $iv))); + } + protected function mcryptDecrypt($value, $iv) + { + try { + return mcrypt_decrypt($this->cipher, $this->key, $value, $this->mode, $iv); + } catch (\Exception $e) { + throw new DecryptException($e->getMessage()); + } + } + protected function getJsonPayload($payload) + { + $payload = json_decode(base64_decode($payload), true); + if (!$payload || $this->invalidPayload($payload)) { + throw new DecryptException('Invalid data.'); + } + if (!$this->validMac($payload)) { + throw new DecryptException('MAC is invalid.'); + } + return $payload; + } + protected function validMac(array $payload) + { + if (!function_exists('openssl_random_pseudo_bytes')) { + throw new \RuntimeException('OpenSSL extension is required.'); + } + $bytes = (new SecureRandom())->nextBytes(16); + $calcMac = hash_hmac('sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true); + return StringUtils::equals(hash_hmac('sha256', $payload['mac'], $bytes, true), $calcMac); + } + protected function hash($iv, $value) + { + return hash_hmac('sha256', $iv . $value, $this->key); + } + protected function addPadding($value) + { + $pad = $this->block - strlen($value) % $this->block; + return $value . str_repeat(chr($pad), $pad); + } + protected function stripPadding($value) + { + $pad = ord($value[($len = strlen($value)) - 1]); + return $this->paddingIsValid($pad, $value) ? substr($value, 0, $len - $pad) : $value; + } + protected function paddingIsValid($pad, $value) + { + $beforePad = strlen($value) - $pad; + return substr($value, $beforePad) == str_repeat(substr($value, -1), $pad); + } + protected function invalidPayload($data) + { + return !is_array($data) || !isset($data['iv']) || !isset($data['value']) || !isset($data['mac']); + } + protected function getIvSize() + { + return mcrypt_get_iv_size($this->cipher, $this->mode); + } + protected function getRandomizer() + { + if (defined('MCRYPT_DEV_URANDOM')) { + return MCRYPT_DEV_URANDOM; + } + if (defined('MCRYPT_DEV_RANDOM')) { + return MCRYPT_DEV_RANDOM; + } + mt_srand(); + return MCRYPT_RAND; + } + public function setKey($key) + { + $this->key = (string) $key; + } + public function setCipher($cipher) + { + $this->cipher = $cipher; + $this->updateBlockSize(); + } + public function setMode($mode) + { + $this->mode = $mode; + $this->updateBlockSize(); + } + protected function updateBlockSize() + { + $this->block = mcrypt_get_iv_size($this->cipher, $this->mode); + } +} +namespace Illuminate\Support\Facades; + +class Log extends Facade +{ + protected static function getFacadeAccessor() + { + return 'log'; + } +} +namespace Illuminate\Log; + +use Monolog\Logger; +use Illuminate\Support\ServiceProvider; +class LogServiceProvider extends ServiceProvider +{ + protected $defer = true; + public function register() + { + $logger = new Writer(new Logger($this->app['env']), $this->app['events']); + $this->app->instance('log', $logger); + $this->app->bind('Psr\\Log\\LoggerInterface', function ($app) { + return $app['log']->getMonolog(); + }); + if (isset($this->app['log.setup'])) { + call_user_func($this->app['log.setup'], $logger); + } + } + public function provides() + { + return array('log', 'Psr\\Log\\LoggerInterface'); + } +} +namespace Illuminate\Log; + +use Closure; +use Illuminate\Events\Dispatcher; +use Monolog\Handler\StreamHandler; +use Monolog\Logger as MonologLogger; +use Monolog\Formatter\LineFormatter; +use Monolog\Handler\ErrorLogHandler; +use Monolog\Handler\RotatingFileHandler; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; +class Writer +{ + protected $monolog; + protected $levels = array('debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'); + protected $dispatcher; + public function __construct(MonologLogger $monolog, Dispatcher $dispatcher = null) + { + $this->monolog = $monolog; + if (isset($dispatcher)) { + $this->dispatcher = $dispatcher; + } + } + protected function callMonolog($method, $parameters) + { + if (is_array($parameters[0])) { + $parameters[0] = json_encode($parameters[0]); + } + return call_user_func_array(array($this->monolog, $method), $parameters); + } + public function useFiles($path, $level = 'debug') + { + $level = $this->parseLevel($level); + $this->monolog->pushHandler($handler = new StreamHandler($path, $level)); + $handler->setFormatter($this->getDefaultFormatter()); + } + public function useDailyFiles($path, $days = 0, $level = 'debug') + { + $level = $this->parseLevel($level); + $this->monolog->pushHandler($handler = new RotatingFileHandler($path, $days, $level)); + $handler->setFormatter($this->getDefaultFormatter()); + } + public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OPERATING_SYSTEM) + { + $level = $this->parseLevel($level); + $this->monolog->pushHandler($handler = new ErrorLogHandler($messageType, $level)); + $handler->setFormatter($this->getDefaultFormatter()); + } + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true); + } + protected function parseLevel($level) + { + switch ($level) { + case 'debug': + return MonologLogger::DEBUG; + case 'info': + return MonologLogger::INFO; + case 'notice': + return MonologLogger::NOTICE; + case 'warning': + return MonologLogger::WARNING; + case 'error': + return MonologLogger::ERROR; + case 'critical': + return MonologLogger::CRITICAL; + case 'alert': + return MonologLogger::ALERT; + case 'emergency': + return MonologLogger::EMERGENCY; + default: + throw new \InvalidArgumentException('Invalid log level.'); + } + } + public function listen(Closure $callback) + { + if (!isset($this->dispatcher)) { + throw new \RuntimeException('Events dispatcher has not been set.'); + } + $this->dispatcher->listen('illuminate.log', $callback); + } + public function getMonolog() + { + return $this->monolog; + } + public function getEventDispatcher() + { + return $this->dispatcher; + } + public function setEventDispatcher(Dispatcher $dispatcher) + { + $this->dispatcher = $dispatcher; + } + protected function fireLogEvent($level, $message, array $context = array()) + { + if (isset($this->dispatcher)) { + $this->dispatcher->fire('illuminate.log', compact('level', 'message', 'context')); + } + } + public function write() + { + $level = head(func_get_args()); + return call_user_func_array(array($this, $level), array_slice(func_get_args(), 1)); + } + public function __call($method, $parameters) + { + if (in_array($method, $this->levels)) { + $this->formatParameters($parameters); + call_user_func_array(array($this, 'fireLogEvent'), array_merge(array($method), $parameters)); + $method = 'add' . ucfirst($method); + return $this->callMonolog($method, $parameters); + } + throw new \BadMethodCallException("Method [{$method}] does not exist."); + } + protected function formatParameters(&$parameters) + { + if (isset($parameters[0])) { + if (is_array($parameters[0])) { + $parameters[0] = var_export($parameters[0], true); + } elseif ($parameters[0] instanceof JsonableInterface) { + $parameters[0] = $parameters[0]->toJson(); + } elseif ($parameters[0] instanceof ArrayableInterface) { + $parameters[0] = var_export($parameters[0]->toArray(), true); + } + } + } +} +namespace Monolog; + +use Monolog\Handler\HandlerInterface; +use Monolog\Handler\StreamHandler; +use Psr\Log\LoggerInterface; +use Psr\Log\InvalidArgumentException; +class Logger implements LoggerInterface +{ + const DEBUG = 100; + const INFO = 200; + const NOTICE = 250; + const WARNING = 300; + const ERROR = 400; + const CRITICAL = 500; + const ALERT = 550; + const EMERGENCY = 600; + const API = 1; + protected static $levels = array(100 => 'DEBUG', 200 => 'INFO', 250 => 'NOTICE', 300 => 'WARNING', 400 => 'ERROR', 500 => 'CRITICAL', 550 => 'ALERT', 600 => 'EMERGENCY'); + protected static $timezone; + protected $name; + protected $handlers; + protected $processors; + public function __construct($name, array $handlers = array(), array $processors = array()) + { + $this->name = $name; + $this->handlers = $handlers; + $this->processors = $processors; + } + public function getName() + { + return $this->name; + } + public function pushHandler(HandlerInterface $handler) + { + array_unshift($this->handlers, $handler); + } + public function popHandler() + { + if (!$this->handlers) { + throw new \LogicException('You tried to pop from an empty handler stack.'); + } + return array_shift($this->handlers); + } + public function getHandlers() + { + return $this->handlers; + } + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), ' . var_export($callback, true) . ' given'); + } + array_unshift($this->processors, $callback); + } + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + return array_shift($this->processors); + } + public function getProcessors() + { + return $this->processors; + } + public function addRecord($level, $message, array $context = array()) + { + if (!$this->handlers) { + $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); + } + $levelName = static::getLevelName($level); + $handlerKey = null; + foreach ($this->handlers as $key => $handler) { + if ($handler->isHandling(array('level' => $level))) { + $handlerKey = $key; + break; + } + } + if (null === $handlerKey) { + return false; + } + if (!static::$timezone) { + static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); + } + $record = array('message' => (string) $message, 'context' => $context, 'level' => $level, 'level_name' => $levelName, 'channel' => $this->name, 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone)->setTimezone(static::$timezone), 'extra' => array()); + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + while (isset($this->handlers[$handlerKey]) && false === $this->handlers[$handlerKey]->handle($record)) { + $handlerKey++; + } + return true; + } + public function addDebug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + public function addInfo($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + public function addNotice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + public function addWarning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + public function addError($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + public function addCritical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + public function addAlert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + public function addEmergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + public static function getLevels() + { + return array_flip(static::$levels); + } + public static function getLevelName($level) + { + if (!isset(static::$levels[$level])) { + throw new InvalidArgumentException('Level "' . $level . '" is not defined, use one of: ' . implode(', ', array_keys(static::$levels))); + } + return static::$levels[$level]; + } + public static function toMonologLevel($level) + { + if (is_string($level) && defined(__CLASS__ . '::' . strtoupper($level))) { + return constant(__CLASS__ . '::' . strtoupper($level)); + } + return $level; + } + public function isHandling($level) + { + $record = array('level' => $level); + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + return false; + } + public function log($level, $message, array $context = array()) + { + if (is_string($level) && defined(__CLASS__ . '::' . strtoupper($level))) { + $level = constant(__CLASS__ . '::' . strtoupper($level)); + } + return $this->addRecord($level, $message, $context); + } + public function debug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + public function info($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + public function notice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + public function warn($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + public function warning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + public function err($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + public function error($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + public function crit($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + public function critical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + public function alert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + public function emerg($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + public function emergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } +} +namespace Psr\Log; + +interface LoggerInterface +{ + public function emergency($message, array $context = array()); + public function alert($message, array $context = array()); + public function critical($message, array $context = array()); + public function error($message, array $context = array()); + public function warning($message, array $context = array()); + public function notice($message, array $context = array()); + public function info($message, array $context = array()); + public function debug($message, array $context = array()); + public function log($level, $message, array $context = array()); +} +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +abstract class AbstractHandler implements HandlerInterface +{ + protected $level = Logger::DEBUG; + protected $bubble = true; + protected $formatter; + protected $processors = array(); + public function __construct($level = Logger::DEBUG, $bubble = true) + { + $this->setLevel($level); + $this->bubble = $bubble; + } + public function isHandling(array $record) + { + return $record['level'] >= $this->level; + } + public function handleBatch(array $records) + { + foreach ($records as $record) { + $this->handle($record); + } + } + public function close() + { + + } + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), ' . var_export($callback, true) . ' given'); + } + array_unshift($this->processors, $callback); + return $this; + } + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + return array_shift($this->processors); + } + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + return $this; + } + public function getFormatter() + { + if (!$this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + return $this->formatter; + } + public function setLevel($level) + { + $this->level = Logger::toMonologLevel($level); + return $this; + } + public function getLevel() + { + return $this->level; + } + public function setBubble($bubble) + { + $this->bubble = $bubble; + return $this; + } + public function getBubble() + { + return $this->bubble; + } + public function __destruct() + { + try { + $this->close(); + } catch (\Exception $e) { + + } + } + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} +namespace Monolog\Handler; + +abstract class AbstractProcessingHandler extends AbstractHandler +{ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + $record = $this->processRecord($record); + $record['formatted'] = $this->getFormatter()->format($record); + $this->write($record); + return false === $this->bubble; + } + protected abstract function write(array $record); + protected function processRecord(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + return $record; + } +} +namespace Monolog\Handler; + +use Monolog\Logger; +class StreamHandler extends AbstractProcessingHandler +{ + protected $stream; + protected $url; + private $errorMessage; + protected $filePermission; + protected $useLocking; + public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + parent::__construct($level, $bubble); + if (is_resource($stream)) { + $this->stream = $stream; + } elseif (is_string($stream)) { + $this->url = $stream; + } else { + throw new \InvalidArgumentException('A stream must either be a resource or a string.'); + } + $this->filePermission = $filePermission; + $this->useLocking = $useLocking; + } + public function close() + { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->stream = null; + } + protected function write(array $record) + { + if (!is_resource($this->stream)) { + if (!$this->url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + } + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $this->stream = fopen($this->url, 'a'); + if ($this->filePermission !== null) { + @chmod($this->url, $this->filePermission); + } + restore_error_handler(); + if (!is_resource($this->stream)) { + $this->stream = null; + throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: ' . $this->errorMessage, $this->url)); + } + } + if ($this->useLocking) { + flock($this->stream, LOCK_EX); + } + fwrite($this->stream, (string) $record['formatted']); + if ($this->useLocking) { + flock($this->stream, LOCK_UN); + } + } + private function customErrorHandler($code, $msg) + { + $this->errorMessage = preg_replace('{^fopen\\(.*?\\): }', '', $msg); + } +} +namespace Monolog\Handler; + +use Monolog\Logger; +class RotatingFileHandler extends StreamHandler +{ + protected $filename; + protected $maxFiles; + protected $mustRotate; + protected $nextRotation; + protected $filenameFormat; + protected $dateFormat; + public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + $this->filename = $filename; + $this->maxFiles = (int) $maxFiles; + $this->nextRotation = new \DateTime('tomorrow'); + $this->filenameFormat = '{filename}-{date}'; + $this->dateFormat = 'Y-m-d'; + parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); + } + public function close() + { + parent::close(); + if (true === $this->mustRotate) { + $this->rotate(); + } + } + public function setFilenameFormat($filenameFormat, $dateFormat) + { + $this->filenameFormat = $filenameFormat; + $this->dateFormat = $dateFormat; + $this->url = $this->getTimedFilename(); + $this->close(); + } + protected function write(array $record) + { + if (null === $this->mustRotate) { + $this->mustRotate = !file_exists($this->url); + } + if ($this->nextRotation < $record['datetime']) { + $this->mustRotate = true; + $this->close(); + } + parent::write($record); + } + protected function rotate() + { + $this->url = $this->getTimedFilename(); + $this->nextRotation = new \DateTime('tomorrow'); + if (0 === $this->maxFiles) { + return; + } + $logFiles = glob($this->getGlobPattern()); + if ($this->maxFiles >= count($logFiles)) { + return; + } + usort($logFiles, function ($a, $b) { + return strcmp($b, $a); + }); + foreach (array_slice($logFiles, $this->maxFiles) as $file) { + if (is_writable($file)) { + unlink($file); + } + } + } + protected function getTimedFilename() + { + $fileInfo = pathinfo($this->filename); + $timedFilename = str_replace(array('{filename}', '{date}'), array($fileInfo['filename'], date($this->dateFormat)), $fileInfo['dirname'] . '/' . $this->filenameFormat); + if (!empty($fileInfo['extension'])) { + $timedFilename .= '.' . $fileInfo['extension']; + } + return $timedFilename; + } + protected function getGlobPattern() + { + $fileInfo = pathinfo($this->filename); + $glob = str_replace(array('{filename}', '{date}'), array($fileInfo['filename'], '*'), $fileInfo['dirname'] . '/' . $this->filenameFormat); + if (!empty($fileInfo['extension'])) { + $glob .= '.' . $fileInfo['extension']; + } + return $glob; + } +} +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +interface HandlerInterface +{ + public function isHandling(array $record); + public function handle(array $record); + public function handleBatch(array $records); + public function pushProcessor($callback); + public function popProcessor(); + public function setFormatter(FormatterInterface $formatter); + public function getFormatter(); +} +namespace Illuminate\Support\Facades; + +class App extends Facade +{ + protected static function getFacadeAccessor() + { + return 'app'; + } +} +namespace Illuminate\Exception; + +use Exception; +interface ExceptionDisplayerInterface +{ + public function display(Exception $exception); +} +namespace Illuminate\Exception; + +use Exception; +use Symfony\Component\Debug\ExceptionHandler; +use Symfony\Component\HttpFoundation\JsonResponse; +class SymfonyDisplayer implements ExceptionDisplayerInterface +{ + protected $symfony; + protected $returnJson; + public function __construct(ExceptionHandler $symfony, $returnJson = false) + { + $this->symfony = $symfony; + $this->returnJson = $returnJson; + } + public function display(Exception $exception) + { + if ($this->returnJson) { + return new JsonResponse(array('error' => $exception->getMessage(), 'file' => $exception->getFile(), 'line' => $exception->getLine()), 500); + } + return $this->symfony->createResponse($exception); + } +} +namespace Illuminate\Exception; + +use Exception; +use Whoops\Run; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +class WhoopsDisplayer implements ExceptionDisplayerInterface +{ + protected $whoops; + protected $runningInConsole; + public function __construct(Run $whoops, $runningInConsole) + { + $this->whoops = $whoops; + $this->runningInConsole = $runningInConsole; + } + public function display(Exception $exception) + { + $status = $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500; + $headers = $exception instanceof HttpExceptionInterface ? $exception->getHeaders() : array(); + return new Response($this->whoops->handleException($exception), $status, $headers); + } +} +namespace Illuminate\Exception; + +use Closure; +use ErrorException; +use ReflectionFunction; +use Illuminate\Support\Contracts\ResponsePreparerInterface; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +use Symfony\Component\Debug\Exception\FatalErrorException as FatalError; +class Handler +{ + protected $responsePreparer; + protected $plainDisplayer; + protected $debugDisplayer; + protected $debug; + protected $handlers = array(); + protected $handled = array(); + public function __construct(ResponsePreparerInterface $responsePreparer, ExceptionDisplayerInterface $plainDisplayer, ExceptionDisplayerInterface $debugDisplayer, $debug = true) + { + $this->debug = $debug; + $this->plainDisplayer = $plainDisplayer; + $this->debugDisplayer = $debugDisplayer; + $this->responsePreparer = $responsePreparer; + } + public function register($environment) + { + $this->registerErrorHandler(); + $this->registerExceptionHandler(); + if ($environment != 'testing') { + $this->registerShutdownHandler(); + } + } + protected function registerErrorHandler() + { + set_error_handler(array($this, 'handleError')); + } + protected function registerExceptionHandler() + { + set_exception_handler(array($this, 'handleUncaughtException')); + } + protected function registerShutdownHandler() + { + register_shutdown_function(array($this, 'handleShutdown')); + } + public function handleError($level, $message, $file = '', $line = 0, $context = array()) + { + if (error_reporting() & $level) { + throw new ErrorException($message, 0, $level, $file, $line); + } + } + public function handleException($exception) + { + $response = $this->callCustomHandlers($exception); + if (!is_null($response)) { + return $this->prepareResponse($response); + } + return $this->displayException($exception); + } + public function handleUncaughtException($exception) + { + $this->handleException($exception)->send(); + } + public function handleShutdown() + { + $error = error_get_last(); + if (!is_null($error)) { + extract($error); + if (!$this->isFatal($type)) { + return; + } + $this->handleException(new FatalError($message, $type, 0, $file, $line))->send(); + } + } + protected function isFatal($type) + { + return in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE)); + } + public function handleConsole($exception) + { + return $this->callCustomHandlers($exception, true); + } + protected function callCustomHandlers($exception, $fromConsole = false) + { + foreach ($this->handlers as $handler) { + if (!$this->handlesException($handler, $exception)) { + continue; + } elseif ($exception instanceof HttpExceptionInterface) { + $code = $exception->getStatusCode(); + } else { + $code = 500; + } + try { + $response = $handler($exception, $code, $fromConsole); + } catch (\Exception $e) { + $response = $this->formatException($e); + } + if (isset($response) && !is_null($response)) { + return $response; + } + } + } + protected function displayException($exception) + { + $displayer = $this->debug ? $this->debugDisplayer : $this->plainDisplayer; + return $displayer->display($exception); + } + protected function handlesException(Closure $handler, $exception) + { + $reflection = new ReflectionFunction($handler); + return $reflection->getNumberOfParameters() == 0 || $this->hints($reflection, $exception); + } + protected function hints(ReflectionFunction $reflection, $exception) + { + $parameters = $reflection->getParameters(); + $expected = $parameters[0]; + return !$expected->getClass() || $expected->getClass()->isInstance($exception); + } + protected function formatException(\Exception $e) + { + if ($this->debug) { + $location = $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine(); + return 'Error in exception handler: ' . $location; + } + return 'Error in exception handler.'; + } + public function error(Closure $callback) + { + array_unshift($this->handlers, $callback); + } + public function pushError(Closure $callback) + { + $this->handlers[] = $callback; + } + protected function prepareResponse($response) + { + return $this->responsePreparer->prepareResponse($response); + } + public function runningInConsole() + { + return php_sapi_name() == 'cli'; + } + public function setDebug($debug) + { + $this->debug = $debug; + } +} +namespace Illuminate\Support\Facades; + +class Route extends Facade +{ + protected static function getFacadeAccessor() + { + return 'router'; + } +} +namespace Illuminate\View\Engines; + +use Closure; +class EngineResolver +{ + protected $resolvers = array(); + protected $resolved = array(); + public function register($engine, Closure $resolver) + { + $this->resolvers[$engine] = $resolver; + } + public function resolve($engine) + { + if (isset($this->resolved[$engine])) { + return $this->resolved[$engine]; + } + if (isset($this->resolvers[$engine])) { + return $this->resolved[$engine] = call_user_func($this->resolvers[$engine]); + } + throw new \InvalidArgumentException("Engine {$engine} not found."); + } +} +namespace Illuminate\View; + +interface ViewFinderInterface +{ + public function find($view); + public function addLocation($location); + public function addNamespace($namespace, $hints); + public function prependNamespace($namespace, $hints); + public function addExtension($extension); +} +namespace Illuminate\View; + +use Illuminate\Filesystem\Filesystem; +class FileViewFinder implements ViewFinderInterface +{ + protected $files; + protected $paths; + protected $views = array(); + protected $hints = array(); + protected $extensions = array('blade.php', 'php'); + const HINT_PATH_DELIMITER = '::'; + public function __construct(Filesystem $files, array $paths, array $extensions = null) + { + $this->files = $files; + $this->paths = $paths; + if (isset($extensions)) { + $this->extensions = $extensions; + } + } + public function find($name) + { + if (isset($this->views[$name])) { + return $this->views[$name]; + } + if ($this->hasHintInformation($name = trim($name))) { + return $this->views[$name] = $this->findNamedPathView($name); + } + return $this->views[$name] = $this->findInPaths($name, $this->paths); + } + protected function findNamedPathView($name) + { + list($namespace, $view) = $this->getNamespaceSegments($name); + return $this->findInPaths($view, $this->hints[$namespace]); + } + protected function getNamespaceSegments($name) + { + $segments = explode(static::HINT_PATH_DELIMITER, $name); + if (count($segments) != 2) { + throw new \InvalidArgumentException("View [{$name}] has an invalid name."); + } + if (!isset($this->hints[$segments[0]])) { + throw new \InvalidArgumentException("No hint path defined for [{$segments[0]}]."); + } + return $segments; + } + protected function findInPaths($name, $paths) + { + foreach ((array) $paths as $path) { + foreach ($this->getPossibleViewFiles($name) as $file) { + if ($this->files->exists($viewPath = $path . '/' . $file)) { + return $viewPath; + } + } + } + throw new \InvalidArgumentException("View [{$name}] not found."); + } + protected function getPossibleViewFiles($name) + { + return array_map(function ($extension) use($name) { + return str_replace('.', '/', $name) . '.' . $extension; + }, $this->extensions); + } + public function addLocation($location) + { + $this->paths[] = $location; + } + public function addNamespace($namespace, $hints) + { + $hints = (array) $hints; + if (isset($this->hints[$namespace])) { + $hints = array_merge($this->hints[$namespace], $hints); + } + $this->hints[$namespace] = $hints; + } + public function prependNamespace($namespace, $hints) + { + $hints = (array) $hints; + if (isset($this->hints[$namespace])) { + $hints = array_merge($hints, $this->hints[$namespace]); + } + $this->hints[$namespace] = $hints; + } + public function addExtension($extension) + { + if (($index = array_search($extension, $this->extensions)) !== false) { + unset($this->extensions[$index]); + } + array_unshift($this->extensions, $extension); + } + public function hasHintInformation($name) + { + return strpos($name, static::HINT_PATH_DELIMITER) > 0; + } + public function getFilesystem() + { + return $this->files; + } + public function getPaths() + { + return $this->paths; + } + public function getHints() + { + return $this->hints; + } + public function getExtensions() + { + return $this->extensions; + } +} +namespace Illuminate\Support\Contracts; + +interface MessageProviderInterface +{ + public function getMessageBag(); +} +namespace Illuminate\Support; + +use Countable; +use JsonSerializable; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; +use Illuminate\Support\Contracts\MessageProviderInterface; +class MessageBag implements ArrayableInterface, Countable, JsonableInterface, MessageProviderInterface, JsonSerializable +{ + protected $messages = array(); + protected $format = ':message'; + public function __construct(array $messages = array()) + { + foreach ($messages as $key => $value) { + $this->messages[$key] = (array) $value; + } + } + public function add($key, $message) + { + if ($this->isUnique($key, $message)) { + $this->messages[$key][] = $message; + } + return $this; + } + public function merge($messages) + { + if ($messages instanceof MessageProviderInterface) { + $messages = $messages->getMessageBag()->getMessages(); + } + $this->messages = array_merge_recursive($this->messages, $messages); + return $this; + } + protected function isUnique($key, $message) + { + $messages = (array) $this->messages; + return !isset($messages[$key]) || !in_array($message, $messages[$key]); + } + public function has($key = null) + { + return $this->first($key) !== ''; + } + public function first($key = null, $format = null) + { + $messages = is_null($key) ? $this->all($format) : $this->get($key, $format); + return count($messages) > 0 ? $messages[0] : ''; + } + public function get($key, $format = null) + { + $format = $this->checkFormat($format); + if (array_key_exists($key, $this->messages)) { + return $this->transform($this->messages[$key], $format, $key); + } + return array(); + } + public function all($format = null) + { + $format = $this->checkFormat($format); + $all = array(); + foreach ($this->messages as $key => $messages) { + $all = array_merge($all, $this->transform($messages, $format, $key)); + } + return $all; + } + protected function transform($messages, $format, $messageKey) + { + $messages = (array) $messages; + foreach ($messages as &$message) { + $replace = array(':message', ':key'); + $message = str_replace($replace, array($message, $messageKey), $format); + } + return $messages; + } + protected function checkFormat($format) + { + return $format === null ? $this->format : $format; + } + public function getMessages() + { + return $this->messages; + } + public function getMessageBag() + { + return $this; + } + public function getFormat() + { + return $this->format; + } + public function setFormat($format = ':message') + { + $this->format = $format; + return $this; + } + public function isEmpty() + { + return !$this->any(); + } + public function any() + { + return $this->count() > 0; + } + public function count() + { + return count($this->messages, COUNT_RECURSIVE) - count($this->messages); + } + public function toArray() + { + return $this->getMessages(); + } + public function jsonSerialize() + { + return $this->toArray(); + } + public function toJson($options = 0) + { + return json_encode($this->toArray(), $options); + } + public function __toString() + { + return $this->toJson(); + } +} +namespace Illuminate\Support\Facades; + +class View extends Facade +{ + protected static function getFacadeAccessor() + { + return 'view'; + } +} +namespace Illuminate\Support\Contracts; + +interface RenderableInterface +{ + public function render(); +} +namespace Illuminate\View; + +use ArrayAccess; +use Closure; +use Illuminate\Support\MessageBag; +use Illuminate\View\Engines\EngineInterface; +use Illuminate\Support\Contracts\MessageProviderInterface; +use Illuminate\Support\Contracts\ArrayableInterface as Arrayable; +use Illuminate\Support\Contracts\RenderableInterface as Renderable; +class View implements ArrayAccess, Renderable +{ + protected $factory; + protected $engine; + protected $view; + protected $data; + protected $path; + public function __construct(Factory $factory, EngineInterface $engine, $view, $path, $data = array()) + { + $this->view = $view; + $this->path = $path; + $this->engine = $engine; + $this->factory = $factory; + $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data; + } + public function render(Closure $callback = null) + { + $contents = $this->renderContents(); + $response = isset($callback) ? $callback($this, $contents) : null; + $this->factory->flushSectionsIfDoneRendering(); + return $response ?: $contents; + } + protected function renderContents() + { + $this->factory->incrementRender(); + $this->factory->callComposer($this); + $contents = $this->getContents(); + $this->factory->decrementRender(); + return $contents; + } + public function renderSections() + { + $env = $this->factory; + return $this->render(function ($view) use($env) { + return $env->getSections(); + }); + } + protected function getContents() + { + return $this->engine->get($this->path, $this->gatherData()); + } + protected function gatherData() + { + $data = array_merge($this->factory->getShared(), $this->data); + foreach ($data as $key => $value) { + if ($value instanceof Renderable) { + $data[$key] = $value->render(); + } + } + return $data; + } + public function with($key, $value = null) + { + if (is_array($key)) { + $this->data = array_merge($this->data, $key); + } else { + $this->data[$key] = $value; + } + return $this; + } + public function nest($key, $view, array $data = array()) + { + return $this->with($key, $this->factory->make($view, $data)); + } + public function withErrors($provider) + { + if ($provider instanceof MessageProviderInterface) { + $this->with('errors', $provider->getMessageBag()); + } else { + $this->with('errors', new MessageBag((array) $provider)); + } + return $this; + } + public function getFactory() + { + return $this->factory; + } + public function getEngine() + { + return $this->engine; + } + public function getName() + { + return $this->view; + } + public function getData() + { + return $this->data; + } + public function getPath() + { + return $this->path; + } + public function setPath($path) + { + $this->path = $path; + } + public function offsetExists($key) + { + return array_key_exists($key, $this->data); + } + public function offsetGet($key) + { + return $this->data[$key]; + } + public function offsetSet($key, $value) + { + $this->with($key, $value); + } + public function offsetUnset($key) + { + unset($this->data[$key]); + } + public function &__get($key) + { + return $this->data[$key]; + } + public function __set($key, $value) + { + $this->with($key, $value); + } + public function __isset($key) + { + return isset($this->data[$key]); + } + public function __unset($key) + { + unset($this->data[$key]); + } + public function __call($method, $parameters) + { + if (starts_with($method, 'with')) { + return $this->with(snake_case(substr($method, 4)), $parameters[0]); + } + throw new \BadMethodCallException("Method [{$method}] does not exist on view."); + } + public function __toString() + { + return $this->render(); + } +} +namespace Illuminate\View\Engines; + +interface EngineInterface +{ + public function get($path, array $data = array()); +} +namespace Illuminate\View\Engines; + +class PhpEngine implements EngineInterface +{ + public function get($path, array $data = array()) + { + return $this->evaluatePath($path, $data); + } + protected function evaluatePath($__path, $__data) + { + $obLevel = ob_get_level(); + ob_start(); + extract($__data); + try { + include $__path; + } catch (\Exception $e) { + $this->handleViewException($e, $obLevel); + } + return ltrim(ob_get_clean()); + } + protected function handleViewException($e, $obLevel) + { + while (ob_get_level() > $obLevel) { + ob_end_clean(); + } + throw $e; + } +} +namespace Symfony\Component\HttpFoundation; + +class Response +{ + const HTTP_CONTINUE = 100; + const HTTP_SWITCHING_PROTOCOLS = 101; + const HTTP_PROCESSING = 102; + const HTTP_OK = 200; + const HTTP_CREATED = 201; + const HTTP_ACCEPTED = 202; + const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; + const HTTP_NO_CONTENT = 204; + const HTTP_RESET_CONTENT = 205; + const HTTP_PARTIAL_CONTENT = 206; + const HTTP_MULTI_STATUS = 207; + const HTTP_ALREADY_REPORTED = 208; + const HTTP_IM_USED = 226; + const HTTP_MULTIPLE_CHOICES = 300; + const HTTP_MOVED_PERMANENTLY = 301; + const HTTP_FOUND = 302; + const HTTP_SEE_OTHER = 303; + const HTTP_NOT_MODIFIED = 304; + const HTTP_USE_PROXY = 305; + const HTTP_RESERVED = 306; + const HTTP_TEMPORARY_REDIRECT = 307; + const HTTP_PERMANENTLY_REDIRECT = 308; + const HTTP_BAD_REQUEST = 400; + const HTTP_UNAUTHORIZED = 401; + const HTTP_PAYMENT_REQUIRED = 402; + const HTTP_FORBIDDEN = 403; + const HTTP_NOT_FOUND = 404; + const HTTP_METHOD_NOT_ALLOWED = 405; + const HTTP_NOT_ACCEPTABLE = 406; + const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; + const HTTP_REQUEST_TIMEOUT = 408; + const HTTP_CONFLICT = 409; + const HTTP_GONE = 410; + const HTTP_LENGTH_REQUIRED = 411; + const HTTP_PRECONDITION_FAILED = 412; + const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; + const HTTP_REQUEST_URI_TOO_LONG = 414; + const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; + const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; + const HTTP_EXPECTATION_FAILED = 417; + const HTTP_I_AM_A_TEAPOT = 418; + const HTTP_UNPROCESSABLE_ENTITY = 422; + const HTTP_LOCKED = 423; + const HTTP_FAILED_DEPENDENCY = 424; + const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; + const HTTP_UPGRADE_REQUIRED = 426; + const HTTP_PRECONDITION_REQUIRED = 428; + const HTTP_TOO_MANY_REQUESTS = 429; + const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; + const HTTP_INTERNAL_SERVER_ERROR = 500; + const HTTP_NOT_IMPLEMENTED = 501; + const HTTP_BAD_GATEWAY = 502; + const HTTP_SERVICE_UNAVAILABLE = 503; + const HTTP_GATEWAY_TIMEOUT = 504; + const HTTP_VERSION_NOT_SUPPORTED = 505; + const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; + const HTTP_INSUFFICIENT_STORAGE = 507; + const HTTP_LOOP_DETECTED = 508; + const HTTP_NOT_EXTENDED = 510; + const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; + public $headers; + protected $content; + protected $version; + protected $statusCode; + protected $statusText; + protected $charset; + public static $statusTexts = array(100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported', 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Reserved', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Reserved for WebDAV advanced collections expired proposal', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates (Experimental)', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 510 => 'Not Extended', 511 => 'Network Authentication Required'); + public function __construct($content = '', $status = 200, $headers = array()) + { + $this->headers = new ResponseHeaderBag($headers); + $this->setContent($content); + $this->setStatusCode($status); + $this->setProtocolVersion('1.0'); + if (!$this->headers->has('Date')) { + $this->setDate(new \DateTime(null, new \DateTimeZone('UTC'))); + } + } + public static function create($content = '', $status = 200, $headers = array()) + { + return new static($content, $status, $headers); + } + public function __toString() + { + return sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText) . ' +' . $this->headers . ' +' . $this->getContent(); + } + public function __clone() + { + $this->headers = clone $this->headers; + } + public function prepare(Request $request) + { + $headers = $this->headers; + if ($this->isInformational() || in_array($this->statusCode, array(204, 304))) { + $this->setContent(null); + $headers->remove('Content-Type'); + $headers->remove('Content-Length'); + } else { + if (!$headers->has('Content-Type')) { + $format = $request->getRequestFormat(); + if (null !== $format && ($mimeType = $request->getMimeType($format))) { + $headers->set('Content-Type', $mimeType); + } + } + $charset = $this->charset ?: 'UTF-8'; + if (!$headers->has('Content-Type')) { + $headers->set('Content-Type', 'text/html; charset=' . $charset); + } elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) { + $headers->set('Content-Type', $headers->get('Content-Type') . '; charset=' . $charset); + } + if ($headers->has('Transfer-Encoding')) { + $headers->remove('Content-Length'); + } + if ($request->isMethod('HEAD')) { + $length = $headers->get('Content-Length'); + $this->setContent(null); + if ($length) { + $headers->set('Content-Length', $length); + } + } + } + if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) { + $this->setProtocolVersion('1.1'); + } + if ('1.0' == $this->getProtocolVersion() && 'no-cache' == $this->headers->get('Cache-Control')) { + $this->headers->set('pragma', 'no-cache'); + $this->headers->set('expires', -1); + } + $this->ensureIEOverSSLCompatibility($request); + return $this; + } + public function sendHeaders() + { + if (headers_sent()) { + return $this; + } + header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); + foreach ($this->headers->allPreserveCase() as $name => $values) { + foreach ($values as $value) { + header($name . ': ' . $value, false, $this->statusCode); + } + } + foreach ($this->headers->getCookies() as $cookie) { + setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); + } + return $this; + } + public function sendContent() + { + echo $this->content; + return $this; + } + public function send() + { + $this->sendHeaders(); + $this->sendContent(); + if (function_exists('fastcgi_finish_request')) { + fastcgi_finish_request(); + } elseif ('cli' !== PHP_SAPI) { + static::closeOutputBuffers(0, true); + } + return $this; + } + public function setContent($content) + { + if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) { + throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content))); + } + $this->content = (string) $content; + return $this; + } + public function getContent() + { + return $this->content; + } + public function setProtocolVersion($version) + { + $this->version = $version; + return $this; + } + public function getProtocolVersion() + { + return $this->version; + } + public function setStatusCode($code, $text = null) + { + $this->statusCode = $code = (int) $code; + if ($this->isInvalid()) { + throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); + } + if (null === $text) { + $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : ''; + return $this; + } + if (false === $text) { + $this->statusText = ''; + return $this; + } + $this->statusText = $text; + return $this; + } + public function getStatusCode() + { + return $this->statusCode; + } + public function setCharset($charset) + { + $this->charset = $charset; + return $this; + } + public function getCharset() + { + return $this->charset; + } + public function isCacheable() + { + if (!in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) { + return false; + } + if ($this->headers->hasCacheControlDirective('no-store') || $this->headers->getCacheControlDirective('private')) { + return false; + } + return $this->isValidateable() || $this->isFresh(); + } + public function isFresh() + { + return $this->getTtl() > 0; + } + public function isValidateable() + { + return $this->headers->has('Last-Modified') || $this->headers->has('ETag'); + } + public function setPrivate() + { + $this->headers->removeCacheControlDirective('public'); + $this->headers->addCacheControlDirective('private'); + return $this; + } + public function setPublic() + { + $this->headers->addCacheControlDirective('public'); + $this->headers->removeCacheControlDirective('private'); + return $this; + } + public function mustRevalidate() + { + return $this->headers->hasCacheControlDirective('must-revalidate') || $this->headers->has('proxy-revalidate'); + } + public function getDate() + { + return $this->headers->getDate('Date', new \DateTime()); + } + public function setDate(\DateTime $date) + { + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Date', $date->format('D, d M Y H:i:s') . ' GMT'); + return $this; + } + public function getAge() + { + if (null !== ($age = $this->headers->get('Age'))) { + return (int) $age; + } + return max(time() - $this->getDate()->format('U'), 0); + } + public function expire() + { + if ($this->isFresh()) { + $this->headers->set('Age', $this->getMaxAge()); + } + return $this; + } + public function getExpires() + { + try { + return $this->headers->getDate('Expires'); + } catch (\RuntimeException $e) { + return \DateTime::createFromFormat(DATE_RFC2822, 'Sat, 01 Jan 00 00:00:00 +0000'); + } + } + public function setExpires(\DateTime $date = null) + { + if (null === $date) { + $this->headers->remove('Expires'); + } else { + $date = clone $date; + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Expires', $date->format('D, d M Y H:i:s') . ' GMT'); + } + return $this; + } + public function getMaxAge() + { + if ($this->headers->hasCacheControlDirective('s-maxage')) { + return (int) $this->headers->getCacheControlDirective('s-maxage'); + } + if ($this->headers->hasCacheControlDirective('max-age')) { + return (int) $this->headers->getCacheControlDirective('max-age'); + } + if (null !== $this->getExpires()) { + return $this->getExpires()->format('U') - $this->getDate()->format('U'); + } + } + public function setMaxAge($value) + { + $this->headers->addCacheControlDirective('max-age', $value); + return $this; + } + public function setSharedMaxAge($value) + { + $this->setPublic(); + $this->headers->addCacheControlDirective('s-maxage', $value); + return $this; + } + public function getTtl() + { + if (null !== ($maxAge = $this->getMaxAge())) { + return $maxAge - $this->getAge(); + } + } + public function setTtl($seconds) + { + $this->setSharedMaxAge($this->getAge() + $seconds); + return $this; + } + public function setClientTtl($seconds) + { + $this->setMaxAge($this->getAge() + $seconds); + return $this; + } + public function getLastModified() + { + return $this->headers->getDate('Last-Modified'); + } + public function setLastModified(\DateTime $date = null) + { + if (null === $date) { + $this->headers->remove('Last-Modified'); + } else { + $date = clone $date; + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s') . ' GMT'); + } + return $this; + } + public function getEtag() + { + return $this->headers->get('ETag'); + } + public function setEtag($etag = null, $weak = false) + { + if (null === $etag) { + $this->headers->remove('Etag'); + } else { + if (0 !== strpos($etag, '"')) { + $etag = '"' . $etag . '"'; + } + $this->headers->set('ETag', (true === $weak ? 'W/' : '') . $etag); + } + return $this; + } + public function setCache(array $options) + { + if ($diff = array_diff(array_keys($options), array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public'))) { + throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', array_values($diff)))); + } + if (isset($options['etag'])) { + $this->setEtag($options['etag']); + } + if (isset($options['last_modified'])) { + $this->setLastModified($options['last_modified']); + } + if (isset($options['max_age'])) { + $this->setMaxAge($options['max_age']); + } + if (isset($options['s_maxage'])) { + $this->setSharedMaxAge($options['s_maxage']); + } + if (isset($options['public'])) { + if ($options['public']) { + $this->setPublic(); + } else { + $this->setPrivate(); + } + } + if (isset($options['private'])) { + if ($options['private']) { + $this->setPrivate(); + } else { + $this->setPublic(); + } + } + return $this; + } + public function setNotModified() + { + $this->setStatusCode(304); + $this->setContent(null); + foreach (array('Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified') as $header) { + $this->headers->remove($header); + } + return $this; + } + public function hasVary() + { + return null !== $this->headers->get('Vary'); + } + public function getVary() + { + if (!($vary = $this->headers->get('Vary', null, false))) { + return array(); + } + $ret = array(); + foreach ($vary as $item) { + $ret = array_merge($ret, preg_split('/[\\s,]+/', $item)); + } + return $ret; + } + public function setVary($headers, $replace = true) + { + $this->headers->set('Vary', $headers, $replace); + return $this; + } + public function isNotModified(Request $request) + { + if (!$request->isMethodSafe()) { + return false; + } + $notModified = false; + $lastModified = $this->headers->get('Last-Modified'); + $modifiedSince = $request->headers->get('If-Modified-Since'); + if ($etags = $request->getEtags()) { + $notModified = in_array($this->getEtag(), $etags) || in_array('*', $etags); + } + if ($modifiedSince && $lastModified) { + $notModified = strtotime($modifiedSince) >= strtotime($lastModified) && (!$etags || $notModified); + } + if ($notModified) { + $this->setNotModified(); + } + return $notModified; + } + public function isInvalid() + { + return $this->statusCode < 100 || $this->statusCode >= 600; + } + public function isInformational() + { + return $this->statusCode >= 100 && $this->statusCode < 200; + } + public function isSuccessful() + { + return $this->statusCode >= 200 && $this->statusCode < 300; + } + public function isRedirection() + { + return $this->statusCode >= 300 && $this->statusCode < 400; + } + public function isClientError() + { + return $this->statusCode >= 400 && $this->statusCode < 500; + } + public function isServerError() + { + return $this->statusCode >= 500 && $this->statusCode < 600; + } + public function isOk() + { + return 200 === $this->statusCode; + } + public function isForbidden() + { + return 403 === $this->statusCode; + } + public function isNotFound() + { + return 404 === $this->statusCode; + } + public function isRedirect($location = null) + { + return in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location')); + } + public function isEmpty() + { + return in_array($this->statusCode, array(204, 304)); + } + public static function closeOutputBuffers($targetLevel, $flush) + { + $status = ob_get_status(true); + $level = count($status); + while ($level-- > $targetLevel && (!empty($status[$level]['del']) || isset($status[$level]['flags']) && $status[$level]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE && $status[$level]['flags'] & ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE))) { + if ($flush) { + ob_end_flush(); + } else { + ob_end_clean(); + } + } + } + protected function ensureIEOverSSLCompatibility(Request $request) + { + if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) { + if (intval(preg_replace('/(MSIE )(.*?);/', '$2', $match[0])) < 9) { + $this->headers->remove('Cache-Control'); + } + } + } +} +namespace Illuminate\Http; + +use Symfony\Component\HttpFoundation\Cookie; +trait ResponseTrait +{ + public function header($key, $value, $replace = true) + { + $this->headers->set($key, $value, $replace); + return $this; + } + public function withCookie(Cookie $cookie) + { + $this->headers->setCookie($cookie); + return $this; + } +} +namespace Illuminate\Http; + +use ArrayObject; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\RenderableInterface; +class Response extends \Symfony\Component\HttpFoundation\Response +{ + use ResponseTrait; + public $original; + public function setContent($content) + { + $this->original = $content; + if ($this->shouldBeJson($content)) { + $this->headers->set('Content-Type', 'application/json'); + $content = $this->morphToJson($content); + } elseif ($content instanceof RenderableInterface) { + $content = $content->render(); + } + return parent::setContent($content); + } + protected function morphToJson($content) + { + if ($content instanceof JsonableInterface) { + return $content->toJson(); + } + return json_encode($content); + } + protected function shouldBeJson($content) + { + return $content instanceof JsonableInterface || $content instanceof ArrayObject || is_array($content); + } + public function getOriginalContent() + { + return $this->original; + } +} +namespace Symfony\Component\HttpFoundation; + +class ResponseHeaderBag extends HeaderBag +{ + const COOKIES_FLAT = 'flat'; + const COOKIES_ARRAY = 'array'; + const DISPOSITION_ATTACHMENT = 'attachment'; + const DISPOSITION_INLINE = 'inline'; + protected $computedCacheControl = array(); + protected $cookies = array(); + protected $headerNames = array(); + public function __construct(array $headers = array()) + { + parent::__construct($headers); + if (!isset($this->headers['cache-control'])) { + $this->set('Cache-Control', ''); + } + } + public function __toString() + { + $cookies = ''; + foreach ($this->getCookies() as $cookie) { + $cookies .= 'Set-Cookie: ' . $cookie . ' +'; + } + ksort($this->headerNames); + return parent::__toString() . $cookies; + } + public function allPreserveCase() + { + return array_combine($this->headerNames, $this->headers); + } + public function replace(array $headers = array()) + { + $this->headerNames = array(); + parent::replace($headers); + if (!isset($this->headers['cache-control'])) { + $this->set('Cache-Control', ''); + } + } + public function set($key, $values, $replace = true) + { + parent::set($key, $values, $replace); + $uniqueKey = strtr(strtolower($key), '_', '-'); + $this->headerNames[$uniqueKey] = $key; + if (in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'))) { + $computed = $this->computeCacheControlValue(); + $this->headers['cache-control'] = array($computed); + $this->headerNames['cache-control'] = 'Cache-Control'; + $this->computedCacheControl = $this->parseCacheControl($computed); + } + } + public function remove($key) + { + parent::remove($key); + $uniqueKey = strtr(strtolower($key), '_', '-'); + unset($this->headerNames[$uniqueKey]); + if ('cache-control' === $uniqueKey) { + $this->computedCacheControl = array(); + } + } + public function hasCacheControlDirective($key) + { + return array_key_exists($key, $this->computedCacheControl); + } + public function getCacheControlDirective($key) + { + return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; + } + public function setCookie(Cookie $cookie) + { + $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; + } + public function removeCookie($name, $path = '/', $domain = null) + { + if (null === $path) { + $path = '/'; + } + unset($this->cookies[$domain][$path][$name]); + if (empty($this->cookies[$domain][$path])) { + unset($this->cookies[$domain][$path]); + if (empty($this->cookies[$domain])) { + unset($this->cookies[$domain]); + } + } + } + public function getCookies($format = self::COOKIES_FLAT) + { + if (!in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) { + throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', array(self::COOKIES_FLAT, self::COOKIES_ARRAY)))); + } + if (self::COOKIES_ARRAY === $format) { + return $this->cookies; + } + $flattenedCookies = array(); + foreach ($this->cookies as $path) { + foreach ($path as $cookies) { + foreach ($cookies as $cookie) { + $flattenedCookies[] = $cookie; + } + } + } + return $flattenedCookies; + } + public function clearCookie($name, $path = '/', $domain = null) + { + $this->setCookie(new Cookie($name, null, 1, $path, $domain)); + } + public function makeDisposition($disposition, $filename, $filenameFallback = '') + { + if (!in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { + throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); + } + if ('' == $filenameFallback) { + $filenameFallback = $filename; + } + if (!preg_match('/^[\\x20-\\x7e]*$/', $filenameFallback)) { + throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.'); + } + if (false !== strpos($filenameFallback, '%')) { + throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.'); + } + if (false !== strpos($filename, '/') || false !== strpos($filename, '\\') || false !== strpos($filenameFallback, '/') || false !== strpos($filenameFallback, '\\')) { + throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); + } + $output = sprintf('%s; filename="%s"', $disposition, str_replace('"', '\\"', $filenameFallback)); + if ($filename !== $filenameFallback) { + $output .= sprintf('; filename*=utf-8\'\'%s', rawurlencode($filename)); + } + return $output; + } + protected function computeCacheControlValue() + { + if (!$this->cacheControl && !$this->has('ETag') && !$this->has('Last-Modified') && !$this->has('Expires')) { + return 'no-cache'; + } + if (!$this->cacheControl) { + return 'private, must-revalidate'; + } + $header = $this->getCacheControlHeader(); + if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) { + return $header; + } + if (!isset($this->cacheControl['s-maxage'])) { + return $header . ', private'; + } + return $header; + } +} +namespace Symfony\Component\HttpFoundation; + +class Cookie +{ + protected $name; + protected $value; + protected $domain; + protected $expire; + protected $path; + protected $secure; + protected $httpOnly; + public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true) + { + if (preg_match('/[=,; + ]/', $name)) { + throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); + } + if (empty($name)) { + throw new \InvalidArgumentException('The cookie name cannot be empty.'); + } + if ($expire instanceof \DateTime) { + $expire = $expire->format('U'); + } elseif (!is_numeric($expire)) { + $expire = strtotime($expire); + if (false === $expire || -1 === $expire) { + throw new \InvalidArgumentException('The cookie expiration time is not valid.'); + } + } + $this->name = $name; + $this->value = $value; + $this->domain = $domain; + $this->expire = $expire; + $this->path = empty($path) ? '/' : $path; + $this->secure = (bool) $secure; + $this->httpOnly = (bool) $httpOnly; + } + public function __toString() + { + $str = urlencode($this->getName()) . '='; + if ('' === (string) $this->getValue()) { + $str .= 'deleted; expires=' . gmdate('D, d-M-Y H:i:s T', time() - 31536001); + } else { + $str .= urlencode($this->getValue()); + if ($this->getExpiresTime() !== 0) { + $str .= '; expires=' . gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()); + } + } + if ($this->path) { + $str .= '; path=' . $this->path; + } + if ($this->getDomain()) { + $str .= '; domain=' . $this->getDomain(); + } + if (true === $this->isSecure()) { + $str .= '; secure'; + } + if (true === $this->isHttpOnly()) { + $str .= '; httponly'; + } + return $str; + } + public function getName() + { + return $this->name; + } + public function getValue() + { + return $this->value; + } + public function getDomain() + { + return $this->domain; + } + public function getExpiresTime() + { + return $this->expire; + } + public function getPath() + { + return $this->path; + } + public function isSecure() + { + return $this->secure; + } + public function isHttpOnly() + { + return $this->httpOnly; + } + public function isCleared() + { + return $this->expire < time(); + } +} +namespace Whoops; + +use Exception; +use InvalidArgumentException; +use Whoops\Exception\ErrorException; +use Whoops\Exception\Inspector; +use Whoops\Handler\CallbackHandler; +use Whoops\Handler\Handler; +use Whoops\Handler\HandlerInterface; +class Run +{ + const EXCEPTION_HANDLER = 'handleException'; + const ERROR_HANDLER = 'handleError'; + const SHUTDOWN_HANDLER = 'handleShutdown'; + protected $isRegistered; + protected $allowQuit = true; + protected $sendOutput = true; + protected $sendHttpCode = 500; + protected $handlerStack = array(); + protected $silencedPatterns = array(); + public function pushHandler($handler) + { + if (is_callable($handler)) { + $handler = new CallbackHandler($handler); + } + if (!$handler instanceof HandlerInterface) { + throw new InvalidArgumentException('Argument to ' . __METHOD__ . ' must be a callable, or instance of' . 'Whoops\\Handler\\HandlerInterface'); + } + $this->handlerStack[] = $handler; + return $this; + } + public function popHandler() + { + return array_pop($this->handlerStack); + } + public function getHandlers() + { + return $this->handlerStack; + } + public function clearHandlers() + { + $this->handlerStack = array(); + return $this; + } + protected function getInspector(Exception $exception) + { + return new Inspector($exception); + } + public function register() + { + if (!$this->isRegistered) { + class_exists('\\Whoops\\Exception\\ErrorException'); + class_exists('\\Whoops\\Exception\\FrameCollection'); + class_exists('\\Whoops\\Exception\\Frame'); + class_exists('\\Whoops\\Exception\\Inspector'); + set_error_handler(array($this, self::ERROR_HANDLER)); + set_exception_handler(array($this, self::EXCEPTION_HANDLER)); + register_shutdown_function(array($this, self::SHUTDOWN_HANDLER)); + $this->isRegistered = true; + } + return $this; + } + public function unregister() + { + if ($this->isRegistered) { + restore_exception_handler(); + restore_error_handler(); + $this->isRegistered = false; + } + return $this; + } + public function allowQuit($exit = null) + { + if (func_num_args() == 0) { + return $this->allowQuit; + } + return $this->allowQuit = (bool) $exit; + } + public function silenceErrorsInPaths($patterns, $levels = 10240) + { + $this->silencedPatterns = array_merge($this->silencedPatterns, array_map(function ($pattern) use($levels) { + return array('pattern' => $pattern, 'levels' => $levels); + }, (array) $patterns)); + return $this; + } + public function sendHttpCode($code = null) + { + if (func_num_args() == 0) { + return $this->sendHttpCode; + } + if (!$code) { + return $this->sendHttpCode = false; + } + if ($code === true) { + $code = 500; + } + if ($code < 400 || 600 <= $code) { + throw new InvalidArgumentException("Invalid status code '{$code}', must be 4xx or 5xx"); + } + return $this->sendHttpCode = $code; + } + public function writeToOutput($send = null) + { + if (func_num_args() == 0) { + return $this->sendOutput; + } + return $this->sendOutput = (bool) $send; + } + public function handleException(Exception $exception) + { + $inspector = $this->getInspector($exception); + ob_start(); + $handlerResponse = null; + foreach (array_reverse($this->handlerStack) as $handler) { + $handler->setRun($this); + $handler->setInspector($inspector); + $handler->setException($exception); + $handlerResponse = $handler->handle($exception); + if (in_array($handlerResponse, array(Handler::LAST_HANDLER, Handler::QUIT))) { + break; + } + } + $willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit(); + $output = ob_get_clean(); + if ($this->writeToOutput()) { + if ($willQuit) { + while (ob_get_level() > 0) { + ob_end_clean(); + } + } + $this->writeToOutputNow($output); + } + if ($willQuit) { + die(1); + } + return $output; + } + public function handleError($level, $message, $file = null, $line = null) + { + if ($level & error_reporting()) { + foreach ($this->silencedPatterns as $entry) { + $pathMatches = (bool) preg_match($entry['pattern'], $file); + $levelMatches = $level & $entry['levels']; + if ($pathMatches && $levelMatches) { + return true; + } + } + $exception = new ErrorException($message, $level, 0, $file, $line); + if ($this->canThrowExceptions) { + throw $exception; + } else { + $this->handleException($exception); + } + } + } + public function handleShutdown() + { + $this->canThrowExceptions = false; + $error = error_get_last(); + if ($error && $this->isLevelFatal($error['type'])) { + $this->handleError($error['type'], $error['message'], $error['file'], $error['line']); + } + } + private $canThrowExceptions = true; + private function writeToOutputNow($output) + { + if ($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) { + $httpCode = $this->sendHttpCode(); + if (function_exists('http_response_code')) { + http_response_code($httpCode); + } else { + header('X-Ignore-This: 1', true, $httpCode); + } + } + echo $output; + return $this; + } + private static function isLevelFatal($level) + { + $errors = E_ERROR; + $errors |= E_PARSE; + $errors |= E_CORE_ERROR; + $errors |= E_CORE_WARNING; + $errors |= E_COMPILE_ERROR; + $errors |= E_COMPILE_WARNING; + return ($level & $errors) > 0; + } +} +namespace Whoops\Handler; + +use Exception; +use Whoops\Exception\Inspector; +use Whoops\Run; +interface HandlerInterface +{ + public function handle(); + public function setRun(Run $run); + public function setException(Exception $exception); + public function setInspector(Inspector $inspector); +} +namespace Whoops\Handler; + +use Exception; +use Whoops\Exception\Inspector; +use Whoops\Run; +abstract class Handler implements HandlerInterface +{ + const DONE = 16; + const LAST_HANDLER = 32; + const QUIT = 48; + private $run; + private $inspector; + private $exception; + public function setRun(Run $run) + { + $this->run = $run; + } + protected function getRun() + { + return $this->run; + } + public function setInspector(Inspector $inspector) + { + $this->inspector = $inspector; + } + protected function getInspector() + { + return $this->inspector; + } + public function setException(Exception $exception) + { + $this->exception = $exception; + } + protected function getException() + { + return $this->exception; + } +} +namespace Whoops\Handler; + +use Whoops\Exception\Formatter; +class JsonResponseHandler extends Handler +{ + private $returnFrames = false; + private $onlyForAjaxRequests = false; + public function addTraceToOutput($returnFrames = null) + { + if (func_num_args() == 0) { + return $this->returnFrames; + } + $this->returnFrames = (bool) $returnFrames; + return $this; + } + public function onlyForAjaxRequests($onlyForAjaxRequests = null) + { + if (func_num_args() == 0) { + return $this->onlyForAjaxRequests; + } + $this->onlyForAjaxRequests = (bool) $onlyForAjaxRequests; + } + private function isAjaxRequest() + { + return !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; + } + public function handle() + { + if ($this->onlyForAjaxRequests() && !$this->isAjaxRequest()) { + return Handler::DONE; + } + $response = array('error' => Formatter::formatExceptionAsDataArray($this->getInspector(), $this->addTraceToOutput())); + if (\Whoops\Util\Misc::canSendHeaders()) { + header('Content-Type: application/json'); + } + echo json_encode($response); + return Handler::QUIT; + } +} +namespace Stack; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Builder +{ + private $specs; + public function __construct() + { + $this->specs = new \SplStack(); + } + public function unshift() + { + if (func_num_args() === 0) { + throw new \InvalidArgumentException('Missing argument(s) when calling unshift'); + } + $spec = func_get_args(); + $this->specs->unshift($spec); + return $this; + } + public function push() + { + if (func_num_args() === 0) { + throw new \InvalidArgumentException('Missing argument(s) when calling push'); + } + $spec = func_get_args(); + $this->specs->push($spec); + return $this; + } + public function resolve(HttpKernelInterface $app) + { + $middlewares = array($app); + foreach ($this->specs as $spec) { + $args = $spec; + $firstArg = array_shift($args); + if (is_callable($firstArg)) { + $app = $firstArg($app); + } else { + $kernelClass = $firstArg; + array_unshift($args, $app); + $reflection = new \ReflectionClass($kernelClass); + $app = $reflection->newInstanceArgs($args); + } + array_unshift($middlewares, $app); + } + return new StackedHttpKernel($app, $middlewares); + } +} +namespace Stack; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\TerminableInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +class StackedHttpKernel implements HttpKernelInterface, TerminableInterface +{ + private $app; + private $middlewares = array(); + public function __construct(HttpKernelInterface $app, array $middlewares) + { + $this->app = $app; + $this->middlewares = $middlewares; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + return $this->app->handle($request, $type, $catch); + } + public function terminate(Request $request, Response $response) + { + $prevKernel = null; + foreach ($this->middlewares as $kernel) { + if (!$prevKernel instanceof TerminableInterface && $kernel instanceof TerminableInterface) { + $kernel->terminate($request, $response); + } + $prevKernel = $kernel; + } + } +} diff --git a/bootstrap/paths.php b/bootstrap/paths.php new file mode 100755 index 0000000..5a1f640 --- /dev/null +++ b/bootstrap/paths.php @@ -0,0 +1,57 @@ + __DIR__.'/../app', + + /* + |-------------------------------------------------------------------------- + | Public Path + |-------------------------------------------------------------------------- + | + | The public path contains the assets for your web application, such as + | your JavaScript and CSS files, and also contains the primary entry + | point for web requests into these applications from the outside. + | + */ + + 'public' => __DIR__.'/../public', + + /* + |-------------------------------------------------------------------------- + | Base Path + |-------------------------------------------------------------------------- + | + | The base path is the root of the Laravel installation. Most likely you + | will not need to change this value. But, if for some wild reason it + | is necessary you will do so here, just proceed with some caution. + | + */ + + 'base' => __DIR__.'/..', + + /* + |-------------------------------------------------------------------------- + | Storage Path + |-------------------------------------------------------------------------- + | + | The storage path is used by Laravel to store cached Blade views, logs + | and other pieces of information. You may modify the path here when + | you want to change the location of this directory for your apps. + | + */ + + 'storage' => __DIR__.'/../app/storage', + +); diff --git a/bootstrap/start.php b/bootstrap/start.php new file mode 100755 index 0000000..84559be --- /dev/null +++ b/bootstrap/start.php @@ -0,0 +1,73 @@ +detectEnvironment(array( + + 'local' => array('homestead'), + +)); + +/* +|-------------------------------------------------------------------------- +| Bind Paths +|-------------------------------------------------------------------------- +| +| Here we are binding the paths configured in paths.php to the app. You +| should not be changing these here. If you need to change these you +| may do so within the paths.php file and they will be bound here. +| +*/ + +$app->bindInstallPaths(require __DIR__.'/paths.php'); + +/* +|-------------------------------------------------------------------------- +| Load The Application +|-------------------------------------------------------------------------- +| +| Here we will load this Illuminate application. We will keep this in a +| separate location so we can isolate the creation of an application +| from the actual running of the application with a given request. +| +*/ + +$framework = $app['path.base']. + '/vendor/laravel/framework/src'; + +require $framework.'/Illuminate/Foundation/start.php'; + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/composer.json b/composer.json new file mode 100755 index 0000000..e53e401 --- /dev/null +++ b/composer.json @@ -0,0 +1,37 @@ +{ + "name": "laravel/laravel", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", + "type": "project", + "require": { + "laravel/framework": "4.2.*" + }, + "autoload": { + "classmap": [ + "app/commands", + "app/controllers", + "app/models", + "app/database/migrations", + "app/database/seeds", + "app/tests/TestCase.php" + ] + }, + "scripts": { + "post-install-cmd": [ + "php artisan clear-compiled", + "php artisan optimize" + ], + "post-update-cmd": [ + "php artisan clear-compiled", + "php artisan optimize" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ] + }, + "config": { + "preferred-install": "dist" + }, + "minimum-stability": "stable" +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..818ef82 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1646 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "cce6015a015d1aaf6f2cae97680d79b9", + "packages": [ + { + "name": "classpreloader/classpreloader", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/ClassPreloader.git", + "reference": "2c9f3bcbab329570c57339895bd11b5dd3b00877" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/ClassPreloader/zipball/2c9f3bcbab329570c57339895bd11b5dd3b00877", + "reference": "2c9f3bcbab329570c57339895bd11b5dd3b00877", + "shasum": "" + }, + "require": { + "nikic/php-parser": "~0.9", + "php": ">=5.3.3", + "symfony/console": "~2.1", + "symfony/filesystem": "~2.1", + "symfony/finder": "~2.1" + }, + "bin": [ + "classpreloader.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "ClassPreloader": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", + "keywords": [ + "autoload", + "class", + "preload" + ], + "time": "2014-03-12 00:05:31" + }, + { + "name": "d11wtq/boris", + "version": "v1.0.8", + "source": { + "type": "git", + "url": "https://github.com/d11wtq/boris.git", + "reference": "125dd4e5752639af7678a22ea597115646d89c6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/d11wtq/boris/zipball/125dd4e5752639af7678a22ea597115646d89c6e", + "reference": "125dd4e5752639af7678a22ea597115646d89c6e", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "suggest": { + "ext-pcntl": "*", + "ext-posix": "*", + "ext-readline": "*" + }, + "bin": [ + "bin/boris" + ], + "type": "library", + "autoload": { + "psr-0": { + "Boris": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "time": "2014-01-17 12:21:18" + }, + { + "name": "filp/whoops", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a85fab9a98f1f9b8ebcdbe71733f0d910e5b9adf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a85fab9a98f1f9b8ebcdbe71733f0d910e5b9adf", + "reference": "a85fab9a98f1f9b8ebcdbe71733f0d910e5b9adf", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "mockery/mockery": "0.9.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-0": { + "Whoops": "src/" + }, + "classmap": [ + "src/deprecated" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://github.com/filp/whoops", + "keywords": [ + "error", + "exception", + "handling", + "library", + "silex-provider", + "whoops", + "zf2" + ], + "time": "2014-10-26 09:05:09" + }, + { + "name": "ircmaxell/password-compat", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/password_compat.git", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "autoload": { + "files": [ + "lib/password.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@php.net", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", + "homepage": "https://github.com/ircmaxell/password_compat", + "keywords": [ + "hashing", + "password" + ], + "time": "2014-11-20 16:49:30" + }, + { + "name": "jeremeamia/SuperClosure", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "4d89ca74994feab128ea46d5b3add92e6cb84554" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/4d89ca74994feab128ea46d5b3add92e6cb84554", + "reference": "4d89ca74994feab128ea46d5b3add92e6cb84554", + "shasum": "" + }, + "require": { + "nikic/php-parser": "~0.9", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "Jeremeamia\\SuperClosure": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom" + } + ], + "description": "Doing interesting things with closures like serialization.", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "time": "2015-01-10 01:09:28" + }, + { + "name": "laravel/framework", + "version": "v4.2.16", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "31fe6a5747bbe3c2df21dc4cc8f291e75ab6144f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/31fe6a5747bbe3c2df21dc4cc8f291e75ab6144f", + "reference": "31fe6a5747bbe3c2df21dc4cc8f291e75ab6144f", + "shasum": "" + }, + "require": { + "classpreloader/classpreloader": "~1.0.2", + "d11wtq/boris": "~1.0", + "filp/whoops": "1.1.*", + "ircmaxell/password-compat": "~1.0", + "jeremeamia/superclosure": "~1.0.1", + "monolog/monolog": "~1.6", + "nesbot/carbon": "~1.0", + "patchwork/utf8": "1.1.*", + "php": ">=5.4.0", + "phpseclib/phpseclib": "0.3.*", + "predis/predis": "0.8.*", + "stack/builder": "~1.0", + "swiftmailer/swiftmailer": "~5.1", + "symfony/browser-kit": "2.5.*", + "symfony/console": "2.5.*", + "symfony/css-selector": "2.5.*", + "symfony/debug": "2.5.*", + "symfony/dom-crawler": "2.5.*", + "symfony/finder": "2.5.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*", + "symfony/process": "2.5.*", + "symfony/routing": "2.5.*", + "symfony/security-core": "2.5.*", + "symfony/translation": "2.5.*" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/foundation": "self.version", + "illuminate/hashing": "self.version", + "illuminate/html": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/pagination": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/remote": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "illuminate/workbench": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~2.6", + "iron-io/iron_mq": "~1.5", + "mockery/mockery": "~0.9", + "pda/pheanstalk": "~2.1", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/Illuminate/Queue/IlluminateQueueClosure.php" + ], + "files": [ + "src/Illuminate/Support/helpers.php" + ], + "psr-0": { + "Illuminate": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Laravel Framework.", + "keywords": [ + "framework", + "laravel" + ], + "time": "2014-12-22 20:56:10" + }, + { + "name": "monolog/monolog", + "version": "1.12.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "1fbe8c2641f2b163addf49cc5e18f144bec6b19f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1fbe8c2641f2b163addf49cc5e18f144bec6b19f", + "reference": "1fbe8c2641f2b163addf49cc5e18f144bec6b19f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "~2.4, >2.4.8", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "phpunit/phpunit": "~4.0", + "raven/raven": "~0.5", + "ruflin/elastica": "0.90.*", + "videlalvaro/php-amqplib": "~2.4" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "raven/raven": "Allow sending log messages to a Sentry server", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2014-12-29 21:29:35" + }, + { + "name": "nesbot/carbon", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "5cb6e71055f7b0b57956b73d324cc4de31278f42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/5cb6e71055f7b0b57956b73d324cc4de31278f42", + "reference": "5cb6e71055f7b0b57956b73d324cc4de31278f42", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Carbon": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "https://github.com/briannesbitt/Carbon", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2014-09-26 02:52:02" + }, + { + "name": "nikic/php-parser", + "version": "v0.9.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb", + "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9-dev" + } + }, + "autoload": { + "psr-0": { + "PHPParser": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2014-07-23 18:24:17" + }, + { + "name": "patchwork/utf8", + "version": "v1.1.28", + "source": { + "type": "git", + "url": "https://github.com/tchwork/utf8.git", + "reference": "ffa082111aa3cb23cf2479a17e6785ace91da982" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tchwork/utf8/zipball/ffa082111aa3cb23cf2479a17e6785ace91da982", + "reference": "ffa082111aa3cb23cf2479a17e6785ace91da982", + "shasum": "" + }, + "require": { + "lib-pcre": ">=7.3", + "php": ">=5.3.0" + }, + "suggest": { + "ext-iconv": "Use iconv for best performance", + "ext-intl": "Use Intl for best performance", + "ext-mbstring": "Use Mbstring for best performance" + }, + "type": "library", + "autoload": { + "psr-0": { + "Patchwork": "class/", + "Normalizer": "class/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "(Apache-2.0 or GPL-2.0)" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + } + ], + "description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP", + "homepage": "https://github.com/tchwork/utf8", + "keywords": [ + "grapheme", + "i18n", + "unicode", + "utf-8", + "utf8" + ], + "time": "2015-01-12 08:05:15" + }, + { + "name": "phpseclib/phpseclib", + "version": "0.3.9", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "c6e88ca6e81bc5a2d7161658e16a95b7ef8d6ad1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c6e88ca6e81bc5a2d7161658e16a95b7ef8d6ad1", + "reference": "c6e88ca6e81bc5a2d7161658e16a95b7ef8d6ad1", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phing/phing": "2.7.*", + "phpunit/phpunit": "4.0.*", + "sami/sami": "1.*", + "squizlabs/php_codesniffer": "1.*" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.", + "pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP < 4.3.3." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.3-dev" + } + }, + "autoload": { + "psr-0": { + "Crypt": "phpseclib/", + "File": "phpseclib/", + "Math": "phpseclib/", + "Net": "phpseclib/", + "System": "phpseclib/" + }, + "files": [ + "phpseclib/Crypt/Random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "phpseclib/" + ], + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "time": "2014-11-10 03:08:59" + }, + { + "name": "predis/predis", + "version": "v0.8.7", + "source": { + "type": "git", + "url": "https://github.com/nrk/predis.git", + "reference": "4123fcd85d61354c6c9900db76c9597dbd129bf6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nrk/predis/zipball/4123fcd85d61354c6c9900db76c9597dbd129bf6", + "reference": "4123fcd85d61354c6c9900db76c9597dbd129bf6", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Allows access to Webdis when paired with phpiredis", + "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" + }, + "type": "library", + "autoload": { + "psr-0": { + "Predis": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniele Alessandri", + "email": "suppakilla@gmail.com", + "homepage": "http://clorophilla.net" + } + ], + "description": "Flexible and feature-complete PHP client library for Redis", + "homepage": "http://github.com/nrk/predis", + "keywords": [ + "nosql", + "predis", + "redis" + ], + "time": "2014-08-01 09:43:10" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "stack/builder", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/stackphp/builder.git", + "reference": "c1f8a4693b55c563405024f708a76ef576c3b276" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stackphp/builder/zipball/c1f8a4693b55c563405024f708a76ef576c3b276", + "reference": "c1f8a4693b55c563405024f708a76ef576c3b276", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/http-foundation": "~2.1", + "symfony/http-kernel": "~2.1" + }, + "require-dev": { + "silex/silex": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Stack": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Builder for stack middlewares based on HttpKernelInterface.", + "keywords": [ + "stack" + ], + "time": "2014-11-23 20:37:11" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.3.1", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/c5f963e7f9d6f6438fda4f22d5cc2db296ec621a", + "reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "mail", + "mailer" + ], + "time": "2014-12-05 14:17:14" + }, + { + "name": "symfony/browser-kit", + "version": "v2.5.9", + "target-dir": "Symfony/Component/BrowserKit", + "source": { + "type": "git", + "url": "https://github.com/symfony/BrowserKit.git", + "reference": "b2b78b850a32251cbbd9915ab61453302e7ecd72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/b2b78b850a32251cbbd9915ab61453302e7ecd72", + "reference": "b2b78b850a32251cbbd9915ab61453302e7ecd72", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/dom-crawler": "~2.0,>=2.0.5" + }, + "require-dev": { + "symfony/css-selector": "~2.0,>=2.0.5", + "symfony/process": "~2.0,>=2.0.5" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\BrowserKit\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 08:01:13" + }, + { + "name": "symfony/console", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Console", + "source": { + "type": "git", + "url": "https://github.com/symfony/Console.git", + "reference": "754f4b6de7b4a1d442f9b6a728bfb7adef54592c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Console/zipball/754f4b6de7b4a1d442f9b6a728bfb7adef54592c", + "reference": "754f4b6de7b4a1d442f9b6a728bfb7adef54592c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Console Component", + "homepage": "http://symfony.com", + "time": "2015-01-06 17:40:45" + }, + { + "name": "symfony/css-selector", + "version": "v2.5.9", + "target-dir": "Symfony/Component/CssSelector", + "source": { + "type": "git", + "url": "https://github.com/symfony/CssSelector.git", + "reference": "d45b306421462295e76b94bcf76b963867450327" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/d45b306421462295e76b94bcf76b963867450327", + "reference": "d45b306421462295e76b94bcf76b963867450327", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\CssSelector\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 08:01:13" + }, + { + "name": "symfony/debug", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Debug", + "source": { + "type": "git", + "url": "https://github.com/symfony/Debug.git", + "reference": "672a71e72310099540dfb03da2da553896e88483" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Debug/zipball/672a71e72310099540dfb03da2da553896e88483", + "reference": "672a71e72310099540dfb03da2da553896e88483", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/class-loader": "~2.2", + "symfony/http-foundation": "~2.1", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" + }, + "suggest": { + "symfony/http-foundation": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Debug\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Debug Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 21:12:45" + }, + { + "name": "symfony/dom-crawler", + "version": "v2.5.9", + "target-dir": "Symfony/Component/DomCrawler", + "source": { + "type": "git", + "url": "https://github.com/symfony/DomCrawler.git", + "reference": "3860edcf7ff7e173cfe2151f0d425e610e77cc35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3860edcf7ff7e173cfe2151f0d425e610e77cc35", + "reference": "3860edcf7ff7e173cfe2151f0d425e610e77cc35", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/css-selector": "~2.3" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\DomCrawler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 08:01:13" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.6.3", + "target-dir": "Symfony/Component/EventDispatcher", + "source": { + "type": "git", + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "40ff70cadea3785d83cac1c8309514b36113064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/40ff70cadea3785d83cac1c8309514b36113064e", + "reference": "40ff70cadea3785d83cac1c8309514b36113064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.6", + "symfony/expression-language": "~2.6", + "symfony/stopwatch": "~2.3" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com", + "time": "2015-01-05 14:28:40" + }, + { + "name": "symfony/filesystem", + "version": "v2.6.3", + "target-dir": "Symfony/Component/Filesystem", + "source": { + "type": "git", + "url": "https://github.com/symfony/Filesystem.git", + "reference": "a1f566d1f92e142fa1593f4555d6d89e3044a9b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a1f566d1f92e142fa1593f4555d6d89e3044a9b7", + "reference": "a1f566d1f92e142fa1593f4555d6d89e3044a9b7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 21:13:09" + }, + { + "name": "symfony/finder", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Finder", + "source": { + "type": "git", + "url": "https://github.com/symfony/Finder.git", + "reference": "e527ebf47ff912a45e148b7d0b107b80ec0b3cc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Finder/zipball/e527ebf47ff912a45e148b7d0b107b80ec0b3cc2", + "reference": "e527ebf47ff912a45e148b7d0b107b80ec0b3cc2", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Finder\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Finder Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 08:01:13" + }, + { + "name": "symfony/http-foundation", + "version": "v2.5.9", + "target-dir": "Symfony/Component/HttpFoundation", + "source": { + "type": "git", + "url": "https://github.com/symfony/HttpFoundation.git", + "reference": "154d6c9ae8f7c27799a6119688dbd6026234441a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/154d6c9ae8f7c27799a6119688dbd6026234441a", + "reference": "154d6c9ae8f7c27799a6119688dbd6026234441a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/expression-language": "~2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "classmap": [ + "Symfony/Component/HttpFoundation/Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 11:12:44" + }, + { + "name": "symfony/http-kernel", + "version": "v2.5.9", + "target-dir": "Symfony/Component/HttpKernel", + "source": { + "type": "git", + "url": "https://github.com/symfony/HttpKernel.git", + "reference": "a218b9ba87b24c440e4e9cd171c880e83796a5bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/a218b9ba87b24c440e4e9cd171c880e83796a5bb", + "reference": "a218b9ba87b24c440e4e9cd171c880e83796a5bb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "psr/log": "~1.0", + "symfony/debug": "~2.5.9|~2.6,>=2.6.2", + "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2", + "symfony/http-foundation": "~2.5" + }, + "require-dev": { + "symfony/browser-kit": "~2.3", + "symfony/class-loader": "~2.1", + "symfony/config": "~2.0,>=2.0.5", + "symfony/console": "~2.2", + "symfony/css-selector": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.2", + "symfony/dom-crawler": "~2.0,>=2.0.5", + "symfony/expression-language": "~2.4", + "symfony/finder": "~2.0,>=2.0.5", + "symfony/process": "~2.0,>=2.0.5", + "symfony/routing": "~2.2", + "symfony/stopwatch": "~2.3", + "symfony/templating": "~2.2" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\HttpKernel\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "http://symfony.com", + "time": "2015-01-07 12:32:08" + }, + { + "name": "symfony/process", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Process", + "source": { + "type": "git", + "url": "https://github.com/symfony/Process.git", + "reference": "3309098ce4d9b5e44c04e51bf4541ea466fbe343" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Process/zipball/3309098ce4d9b5e44c04e51bf4541ea466fbe343", + "reference": "3309098ce4d9b5e44c04e51bf4541ea466fbe343", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Process\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Process Component", + "homepage": "http://symfony.com", + "time": "2015-01-05 20:58:03" + }, + { + "name": "symfony/routing", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Routing", + "source": { + "type": "git", + "url": "https://github.com/symfony/Routing.git", + "reference": "47e350dadadabdf64c8dbab499a1132c567f9411" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Routing/zipball/47e350dadadabdf64c8dbab499a1132c567f9411", + "reference": "47e350dadadabdf64c8dbab499a1132c567f9411", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.2", + "symfony/expression-language": "~2.4", + "symfony/http-foundation": "~2.3", + "symfony/yaml": "~2.0,>=2.0.5" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Routing\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Routing Component", + "homepage": "http://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2015-01-05 08:51:41" + }, + { + "name": "symfony/security-core", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Security/Core", + "source": { + "type": "git", + "url": "https://github.com/symfony/security-core.git", + "reference": "e0d8f52dbb7d6e6a5d8df26b56bc68d829c8d519" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/security-core/zipball/e0d8f52dbb7d6e6a5d8df26b56bc68d829c8d519", + "reference": "e0d8f52dbb7d6e6a5d8df26b56bc68d829c8d519", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "ircmaxell/password-compat": "1.0.*", + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "symfony/expression-language": "~2.4", + "symfony/http-foundation": "~2.4", + "symfony/translation": "~2.0,>=2.0.5", + "symfony/validator": "~2.5,>=2.5.5" + }, + "suggest": { + "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", + "symfony/event-dispatcher": "", + "symfony/expression-language": "For using the expression voter", + "symfony/http-foundation": "", + "symfony/validator": "For using the user password constraint" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Security\\Core\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Security Component - Core Library", + "homepage": "http://symfony.com", + "time": "2015-01-05 20:58:03" + }, + { + "name": "symfony/translation", + "version": "v2.5.9", + "target-dir": "Symfony/Component/Translation", + "source": { + "type": "git", + "url": "https://github.com/symfony/Translation.git", + "reference": "165b5348cd20f8c4b2fcf1097c9c8300d1093b90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Translation/zipball/165b5348cd20f8c4b2fcf1097c9c8300d1093b90", + "reference": "165b5348cd20f8c4b2fcf1097c9c8300d1093b90", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "symfony/config": "~2.3,>=2.3.12", + "symfony/intl": "~2.3", + "symfony/yaml": "~2.2" + }, + "suggest": { + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Translation Component", + "homepage": "http://symfony.com", + "time": "2015-01-03 15:23:51" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100755 index 0000000..c330420 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,18 @@ + + + + + ./app/tests/ + + + diff --git a/public/.htaccess b/public/.htaccess new file mode 100755 index 0000000..77827ae --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,15 @@ + + + Options -MultiViews + + + RewriteEngine On + + # Redirect Trailing Slashes... + RewriteRule ^(.*)/$ /$1 [L,R=301] + + # Handle Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + diff --git a/public/css/bootstrap.min.css b/public/css/bootstrap.min.css new file mode 100644 index 0000000..a553c4f --- /dev/null +++ b/public/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v3.0.0 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.099999999999998px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h4,h5,h6{margin-top:10px;margin-bottom:10px}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}h1 small,.h1 small{font-size:24px}h2 small,.h2 small{font-size:18px}h3 small,.h3 small,h4 small,.h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}@media(min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small{display:block;line-height:1.428571429;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:1.428571429}code,pre{font-family:Monaco,Menlo,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.row{margin-right:-15px;margin-left:-15px}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11{float:left}.col-xs-1{width:8.333333333333332%}.col-xs-2{width:16.666666666666664%}.col-xs-3{width:25%}.col-xs-4{width:33.33333333333333%}.col-xs-5{width:41.66666666666667%}.col-xs-6{width:50%}.col-xs-7{width:58.333333333333336%}.col-xs-8{width:66.66666666666666%}.col-xs-9{width:75%}.col-xs-10{width:83.33333333333334%}.col-xs-11{width:91.66666666666666%}.col-xs-12{width:100%}@media(min-width:768px){.container{max-width:750px}.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11{float:left}.col-sm-1{width:8.333333333333332%}.col-sm-2{width:16.666666666666664%}.col-sm-3{width:25%}.col-sm-4{width:33.33333333333333%}.col-sm-5{width:41.66666666666667%}.col-sm-6{width:50%}.col-sm-7{width:58.333333333333336%}.col-sm-8{width:66.66666666666666%}.col-sm-9{width:75%}.col-sm-10{width:83.33333333333334%}.col-sm-11{width:91.66666666666666%}.col-sm-12{width:100%}.col-sm-push-1{left:8.333333333333332%}.col-sm-push-2{left:16.666666666666664%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333333333333%}.col-sm-push-5{left:41.66666666666667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.333333333333336%}.col-sm-push-8{left:66.66666666666666%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333333333334%}.col-sm-push-11{left:91.66666666666666%}.col-sm-pull-1{right:8.333333333333332%}.col-sm-pull-2{right:16.666666666666664%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333333333333%}.col-sm-pull-5{right:41.66666666666667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.333333333333336%}.col-sm-pull-8{right:66.66666666666666%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333333333334%}.col-sm-pull-11{right:91.66666666666666%}.col-sm-offset-1{margin-left:8.333333333333332%}.col-sm-offset-2{margin-left:16.666666666666664%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333333333%}.col-sm-offset-5{margin-left:41.66666666666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.333333333333336%}.col-sm-offset-8{margin-left:66.66666666666666%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333333334%}.col-sm-offset-11{margin-left:91.66666666666666%}}@media(min-width:992px){.container{max-width:970px}.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11{float:left}.col-md-1{width:8.333333333333332%}.col-md-2{width:16.666666666666664%}.col-md-3{width:25%}.col-md-4{width:33.33333333333333%}.col-md-5{width:41.66666666666667%}.col-md-6{width:50%}.col-md-7{width:58.333333333333336%}.col-md-8{width:66.66666666666666%}.col-md-9{width:75%}.col-md-10{width:83.33333333333334%}.col-md-11{width:91.66666666666666%}.col-md-12{width:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.333333333333332%}.col-md-push-2{left:16.666666666666664%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333333333333%}.col-md-push-5{left:41.66666666666667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.333333333333336%}.col-md-push-8{left:66.66666666666666%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333333333334%}.col-md-push-11{left:91.66666666666666%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.333333333333332%}.col-md-pull-2{right:16.666666666666664%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333333333333%}.col-md-pull-5{right:41.66666666666667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.333333333333336%}.col-md-pull-8{right:66.66666666666666%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333333333334%}.col-md-pull-11{right:91.66666666666666%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.333333333333332%}.col-md-offset-2{margin-left:16.666666666666664%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333333333%}.col-md-offset-5{margin-left:41.66666666666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.333333333333336%}.col-md-offset-8{margin-left:66.66666666666666%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333333334%}.col-md-offset-11{margin-left:91.66666666666666%}}@media(min-width:1200px){.container{max-width:1170px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11{float:left}.col-lg-1{width:8.333333333333332%}.col-lg-2{width:16.666666666666664%}.col-lg-3{width:25%}.col-lg-4{width:33.33333333333333%}.col-lg-5{width:41.66666666666667%}.col-lg-6{width:50%}.col-lg-7{width:58.333333333333336%}.col-lg-8{width:66.66666666666666%}.col-lg-9{width:75%}.col-lg-10{width:83.33333333333334%}.col-lg-11{width:91.66666666666666%}.col-lg-12{width:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.333333333333332%}.col-lg-push-2{left:16.666666666666664%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333333333333%}.col-lg-push-5{left:41.66666666666667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.333333333333336%}.col-lg-push-8{left:66.66666666666666%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333333333334%}.col-lg-push-11{left:91.66666666666666%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.333333333333332%}.col-lg-pull-2{right:16.666666666666664%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333333333333%}.col-lg-pull-5{right:41.66666666666667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.333333333333336%}.col-lg-pull-8{right:66.66666666666666%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333333333334%}.col-lg-pull-11{right:91.66666666666666%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.333333333333332%}.col-lg-offset-2{margin-left:16.666666666666664%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333333333%}.col-lg-offset-5{margin-left:41.66666666666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.333333333333336%}.col-lg-offset-8{margin-left:66.66666666666666%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333333334%}.col-lg-offset-11{margin-left:91.66666666666666%}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table thead>tr>th,.table tbody>tr>th,.table tfoot>tr>th,.table thead>tr>td,.table tbody>tr>td,.table tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed thead>tr>th,.table-condensed tbody>tr>th,.table-condensed tfoot>tr>th,.table-condensed thead>tr>td,.table-condensed tbody>tr>td,.table-condensed tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{display:table-column;float:none}table td[class*="col-"],table th[class*="col-"]{display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8;border-color:#d6e9c6}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td{background-color:#d0e9c6;border-color:#c9e2b3}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede;border-color:#eed3d7}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td{background-color:#ebcccc;border-color:#e6c1c7}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3;border-color:#fbeed5}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td{background-color:#faf2cc;border-color:#f8e5be}@media(max-width:768px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:scroll;overflow-y:hidden;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0;background-color:#fff}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>thead>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>thead>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm{height:auto}.input-lg{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:45px;line-height:45px}textarea.input-lg{height:auto}.has-warning .help-block,.has-warning .control-label{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.has-error .help-block,.has-error .control-label{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.has-success .help-block,.has-success .control-label{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;background-color:#dff0d8;border-color:#468847}.form-control-static{padding-top:7px;margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media(min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block}.form-inline .radio,.form-inline .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}@media(min-width:768px){.form-horizontal .control-label{text-align:right}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-link{font-weight:normal;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-xs{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';-webkit-font-smoothing:antialiased;font-style:normal;font-weight:normal;line-height:1}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-print:before{content:"\e045"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-briefcase:before{content:"\1f4bc"}.glyphicon-calendar:before{content:"\1f4c5"}.glyphicon-pushpin:before{content:"\1f4cc"}.glyphicon-paperclip:before{content:"\1f4ce"}.glyphicon-camera:before{content:"\1f4f7"}.glyphicon-lock:before{content:"\1f512"}.glyphicon-bell:before{content:"\1f514"}.glyphicon-bookmark:before{content:"\1f516"}.glyphicon-fire:before{content:"\1f525"}.glyphicon-wrench:before{content:"\1f527"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid #000;border-right:4px solid transparent;border-bottom:0 dotted;border-left:4px solid transparent;content:""}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#fff;text-decoration:none;background-color:#428bca}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0 dotted;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}}.btn-default .caret{border-top-color:#333}.btn-primary .caret,.btn-success .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret{border-top-color:#fff}.dropup .btn-default .caret{border-bottom-color:#333}.dropup .btn-primary .caret,.dropup .btn-success .caret,.dropup .btn-warning .caret,.dropup .btn-danger .caret,.dropup .btn-info .caret{border-bottom-color:#fff}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group-xs>.btn{padding:5px 10px;padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after{display:table;content:" "}.btn-group-vertical>.btn-group:after{clear:both}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:4px;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;border-collapse:separate;table-layout:fixed}.btn-group-justified .btn{display:table-cell;float:none;width:1%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group.col{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:45px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:45px;line-height:45px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center}@media(min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}}.nav-tabs.nav-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs.nav-justified>.active>a{border-bottom-color:#fff}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:5px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center}@media(min-width:768px){.nav-justified>li{display:table-cell;width:1%}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs-justified>.active>a{border-bottom-color:#fff}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.nav .caret{border-top-color:#428bca;border-bottom-color:#428bca}.nav a:hover .caret{border-top-color:#2a6496;border-bottom-color:#2a6496}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;z-index:1000;min-height:50px;margin-bottom:20px;border:1px solid transparent}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}@media(min-width:768px){.navbar{border-radius:4px}}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}.navbar-header:before,.navbar-header:after{display:table;content:" "}.navbar-header:after{clear:both}@media(min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;padding-right:15px;padding-left:15px;overflow-x:visible;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse:before,.navbar-collapse:after{display:table;content:" "}.navbar-collapse:after{clear:both}.navbar-collapse.in{overflow-y:auto}@media(min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-collapse .navbar-nav.navbar-left:first-child{margin-left:-15px}.navbar-collapse .navbar-nav.navbar-right:last-child{margin-right:-15px}.navbar-collapse .navbar-text:last-child{margin-right:0}}.container>.navbar-header,.container>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media(min-width:768px){.container>.navbar-header,.container>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{border-width:0 0 1px}@media(min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;border-width:0 0 1px}@media(min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;z-index:1030}.navbar-fixed-bottom{bottom:0;margin-bottom:0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media(min-width:768px){.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media(min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media(max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media(min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}@media(min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}@media(min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;padding-left:0;margin-top:0;margin-bottom:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}}@media(max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media(min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-text{float:left;margin-top:15px;margin-bottom:15px}@media(min-width:768px){.navbar-text{margin-right:15px;margin-left:15px}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#ccc}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e6e6e6}.navbar-default .navbar-nav>.dropdown>a:hover .caret,.navbar-default .navbar-nav>.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.open>a .caret,.navbar-default .navbar-nav>.open>a:hover .caret,.navbar-default .navbar-nav>.open>a:focus .caret{border-top-color:#555;border-bottom-color:#555}.navbar-default .navbar-nav>.dropdown>a .caret{border-top-color:#777;border-bottom-color:#777}@media(max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-nav>.dropdown>a .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .navbar-nav>.open>a .caret,.navbar-inverse .navbar-nav>.open>a:hover .caret,.navbar-inverse .navbar-nav>.open>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}@media(max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{background-color:#eee}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#999;border-radius:10px}.badge:empty{display:none}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.btn .badge{position:relative;top:-1px}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}.container .jumbotron{border-radius:6px}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1{font-size:63px}}.thumbnail{display:inline-block;display:block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img{display:block;height:auto;max-width:100%}a.thumbnail:hover,a.thumbnail:focus{border-color:#428bca}.thumbnail>img{margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.alert-warning hr{border-top-color:#f8e5be}.alert-warning .alert-link{color:#a47e3c}.alert-danger{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel-body:before,.panel-body:after{display:table;content:" "}.panel-body:after{clear:both}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0}.panel>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.list-group .list-group-item:last-child{border-bottom:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table{margin-bottom:0}.panel>.panel-body+.table{border-top:1px solid #ddd}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-group .panel{margin-bottom:0;overflow:hidden;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-warning{border-color:#fbeed5}.panel-warning>.panel-heading{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#fbeed5}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#fbeed5}.panel-danger{border-color:#eed3d7}.panel-danger>.panel-heading{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#eed3d7}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#eed3d7}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}body.modal-open,.modal-open .navbar-fixed-top,.modal-open .navbar-fixed-bottom{margin-right:15px}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{z-index:1050;width:auto;padding:10px;margin-right:auto;margin-left:auto}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{right:auto;left:50%;width:600px;padding-top:30px;padding-bottom:30px}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:#000;border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.5)),to(rgba(0,0,0,0.0001)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.0001)),to(rgba(0,0,0,0.5)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;left:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media screen and (max-width:400px){@-ms-viewport{width:320px}}.hidden{display:none!important;visibility:hidden!important}.visible-xs{display:none!important}tr.visible-xs{display:none!important}th.visible-xs,td.visible-xs{display:none!important}@media(max-width:767px){.visible-xs{display:block!important}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-xs.visible-sm{display:block!important}tr.visible-xs.visible-sm{display:table-row!important}th.visible-xs.visible-sm,td.visible-xs.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-xs.visible-md{display:block!important}tr.visible-xs.visible-md{display:table-row!important}th.visible-xs.visible-md,td.visible-xs.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-xs.visible-lg{display:block!important}tr.visible-xs.visible-lg{display:table-row!important}th.visible-xs.visible-lg,td.visible-xs.visible-lg{display:table-cell!important}}.visible-sm{display:none!important}tr.visible-sm{display:none!important}th.visible-sm,td.visible-sm{display:none!important}@media(max-width:767px){.visible-sm.visible-xs{display:block!important}tr.visible-sm.visible-xs{display:table-row!important}th.visible-sm.visible-xs,td.visible-sm.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-sm{display:block!important}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-sm.visible-md{display:block!important}tr.visible-sm.visible-md{display:table-row!important}th.visible-sm.visible-md,td.visible-sm.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-sm.visible-lg{display:block!important}tr.visible-sm.visible-lg{display:table-row!important}th.visible-sm.visible-lg,td.visible-sm.visible-lg{display:table-cell!important}}.visible-md{display:none!important}tr.visible-md{display:none!important}th.visible-md,td.visible-md{display:none!important}@media(max-width:767px){.visible-md.visible-xs{display:block!important}tr.visible-md.visible-xs{display:table-row!important}th.visible-md.visible-xs,td.visible-md.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-md.visible-sm{display:block!important}tr.visible-md.visible-sm{display:table-row!important}th.visible-md.visible-sm,td.visible-md.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-md{display:block!important}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-md.visible-lg{display:block!important}tr.visible-md.visible-lg{display:table-row!important}th.visible-md.visible-lg,td.visible-md.visible-lg{display:table-cell!important}}.visible-lg{display:none!important}tr.visible-lg{display:none!important}th.visible-lg,td.visible-lg{display:none!important}@media(max-width:767px){.visible-lg.visible-xs{display:block!important}tr.visible-lg.visible-xs{display:table-row!important}th.visible-lg.visible-xs,td.visible-lg.visible-xs{display:table-cell!important}}@media(min-width:768px) and (max-width:991px){.visible-lg.visible-sm{display:block!important}tr.visible-lg.visible-sm{display:table-row!important}th.visible-lg.visible-sm,td.visible-lg.visible-sm{display:table-cell!important}}@media(min-width:992px) and (max-width:1199px){.visible-lg.visible-md{display:block!important}tr.visible-lg.visible-md{display:table-row!important}th.visible-lg.visible-md,td.visible-lg.visible-md{display:table-cell!important}}@media(min-width:1200px){.visible-lg{display:block!important}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}.hidden-xs{display:block!important}tr.hidden-xs{display:table-row!important}th.hidden-xs,td.hidden-xs{display:table-cell!important}@media(max-width:767px){.hidden-xs{display:none!important}tr.hidden-xs{display:none!important}th.hidden-xs,td.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-xs.hidden-sm{display:none!important}tr.hidden-xs.hidden-sm{display:none!important}th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-xs.hidden-md{display:none!important}tr.hidden-xs.hidden-md{display:none!important}th.hidden-xs.hidden-md,td.hidden-xs.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-xs.hidden-lg{display:none!important}tr.hidden-xs.hidden-lg{display:none!important}th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg{display:none!important}}.hidden-sm{display:block!important}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}@media(max-width:767px){.hidden-sm.hidden-xs{display:none!important}tr.hidden-sm.hidden-xs{display:none!important}th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}tr.hidden-sm{display:none!important}th.hidden-sm,td.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-sm.hidden-md{display:none!important}tr.hidden-sm.hidden-md{display:none!important}th.hidden-sm.hidden-md,td.hidden-sm.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-sm.hidden-lg{display:none!important}tr.hidden-sm.hidden-lg{display:none!important}th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg{display:none!important}}.hidden-md{display:block!important}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}@media(max-width:767px){.hidden-md.hidden-xs{display:none!important}tr.hidden-md.hidden-xs{display:none!important}th.hidden-md.hidden-xs,td.hidden-md.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-md.hidden-sm{display:none!important}tr.hidden-md.hidden-sm{display:none!important}th.hidden-md.hidden-sm,td.hidden-md.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}tr.hidden-md{display:none!important}th.hidden-md,td.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-md.hidden-lg{display:none!important}tr.hidden-md.hidden-lg{display:none!important}th.hidden-md.hidden-lg,td.hidden-md.hidden-lg{display:none!important}}.hidden-lg{display:block!important}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(max-width:767px){.hidden-lg.hidden-xs{display:none!important}tr.hidden-lg.hidden-xs{display:none!important}th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs{display:none!important}}@media(min-width:768px) and (max-width:991px){.hidden-lg.hidden-sm{display:none!important}tr.hidden-lg.hidden-sm{display:none!important}th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm{display:none!important}}@media(min-width:992px) and (max-width:1199px){.hidden-lg.hidden-md{display:none!important}tr.hidden-lg.hidden-md{display:none!important}th.hidden-lg.hidden-md,td.hidden-lg.hidden-md{display:none!important}}@media(min-width:1200px){.hidden-lg{display:none!important}tr.hidden-lg{display:none!important}th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print{display:none!important}tr.visible-print{display:none!important}th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print{display:none!important}tr.hidden-print{display:none!important}th.hidden-print,td.hidden-print{display:none!important}} \ No newline at end of file diff --git a/public/css/font-awesome.min.css b/public/css/font-awesome.min.css new file mode 100644 index 0000000..6dca74a --- /dev/null +++ b/public/css/font-awesome.min.css @@ -0,0 +1,395 @@ +@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.0.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.0.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.0.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.0.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} +.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%} +.fa-2x{font-size:2em} +.fa-3x{font-size:3em} +.fa-4x{font-size:4em} +.fa-5x{font-size:5em} +.fa-fw{width:1.2857142857142858em;text-align:center} +.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative} +.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em} +.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em} +.pull-right{float:right} +.pull-left{float:left} +.fa.pull-left{margin-right:.3em} +.fa.pull-right{margin-left:.3em} +.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear} +@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)} 100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)} 100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)} 100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)} 100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)} 100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)} +.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)} +.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)} +.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)} +.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)} +.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle} +.fa-stack-1x,.fa-stack-2x{position:absolute;width:100%;text-align:center} +.fa-stack-1x{line-height:inherit} +.fa-stack-2x{font-size:2em} +.fa-inverse{color:#fff} +.fa-glass:before{content:"\f000"} +.fa-music:before{content:"\f001"} +.fa-search:before{content:"\f002"} +.fa-envelope-o:before{content:"\f003"} +.fa-heart:before{content:"\f004"} +.fa-star:before{content:"\f005"} +.fa-star-o:before{content:"\f006"} +.fa-user:before{content:"\f007"} +.fa-film:before{content:"\f008"} +.fa-th-large:before{content:"\f009"} +.fa-th:before{content:"\f00a"} +.fa-th-list:before{content:"\f00b"} +.fa-check:before{content:"\f00c"} +.fa-times:before{content:"\f00d"} +.fa-search-plus:before{content:"\f00e"} +.fa-search-minus:before{content:"\f010"} +.fa-power-off:before{content:"\f011"} +.fa-signal:before{content:"\f012"} +.fa-gear:before,.fa-cog:before{content:"\f013"} +.fa-trash-o:before{content:"\f014"} +.fa-home:before{content:"\f015"} +.fa-file-o:before{content:"\f016"} +.fa-clock-o:before{content:"\f017"} +.fa-road:before{content:"\f018"} +.fa-download:before{content:"\f019"} +.fa-arrow-circle-o-down:before{content:"\f01a"} +.fa-arrow-circle-o-up:before{content:"\f01b"} +.fa-inbox:before{content:"\f01c"} +.fa-play-circle-o:before{content:"\f01d"} +.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"} +.fa-refresh:before{content:"\f021"} +.fa-list-alt:before{content:"\f022"} +.fa-lock:before{content:"\f023"} +.fa-flag:before{content:"\f024"} +.fa-headphones:before{content:"\f025"} +.fa-volume-off:before{content:"\f026"} +.fa-volume-down:before{content:"\f027"} +.fa-volume-up:before{content:"\f028"} +.fa-qrcode:before{content:"\f029"} +.fa-barcode:before{content:"\f02a"} +.fa-tag:before{content:"\f02b"} +.fa-tags:before{content:"\f02c"} +.fa-book:before{content:"\f02d"} +.fa-bookmark:before{content:"\f02e"} +.fa-print:before{content:"\f02f"} +.fa-camera:before{content:"\f030"} +.fa-font:before{content:"\f031"} +.fa-bold:before{content:"\f032"} +.fa-italic:before{content:"\f033"} +.fa-text-height:before{content:"\f034"} +.fa-text-width:before{content:"\f035"} +.fa-align-left:before{content:"\f036"} +.fa-align-center:before{content:"\f037"} +.fa-align-right:before{content:"\f038"} +.fa-align-justify:before{content:"\f039"} +.fa-list:before{content:"\f03a"} +.fa-dedent:before,.fa-outdent:before{content:"\f03b"} +.fa-indent:before{content:"\f03c"} +.fa-video-camera:before{content:"\f03d"} +.fa-picture-o:before{content:"\f03e"} +.fa-pencil:before{content:"\f040"} +.fa-map-marker:before{content:"\f041"} +.fa-adjust:before{content:"\f042"} +.fa-tint:before{content:"\f043"} +.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"} +.fa-share-square-o:before{content:"\f045"} +.fa-check-square-o:before{content:"\f046"} +.fa-move:before{content:"\f047"} +.fa-step-backward:before{content:"\f048"} +.fa-fast-backward:before{content:"\f049"} +.fa-backward:before{content:"\f04a"} +.fa-play:before{content:"\f04b"} +.fa-pause:before{content:"\f04c"} +.fa-stop:before{content:"\f04d"} +.fa-forward:before{content:"\f04e"} +.fa-fast-forward:before{content:"\f050"} +.fa-step-forward:before{content:"\f051"} +.fa-eject:before{content:"\f052"} +.fa-chevron-left:before{content:"\f053"} +.fa-chevron-right:before{content:"\f054"} +.fa-plus-circle:before{content:"\f055"} +.fa-minus-circle:before{content:"\f056"} +.fa-times-circle:before{content:"\f057"} +.fa-check-circle:before{content:"\f058"} +.fa-question-circle:before{content:"\f059"} +.fa-info-circle:before{content:"\f05a"} +.fa-crosshairs:before{content:"\f05b"} +.fa-times-circle-o:before{content:"\f05c"} +.fa-check-circle-o:before{content:"\f05d"} +.fa-ban:before{content:"\f05e"} +.fa-arrow-left:before{content:"\f060"} +.fa-arrow-right:before{content:"\f061"} +.fa-arrow-up:before{content:"\f062"} +.fa-arrow-down:before{content:"\f063"} +.fa-mail-forward:before,.fa-share:before{content:"\f064"} +.fa-resize-full:before{content:"\f065"} +.fa-resize-small:before{content:"\f066"} +.fa-plus:before{content:"\f067"} +.fa-minus:before{content:"\f068"} +.fa-asterisk:before{content:"\f069"} +.fa-exclamation-circle:before{content:"\f06a"} +.fa-gift:before{content:"\f06b"} +.fa-leaf:before{content:"\f06c"} +.fa-fire:before{content:"\f06d"} +.fa-eye:before{content:"\f06e"} +.fa-eye-slash:before{content:"\f070"} +.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"} +.fa-plane:before{content:"\f072"} +.fa-calendar:before{content:"\f073"} +.fa-random:before{content:"\f074"} +.fa-comment:before{content:"\f075"} +.fa-magnet:before{content:"\f076"} +.fa-chevron-up:before{content:"\f077"} +.fa-chevron-down:before{content:"\f078"} +.fa-retweet:before{content:"\f079"} +.fa-shopping-cart:before{content:"\f07a"} +.fa-folder:before{content:"\f07b"} +.fa-folder-open:before{content:"\f07c"} +.fa-resize-vertical:before{content:"\f07d"} +.fa-resize-horizontal:before{content:"\f07e"} +.fa-bar-chart-o:before{content:"\f080"} +.fa-twitter-square:before{content:"\f081"} +.fa-facebook-square:before{content:"\f082"} +.fa-camera-retro:before{content:"\f083"} +.fa-key:before{content:"\f084"} +.fa-gears:before,.fa-cogs:before{content:"\f085"} +.fa-comments:before{content:"\f086"} +.fa-thumbs-o-up:before{content:"\f087"} +.fa-thumbs-o-down:before{content:"\f088"} +.fa-star-half:before{content:"\f089"} +.fa-heart-o:before{content:"\f08a"} +.fa-sign-out:before{content:"\f08b"} +.fa-linkedin-square:before{content:"\f08c"} +.fa-thumb-tack:before{content:"\f08d"} +.fa-external-link:before{content:"\f08e"} +.fa-sign-in:before{content:"\f090"} +.fa-trophy:before{content:"\f091"} +.fa-github-square:before{content:"\f092"} +.fa-upload:before{content:"\f093"} +.fa-lemon-o:before{content:"\f094"} +.fa-phone:before{content:"\f095"} +.fa-square-o:before{content:"\f096"} +.fa-bookmark-o:before{content:"\f097"} +.fa-phone-square:before{content:"\f098"} +.fa-twitter:before{content:"\f099"} +.fa-facebook:before{content:"\f09a"} +.fa-github:before{content:"\f09b"} +.fa-unlock:before{content:"\f09c"} +.fa-credit-card:before{content:"\f09d"} +.fa-rss:before{content:"\f09e"} +.fa-hdd:before{content:"\f0a0"} +.fa-bullhorn:before{content:"\f0a1"} +.fa-bell:before{content:"\f0f3"} +.fa-certificate:before{content:"\f0a3"} +.fa-hand-o-right:before{content:"\f0a4"} +.fa-hand-o-left:before{content:"\f0a5"} +.fa-hand-o-up:before{content:"\f0a6"} +.fa-hand-o-down:before{content:"\f0a7"} +.fa-arrow-circle-left:before{content:"\f0a8"} +.fa-arrow-circle-right:before{content:"\f0a9"} +.fa-arrow-circle-up:before{content:"\f0aa"} +.fa-arrow-circle-down:before{content:"\f0ab"} +.fa-globe:before{content:"\f0ac"} +.fa-wrench:before{content:"\f0ad"} +.fa-tasks:before{content:"\f0ae"} +.fa-filter:before{content:"\f0b0"} +.fa-briefcase:before{content:"\f0b1"} +.fa-fullscreen:before{content:"\f0b2"} +.fa-group:before{content:"\f0c0"} +.fa-chain:before,.fa-link:before{content:"\f0c1"} +.fa-cloud:before{content:"\f0c2"} +.fa-flask:before{content:"\f0c3"} +.fa-cut:before,.fa-scissors:before{content:"\f0c4"} +.fa-copy:before,.fa-files-o:before{content:"\f0c5"} +.fa-paperclip:before{content:"\f0c6"} +.fa-save:before,.fa-floppy-o:before{content:"\f0c7"} +.fa-square:before{content:"\f0c8"} +.fa-reorder:before{content:"\f0c9"} +.fa-list-ul:before{content:"\f0ca"} +.fa-list-ol:before{content:"\f0cb"} +.fa-strikethrough:before{content:"\f0cc"} +.fa-underline:before{content:"\f0cd"} +.fa-table:before{content:"\f0ce"} +.fa-magic:before{content:"\f0d0"} +.fa-truck:before{content:"\f0d1"} +.fa-pinterest:before{content:"\f0d2"} +.fa-pinterest-square:before{content:"\f0d3"} +.fa-google-plus-square:before{content:"\f0d4"} +.fa-google-plus:before{content:"\f0d5"} +.fa-money:before{content:"\f0d6"} +.fa-caret-down:before{content:"\f0d7"} +.fa-caret-up:before{content:"\f0d8"} +.fa-caret-left:before{content:"\f0d9"} +.fa-caret-right:before{content:"\f0da"} +.fa-columns:before{content:"\f0db"} +.fa-unsorted:before,.fa-sort:before{content:"\f0dc"} +.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"} +.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"} +.fa-envelope:before{content:"\f0e0"} +.fa-linkedin:before{content:"\f0e1"} +.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"} +.fa-legal:before,.fa-gavel:before{content:"\f0e3"} +.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"} +.fa-comment-o:before{content:"\f0e5"} +.fa-comments-o:before{content:"\f0e6"} +.fa-flash:before,.fa-bolt:before{content:"\f0e7"} +.fa-sitemap:before{content:"\f0e8"} +.fa-umbrella:before{content:"\f0e9"} +.fa-paste:before,.fa-clipboard:before{content:"\f0ea"} +.fa-lightbulb-o:before{content:"\f0eb"} +.fa-exchange:before{content:"\f0ec"} +.fa-cloud-download:before{content:"\f0ed"} +.fa-cloud-upload:before{content:"\f0ee"} +.fa-user-md:before{content:"\f0f0"} +.fa-stethoscope:before{content:"\f0f1"} +.fa-suitcase:before{content:"\f0f2"} +.fa-bell-o:before{content:"\f0a2"} +.fa-coffee:before{content:"\f0f4"} +.fa-cutlery:before{content:"\f0f5"} +.fa-file-text-o:before{content:"\f0f6"} +.fa-building:before{content:"\f0f7"} +.fa-hospital:before{content:"\f0f8"} +.fa-ambulance:before{content:"\f0f9"} +.fa-medkit:before{content:"\f0fa"} +.fa-fighter-jet:before{content:"\f0fb"} +.fa-beer:before{content:"\f0fc"} +.fa-h-square:before{content:"\f0fd"} +.fa-plus-square:before{content:"\f0fe"} +.fa-angle-double-left:before{content:"\f100"} +.fa-angle-double-right:before{content:"\f101"} +.fa-angle-double-up:before{content:"\f102"} +.fa-angle-double-down:before{content:"\f103"} +.fa-angle-left:before{content:"\f104"} +.fa-angle-right:before{content:"\f105"} +.fa-angle-up:before{content:"\f106"} +.fa-angle-down:before{content:"\f107"} +.fa-desktop:before{content:"\f108"} +.fa-laptop:before{content:"\f109"} +.fa-tablet:before{content:"\f10a"} +.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"} +.fa-circle-o:before{content:"\f10c"} +.fa-quote-left:before{content:"\f10d"} +.fa-quote-right:before{content:"\f10e"} +.fa-spinner:before{content:"\f110"} +.fa-circle:before{content:"\f111"} +.fa-mail-reply:before,.fa-reply:before{content:"\f112"} +.fa-github-alt:before{content:"\f113"} +.fa-folder-o:before{content:"\f114"} +.fa-folder-open-o:before{content:"\f115"} +.fa-expand-o:before{content:"\f116"} +.fa-collapse-o:before{content:"\f117"} +.fa-smile-o:before{content:"\f118"} +.fa-frown-o:before{content:"\f119"} +.fa-meh-o:before{content:"\f11a"} +.fa-gamepad:before{content:"\f11b"} +.fa-keyboard-o:before{content:"\f11c"} +.fa-flag-o:before{content:"\f11d"} +.fa-flag-checkered:before{content:"\f11e"} +.fa-terminal:before{content:"\f120"} +.fa-code:before{content:"\f121"} +.fa-reply-all:before{content:"\f122"} +.fa-mail-reply-all:before{content:"\f122"} +.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"} +.fa-location-arrow:before{content:"\f124"} +.fa-crop:before{content:"\f125"} +.fa-code-fork:before{content:"\f126"} +.fa-unlink:before,.fa-chain-broken:before{content:"\f127"} +.fa-question:before{content:"\f128"} +.fa-info:before{content:"\f129"} +.fa-exclamation:before{content:"\f12a"} +.fa-superscript:before{content:"\f12b"} +.fa-subscript:before{content:"\f12c"} +.fa-eraser:before{content:"\f12d"} +.fa-puzzle-piece:before{content:"\f12e"} +.fa-microphone:before{content:"\f130"} +.fa-microphone-slash:before{content:"\f131"} +.fa-shield:before{content:"\f132"} +.fa-calendar-o:before{content:"\f133"} +.fa-fire-extinguisher:before{content:"\f134"} +.fa-rocket:before{content:"\f135"} +.fa-maxcdn:before{content:"\f136"} +.fa-chevron-circle-left:before{content:"\f137"} +.fa-chevron-circle-right:before{content:"\f138"} +.fa-chevron-circle-up:before{content:"\f139"} +.fa-chevron-circle-down:before{content:"\f13a"} +.fa-html5:before{content:"\f13b"} +.fa-css3:before{content:"\f13c"} +.fa-anchor:before{content:"\f13d"} +.fa-unlock-o:before{content:"\f13e"} +.fa-bullseye:before{content:"\f140"} +.fa-ellipsis-horizontal:before{content:"\f141"} +.fa-ellipsis-vertical:before{content:"\f142"} +.fa-rss-square:before{content:"\f143"} +.fa-play-circle:before{content:"\f144"} +.fa-ticket:before{content:"\f145"} +.fa-minus-square:before{content:"\f146"} +.fa-minus-square-o:before{content:"\f147"} +.fa-level-up:before{content:"\f148"} +.fa-level-down:before{content:"\f149"} +.fa-check-square:before{content:"\f14a"} +.fa-pencil-square:before{content:"\f14b"} +.fa-external-link-square:before{content:"\f14c"} +.fa-share-square:before{content:"\f14d"} +.fa-compass:before{content:"\f14e"} +.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"} +.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"} +.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"} +.fa-euro:before,.fa-eur:before{content:"\f153"} +.fa-gbp:before{content:"\f154"} +.fa-dollar:before,.fa-usd:before{content:"\f155"} +.fa-rupee:before,.fa-inr:before{content:"\f156"} +.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"} +.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"} +.fa-won:before,.fa-krw:before{content:"\f159"} +.fa-bitcoin:before,.fa-btc:before{content:"\f15a"} +.fa-file:before{content:"\f15b"} +.fa-file-text:before{content:"\f15c"} +.fa-sort-alpha-asc:before{content:"\f15d"} +.fa-sort-alpha-desc:before{content:"\f15e"} +.fa-sort-amount-asc:before{content:"\f160"} +.fa-sort-amount-desc:before{content:"\f161"} +.fa-sort-numeric-asc:before{content:"\f162"} +.fa-sort-numeric-desc:before{content:"\f163"} +.fa-thumbs-up:before{content:"\f164"} +.fa-thumbs-down:before{content:"\f165"} +.fa-youtube-square:before{content:"\f166"} +.fa-youtube:before{content:"\f167"} +.fa-xing:before{content:"\f168"} +.fa-xing-square:before{content:"\f169"} +.fa-youtube-play:before{content:"\f16a"} +.fa-dropbox:before{content:"\f16b"} +.fa-stack-overflow:before{content:"\f16c"} +.fa-instagram:before{content:"\f16d"} +.fa-flickr:before{content:"\f16e"} +.fa-adn:before{content:"\f170"} +.fa-bitbucket:before{content:"\f171"} +.fa-bitbucket-square:before{content:"\f172"} +.fa-tumblr:before{content:"\f173"} +.fa-tumblr-square:before{content:"\f174"} +.fa-long-arrow-down:before{content:"\f175"} +.fa-long-arrow-up:before{content:"\f176"} +.fa-long-arrow-left:before{content:"\f177"} +.fa-long-arrow-right:before{content:"\f178"} +.fa-apple:before{content:"\f179"} +.fa-windows:before{content:"\f17a"} +.fa-android:before{content:"\f17b"} +.fa-linux:before{content:"\f17c"} +.fa-dribbble:before{content:"\f17d"} +.fa-skype:before{content:"\f17e"} +.fa-foursquare:before{content:"\f180"} +.fa-trello:before{content:"\f181"} +.fa-female:before{content:"\f182"} +.fa-male:before{content:"\f183"} +.fa-gittip:before{content:"\f184"} +.fa-sun-o:before{content:"\f185"} +.fa-moon-o:before{content:"\f186"} +.fa-archive:before{content:"\f187"} +.fa-bug:before{content:"\f188"} +.fa-vk:before{content:"\f189"} +.fa-weibo:before{content:"\f18a"} +.fa-renren:before{content:"\f18b"} +.fa-pagelines:before{content:"\f18c"} +.fa-stack-exchange:before{content:"\f18d"} +.fa-arrow-circle-o-right:before{content:"\f18e"} +.fa-arrow-circle-o-left:before{content:"\f190"} +.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"} +.fa-dot-circle-o:before{content:"\f192"} +.fa-wheelchair:before{content:"\f193"} +.fa-vimeo-square:before{content:"\f194"} +.fa-turkish-lira:before,.fa-try:before{content:"\f195"} diff --git a/public/css/loginStyle.css b/public/css/loginStyle.css new file mode 100755 index 0000000..682f7a0 --- /dev/null +++ b/public/css/loginStyle.css @@ -0,0 +1,199 @@ +@font-face{ font-family: segoelight;src:url('../fonts/segoelight.ttf'),url('../fonts/segoelight.eot'),url('../fonts/segoelight.woff');} +@font-face{ font-family: segoe; src:url('../fonts/segoeui.ttf'),url('../fonts/segoeui.eot'); } +h1,h2,h3,h4,h5,h6,p{margin:0px;padding:0px;font-weight:normal;} +input{outline:none;} ::selection{background: rgba(0,0,0,0.3)} +body{ + font-family: segoe; + overflow: hidden; +} +.fullScreenItem{ + width: 100%; + height: 100%; + position: absolute; + top: 0%; + left: 0%; +} +#loginPage{ + opacity: 1; + z-index: 0; + -webkit-transition-duration: 0.35s; + -moz-transition-duration: 0.35s; + -ms-transition-duration: 0.35s; + -o-transition-duration: 0.35s; + -webkit-transform: perspective(1000) rotateY(0deg); + -moz-transform: perspective(1000) rotateY(0deg); + -ms-transform: perspective(1000) rotateY(0deg); + -o-transform: perspective(1000) rotateY(0deg); +} +.flipped{ + opacity: 0 !important; + -webkit-transform: perspective(650) rotateY(130deg) !important; + -moz-transform: perspective(650) rotateY(130deg) !important; + -ms-transform: perspective(650) rotateY(130deg) !important; + -o-transform: perspective(650) rotateY(130deg) !important; +} +#loginCover{ + background-color: #333 !important; + background-size: cover !important; + box-shadow: inset 0px 0px 100px rgba(0,0,0,0.7), 0px 0px 100px rgba(0,0,0,0.3); + z-index: 2; + cursor: default; +} +#loginFormCenter{ + width: 100%; + height: auto; + text-align: center; + margin-top: 10%; +} +#loginFormContainer{ + width: 550px; + height: 200px; + margin: auto; + background: rgb(181, 24, 69); +} +#loginFormContainer img{ + width: 200px; + height: 200px; + float: left; +} +#loginFormContainer #rightContainer{ + width: 330px; + height: 200px; + float: right; + text-align: left; +} +#loginFormContainer #rightContainer h1{ + font-family: segoe; + color: white; + font-size: 38px; + outline: none; +} +#loginFormContainer #rightContainer h4{ + color: rgba(255,255,255,0.6); + font-size: 18px; + font-family: segoelight; +} +form{ + width: 100%; + background: white; + height: 34px; + margin-top: 10px; +} +#pass{ + width: 264px; + height: 100%; + padding: 5px; + padding-left: 9px; + font-size: 18px; + font-family: segoe; + float: left; + border: none; +} +#submit{ + width: 30px; + height: 30px; + background-image:url(../images/submit.png); + font-size: 20px; + float: left; + border: none; + margin: 2px; +} +#submit:hover{ + background-color: rgb(12, 142, 184); +} +#submit:active{ + background-color: rgb(1, 166, 218); +} +#showPass{ + float: left; + margin: 2px; + margin-right: 0px; + width: 30px; + height: 30px; + background: url(../images/eye_normal.jpg); +} +#showPass:hover{ + background: url(../images/eye_hover.jpg); +} +#showPass:active{ + background: url(../images/eye_active.jpg); +} +p{ + font-family: segoelight; + color: white; + font-size: 40px; + position: absolute; + bottom: 90px; + left: 60px; + text-shadow: 0px 0px 25px rgba(0,0,0,0.3); +} +#Time{ + font-family: segoe; + font-size: 130px; + bottom: 130px; + left: 50px; +} +.bottomBar{ + position: absolute; + bottom: 25px; +} +#leftBar{ left:25px; } +#rightBar{ right:30px; } +#leftBar img{ + margin-left: 10px; + float: left; +} +#rightBar img{ + margin-right: 10px; + float: right; +} +.bottomBar img{ + /*-webkit-transition-duration: 0.35s; + -moz-transition-duration: 0.35s; + -ms-transition-duration: 0.35s; + -o-transition-duration: 0.35s;*/ + cursor: pointer; + z-index: 1; + outline: none; + border: none; +} +.bottomBar img:hover{ + background: rgba(255,255,255,0.15); +} +.bottomBar img:active{ + background: rgba(255,255,255,0.3); + /*-webkit-transform: scale(0.8); + -moz-transform: scale(0.8); + -ms-transform: scale(0.8); + -o-transform: scale(0.8);*/ +} +#notyou{ + font-size: 15px; + cursor: pointer; +} +#notyou:hover{ + text-decoration: underline; +} +#user{ + outline: none; + border: none; + padding: 1px; + padding-left: 0px; +} +#remember{ + font-size: 15px; + color: rgba(255,255,255,0.80); + text-decoration: underline; + text-align: right; + vertical-align: middle; +} +#remember:hover{ + color: rgba(255,255,255,0.90); +} +#remember:active{ + color: rgba(255,255,255,0.40); +} +body{background: rgb(32, 132, 197);} +#submit{background-color: rgb(9, 129, 167);} +#submit:hover{background-color: rgb(12, 142, 184);} +#submit:active{background-color: rgb(1, 166, 218);} \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..6c0278a --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,1080 @@ +/** + * Table of Contents: + * + * 1 - Basic + * 2 - Navbar + * 3 - Tile + * 4 - Portfolio + * 5 - About + * 6 - Service + * 7 - Team + * 8 - Client + * 9 - Blog + * 10 - Contact + * 11 - Follow + * 12 - Media Query + * 13 - Ricardo + * + * ---------------------------------------------------------------------------- + */ + +/* Basic */ +body { + font-size: 15px; + font-family: 'Open Sans', sans-serif; + background-image: url(../images/background.jpg); +} +ol, ul, li { + margin: 0; + padding: 0; + list-style: none; +} +a, a:hover { + text-decoration: none; +} +.h1, .h2, .h3, .h4 { + color: #555555; + font-weight: 400; + font-family: 'Open Sans', sans-serif; +} +.h1 { + font-size: 50px; + text-align: center; + margin-bottom: 30px; + font-family: 'Quicksand', sans-serif; +} +.h2 { + color: #ffffff; + font-size: 34px; + text-align: center; +} +.h3 { + color: #ffffff; + padding-bottom: 5px; +} +.h4 { + color: #FFFFFF; + margin: 20px 0; + padding-bottom: 5px; + border-bottom: 1px solid #FDFDFD; +} +.lead { + color: #555555; + text-align: center; +} +.metro-hr { + width: 100%; + height: 1px; + float: left; + border: none; + background: #e1e1e1; + margin: 40px 0 40px 0; + position: relative; +} +.metro-hr:before { + width: 25%; + height: 1px; + content: ''; + left: 0; + top: 0; + display: block; + position: absolute; + background: #2A90FF; +} +.btn, .alert, .modal-content { + border-radius: 0; +} +.navbar .container { + max-width:970px; +} +.section .container { + max-width: 970px; + padding-bottom: 70px; +} +::selection { + text-shadow: none; + background: #b3d4fc; +} +::-webkit-scrollbar { + display:none; +} +#loading { + width: 100%; + height: 100%; + position: fixed; + background: #303030 url(../images/loader.gif) no-repeat center center; + z-index: 1000; +} +/* Navbar */ +.navbar { + border: 0; + bottom: -50px; + background: #34495e; +} +.navbar-default .navbar-nav li a { + color: #FFFFFF; + font-size: 16px; +} +.navbar-default .navbar-brand { + color: #FFFFFF; +} +.navbar-default .navbar-brand:hover, .navbar-default .navbar-nav li a:hover { + color: #66B6FF; +} +.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { + background-color: #34495e; +} +body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom { + margin-right: auto; +} +/* Tile */ +.home .container { + max-width: 940px; + padding-bottom: 0; +} +.tile { + width: 24%; + float: left; + margin: 0.5%; + position: relative; +} +/* http://www.mademyday.de/css-height-equals-width-with-pure-css.html */ +.tile:before { + content: ""; + display: block; + padding-top: 100%; +} +.tile:nth-child(4n+1) { + clear: both; +} +.tile-item { + top: 0; + left: 0; + bottom: 0; + right: 0; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; + z-index: 10; +} +.tile-item a, +.tile-item a:hover { + color: #ffffff; +} +.tile-item:hover { + color: #ffffff; + -webkit-box-shadow: -3px 3px 3px 1px #858585; + -moz-box-shadow: -3px 3px 3px 1px #858585; + -o-box-shadow: -3px 3px 3px 1px #858585; + box-shadow: -3px 3px 3px 1px #858585; + -webkit-transform: translate3d(6px, -6px, 0); + -moz-transform: translate3d(6px, -6px, 0); + -ms-transform: translate3d(6px, -6px, 0); + -o-transform: translate3d(6px, -6px, 0); + transform: translate3d(6px, -6px, 0); + z-index: 100; +} +.tile-item i { + display: block; + padding-top: 9%; + -webkit-transition: all 0.4s ease; + -moz-transition: all 0.4s ease; + -ms-transition: all 0.4s ease; + -o-transition: all 0.4s ease; + transition: all 0.4s ease; +} +.tile-item:hover i { + -webkit-transform: scale(1.2) rotate(360deg); + -moz-transform: scale(1.2) rotate(360deg); + -ms-transform: scale(1.2) rotate(360deg); + -o-transform: scale(1.2) rotate(360deg); + transform: scale(1.2) rotate(360deg); +} +.tile-nav { + width: 100%; + height: 100%; + color: #ffffff; + display: block; + font-size: 19.2px; + text-align: center; + position: relative; + font-family: 'Open Sans', sans-serif; +} +.tile .ascensorLink { + top: 0; + left: 0; + bottom: 0; + right: 0; + display: block; + position: absolute; +} +.tile .ascensorLink .h5 { + font-size: 18px; + line-height: 2; + font-family: 'Open Sans', sans-serif; +} +.tile-portfolio { + background: #00c6ff; +} +.tile-about { + background: #f39c12; +} +.tile-service { + background: #FD2561; +} +.tile-team { + background: #20b9cb; +} +.tile-client { + background: #49E035; +} +.tile-blog { + background: #FF08FF; +} +.tile-contact { + background: #47E4C4; +} +.tile-follow { + background: #3cf; +} +/* Portfolio */ +.portfolio .container { + max-width: 800px; +} +.grid-controls { + margin: 20px 0; + text-align: center; +} +.grid-controls ul { + display: inline-block; +} +.grid-controls li { + min-width: 80px; + height: 40px; + float: left; + margin: 5px; + background-color: #33CCFF; +} +.grid-controls li a { + color: #FFFFFF; + display: block; + padding: 10px 10px; +} +.grid-controls li a:hover { + text-shadow: 0px 0px 10px #ffffff; + filter: dropshadow(color=#ffffff, offx=0, offy=0); +} +#grid { + width: 100%; + display: inline-block; + position: relative; +} +#grid li { + width: 24%; + float: left; + margin: 0.5%; + opacity: 0; + display: none; + position: relative; +} +#grid li:before { + content: ""; + display: block; + padding-top: 100%; +} +#grid li a { + display: block; + overflow: hidden; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + -webkit-transition: all 300ms ease; + -moz-transition: all 300ms ease; + -ms-transition: all 300ms ease; + -o-transition: all 300ms ease; + transition: all 300ms ease; + z-index: 10; +} +#grid li a:hover { + box-shadow: -3px 3px 3px 1px #858585; + -webkit-box-shadow: -3px 3px 3px 1px #858585; + -moz-box-shadow: -3px 3px 3px 1px #858585; + -o-box-shadow: -3px 3px 3px 1px #858585; + -webkit-transform: translate3d(6px, -6px, 0); + -moz-transform: translate3d(6px, -6px, 0); + -ms-transform: translate3d(6px, -6px, 0); + -o-transform: translate3d(6px, -6px, 0); + transform: translate3d(6px, -6px, 0); + z-index: 100; +} +#grid li a img { + width: 100%; + height: 100%; + display: block; + position: relative; +} +#grid li a div { + position: absolute; + background: #4AAFFF; + background: rgba(74, 175, 255, 0.8); + width: 100%; + height: 100%; +} +#grid li a div span { + display: block; + padding-top: 40%; + font-weight: normal; + text-align: center; + color: rgba(255,255,255,0.9); + text-shadow: 1px 1px 1px rgba(0,0,0,0.2); +} +.modal-dialog { + width: 830px; + padding-top: 140px; +} +.modal .modal-body img { + width: 100%; + min-height: 300px; + max-height: 350px; +} +.modal-header { + padding: 0; + border-bottom: none; +} +.modal-content { + color: #FFFFFF; + background: #005286; +} +.modal-header .close { + width: 50px; + height: 45px; + margin-top: 0; + opacity: 1; + filter: alpha(opacity=100); + color: #FFFFFF; +} +.modal-title { + color: #FFFFFF; + padding: 15px 25px 0; +} +.modal-body { + padding: 10px 10px 50px 10px; +} +.modal-body .container { + padding-bottom: 0; +} +.modal-entery .h4 { + margin: 20px 0 5px; +} +/* About */ +.about { + background: #A1FFC9; + background: rgba(161, 255, 201, 0.3); +} +#about-carousel .item img { + width: 100%; + height: 385px; +} +#about-carousel .carousel-control { + top: auto; + height: 40px; + background: #67C8FF; + background: rgb(103, 200, 255); +} +#about-carousel .carousel-control .icon-prev, .carousel-control .icon-next { + top: 30%; +} +#about-carousel .carousel-control.left { + width: 50px; +} +#about-carousel .carousel-control.right { + left: 50px; + width: 50px; +} +.skills { + padding: 30px 30px; + color: #FFFFFF; + background: #37AFFF; + background: rgba(55, 175, 255, 0.9); +} +.skills p { + margin-bottom: 5px; +} +.skills .skill-q { + height: 40px; + margin-top: 30px; +} +.skills .skill-q p { + margin-top: 6px; +} +.skills h3, .skills h4 { + color: #ffffff; + margin: 0 0 10px; +} +.progress { + height: auto; + border-radius: 0; + padding-top: 20px; + margin-bottom: 0; + background-color: transparent; + box-shadow: none; + position: relative; +} +.progress-percent { + right: -12px; + bottom: 15px; + padding: 3px 5px; + position: absolute; + background-color: #3FD6FF; +} +.progress-bar-success { + height: 10px; + background-color: #82FA82; + box-shadow: none; + position: relative; +} +.progress-percent:after { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-top-color: #3FD6FF; + border-width: 5px; + bottom: -10px; + right: 30%; +} +.about-note { + margin-top: 30px; + color: #FFFFFF; + position: relative; + padding: 20px 30px; + background: #37AFFF; + background: rgba(55, 175, 255, 0.9); +} +/* Service */ +.brick { + padding: 15px; + margin-top: 30px; + text-align: center; + border: 1px solid #D7D8D9; + background: #f0f1f2; + -moz-transition: background .3s ease-in-out; + -webkit-transition: background .3s ease-in-out; + -o-transition: background .3s ease-in-out; + transition: background .3s ease-in-out; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; + -o-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} +.brick:hover { + background: #f0f1f2 url(../images/brick.png) repeat-x top center; + -webkit-box-shadow: -10px 10px 5px 0px rgba(128,128,128,0.67); + -moz-box-shadow: -10px 10px 5px 0px rgba(128,128,128,0.67); + box-shadow: -10px 10px 5px 0px rgba(128,128,128,0.67); + -webkit-transform: translate3d(6px, -6px, 0); + -moz-transform: translate3d(6px, -6px, 0); + -ms-transform: translate3d(6px, -6px, 0); + -o-transform: translate3d(6px, -6px, 0); + transform: translate3d(6px, -6px, 0); +} +.brick .h4 { + color: #000000; +} +.service-img { + margin: 10px 0; +} +.service-title { + margin: 15px 0; +} +.service-desc { + margin: 10px 0; + position: relative; + text-align: left; +} +.check-our-work { + margin-top: 20px; +} +.check-our-work a { + color: #FFFFFF; + padding: 10px 20px; + background: #4FBAFF; + transition: all 0.1s ease-in-out; + -webkit-transition: all 300ms ease; + -moz-transition: all 300ms ease; + -ms-transition: all 300ms ease; + -o-transition: all 300ms ease; +} +.check-our-work a:hover { + text-shadow: 0px 0px 10px #ffffff; + filter: dropshadow(color=#ffffff, offx=0, offy=0); +} +.service .nav-tabs li { + text-align: center; +} +.feature-box { + padding: 15px; + max-width: 293px; + margin-top: 20px; + background: #00CCFF; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; + -o-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} +.feature-box:hover { + box-shadow: -1px 0px 1px #6fadcb, 0px 1px 1px #54809d, -2px 1px 1px #6fadcb, -1px 2px 1px #54809d, -3px 2px 1px #6fadcb, -2px 3px 1px #54809d, -4px 3px 1px #6fadcb, -3px 4px 1px #54809d, -5px 4px 1px #6fadcb, -4px 5px 1px #54809d, -6px 5px 1px #6fadcb, -6px 7px 0 rgba(0,0,0,0.05), -5px 8px 0 rgba(0,0,0,0.05), -3px 9px 0 rgba(0,0,0,0.04), -2px 10px 0 rgba(0,0,0,0.04), -1px 11px 0 rgba(0,0,0,0.03), 0px 12px 0 rgba(0,0,0,0.03), 1px 13px 0 rgba(0,0,0,0.02), 2px 14px 0 rgba(0,0,0,0.02), 3px 15px 0 rgba(0,0,0,0.01), 4px 16px 0 rgba(0,0,0,0.01), 5px 17px 0 rgba(0,0,0,0.01), 6px 18px 0 rgba(0,0,0,0.01), inset 0 4px 5px -2px rgba(255,255,255,0.5), inset 0 1px 0 0 rgba(0,0,0,0.3); + -webkit-transform: translate3d(6px, -6px, 0); + -moz-transform: translate3d(6px, -6px, 0); + -ms-transform: translate3d(6px, -6px, 0); + -o-transform: translate3d(6px, -6px, 0); + transform: translate3d(6px, -6px, 0); +} +.feature-box .feature-icon { + float: left; + margin-top: 15px; +} +.feature-box .feature-icon i { + color: #111111; + font-size: 1.5em; +} +.feature-box .feature-text { + margin-top: -10px; + padding-left: 40px; +} +.feature-box .feature-text h3 { + color: #FFFFFF; + font-size: 16px; + margin-bottom: 5px; +} +/* Team */ +.team { + background: #A9D6FF; + background: rgba(169, 214, 255, 0.4); +} +.team-member { + max-width: 293px; + margin-top: 20px; + margin-bottom: 10px; + padding-bottom: 30px; + text-align: center; + background-color: #42D9FF; + background-color: rgba(66, 217, 255, 0.7); + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; + -o-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + z-index: 10; +} +.team-member:hover { + box-shadow: -1px 0px 1px #6fadcb, 0px 1px 1px #54809d, -2px 1px 1px #6fadcb, -1px 2px 1px #54809d, -3px 2px 1px #6fadcb, -2px 3px 1px #54809d, -4px 3px 1px #6fadcb, -3px 4px 1px #54809d, -5px 4px 1px #6fadcb, -4px 5px 1px #54809d, -6px 5px 1px #6fadcb, -6px 7px 0 rgba(0,0,0,0.05), -5px 8px 0 rgba(0,0,0,0.05), -3px 9px 0 rgba(0,0,0,0.04), -2px 10px 0 rgba(0,0,0,0.04), -1px 11px 0 rgba(0,0,0,0.03), 0px 12px 0 rgba(0,0,0,0.03), 1px 13px 0 rgba(0,0,0,0.02), 2px 14px 0 rgba(0,0,0,0.02), 3px 15px 0 rgba(0,0,0,0.01), 4px 16px 0 rgba(0,0,0,0.01), 5px 17px 0 rgba(0,0,0,0.01), 6px 18px 0 rgba(0,0,0,0.01), inset 0 4px 5px -2px rgba(255,255,255,0.5), inset 0 1px 0 0 rgba(0,0,0,0.3); + -webkit-transform: translate3d(6px, -6px, 0); + -moz-transform: translate3d(6px, -6px, 0); + -ms-transform: translate3d(6px, -6px, 0); + -o-transform: translate3d(6px, -6px, 0); + transform: translate3d(6px, -6px, 0); + z-index: 100; +} +.team-member img { + width: 100%; + max-height: 293px; +} +.team-member .h3 { + margin: 20px 0 10px 0; +} +.member-social { + margin: 15px 0; + text-align: center; +} +.member-social li { + padding: 3px; + display: inline-block; +} +.member-social li a { + width: 40px; + height: 40px; + padding-top: 5px; + display: inline-block; + color: #FFFFFF; + -webkit-box-shadow: 0 0 1px 100px rgba(255, 255, 255, 0.3) inset; + -moz-box-shadow: 0 0 1px 100px rgba(255, 255, 255, 0.3) inset; + box-shadow: 0 0 1px 100px rgba(255, 255, 255, 0.3) inset; + -webkit-transition: all 0.3s ease-out; + -moz-transition: all 0.3s ease-out; + -o-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} +.member-social li a:hover { + opacity: 1; + color: #ffffff; + -webkit-box-shadow: 0 0 1px 0px rgba(255, 255, 255, 0.6) inset; + -moz-box-shadow: 0 0 1px 0px rgba(255, 255, 255, 0.6) inset; + box-shadow: 0 0 1px 0px rgba(255, 255, 255, 0.6) inset; +} +/* Client */ +.client { + background: #D1E7E9; + background: rgba(209, 231, 233, 0.5); +} +.client .photos ul li { + display: block; + float: left; + height: auto; + line-height: 0; + width: 33.333333%; +} +.client .photos ul li a { + display: block; +} +.client .photos ul li img { + -webkit-transition: all 0.7s ease-in-out; + -moz-transition: all 0.7s ease-in-out; + -ms-transition: all 0.7s ease-in-out; + -o-transition: all 0.7s ease-in-out; + transition: all 0.7s ease-in-out; + opacity: 0.2; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; +} +.client .quotes { + color: #FFF; + float: left; + height: 368px; + padding: 30px; + position: relative; + background: #2D92FF +} +.client .quotes:after, .client .quotes:before { + left: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} +.client .quotes:after { + border-color: rgba(136, 183, 213, 0); + border-left-color: #2D92FF; + border-width: 20px; + top: 15px; +} +.client .quotes ul li { + display: none; +} +.client .quotes ul li p { + font-size: 22px; + font-style: italic; + line-height: 1.4; + margin-bottom: 0; +} +.client .photos ul li.active a img, .client .photos ul li a:hover img { + opacity: 1; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; +} +.client .photos .author { + background: #2D92FF; + clear: both; + font-size: 18px; + font-weight: 300; + color: #FFFFFF; + padding: 20px 20px 20px 40px; + padding: 2rem 2rem 2rem 4rem; + position: relative; +} +/* ============================================== +Blog +=============================================== */ +.blog { + background: #A9D6FF; + background: rgba(169, 214, 255, 0.4); +} +.blog-post { + position: relative; + margin-top: 30px; + margin-bottom: 10px; +} +.blog-post .article { + width: 100%; + min-height: 500px; + background-color: #42C5FF; + background-color: rgba(66, 197, 255, 0.7); + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; + -o-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; + z-index: 10; +} +.blog-post .article:hover { + box-shadow: -1px 0px 1px #6fadcb, 0px 1px 1px #54809d, -2px 1px 1px #6fadcb, -1px 2px 1px #54809d, -3px 2px 1px #6fadcb, -2px 3px 1px #54809d, -4px 3px 1px #6fadcb, -3px 4px 1px #54809d, -5px 4px 1px #6fadcb, -4px 5px 1px #54809d, -6px 5px 1px #6fadcb, -6px 7px 0 rgba(0,0,0,0.05), -5px 8px 0 rgba(0,0,0,0.05), -3px 9px 0 rgba(0,0,0,0.04), -2px 10px 0 rgba(0,0,0,0.04), -1px 11px 0 rgba(0,0,0,0.03), 0px 12px 0 rgba(0,0,0,0.03), 1px 13px 0 rgba(0,0,0,0.02), 2px 14px 0 rgba(0,0,0,0.02), 3px 15px 0 rgba(0,0,0,0.01), 4px 16px 0 rgba(0,0,0,0.01), 5px 17px 0 rgba(0,0,0,0.01), 6px 18px 0 rgba(0,0,0,0.01), inset 0 4px 5px -2px rgba(255,255,255,0.5), inset 0 1px 0 0 rgba(0,0,0,0.3); + -webkit-transform: translate3d(6px, -6px, 0); + -moz-transform: translate3d(6px, -6px, 0); + -ms-transform: translate3d(6px, -6px, 0); + -o-transform: translate3d(6px, -6px, 0); + transform: translate3d(6px, -6px, 0); + z-index: 100; +} +.blog-post .article-body { + padding: 10px 20px; +} +.article-body .reading i { + color: #FFFFFF; + padding-top: 3px; +} +.article .article-tag { + color: #FFFFFF; + margin-top: 15px; + padding-bottom: 5px; +} +.article .article-tag .fa-tag { + padding-right: 10px; +} +.article .article-media img { + width: 100%; + max-height: 250px; +} +.article .article-by { + margin-bottom: 10px; +} +.article .article-title { + margin-top: 10px; +} +.article .read-more { + color: #FFFFFF; + padding: 5px 0; + margin-top: 30px; + margin-bottom: 30px; + border-top: 1px solid #FDFDFD; + border-bottom: 1px solid #FDFDFD; +} +.blog-post .article-tag a, .article .article-title a, .article .read-more a { + color: #FFFFFF; +} +.separator { + color: #FFFFFF; + padding: 0px 5px; +} +/* Contact */ +.contact { + background: #858585; + background: rgba(133, 133, 133, 0.3); +} +.contact .modal-dialog { + max-width: 640px; +} +.contact .container { + max-width: 860px; +} +.contact-holder { + min-height: 100%; + position: relative; +} +.contact-box { + margin: 10px 0; + padding: 20px 30px; + position: relative; + color: #ffffff !important; + background-color: #15B7FF; + background-color: rgba(21, 183, 255, 0.8); + z-index: 10; +} +.contact-box a { + color: #FFFFFF; +} +.contact-box .h3 { + color: #FFFFFF; + font-size: 22px; + text-align: center; +} +.contact-box .close { + width: 50px; + height: 45px; + top: 0; + right: 0; + color: #FFFFFF; + position: absolute; + opacity: 1; + filter: alpha(opacity=100); +} +#contactform .btn, .submit { + border: none; + background-color: #F151FF; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.3s ease-in-out; + -ms-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} +#contactform .btn:hover, .submit:hover { + border: none; + background-color: #EA00FF; +} +.form-control { + color: #747474; + border-radius: 0; + padding-left: 30px; + font-style: italic; +} +.form-group { + position: relative; +} +.form-group i { + position: absolute; + top: 8px; + left: 10px; + color: #B9B9B9; +} +.form-group .fa-arrow-right { + color: #FFFFFF; +} +#state-message .alert-danger { + margin-bottom: 0; +} +#state-message .alert-success { + margin-top: 20px; +} +#map { + top: 0; + width: 100%; + height: 100%; + position: absolute; + z-index: 5; +} +/* Follow */ +.follow .container { + max-width: 600px; +} +.tweet-box { + min-height: 100px; + margin: 0 0.5% 1% 0.5%; + color: #FFFFFF; + background: #5398AF; +} +#twitter-carousel { + padding: 10px 10px 0 10px; +} +#twitter-carousel p { + margin-bottom: 5px; +} +#twitter-carousel a { + color: #0033FF; +} +#twitter-carousel .carousel-inner { + height: 100%; +} +.socialize { + background: #32CCFF; + padding: 10px 0 20px 0; + margin: 0 0.5% 0.5% 0.5%; +} +#social-networks { + width: 100%; + display: inline-block; +} +#social-networks li { + width: 24%; + float: left; + margin: 0.5%; + position: relative; + text-align: center; + -webkit-transition: all 300ms ease; + -moz-transition: all 300ms ease; + -ms-transition: all 300ms ease; + -o-transition: all 300ms ease; + transition: all 300ms ease; +} +/* http://www.mademyday.de/css-height-equals-width-with-pure-css.html */ +#social-networks li:before { + content: ""; + display: block; + padding-top: 100%; +} +#social-networks li:hover { + -webkit-box-shadow: -3px 3px 3px 1px #858585; + -moz-box-shadow: -3px 3px 3px 1px #858585; + -o-box-shadow: -3px 3px 3px 1px #858585; + box-shadow: -3px 3px 3px 1px #858585; + -webkit-transform: translate3d(4px, -4px, 0); + -moz-transform: translate3d(4px, -4px, 0); + -ms-transform: translate3d(4px, -4px, 0); + -o-transform: translate3d(4px, -4px, 0); + transform: translate3d(4px, -4px, 0); +} +#social-networks li a { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + padding-top: 30%; + display: block; + color: #FFFFFF; + z-index: 10; +} +#social-networks li a:hover { + color: #FFFFFF; +} +#social-networks li i { + display: block; + -moz-transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1); + -ms-transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1); + -o-transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1); + -webkit-transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1); + transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1); +} +#social-networks li:hover i { + -webkit-transform: scale(1.2) rotate(360deg); + -moz-transform: scale(1.2) rotate(360deg); + -ms-transform: scale(1.2) rotate(360deg); + -o-transform: scale(1.2) rotate(360deg); + transform: scale(1.2) rotate(360deg); +} +.social-twitter { + background: #32CCFF; +} +.social-facebook { + background: #3b5998; +} +.social-googleplus { + background: #666; +} +.social-youtube { + background: #cc181e; +} +.social-pinterest { + background: #e3262e; +} +.social-linkedin { + background: #39c; +} +.social-dribbble { + background: #f06; +} +.social-flickr { + background: #F10091; +} +/* Media Query */ + +@media (max-width:991px) { +.modal-dialog { + width: 768px; + padding: 10px; +} +.feature-box { + max-width: 455px; +} +} + @media (max-width:767px) { +.feature-box { + max-width: 100%; +} +.team-member { + max-width: 100%; +} +.modal-dialog { + width: auto; + padding: 10px; +} +.client .quotes { + height: auto; + margin-top: 30px; +} +.client .photos ul li { + width: 16.666666%; +} +.client .quotes:after, .client .quotes:before { + bottom: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; +} +.client .quotes:before { + border-color: rgba(194, 225, 245, 0); + border-bottom-color: #2D92FF; + border-width: 26px; + left: 20%; +} +.tile .fa-4x { + font-size: 3em; +} +.modal-entery { + margin-top: 20px; +} +.tile-item i { + padding-top: 8%; +} +.navbar-nav { + float: left !important; +} +.navbar-nav li a { + padding-top: 5px; + padding-bottom: 5px; +} +.skills { + margin-top: 30px; +} +} +@media (max-width:640px) { +.tile .fa-4x { + font-size: 2em; +} +.tile .ascensorLink .h5 { + line-height: 1.3; +} +} +@media (max-width:480px) { +.tile-item i { + padding-top: 7%; +} +.team .col-xs-6 { + width: 100%; +} +.follow .col-xs-4 { + width: 50%; +} +#social-networks .fa-4x { + font-size: 3em; +} +.socialize { + padding: 5px 0 10px 0; +} +} +@media (max-width:420px) { +.tile { + width: 32.333333%; +} +.tile:nth-child(4n+1) { + clear: none; +} +.tile:nth-child(3n+1) { + clear: both; +} +#social-networks li a { + padding-top: 25%; +} +#social-networks .fa-4x { + font-size: 2.7em; +} +} + +/* +* Modified from Bellow here: +* +*/ + +ul.subFilter li{ + font-size: .8em; + background-color: #8AA7DB; +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100755 index 0000000..e69de29 diff --git a/public/fonts/fontawesome-webfont.eot b/public/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e054c93 Binary files /dev/null and b/public/fonts/fontawesome-webfont.eot differ diff --git a/public/fonts/fontawesome-webfont.svg b/public/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..36d43b8 --- /dev/null +++ b/public/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/fonts/fontawesome-webfont.ttf b/public/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..7ec2e1d Binary files /dev/null and b/public/fonts/fontawesome-webfont.ttf differ diff --git a/public/fonts/fontawesome-webfont.woff b/public/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..27d80b1 Binary files /dev/null and b/public/fonts/fontawesome-webfont.woff differ diff --git a/public/fonts/segoelight.eot b/public/fonts/segoelight.eot new file mode 100755 index 0000000..b8a8758 Binary files /dev/null and b/public/fonts/segoelight.eot differ diff --git a/public/fonts/segoelight.ttf b/public/fonts/segoelight.ttf new file mode 100755 index 0000000..2bb0299 Binary files /dev/null and b/public/fonts/segoelight.ttf differ diff --git a/public/fonts/segoelight.woff b/public/fonts/segoelight.woff new file mode 100755 index 0000000..310e401 Binary files /dev/null and b/public/fonts/segoelight.woff differ diff --git a/public/fonts/segoeui.eot b/public/fonts/segoeui.eot new file mode 100755 index 0000000..a0bd214 Binary files /dev/null and b/public/fonts/segoeui.eot differ diff --git a/public/fonts/segoeui.ttf b/public/fonts/segoeui.ttf new file mode 100755 index 0000000..7db735b Binary files /dev/null and b/public/fonts/segoeui.ttf differ diff --git a/public/images/about/about.jpg b/public/images/about/about.jpg new file mode 100644 index 0000000..474b311 Binary files /dev/null and b/public/images/about/about.jpg differ diff --git a/public/images/background.jpg b/public/images/background.jpg new file mode 100644 index 0000000..7738d61 Binary files /dev/null and b/public/images/background.jpg differ diff --git a/public/images/blog/blog-post1.jpg b/public/images/blog/blog-post1.jpg new file mode 100644 index 0000000..4e11de3 Binary files /dev/null and b/public/images/blog/blog-post1.jpg differ diff --git a/public/images/blog/blog-post2.jpg b/public/images/blog/blog-post2.jpg new file mode 100644 index 0000000..9aa6439 Binary files /dev/null and b/public/images/blog/blog-post2.jpg differ diff --git a/public/images/blog/blog-post3.jpg b/public/images/blog/blog-post3.jpg new file mode 100644 index 0000000..bedf687 Binary files /dev/null and b/public/images/blog/blog-post3.jpg differ diff --git a/public/images/blog/blog-post4.jpg b/public/images/blog/blog-post4.jpg new file mode 100644 index 0000000..b8d22e6 Binary files /dev/null and b/public/images/blog/blog-post4.jpg differ diff --git a/public/images/blog/blog-post5.jpg b/public/images/blog/blog-post5.jpg new file mode 100644 index 0000000..a442035 Binary files /dev/null and b/public/images/blog/blog-post5.jpg differ diff --git a/public/images/blog/blog-post6.jpg b/public/images/blog/blog-post6.jpg new file mode 100644 index 0000000..8dada5b Binary files /dev/null and b/public/images/blog/blog-post6.jpg differ diff --git a/public/images/brick.png b/public/images/brick.png new file mode 100644 index 0000000..6e05e4d Binary files /dev/null and b/public/images/brick.png differ diff --git a/public/images/client/client.jpg b/public/images/client/client.jpg new file mode 100644 index 0000000..af2695b Binary files /dev/null and b/public/images/client/client.jpg differ diff --git a/public/images/cover1.jpg b/public/images/cover1.jpg new file mode 100755 index 0000000..2c5f107 Binary files /dev/null and b/public/images/cover1.jpg differ diff --git a/public/images/eye_active.jpg b/public/images/eye_active.jpg new file mode 100755 index 0000000..320d042 Binary files /dev/null and b/public/images/eye_active.jpg differ diff --git a/public/images/eye_hover.jpg b/public/images/eye_hover.jpg new file mode 100755 index 0000000..e1f61ea Binary files /dev/null and b/public/images/eye_hover.jpg differ diff --git a/public/images/eye_normal.jpg b/public/images/eye_normal.jpg new file mode 100755 index 0000000..6b2806a Binary files /dev/null and b/public/images/eye_normal.jpg differ diff --git a/public/images/icon/apple-touch-icon-114-precomposed.png b/public/images/icon/apple-touch-icon-114-precomposed.png new file mode 100644 index 0000000..fdddbe0 Binary files /dev/null and b/public/images/icon/apple-touch-icon-114-precomposed.png differ diff --git a/public/images/icon/apple-touch-icon-144-precomposed.png b/public/images/icon/apple-touch-icon-144-precomposed.png new file mode 100644 index 0000000..b9f49b0 Binary files /dev/null and b/public/images/icon/apple-touch-icon-144-precomposed.png differ diff --git a/public/images/icon/apple-touch-icon-57-precomposed.png b/public/images/icon/apple-touch-icon-57-precomposed.png new file mode 100644 index 0000000..e5dae41 Binary files /dev/null and b/public/images/icon/apple-touch-icon-57-precomposed.png differ diff --git a/public/images/icon/apple-touch-icon-72-precomposed.png b/public/images/icon/apple-touch-icon-72-precomposed.png new file mode 100644 index 0000000..993e776 Binary files /dev/null and b/public/images/icon/apple-touch-icon-72-precomposed.png differ diff --git a/public/images/icon/favicon.ico b/public/images/icon/favicon.ico new file mode 100644 index 0000000..e4bc4c7 Binary files /dev/null and b/public/images/icon/favicon.ico differ diff --git a/public/images/loader.gif b/public/images/loader.gif new file mode 100644 index 0000000..08fca6b Binary files /dev/null and b/public/images/loader.gif differ diff --git a/public/images/me.png b/public/images/me.png new file mode 100755 index 0000000..92f6f20 Binary files /dev/null and b/public/images/me.png differ diff --git a/public/images/myCIT.png b/public/images/myCIT.png new file mode 100755 index 0000000..9b0f4b5 Binary files /dev/null and b/public/images/myCIT.png differ diff --git a/public/images/portfolio.png b/public/images/portfolio.png new file mode 100755 index 0000000..0baa3c2 Binary files /dev/null and b/public/images/portfolio.png differ diff --git a/public/images/portfolio/portfolio1.jpg b/public/images/portfolio/portfolio1.jpg new file mode 100644 index 0000000..48d5ba7 Binary files /dev/null and b/public/images/portfolio/portfolio1.jpg differ diff --git a/public/images/portfolio/portfolio10.jpg b/public/images/portfolio/portfolio10.jpg new file mode 100644 index 0000000..8c1738a Binary files /dev/null and b/public/images/portfolio/portfolio10.jpg differ diff --git a/public/images/portfolio/portfolio11.jpg b/public/images/portfolio/portfolio11.jpg new file mode 100644 index 0000000..a85da92 Binary files /dev/null and b/public/images/portfolio/portfolio11.jpg differ diff --git a/public/images/portfolio/portfolio12.jpg b/public/images/portfolio/portfolio12.jpg new file mode 100644 index 0000000..5f20287 Binary files /dev/null and b/public/images/portfolio/portfolio12.jpg differ diff --git a/public/images/portfolio/portfolio2.jpg b/public/images/portfolio/portfolio2.jpg new file mode 100644 index 0000000..99d4198 Binary files /dev/null and b/public/images/portfolio/portfolio2.jpg differ diff --git a/public/images/portfolio/portfolio3.jpg b/public/images/portfolio/portfolio3.jpg new file mode 100644 index 0000000..1758ee0 Binary files /dev/null and b/public/images/portfolio/portfolio3.jpg differ diff --git a/public/images/portfolio/portfolio4.jpg b/public/images/portfolio/portfolio4.jpg new file mode 100644 index 0000000..0503096 Binary files /dev/null and b/public/images/portfolio/portfolio4.jpg differ diff --git a/public/images/portfolio/portfolio5.jpg b/public/images/portfolio/portfolio5.jpg new file mode 100644 index 0000000..2e6418e Binary files /dev/null and b/public/images/portfolio/portfolio5.jpg differ diff --git a/public/images/portfolio/portfolio6.jpg b/public/images/portfolio/portfolio6.jpg new file mode 100644 index 0000000..9245c41 Binary files /dev/null and b/public/images/portfolio/portfolio6.jpg differ diff --git a/public/images/portfolio/portfolio7.jpg b/public/images/portfolio/portfolio7.jpg new file mode 100644 index 0000000..d7110ae Binary files /dev/null and b/public/images/portfolio/portfolio7.jpg differ diff --git a/public/images/portfolio/portfolio8.jpg b/public/images/portfolio/portfolio8.jpg new file mode 100644 index 0000000..785e740 Binary files /dev/null and b/public/images/portfolio/portfolio8.jpg differ diff --git a/public/images/portfolio/portfolio9.jpg b/public/images/portfolio/portfolio9.jpg new file mode 100644 index 0000000..1788397 Binary files /dev/null and b/public/images/portfolio/portfolio9.jpg differ diff --git a/public/images/submit.png b/public/images/submit.png new file mode 100755 index 0000000..0dfeabc Binary files /dev/null and b/public/images/submit.png differ diff --git a/public/images/team/team-member.jpg b/public/images/team/team-member.jpg new file mode 100644 index 0000000..f6e7d2a Binary files /dev/null and b/public/images/team/team-member.jpg differ diff --git a/public/index.php b/public/index.php new file mode 100755 index 0000000..f08822d --- /dev/null +++ b/public/index.php @@ -0,0 +1,49 @@ + + */ + +/* +|-------------------------------------------------------------------------- +| Register The Auto Loader +|-------------------------------------------------------------------------- +| +| Composer provides a convenient, automatically generated class loader +| for our application. We just need to utilize it! We'll require it +| into the script here so that we do not have to worry about the +| loading of any our classes "manually". Feels great to relax. +| +*/ + +require __DIR__.'/../bootstrap/autoload.php'; + +/* +|-------------------------------------------------------------------------- +| Turn On The Lights +|-------------------------------------------------------------------------- +| +| We need to illuminate PHP development, so let's turn on the lights. +| This bootstraps the framework and gets it ready for use, then it +| will load up this application so that we can run it and send +| the responses back to the browser and delight these users. +| +*/ + +$app = require_once __DIR__.'/../bootstrap/start.php'; + +/* +|-------------------------------------------------------------------------- +| Run The Application +|-------------------------------------------------------------------------- +| +| Once we have the application, we can simply call the run method, +| which will execute the request and send the response back to +| the client's browser allowing them to enjoy the creative +| and wonderful application we have whipped up for them. +| +*/ + +$app->run(); diff --git a/public/js/bootstrap.min.js b/public/js/bootstrap.min.js new file mode 100644 index 0000000..1765631 --- /dev/null +++ b/public/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/** +* bootstrap.js v3.0.0 by @fat and @mdo +* Copyright 2013 Twitter Inc. +* http://www.apache.org/licenses/LICENSE-2.0 +*/ +if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery); \ No newline at end of file diff --git a/public/js/jquery-1.10.2.min.js b/public/js/jquery-1.10.2.min.js new file mode 100644 index 0000000..da41706 --- /dev/null +++ b/public/js/jquery-1.10.2.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery-1.10.2.min.map +*/ +(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="
",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
t
",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t +}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); +u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("