diff --git a/.env.example b/.env.example index c40ef51eb943..abc9da3a5254 100644 --- a/.env.example +++ b/.env.example @@ -19,3 +19,5 @@ MAIL_USERNAME MAIL_FROM_ADDRESS MAIL_FROM_NAME MAIL_PASSWORD + +ALLOW_NEW_ACCOUNTS \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7055b9135f86..3089745bd2b1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,18 +13,19 @@ /bootstrap/environment.php /vendor /node_modules -.env /.DS_Store /Thumbs.db -.env.development.php -.env.php -.idea -.project -error_log -public/error_log +/.env +/.env.development.php +/.env.php + +/error_log +/auth.json +/public/error_log + /ninja.sublime-project /ninja.sublime-workspace -auth.json - -.phpstorm.meta.php -_ide_helper.php \ No newline at end of file +/.phpstorm.meta.php +/_ide_helper.php +/.idea +/.project \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 000000000000..500686664f68 --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine On + RewriteRule "^.env" - [F,L] + RewriteRule "^storage" - [F,L] + diff --git a/Gruntfile.js b/Gruntfile.js index 09651ebc8f4e..4de932ca45a6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -51,7 +51,17 @@ module.exports = function(grunt) { 'public/vendor/knockout-mapping/build/output/knockout.mapping-latest.js', 'public/vendor/knockout-sortable/build/knockout-sortable.min.js', 'public/vendor/underscore/underscore.js', - 'public/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js', + 'public/vendor/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.da.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.pt-BR.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nl.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.it.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.lt.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.no.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.es.min.js', + 'public/vendor/bootstrap-datepicker/dist/locales/bootstrap-datepicker.sv.min.js', 'public/vendor/typeahead.js/dist/typeahead.min.js', 'public/vendor/accounting/accounting.min.js', 'public/vendor/spectrum/spectrum.js', @@ -65,7 +75,7 @@ module.exports = function(grunt) { 'public/js/lightbox.min.js', 'public/js/bootstrap-combobox.js', 'public/js/script.js', - 'public/js/pdf.pdfmake.js' + 'public/js/pdf.pdfmake.js', ], dest: 'public/js/built.js', nonull: true @@ -79,8 +89,8 @@ module.exports = function(grunt) { 'public/js/simpleexpand.js', */ 'public/vendor/bootstrap/dist/js/bootstrap.min.js', - 'public/js/bootstrap-combobox.js', - + 'public/js/bootstrap-combobox.js', + ], dest: 'public/js/built.public.js', nonull: true @@ -91,7 +101,7 @@ module.exports = function(grunt) { 'public/vendor/datatables/media/css/jquery.dataTables.css', 'public/vendor/datatables-bootstrap3/BS3/assets/css/datatables.css', 'public/vendor/font-awesome/css/font-awesome.min.css', - 'public/vendor/bootstrap-datepicker/css/datepicker3.css', + 'public/vendor/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css', 'public/vendor/spectrum/spectrum.css', 'public/css/bootstrap-combobox.css', 'public/css/typeahead.js-bootstrap.css', @@ -115,7 +125,7 @@ module.exports = function(grunt) { */ 'public/css/bootstrap-combobox.css', 'public/vendor/datatables/media/css/jquery.dataTables.css', - 'public/vendor/datatables-bootstrap3/BS3/assets/css/datatables.css', + 'public/vendor/datatables-bootstrap3/BS3/assets/css/datatables.css', ], dest: 'public/css/built.public.css', nonull: true, diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 084f74fcc498..e0db4f0a89f5 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -1,8 +1,10 @@ get_class($e), diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index c366547f9b54..204e270c7e3a 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -77,14 +77,17 @@ class AccountController extends BaseController { if (Auth::check()) { return Redirect::to('invoices/create'); - } elseif (!Utils::isNinja() && Account::count() > 0) { - return Redirect::to('/login'); } + if (!Utils::isNinja() && !Utils::allowNewAccounts() && Account::count() > 0) { + return Redirect::to('/login'); + } + $user = false; - $guestKey = Input::get('guest_key'); + $guestKey = Input::get('guest_key'); // local storage key to login until registered + $prevUserId = Session::pull(PREV_USER_ID); // last user id used to link to new account - if ($guestKey) { + if ($guestKey && !$prevUserId) { $user = User::where('password', '=', $guestKey)->first(); if ($user && $user->registered) { @@ -97,6 +100,11 @@ class AccountController extends BaseController $user = $account->users()->first(); Session::forget(RECENTLY_VIEWED); + + if ($prevUserId) { + $users = $this->accountRepo->associateAccounts($user->id, $prevUserId); + Session::put(SESSION_USER_ACCOUNTS, $users); + } } Auth::login($user, true); @@ -152,6 +160,7 @@ class AccountController extends BaseController 'currencies' => Cache::get('currencies'), 'languages' => Cache::get('languages'), 'showUser' => Auth::user()->id === Auth::user()->account->users()->first()->id, + 'title' => trans('texts.company_details'), ]; return View::make('accounts.details', $data); @@ -164,26 +173,33 @@ class AccountController extends BaseController if ($count == 0) { return Redirect::to('gateways/create'); } else { - return View::make('accounts.payments', ['showAdd' => $count < 3]); + return View::make('accounts.payments', [ + 'showAdd' => $count < 3, + 'title' => trans('texts.online_payments') + ]); } } elseif ($section == ACCOUNT_NOTIFICATIONS) { $data = [ 'account' => Account::with('users')->findOrFail(Auth::user()->account_id), + 'title' => trans('texts.notifications'), ]; return View::make('accounts.notifications', $data); } elseif ($section == ACCOUNT_IMPORT_EXPORT) { - return View::make('accounts.import_export'); + return View::make('accounts.import_export', ['title' => trans('texts.import_export')]); } elseif ($section == ACCOUNT_ADVANCED_SETTINGS) { - $account = Auth::user()->account; + $account = Auth::user()->account->load('country'); $data = [ 'account' => $account, 'feature' => $subSection, + 'title' => trans('texts.invoice_settings'), ]; - if ($subSection == ACCOUNT_INVOICE_DESIGN) { + if ($subSection == ACCOUNT_INVOICE_DESIGN + || $subSection == ACCOUNT_CUSTOMIZE_DESIGN) { $invoice = new stdClass(); $client = new stdClass(); + $contact = new stdClass(); $invoiceItem = new stdClass(); $client->name = 'Sample Client'; @@ -194,11 +210,17 @@ class AccountController extends BaseController $client->work_phone = ''; $client->work_email = ''; - $invoice->invoice_number = Auth::user()->account->getNextInvoiceNumber(); + $invoice->invoice_number = $account->getNextInvoiceNumber(); $invoice->invoice_date = date_create()->format('Y-m-d'); - $invoice->account = json_decode(Auth::user()->account->toJson()); + $invoice->account = json_decode($account->toJson()); $invoice->amount = $invoice->balance = 100; + $invoice->terms = trim($account->invoice_terms); + $invoice->invoice_footer = trim($account->invoice_footer); + + $contact->email = 'contact@gmail.com'; + $client->contacts = [$contact]; + $invoiceItem->cost = 100; $invoiceItem->qty = 1; $invoiceItem->notes = 'Notes'; @@ -207,20 +229,38 @@ class AccountController extends BaseController $invoice->client = $client; $invoice->invoice_items = [$invoiceItem]; + $data['account'] = $account; $data['invoice'] = $invoice; - $data['invoiceDesigns'] = InvoiceDesign::availableDesigns(); $data['invoiceLabels'] = json_decode($account->invoice_labels) ?: []; + $data['title'] = trans('texts.invoice_design'); + $data['invoiceDesigns'] = InvoiceDesign::getDesigns($subSection == ACCOUNT_CUSTOMIZE_DESIGN); + + $design = false; + foreach ($data['invoiceDesigns'] as $item) { + if ($item->id == $account->invoice_design_id) { + $design = $item->javascript; + break; + } + } + + if ($subSection == ACCOUNT_CUSTOMIZE_DESIGN) { + $data['customDesign'] = ($account->custom_design && !$design) ? $account->custom_design : $design; + } } else if ($subSection == ACCOUNT_EMAIL_TEMPLATES) { $data['invoiceEmail'] = $account->getEmailTemplate(ENTITY_INVOICE); $data['quoteEmail'] = $account->getEmailTemplate(ENTITY_QUOTE); $data['paymentEmail'] = $account->getEmailTemplate(ENTITY_PAYMENT); - $data['emailFooter'] = $account->getEmailFooter(); + $data['emailFooter'] = $account->getEmailFooter(); + $data['title'] = trans('texts.email_templates'); + } else if ($subSection == ACCOUNT_USER_MANAGEMENT) { + $data['title'] = trans('texts.users_and_tokens'); } return View::make("accounts.{$subSection}", $data); } elseif ($section == ACCOUNT_PRODUCTS) { $data = [ 'account' => Auth::user()->account, + 'title' => trans('texts.product_library'), ]; return View::make('accounts.products', $data); @@ -244,6 +284,8 @@ class AccountController extends BaseController return AccountController::saveInvoiceSettings(); } elseif ($subSection == ACCOUNT_INVOICE_DESIGN) { return AccountController::saveInvoiceDesign(); + } elseif ($subSection == ACCOUNT_CUSTOMIZE_DESIGN) { + return AccountController::saveCustomizeDesign(); } elseif ($subSection == ACCOUNT_EMAIL_TEMPLATES) { return AccountController::saveEmailTemplates(); } @@ -252,6 +294,24 @@ class AccountController extends BaseController } } + private function saveCustomizeDesign() { + if (Auth::user()->account->isPro()) { + $account = Auth::user()->account; + $account->custom_design = Input::get('custom_design'); + $account->invoice_design_id = CUSTOM_DESIGN; + + if (!$account->utf8_invoices) { + $account->utf8_invoices = true; + } + + $account->save(); + + Session::flash('message', trans('texts.updated_settings')); + } + + return Redirect::to('company/advanced_settings/customize_design'); + } + private function saveEmailTemplates() { if (Auth::user()->account->isPro()) { @@ -628,6 +688,9 @@ class AccountController extends BaseController $user->username = trim(Input::get('email')); $user->email = trim(strtolower(Input::get('email'))); $user->phone = trim(Input::get('phone')); + if (Utils::isNinja()) { + $user->dark_mode = Input::get('dark_mode') ? true : false; + } $user->save(); } @@ -635,17 +698,21 @@ class AccountController extends BaseController if ($file = Input::file('logo')) { $path = Input::file('logo')->getRealPath(); File::delete('logo/'.$account->account_key.'.jpg'); + File::delete('logo/'.$account->account_key.'.png'); $image = Image::make($path); $mimeType = $file->getMimeType(); - if ($image->width() == 200 && $mimeType == 'image/jpeg') { + if ($mimeType == 'image/jpeg' && $account->utf8_invoices) { $file->move('logo/', $account->account_key . '.jpg'); + } else if ($mimeType == 'image/png' && $account->utf8_invoices) { + $file->move('logo/', $account->account_key . '.png'); } else { $image->resize(200, 120, function ($constraint) { $constraint->aspectRatio(); }); - Image::canvas($image->width(), $image->height(), '#FFFFFF')->insert($image)->save($account->getLogoPath()); + Image::canvas($image->width(), $image->height(), '#FFFFFF') + ->insert($image)->save('logo/'.$account->account_key.'.jpg'); } } @@ -659,6 +726,7 @@ class AccountController extends BaseController public function removeLogo() { File::delete('logo/'.Auth::user()->account->account_key.'.jpg'); + File::delete('logo/'.Auth::user()->account->account_key.'.png'); Session::flash('message', trans('texts.removed_logo')); @@ -702,8 +770,6 @@ class AccountController extends BaseController if (Utils::isNinja()) { $this->userMailer->sendConfirmation($user); - } else { - $this->accountRepo->registerUser($user); } $activities = Activity::scope()->get(); @@ -725,10 +791,16 @@ class AccountController extends BaseController { $affiliate = Affiliate::where('affiliate_key', '=', SELF_HOST_AFFILIATE_KEY)->first(); + $email = trim(Input::get('email')); + + if (!$email || $email == 'user@example.com') { + return ''; + } + $license = new License(); $license->first_name = Input::get('first_name'); $license->last_name = Input::get('last_name'); - $license->email = Input::get('email'); + $license->email = $email; $license->transaction_reference = Request::getClientIp(); $license->license_key = Utils::generateLicense(); $license->affiliate_id = $affiliate->id; @@ -753,9 +825,11 @@ class AccountController extends BaseController } $account = Auth::user()->account; + $this->accountRepo->unlinkAccount($account); $account->forceDelete(); Auth::logout(); + Session::flush(); return Redirect::to('/')->with('clearGuestKey', true); } diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index c1d570c6534f..ff4c84c649be 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -200,7 +200,7 @@ class AccountGatewayController extends BaseController $fields = $gateway->getFields(); $optional = array_merge(Gateway::$hiddenFields, Gateway::$optionalFields); - if (Utils::isNinja() && $gatewayId == GATEWAY_DWOLLA) { + if ($gatewayId == GATEWAY_DWOLLA) { $optional = array_merge($optional, ['key', 'secret']); } @@ -257,6 +257,8 @@ class AccountGatewayController extends BaseController } $accountGateway->accepted_credit_cards = $cardCount; + $accountGateway->show_address = Input::get('show_address') ? true : false; + $accountGateway->update_address = Input::get('update_address') ? true : false; $accountGateway->config = json_encode($config); if ($accountGatewayPublicId) { @@ -278,7 +280,7 @@ class AccountGatewayController extends BaseController Session::flash('message', $message); - return Redirect::to('company/payments'); + return Redirect::to("gateways/{$accountGateway->public_id}/edit"); } } diff --git a/app/Http/Controllers/AppController.php b/app/Http/Controllers/AppController.php index 0ea384cf29aa..dac4b85ccbbb 100644 --- a/app/Http/Controllers/AppController.php +++ b/app/Http/Controllers/AppController.php @@ -13,6 +13,8 @@ use Session; use Cookie; use Response; use App\Models\User; +use App\Models\Account; +use App\Models\Industry; use App\Ninja\Mailers\Mailer; use App\Ninja\Repositories\AccountRepository; use Redirect; @@ -32,24 +34,16 @@ class AppController extends BaseController public function showSetup() { - if (Utils::isNinja() || Utils::isDatabaseSetup()) { + if (Utils::isNinja() || (Utils::isDatabaseSetup() && Account::count() > 0)) { return Redirect::to('/'); } - $view = View::make('setup'); - - /* - $cookie = Cookie::forget('ninja_session', '/', 'www.ninja.dev'); - Cookie::queue($cookie); - return Response::make($view)->withCookie($cookie); - */ - - return Response::make($view); + return View::make('setup'); } public function doSetup() { - if (Utils::isNinja() || Utils::isDatabaseSetup()) { + if (Utils::isNinja() || (Utils::isDatabaseSetup() && Account::count() > 0)) { return Redirect::to('/'); } @@ -104,7 +98,9 @@ class AppController extends BaseController // == DB Migrate & Seed == // // Artisan::call('migrate:rollback', array('--force' => true)); // Debug Purposes Artisan::call('migrate', array('--force' => true)); - Artisan::call('db:seed', array('--force' => true)); + if (Industry::count() == 0) { + Artisan::call('db:seed', array('--force' => true)); + } Artisan::call('optimize', array('--force' => true)); $firstName = trim(Input::get('first_name')); @@ -114,8 +110,6 @@ class AppController extends BaseController $account = $this->accountRepo->create($firstName, $lastName, $email, $password); $user = $account->users()->first(); - //Auth::login($user, true); - return Redirect::to('/login'); } @@ -168,7 +162,9 @@ class AppController extends BaseController if (!Utils::isNinja() && !Utils::isDatabaseSetup()) { try { Artisan::call('migrate', array('--force' => true)); - Artisan::call('db:seed', array('--force' => true)); + if (Industry::count() == 0) { + Artisan::call('db:seed', array('--force' => true)); + } Artisan::call('optimize', array('--force' => true)); } catch (Exception $e) { Response::make($e->getMessage(), 500); diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index 797c54ac4a92..e17135fe7146 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -3,10 +3,12 @@ use Auth; use Event; use Utils; +use Session; use Illuminate\Http\Request; use App\Models\User; use App\Events\UserLoggedIn; use App\Http\Controllers\Controller; +use App\Ninja\Repositories\AccountRepository; use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\Registrar; use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; @@ -28,6 +30,7 @@ class AuthController extends Controller { protected $loginPath = '/login'; protected $redirectTo = '/dashboard'; + protected $accountRepo; /** * Create a new authentication controller instance. @@ -36,12 +39,13 @@ class AuthController extends Controller { * @param \Illuminate\Contracts\Auth\Registrar $registrar * @return void */ - public function __construct(Guard $auth, Registrar $registrar) + public function __construct(Guard $auth, Registrar $registrar, AccountRepository $repo) { $this->auth = $auth; $this->registrar = $registrar; + $this->accountRepo = $repo; - $this->middleware('guest', ['except' => 'getLogout']); + //$this->middleware('guest', ['except' => 'getLogout']); } public function getLoginWrapper() @@ -55,13 +59,50 @@ class AuthController extends Controller { public function postLoginWrapper(Request $request) { + $userId = Auth::check() ? Auth::user()->id : null; + $user = User::where('email', '=', $request->input('email'))->first(); + + if ($user->failed_logins >= 3) { + Session::flash('error', 'These credentials do not match our records.'); + return redirect()->to('login'); + } + $response = self::postLogin($request); if (Auth::check()) { Event::fire(new UserLoggedIn()); + + $users = false; + // we're linking a new account + if ($userId && Auth::user()->id != $userId) { + $users = $this->accountRepo->associateAccounts($userId, Auth::user()->id); + Session::flash('message', trans('texts.associated_accounts')); + // check if other accounts are linked + } else { + $users = $this->accountRepo->loadAccounts(Auth::user()->id); + } + + Session::put(SESSION_USER_ACCOUNTS, $users); + } elseif ($user) { + $user->failed_logins = $user->failed_logins + 1; + $user->save(); } return $response; } + public function getLogoutWrapper() + { + if (Auth::check() && !Auth::user()->registered) { + $account = Auth::user()->account; + $this->accountRepo->unlinkAccount($account); + $account->forceDelete(); + } + + $response = self::getLogout(); + + Session::flush(); + + return $response; + } } diff --git a/app/Http/Controllers/ClientApiController.php b/app/Http/Controllers/ClientApiController.php index d62056406bb9..ccb7a1c34baa 100644 --- a/app/Http/Controllers/ClientApiController.php +++ b/app/Http/Controllers/ClientApiController.php @@ -24,8 +24,11 @@ class ClientApiController extends Controller public function index() { - $clients = Client::scope()->with('contacts')->orderBy('created_at', 'desc')->get(); - $clients = Utils::remapPublicIds($clients->toArray()); + $clients = Client::scope() + ->with('country', 'contacts', 'industry', 'size', 'currency') + ->orderBy('created_at', 'desc') + ->get(); + $clients = Utils::remapPublicIds($clients); $response = json_encode($clients, JSON_PRETTY_PRINT); $headers = Utils::getApiHeaders(count($clients)); @@ -43,9 +46,9 @@ class ClientApiController extends Controller return Response::make($error, 500, $headers); } else { - $client = $this->clientRepo->save(false, $data, false); - $client->load('contacts'); - $client = Utils::remapPublicIds($client->toArray()); + $client = $this->clientRepo->save(isset($data['id']) ? $data['id'] : false, $data, false); + $client = Client::scope($client->public_id)->with('country', 'contacts', 'industry', 'size', 'currency')->first(); + $client = Utils::remapPublicIds([$client]); $response = json_encode($client, JSON_PRETTY_PRINT); $headers = Utils::getApiHeaders(); diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 7e3a5e84196a..e286b885cbf6 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -44,6 +44,8 @@ class DashboardController extends BaseController ->where('accounts.id', '=', Auth::user()->account_id) ->where('clients.is_deleted', '=', false) ->where('invoices.is_deleted', '=', false) + ->where('invoices.is_quote', '=', false) + ->where('invoices.is_recurring', '=', false) ->groupBy('accounts.id') ->groupBy(DB::raw('CASE WHEN clients.currency_id IS NULL THEN CASE WHEN accounts.currency_id IS NULL THEN 1 ELSE accounts.currency_id END ELSE clients.currency_id END')) ->get(); @@ -83,6 +85,7 @@ class DashboardController extends BaseController 'activities' => $activities, 'pastDue' => $pastDue, 'upcoming' => $upcoming, + 'title' => trans('texts.dashboard'), ]; return View::make('dashboard', $data); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index adf28e133cec..a58245e0e25b 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -27,10 +27,8 @@ class HomeController extends BaseController { Session::reflash(); - if (!Utils::isDatabaseSetup()) { + if (!Utils::isNinja() && (!Utils::isDatabaseSetup() || Account::count() == 0)) { return Redirect::to('/setup'); - } elseif (Account::count() == 0) { - return Redirect::to('/invoice_now'); } elseif (Auth::check()) { return Redirect::to('/dashboard'); } else { @@ -45,6 +43,12 @@ class HomeController extends BaseController public function invoiceNow() { + if (Auth::check() && Input::get('new_account')) { + Session::put(PREV_USER_ID, Auth::user()->id); + Auth::user()->clearSession(); + Auth::logout(); + } + if (Auth::check()) { return Redirect::to('invoices/create')->with('sign_up', Input::get('sign_up')); } else { diff --git a/app/Http/Controllers/InvoiceApiController.php b/app/Http/Controllers/InvoiceApiController.php index 764a59986660..43911db7d8c3 100644 --- a/app/Http/Controllers/InvoiceApiController.php +++ b/app/Http/Controllers/InvoiceApiController.php @@ -26,7 +26,7 @@ class InvoiceApiController extends Controller public function index() { - $invoices = Invoice::scope()->with('invitations')->where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get(); + $invoices = Invoice::scope()->with('client', 'invitations.account')->where('invoices.is_quote', '=', false)->orderBy('created_at', 'desc')->get(); // Add the first invitation link to the data foreach ($invoices as $key => $invoice) { @@ -36,7 +36,7 @@ class InvoiceApiController extends Controller unset($invoice['invitations']); } - $invoices = Utils::remapPublicIds($invoices->toArray()); + $invoices = Utils::remapPublicIds($invoices); $response = json_encode($invoices, JSON_PRETTY_PRINT); $headers = Utils::getApiHeaders(count($invoices)); @@ -99,7 +99,6 @@ class InvoiceApiController extends Controller $data = self::prepareData($data); $data['client_id'] = $client->id; $invoice = $this->invoiceRepo->save(false, $data, false); - $invoice->load('invoice_items'); $invitation = Invitation::createNew(); $invitation->invoice_id = $invoice->id; @@ -112,13 +111,9 @@ class InvoiceApiController extends Controller } // prepare the return data - $invoice = $invoice->toArray(); - $invoice['link'] = $invitation->getLink(); - unset($invoice['account']); - unset($invoice['client']); - $invoice = Utils::remapPublicIds($invoice); - $invoice['client_id'] = $client->public_id; - + $invoice = Invoice::scope($invoice->public_id)->with('client', 'invoice_items', 'invitations')->first(); + $invoice = Utils::remapPublicIds([$invoice]); + $response = json_encode($invoice, JSON_PRETTY_PRINT); } diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 4889144bea7c..1939ce9c65da 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -213,6 +213,10 @@ class InvoiceController extends BaseController $invoice->due_date = Utils::fromSqlDate($invoice->due_date); $invoice->is_pro = $account->isPro(); + if ($invoice->invoice_design_id == CUSTOM_DESIGN) { + $invoice->invoice_design->javascript = $account->custom_design; + } + $contact = $invitation->contact; $contact->setVisible([ 'first_name', @@ -224,17 +228,23 @@ class InvoiceController extends BaseController $paymentTypes = []; if ($client->getGatewayToken()) { $paymentTypes[] = [ - 'url' => URL::to("payment/{$invitation->invitation_key}/".PAYMENT_TYPE_TOKEN), 'label' => trans('texts.use_card_on_file') + 'url' => URL::to("payment/{$invitation->invitation_key}/token"), 'label' => trans('texts.use_card_on_file') ]; } foreach(Gateway::$paymentTypes as $type) { if ($account->getGatewayByType($type)) { - $paymentTypes[] = [ - 'url' => URL::to("/payment/{$invitation->invitation_key}/{$type}"), 'label' => trans('texts.'.strtolower($type)) + $typeLink = strtolower(str_replace('PAYMENT_TYPE_', '', $type)); + $paymentTypes[] = [ + 'url' => URL::to("/payment/{$invitation->invitation_key}/{$typeLink}"), 'label' => trans('texts.'.strtolower($type)) ]; } } + $paymentURL = ''; + if (count($paymentTypes)) { + $paymentURL = $paymentTypes[0]['url']; + } + $data = array( 'isConverted' => $invoice->quote_invoice_id ? true : false, 'showBreadcrumbs' => false, @@ -243,7 +253,8 @@ class InvoiceController extends BaseController 'invitation' => $invitation, 'invoiceLabels' => $account->getInvoiceLabels(), 'contact' => $contact, - 'paymentTypes' => $paymentTypes + 'paymentTypes' => $paymentTypes, + 'paymentURL' => $paymentURL ); return View::make('invoices.view', $data); @@ -318,7 +329,6 @@ class InvoiceController extends BaseController $data = array( 'entityType' => $entityType, 'showBreadcrumbs' => $clone, - 'account' => $invoice->account, 'invoice' => $invoice, 'data' => false, 'method' => $method, @@ -353,7 +363,6 @@ class InvoiceController extends BaseController { $client = null; $invoiceNumber = Auth::user()->account->getNextInvoiceNumber(); - $account = Account::with('country')->findOrFail(Auth::user()->account_id); if ($clientPublicId) { $client = Client::scope($clientPublicId)->firstOrFail(); @@ -361,17 +370,15 @@ class InvoiceController extends BaseController $data = array( 'entityType' => ENTITY_INVOICE, - 'account' => $account, 'invoice' => null, 'data' => Input::old('data'), 'invoiceNumber' => $invoiceNumber, 'method' => 'POST', 'url' => 'invoices', 'title' => trans('texts.new_invoice'), - 'client' => $client, - 'tasks' => Session::get('tasks') ? json_encode(Session::get('tasks')) : null); + 'client' => $client); $data = array_merge($data, self::getViewModel()); - + return View::make('invoices.edit', $data); } @@ -389,7 +396,7 @@ class InvoiceController extends BaseController } return [ - 'account' => Auth::user()->account, + 'account' => Auth::user()->account->load('country'), 'products' => Product::scope()->orderBy('id')->get(array('product_key', 'notes', 'cost', 'qty')), 'countries' => Cache::get('countries'), 'clients' => Client::scope()->with('contacts', 'country')->orderBy('name')->get(), @@ -398,7 +405,7 @@ class InvoiceController extends BaseController 'sizes' => Cache::get('sizes'), 'paymentTerms' => Cache::get('paymentTerms'), 'industries' => Cache::get('industries'), - 'invoiceDesigns' => InvoiceDesign::availableDesigns(), + 'invoiceDesigns' => InvoiceDesign::getDesigns(), 'frequencies' => array( 1 => 'Weekly', 2 => 'Two weeks', @@ -410,7 +417,7 @@ class InvoiceController extends BaseController ), 'recurringHelp' => $recurringHelp, 'invoiceLabels' => Auth::user()->account->getInvoiceLabels(), - + 'tasks' => Session::get('tasks') ? json_encode(Session::get('tasks')) : null, ]; } @@ -504,9 +511,13 @@ class InvoiceController extends BaseController return $this->convertQuote($publicId); } elseif ($action == 'email') { if (Auth::user()->confirmed && !Auth::user()->isDemo()) { - $message = trans("texts.emailed_{$entityType}"); - $this->mailer->sendInvoice($invoice); - Session::flash('message', $message); + $response = $this->mailer->sendInvoice($invoice); + if ($response === true) { + $message = trans("texts.emailed_{$entityType}"); + Session::flash('message', $message); + } else { + Session::flash('error', $response); + } } else { $errorMessage = trans(Auth::user()->registered ? 'texts.confirmation_required' : 'texts.registration_required'); Session::flash('error', $errorMessage); @@ -635,7 +646,7 @@ class InvoiceController extends BaseController 'invoice' => $invoice, 'versionsJson' => json_encode($versionsJson), 'versionsSelect' => $versionsSelect, - 'invoiceDesigns' => InvoiceDesign::availableDesigns(), + 'invoiceDesigns' => InvoiceDesign::getDesigns(), ]; return View::make('invoices.history', $data); diff --git a/app/Http/Controllers/PaymentApiController.php b/app/Http/Controllers/PaymentApiController.php index 40ba155b54ad..1fb81bf78283 100644 --- a/app/Http/Controllers/PaymentApiController.php +++ b/app/Http/Controllers/PaymentApiController.php @@ -1,8 +1,10 @@ orderBy('created_at', 'desc')->get(); - $payments = Utils::remapPublicIds($payments->toArray()); - + $payments = Payment::scope() + ->with('client', 'contact', 'invitation', 'user', 'invoice') + ->orderBy('created_at', 'desc') + ->get(); + $payments = Utils::remapPublicIds($payments); + $response = json_encode($payments, JSON_PRETTY_PRINT); $headers = Utils::getApiHeaders(count($payments)); return Response::make($response, 200, $headers); } - /* - public function store() - { - $data = Input::all(); - $invoice = $this->invoiceRepo->save(false, $data, false); - $response = json_encode($invoice, JSON_PRETTY_PRINT); - $headers = Utils::getApiHeaders(); - return Response::make($response, 200, $headers); - } - */ + public function store() + { + $data = Input::all(); + $error = false; + + if (isset($data['invoice_id'])) { + $invoice = Invoice::scope($data['invoice_id'])->with('client')->first(); + + if ($invoice) { + $data['invoice'] = $invoice->public_id; + $data['client'] = $invoice->client->public_id; + } else { + $error = trans('validation.not_in', ['attribute' => 'invoice_id']); + } + } else { + $error = trans('validation.not_in', ['attribute' => 'invoice_id']); + } + + if (!isset($data['transaction_reference'])) { + $data['transaction_reference'] = ''; + } + + if (!$error) { + $payment = $this->paymentRepo->save(false, $data); + $payment = Payment::scope($payment->public_id)->with('client', 'contact', 'user', 'invoice')->first(); + + $payment = Utils::remapPublicIds([$payment]); + } + + $response = json_encode($error ?: $payment, JSON_PRETTY_PRINT); + $headers = Utils::getApiHeaders(); + return Response::make($response, 200, $headers); + } } diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php index c3e6ce3c9001..6248a8e6917b 100644 --- a/app/Http/Controllers/PaymentController.php +++ b/app/Http/Controllers/PaymentController.php @@ -233,33 +233,41 @@ class PaymentController extends BaseController private function convertInputForOmnipay($input) { - $country = Country::find($input['country_id']); - - return [ + $data = [ 'firstName' => $input['first_name'], 'lastName' => $input['last_name'], 'number' => $input['card_number'], 'expiryMonth' => $input['expiration_month'], 'expiryYear' => $input['expiration_year'], 'cvv' => $input['cvv'], - 'billingAddress1' => $input['address1'], - 'billingAddress2' => $input['address2'], - 'billingCity' => $input['city'], - 'billingState' => $input['state'], - 'billingPostcode' => $input['postal_code'], - 'billingCountry' => $country->iso_3166_2, - 'shippingAddress1' => $input['address1'], - 'shippingAddress2' => $input['address2'], - 'shippingCity' => $input['city'], - 'shippingState' => $input['state'], - 'shippingPostcode' => $input['postal_code'], - 'shippingCountry' => $country->iso_3166_2 ]; + + if (isset($input['country_id'])) { + $country = Country::find($input['country_id']); + + $data = array_merge($data, [ + 'billingAddress1' => $input['address1'], + 'billingAddress2' => $input['address2'], + 'billingCity' => $input['city'], + 'billingState' => $input['state'], + 'billingPostcode' => $input['postal_code'], + 'billingCountry' => $country->iso_3166_2, + 'shippingAddress1' => $input['address1'], + 'shippingAddress2' => $input['address2'], + 'shippingCity' => $input['city'], + 'shippingState' => $input['state'], + 'shippingPostcode' => $input['postal_code'], + 'shippingCountry' => $country->iso_3166_2 + ]); + } + + return $data; } private function getPaymentDetails($invitation, $input = null) { $invoice = $invitation->invoice; + $account = $invoice->account; $key = $invoice->account_id.'-'.$invoice->invoice_number; $currencyCode = $invoice->client->currency ? $invoice->client->currency->code : ($invoice->account->currency ? $invoice->account->currency->code : 'USD'); @@ -292,7 +300,9 @@ class PaymentController extends BaseController $account = $client->account; $useToken = false; - if (!$paymentType) { + if ($paymentType) { + $paymentType = 'PAYMENT_TYPE_' . strtoupper($paymentType); + } else { $paymentType = Session::get('payment_type', $account->account_gateways[0]->getPaymentType()); } if ($paymentType == PAYMENT_TYPE_TOKEN) { @@ -328,6 +338,7 @@ class PaymentController extends BaseController 'currencyId' => $client->getCurrencyId(), 'account' => $client->account, 'hideLogo' => $account->isWhiteLabel(), + 'showAddress' => $accountGateway->show_address, ]; return View::make('payments.payment', $data); @@ -458,10 +469,11 @@ class PaymentController extends BaseController $this->contactMailer->sendLicensePaymentConfirmation($name, $license->email, $affiliate->price, $license->license_key, $license->product_id); if (Session::has('return_url')) { - return Redirect::away(Session::get('return_url')."?license_key={$license->license_key}&product_id=".Session::get('product_id')); - } else { - return View::make('public.license', $data); + $data['redirectTo'] = Session::get('return_url')."?license_key={$license->license_key}&product_id=".Session::get('product_id'); + $data['message'] = "Redirecting to " . Session::get('return_url'); } + + return View::make('public.license', $data); } catch (\Exception $e) { $errorMessage = trans('texts.payment_error'); Session::flash('error', $errorMessage); @@ -495,19 +507,30 @@ class PaymentController extends BaseController public function do_payment($invitationKey, $onSite = true, $useToken = false) { - $rules = array( + $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail(); + $invoice = $invitation->invoice; + $client = $invoice->client; + $account = $client->account; + $accountGateway = $account->getGatewayByType(Session::get('payment_type')); + + $rules = [ 'first_name' => 'required', 'last_name' => 'required', 'card_number' => 'required', 'expiration_month' => 'required', 'expiration_year' => 'required', 'cvv' => 'required', - 'address1' => 'required', - 'city' => 'required', - 'state' => 'required', - 'postal_code' => 'required', - 'country_id' => 'required', - ); + ]; + + if ($accountGateway->show_address) { + $rules = array_merge($rules, [ + 'address1' => 'required', + 'city' => 'required', + 'state' => 'required', + 'postal_code' => 'required', + 'country_id' => 'required', + ]); + } if ($onSite) { $validator = Validator::make(Input::all(), $rules); @@ -519,23 +542,16 @@ class PaymentController extends BaseController ->withInput(); } } - - $invitation = Invitation::with('invoice.invoice_items', 'invoice.client.currency', 'invoice.client.account.currency', 'invoice.client.account.account_gateways.gateway')->where('invitation_key', '=', $invitationKey)->firstOrFail(); - $invoice = $invitation->invoice; - $client = $invoice->client; - $account = $client->account; - $accountGateway = $account->getGatewayByType(Session::get('payment_type')); - - /* - if ($onSite) { + + if ($onSite && $accountGateway->update_address) { $client->address1 = trim(Input::get('address1')); $client->address2 = trim(Input::get('address2')); $client->city = trim(Input::get('city')); $client->state = trim(Input::get('state')); $client->postal_code = trim(Input::get('postal_code')); + $client->country_id = Input::get('country_id'); $client->save(); } - */ try { $gateway = self::createGateway($accountGateway); @@ -628,8 +644,9 @@ class PaymentController extends BaseController $invoice = $invitation->invoice; $accountGateway = $invoice->client->account->getGatewayByType(Session::get('payment_type')); - if ($invoice->account->account_key == NINJA_ACCOUNT_KEY) { - $account = Account::find($invoice->client->public_id); + if ($invoice->account->account_key == NINJA_ACCOUNT_KEY + && $invoice->amount == PRO_PLAN_PRICE) { + $account = Account::with('users')->find($invoice->client->public_id); if ($account->pro_plan_paid && $account->pro_plan_paid != '0000-00-00') { $date = DateTime::createFromFormat('Y-m-d', $account->pro_plan_paid); $account->pro_plan_paid = $date->modify('+1 year')->format('Y-m-d'); @@ -637,6 +654,9 @@ class PaymentController extends BaseController $account->pro_plan_paid = date_create()->format('Y-m-d'); } $account->save(); + + $user = $account->users()->first(); + $this->accountRepo->syncAccounts($user->id, $account->pro_plan_paid); } $payment = Payment::createNew($invitation); @@ -679,6 +699,14 @@ class PaymentController extends BaseController $accountGateway = $invoice->client->account->getGatewayByType(Session::get('payment_type')); $gateway = self::createGateway($accountGateway); + // Check for Dwolla payment error + if ($accountGateway->isGateway(GATEWAY_DWOLLA) && Input::get('error')) { + $errorMessage = trans('texts.payment_error')."\n\n".Input::get('error_description'); + Session::flash('error', $errorMessage); + Utils::logError($errorMessage); + return Redirect::to('view/'.$invitation->invitation_key); + } + try { if (method_exists($gateway, 'completePurchase')) { $details = self::getPaymentDetails($invitation); @@ -731,14 +759,19 @@ class PaymentController extends BaseController ->withErrors($errors) ->withInput(); } else { - $this->paymentRepo->save($publicId, Input::all()); + $payment = $this->paymentRepo->save($publicId, Input::all()); if ($publicId) { Session::flash('message', trans('texts.updated_payment')); return Redirect::to('payments/'); } else { - Session::flash('message', trans('texts.created_payment')); + if (Input::get('email_receipt')) { + $this->contactMailer->sendPaymentConfirmation($payment); + Session::flash('message', trans('texts.created_payment_emailed_client')); + } else { + Session::flash('message', trans('texts.created_payment')); + } return Redirect::to('clients/'.Input::get('client')); } diff --git a/app/Http/Controllers/QuoteApiController.php b/app/Http/Controllers/QuoteApiController.php index 2be0dc9b25db..70257644c544 100644 --- a/app/Http/Controllers/QuoteApiController.php +++ b/app/Http/Controllers/QuoteApiController.php @@ -16,8 +16,8 @@ class QuoteApiController extends Controller public function index() { - $invoices = Invoice::scope()->where('invoices.is_quote', '=', true)->orderBy('created_at', 'desc')->get(); - $invoices = Utils::remapPublicIds($invoices->toArray()); + $invoices = Invoice::scope()->with('client', 'user')->where('invoices.is_quote', '=', true)->orderBy('created_at', 'desc')->get(); + $invoices = Utils::remapPublicIds($invoices); $response = json_encode($invoices, JSON_PRETTY_PRINT); $headers = Utils::getApiHeaders(count($invoices)); diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php index ebfc8a6629c0..b8dfd095e44b 100644 --- a/app/Http/Controllers/QuoteController.php +++ b/app/Http/Controllers/QuoteController.php @@ -156,7 +156,7 @@ class QuoteController extends BaseController 'sizes' => Cache::get('sizes'), 'paymentTerms' => Cache::get('paymentTerms'), 'industries' => Cache::get('industries'), - 'invoiceDesigns' => InvoiceDesign::availableDesigns(), + 'invoiceDesigns' => InvoiceDesign::getDesigns(), 'invoiceLabels' => Auth::user()->account->getInvoiceLabels() ]; } diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index b1746761b10f..da37c9eb9bec 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -1,6 +1,7 @@ balance; } - if ($action == 'export') { + if ($action == 'export') + { self::export($exportData, $reportTotals); } } - if ($enableChart) { - foreach ([ENTITY_INVOICE, ENTITY_PAYMENT, ENTITY_CREDIT] as $entityType) { - $records = DB::table($entityType.'s') - ->select(DB::raw('sum(amount) as total, concat(YEAR('.$entityType.'_date), '.$groupBy.'('.$entityType.'_date)) as '.$groupBy)) - ->where('account_id', '=', Auth::user()->account_id) - ->where($entityType.'s.is_deleted', '=', false) - ->where($entityType.'s.'.$entityType.'_date', '>=', $startDate->format('Y-m-d')) - ->where($entityType.'s.'.$entityType.'_date', '<=', $endDate->format('Y-m-d')) - ->groupBy($groupBy); + if ($enableChart) + { + foreach ([ENTITY_INVOICE, ENTITY_PAYMENT, ENTITY_CREDIT] as $entityType) + { + // SQLite does not support the YEAR(), MONTH(), WEEK() and similar functions. + // Let's see if SQLite is being used. + if (Config::get('database.connections.'.Config::get('database.default').'.driver') == 'sqlite') + { + // Replace the unsupported function with it's date format counterpart + switch ($groupBy) + { + case 'MONTH': + $dateFormat = '%m'; // returns 01-12 + break; + case 'WEEK': + $dateFormat = '%W'; // returns 00-53 + break; + case 'DAYOFYEAR': + $dateFormat = '%j'; // returns 001-366 + break; + default: + $dateFormat = '%m'; // MONTH by default + break; + } - if ($entityType == ENTITY_INVOICE) { + // Concatenate the year and the chosen timeframe (Month, Week or Day) + $timeframe = 'strftime("%Y", '.$entityType.'_date) || strftime("'.$dateFormat.'", '.$entityType.'_date)'; + } + else + { + // Supported by Laravel's other DBMS drivers (MySQL, MSSQL and PostgreSQL) + $timeframe = 'concat(YEAR('.$entityType.'_date), '.$groupBy.'('.$entityType.'_date))'; + } + + $records = DB::table($entityType.'s') + ->select(DB::raw('sum(amount) as total, '.$timeframe.' as '.$groupBy)) + ->where('account_id', '=', Auth::user()->account_id) + ->where($entityType.'s.is_deleted', '=', false) + ->where($entityType.'s.'.$entityType.'_date', '>=', $startDate->format('Y-m-d')) + ->where($entityType.'s.'.$entityType.'_date', '<=', $endDate->format('Y-m-d')) + ->groupBy($groupBy); + + if ($entityType == ENTITY_INVOICE) + { $records->where('is_quote', '=', false) ->where('is_recurring', '=', false); } $totals = $records->lists('total'); - $dates = $records->lists($groupBy); - $data = array_combine($dates, $totals); + $dates = $records->lists($groupBy); + $data = array_combine($dates, $totals); $padding = $groupBy == 'DAYOFYEAR' ? 'day' : ($groupBy == 'WEEK' ? 'week' : 'month'); $endDate->modify('+1 '.$padding); $interval = new DateInterval('P1'.substr($groupBy, 0, 1)); - $period = new DatePeriod($startDate, $interval, $endDate); + $period = new DatePeriod($startDate, $interval, $endDate); $endDate->modify('-1 '.$padding); $totals = []; - foreach ($period as $d) { + foreach ($period as $d) + { $dateFormat = $groupBy == 'DAYOFYEAR' ? 'z' : ($groupBy == 'WEEK' ? 'W' : 'n'); $date = $d->format('Y'.$dateFormat); $totals[] = isset($data[$date]) ? $data[$date] : 0; - - if ($entityType == ENTITY_INVOICE) { + + if ($entityType == ENTITY_INVOICE) + { $labelFormat = $groupBy == 'DAYOFYEAR' ? 'j' : ($groupBy == 'WEEK' ? 'W' : 'F'); - $label = $d->format($labelFormat); + $label = $d->format($labelFormat); $labels[] = $label; } } - + $max = max($totals); - if ($max > 0) { + if ($max > 0) + { $datasets[] = [ 'totals' => $totals, 'colors' => $entityType == ENTITY_INVOICE ? '78,205,196' : ($entityType == ENTITY_CREDIT ? '199,244,100' : '255,107,107'), @@ -243,6 +281,7 @@ class ReportController extends BaseController 'reportType' => $reportType, 'enableChart' => $enableChart, 'enableReport' => $enableReport, + 'title' => trans('texts.charts_and_reports'), ]; return View::make('reports.chart_builder', $params); diff --git a/app/Http/Controllers/TaskController.php b/app/Http/Controllers/TaskController.php index 55c1dd53d5b3..7b719e148d73 100644 --- a/app/Http/Controllers/TaskController.php +++ b/app/Http/Controllers/TaskController.php @@ -1,5 +1,6 @@ taskRepo = $taskRepo; + $this->invoiceRepo = $invoiceRepo; } /** @@ -44,7 +35,9 @@ class TaskController extends BaseController * @return Response */ public function index() - { + { + self::checkTimezone(); + return View::make('list', array( 'entityType' => ENTITY_TASK, 'title' => trans('texts.tasks'), @@ -64,8 +57,8 @@ class TaskController extends BaseController ->addColumn('client_name', function ($model) { return $model->client_public_id ? link_to('clients/'.$model->client_public_id, Utils::getClientDisplayName($model)) : ''; }); } - return $table->addColumn('start_time', function($model) { return Utils::fromSqlDateTime($model->start_time); }) - ->addColumn('duration', function($model) { return gmdate('H:i:s', $model->duration == -1 ? time() - strtotime($model->start_time) : $model->duration); }) + return $table->addColumn('created_at', function($model) { return Task::calcStartTime($model); }) + ->addColumn('time_log', function($model) { return gmdate('H:i:s', Task::calcDuration($model)); }) ->addColumn('description', function($model) { return $model->description; }) ->addColumn('invoice_number', function($model) { return self::getStatusLabel($model); }) ->addColumn('dropdown', function ($model) { @@ -81,7 +74,7 @@ class TaskController extends BaseController if ($model->invoice_number) { $str .= '
  • ' . link_to("/invoices/{$model->invoice_public_id}/edit", trans('texts.view_invoice')) . '
  • '; - } elseif ($model->duration == -1) { + } elseif ($model->is_running) { $str .= '
  • '.trans('texts.stop_task').'
  • '; } elseif (!$model->deleted_at || $model->deleted_at == '0000-00-00') { $str .= '
  • '.trans('texts.invoice_task').'
  • '; @@ -107,7 +100,7 @@ class TaskController extends BaseController if ($model->invoice_number) { $class = 'success'; $label = trans('texts.invoiced'); - } elseif ($model->duration == -1) { + } elseif ($model->is_running) { $class = 'primary'; $label = trans('texts.running'); } else { @@ -135,12 +128,15 @@ class TaskController extends BaseController */ public function create($clientPublicId = 0) { + self::checkTimezone(); + $data = [ 'task' => null, 'clientPublicId' => Input::old('client') ? Input::old('client') : $clientPublicId, 'method' => 'POST', 'url' => 'tasks', 'title' => trans('texts.new_task'), + 'minuteOffset' => Utils::getTiemstampOffset(), ]; $data = array_merge($data, self::getViewModel()); @@ -156,15 +152,41 @@ class TaskController extends BaseController */ public function edit($publicId) { - $task = Task::scope($publicId)->with('client')->firstOrFail(); - + self::checkTimezone(); + + $task = Task::scope($publicId)->with('client', 'invoice')->firstOrFail(); + + $actions = []; + if ($task->invoice) { + $actions[] = ['url' => URL::to("inovices/{$task->invoice->public_id}/edit"), 'label' => trans("texts.view_invoice")]; + } else { + $actions[] = ['url' => 'javascript:submitAction("invoice")', 'label' => trans("texts.create_invoice")]; + + // check for any open invoices + $invoices = $task->client_id ? $this->invoiceRepo->findOpenInvoices($task->client_id) : []; + + foreach ($invoices as $invoice) { + $actions[] = ['url' => 'javascript:submitAction("add_to_invoice", '.$invoice->public_id.')', 'label' => trans("texts.add_to_invoice", ["invoice" => $invoice->invoice_number])]; + } + } + + $actions[] = DropdownButton::DIVIDER; + if (!$task->trashed()) { + $actions[] = ['url' => 'javascript:submitAction("archive")', 'label' => trans('texts.archive_task')]; + $actions[] = ['url' => 'javascript:onDeleteClick()', 'label' => trans('texts.delete_task')]; + } else { + $actions[] = ['url' => 'javascript:submitAction("restore")', 'label' => trans('texts.restore_task')]; + } + $data = [ 'task' => $task, 'clientPublicId' => $task->client ? $task->client->public_id : 0, 'method' => 'PUT', 'url' => 'tasks/'.$publicId, 'title' => trans('texts.edit_task'), - 'duration' => time() - strtotime($task->start_time), + 'duration' => $task->is_running ? $task->getCurrentDuration() : $task->getDuration(), + 'actions' => $actions, + 'minuteOffset' => Utils::getTiemstampOffset(), ]; $data = array_merge($data, self::getViewModel()); @@ -192,15 +214,16 @@ class TaskController extends BaseController private function save($publicId = null) { - $task = $this->taskRepo->save($publicId, Input::all()); + $action = Input::get('action'); + if (in_array($action, ['archive', 'delete', 'invoice', 'restore', 'add_to_invoice'])) { + return self::bulk(); + } + + $task = $this->taskRepo->save($publicId, Input::all()); Session::flash('message', trans($publicId ? 'texts.updated_task' : 'texts.created_task')); - if (Input::get('action') == 'stop') { - return Redirect::to("tasks"); - } else { - return Redirect::to("tasks/{$task->public_id}/edit"); - } + return Redirect::to("tasks/{$task->public_id}/edit"); } public function bulk() @@ -212,12 +235,11 @@ class TaskController extends BaseController $this->taskRepo->save($ids, ['action' => $action]); Session::flash('message', trans('texts.stopped_task')); return Redirect::to('tasks'); - } else if ($action == 'invoice') { - + } else if ($action == 'invoice' || $action == 'add_to_invoice') { $tasks = Task::scope($ids)->with('client')->get(); $clientPublicId = false; $data = []; - + foreach ($tasks as $task) { if ($task->client) { if (!$clientPublicId) { @@ -228,23 +250,28 @@ class TaskController extends BaseController } } - if ($task->duration == -1) { + if ($task->is_running) { Session::flash('error', trans('texts.task_error_running')); return Redirect::to('tasks'); } else if ($task->invoice_id) { Session::flash('error', trans('texts.task_error_invoiced')); return Redirect::to('tasks'); } - + $data[] = [ 'publicId' => $task->public_id, 'description' => $task->description, - 'startTime' => Utils::fromSqlDateTime($task->start_time), - 'duration' => round($task->duration / (60 * 60), 2) + 'startTime' => $task->getStartTime(), + 'duration' => $task->getHours(), ]; } - return Redirect::to("invoices/create/{$clientPublicId}")->with('tasks', $data); + if ($action == 'invoice') { + return Redirect::to("invoices/create/{$clientPublicId}")->with('tasks', $data); + } else { + $invoiceId = Input::get('invoice_id'); + return Redirect::to("invoices/{$invoiceId}/edit")->with('tasks', $data); + } } else { $count = $this->taskRepo->bulk($ids, $action); @@ -258,4 +285,12 @@ class TaskController extends BaseController } } } + + private function checkTimezone() + { + if (!Auth::user()->account->timezone) { + $link = link_to('/company/details', trans('texts.click_here'), ['target' => '_blank']); + Session::flash('warning', trans('texts.timezone_unset', ['link' => $link])); + } + } } diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 1a1afd3f1df9..dedd752190fb 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -7,6 +7,7 @@ use DB; use Event; use Input; use View; +use Request; use Redirect; use Session; use URL; @@ -300,23 +301,24 @@ class UserController extends BaseController * Log the user out of the application. * */ + /* public function logout() { if (Auth::check()) { if (!Auth::user()->registered) { $account = Auth::user()->account; + $this->accountRepo->unlinkAccount($account); $account->forceDelete(); } } - Session::forget('news_feed_id'); - Session::forget('news_feed_message'); - Auth::logout(); + Session::flush(); return Redirect::to('/')->with('clearGuestKey', true); } - + */ + public function changePassword() { // check the current password is correct @@ -342,4 +344,36 @@ class UserController extends BaseController return RESULT_SUCCESS; } + + public function switchAccount($newUserId) + { + $oldUserId = Auth::user()->id; + $referer = Request::header('referer'); + $account = $this->accountRepo->findUserAccounts($newUserId, $oldUserId); + + if ($account) { + if ($account->hasUserId($newUserId) && $account->hasUserId($oldUserId)) { + Auth::loginUsingId($newUserId); + Auth::user()->account->loadLocalizationSettings(); + + // regenerate token to prevent open pages + // from saving under the wrong account + Session::put('_token', str_random(40)); + } + } + + return Redirect::to($referer); + } + + public function unlinkAccount($userAccountId, $userId) + { + $this->accountRepo->unlinkUser($userAccountId, $userId); + $referer = Request::header('referer'); + + $users = $this->accountRepo->loadAccounts(Auth::user()->id); + Session::put(SESSION_USER_ACCOUNTS, $users); + + Session::flash('message', trans('texts.unlinked_account')); + return Redirect::to($referer); + } } diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index 329e1a2c36a4..a6c2741977c8 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -49,6 +49,7 @@ class StartupCheck 'paymentTerms' => 'App\Models\PaymentTerm', 'paymentTypes' => 'App\Models\PaymentType', 'countries' => 'App\Models\Country', + 'invoiceDesigns' => 'App\Models\InvoiceDesign', ]; foreach ($cachedTables as $name => $class) { if (Input::has('clear_cache')) { @@ -157,6 +158,14 @@ class StartupCheck } } - return $next($request); + if (preg_match('/(?i)msie [2-8]/', $_SERVER['HTTP_USER_AGENT'])) { + Session::flash('error', trans('texts.old_browser')); + } + + // for security prevent displaying within an iframe + $response = $next($request); + $response->headers->set('X-Frame-Options', 'DENY'); + + return $response; } } diff --git a/app/Http/routes.php b/app/Http/routes.php index efad81d4f736..156e66ea6573 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -67,7 +67,7 @@ get('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@getRegiste post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegister')); get('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@getLoginWrapper')); post('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@postLoginWrapper')); -get('/logout', array('as' => 'logout', 'uses' => 'Auth\AuthController@getLogout')); +get('/logout', array('as' => 'logout', 'uses' => 'Auth\AuthController@getLogoutWrapper')); get('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getEmail')); post('/forgot', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@postEmail')); get('/password/reset/{token}', array('as' => 'forgot', 'uses' => 'Auth\PasswordController@getReset')); @@ -93,6 +93,8 @@ Route::group(['middleware' => 'auth'], function() { Route::get('send_confirmation/{user_id}', 'UserController@sendConfirmation'); Route::get('restore_user/{user_id}', 'UserController@restoreUser'); Route::post('users/change_password', 'UserController@changePassword'); + Route::get('/switch_account/{user_id}', 'UserController@switchAccount'); + Route::get('/unlink_account/{user_account_id}/{user_id}', 'UserController@unlinkAccount'); Route::get('api/tokens', array('as'=>'api.tokens', 'uses'=>'TokenController@getDatatable')); Route::resource('tokens', 'TokenController'); @@ -204,6 +206,9 @@ Route::get('/testimonials', function() { Route::get('/compare-online-invoicing{sites?}', function() { return Redirect::to(NINJA_WEB_URL, 301); }); +Route::get('/forgot_password', function() { + return Redirect::to(NINJA_APP_URL.'/forgot', 301); +}); define('CONTACT_EMAIL', Config::get('mail.from.address')); @@ -241,6 +246,8 @@ define('ACCOUNT_USER_MANAGEMENT', 'user_management'); define('ACCOUNT_DATA_VISUALIZATIONS', 'data_visualizations'); define('ACCOUNT_EMAIL_TEMPLATES', 'email_templates'); define('ACCOUNT_TOKEN_MANAGEMENT', 'token_management'); +define('ACCOUNT_CUSTOMIZE_DESIGN', 'customize_design'); + define('ACTIVITY_TYPE_CREATE_CLIENT', 1); define('ACTIVITY_TYPE_ARCHIVE_CLIENT', 2); @@ -294,6 +301,7 @@ define('INVOICE_STATUS_PARTIAL', 4); define('INVOICE_STATUS_PAID', 5); define('PAYMENT_TYPE_CREDIT', 1); +define('CUSTOM_DESIGN', 11); define('FREQUENCY_WEEKLY', 1); define('FREQUENCY_TWO_WEEKS', 2); @@ -310,6 +318,7 @@ define('SESSION_DATE_PICKER_FORMAT', 'datePickerFormat'); define('SESSION_DATETIME_FORMAT', 'datetimeFormat'); define('SESSION_COUNTER', 'sessionCounter'); define('SESSION_LOCALE', 'sessionLocale'); +define('SESSION_USER_ACCOUNTS', 'userAccounts'); define('SESSION_LAST_REQUEST_PAGE', 'SESSION_LAST_REQUEST_PAGE'); define('SESSION_LAST_REQUEST_TIME', 'SESSION_LAST_REQUEST_TIME'); @@ -348,18 +357,23 @@ define('EVENT_CREATE_PAYMENT', 4); define('REQUESTED_PRO_PLAN', 'REQUESTED_PRO_PLAN'); define('DEMO_ACCOUNT_ID', 'DEMO_ACCOUNT_ID'); +define('PREV_USER_ID', 'PREV_USER_ID'); define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h'); define('NINJA_GATEWAY_ID', GATEWAY_STRIPE); define('NINJA_GATEWAY_CONFIG', ''); define('NINJA_WEB_URL', 'https://www.invoiceninja.com'); define('NINJA_APP_URL', 'https://app.invoiceninja.com'); -define('NINJA_VERSION', '2.2.0'); +define('NINJA_VERSION', '2.2.2'); define('NINJA_DATE', '2000-01-01'); + define('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'); define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/'); define('ZAPIER_URL', 'https://zapier.com/developer/invite/11276/85cf0ee4beae8e802c6c579eb4e351f1/'); +define('OUTDATE_BROWSER_URL', 'http://browsehappy.com/'); +define('PDFMAKE_DOCS', 'http://pdfmake.org/playground.html'); define('COUNT_FREE_DESIGNS', 4); +define('COUNT_FREE_DESIGNS_SELF_HOST', 5); // include the custom design define('PRODUCT_ONE_CLICK_INSTALL', 1); define('PRODUCT_INVOICE_DESIGNS', 2); define('PRODUCT_WHITE_LABEL', 3); @@ -452,6 +466,7 @@ Event::listen('illuminate.query', function($query, $bindings, $time, $name) }); */ + /* if (Auth::check() && Auth::user()->id === 1) { diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index d09e60cfab4f..184dd453e498 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -51,12 +51,17 @@ class Utils public static function isNinjaProd() { - return isset($_ENV['NINJA_PROD']) && $_ENV['NINJA_PROD']; + return isset($_ENV['NINJA_PROD']) && $_ENV['NINJA_PROD'] == 'true'; } public static function isNinjaDev() { - return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV']; + return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV'] == 'true'; + } + + public static function allowNewAccounts() + { + return Utils::isNinja() || (isset($_ENV['ALLOW_NEW_ACCOUNTS']) && $_ENV['ALLOW_NEW_ACCOUNTS'] == 'true'); } public static function isPro() @@ -246,6 +251,10 @@ class Utils $currency = Currency::find(1); } + if (!$value) { + $value = 0; + } + Cache::add('currency', $currency, DEFAULT_QUERY_CACHE); return $currency->symbol.number_format($value, $currency->precision, $currency->decimal_separator, $currency->thousand_separator); @@ -310,6 +319,16 @@ class Utils return $date->format($format); } + public static function getTiemstampOffset() + { + $timezone = new DateTimeZone(Session::get(SESSION_TIMEZONE, DEFAULT_TIMEZONE)); + $datetime = new DateTime('now', $timezone); + $offset = $timezone->getOffset($datetime); + $minutes = $offset / 60; + + return $minutes; + } + public static function toSqlDate($date, $formatResult = true) { if (!$date) { @@ -347,7 +366,7 @@ class Utils $timezone = Session::get(SESSION_TIMEZONE, DEFAULT_TIMEZONE); $format = Session::get(SESSION_DATETIME_FORMAT, DEFAULT_DATETIME_FORMAT); - + $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $date); $dateTime->setTimeZone(new DateTimeZone($timezone)); @@ -563,14 +582,15 @@ class Utils { $curl = curl_init(); - $jsonEncodedData = json_encode($data->toJson()); + $jsonEncodedData = json_encode($data->toPublicArray()); + $opts = [ - CURLOPT_URL => $subscription->target_url, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_CUSTOMREQUEST => 'POST', - CURLOPT_POST => 1, - CURLOPT_POSTFIELDS => $jsonEncodedData, - CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Content-Length: '.strlen($jsonEncodedData)], + CURLOPT_URL => $subscription->target_url, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POST => 1, + CURLOPT_POSTFIELDS => $jsonEncodedData, + CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Content-Length: '.strlen($jsonEncodedData)], ]; curl_setopt_array($curl, $opts); @@ -586,27 +606,39 @@ class Utils } - public static function remapPublicIds(array $data) + public static function remapPublicIds($items) { $return = []; - - foreach ($data as $key => $val) { - if ($key === 'public_id') { - $key = 'id'; - } elseif (strpos($key, '_id')) { - continue; - } - - if (is_array($val)) { - $val = Utils::remapPublicIds($val); - } - - $return[$key] = $val; + + foreach ($items as $item) { + $return[] = $item->toPublicArray(); } return $return; } + public static function hideIds($data) + { + $publicId = null; + + foreach ($data as $key => $val) { + if (is_array($val)) { + $data[$key] = Utils::hideIds($val); + } else if ($key == 'id' || strpos($key, '_id')) { + if ($key == 'public_id') { + $publicId = $val; + } + unset($data[$key]); + } + } + + if ($publicId) { + $data['id'] = $publicId; + } + + return $data; + } + public static function getApiHeaders($count = 0) { return [ @@ -659,4 +691,29 @@ class Utils fwrite($output, "\n"); } + + public static function stringToObjectResolution($baseObject, $rawPath) + { + $val = ''; + + if (!is_object($baseObject)) { + return $val; + } + + $path = preg_split('/->/', $rawPath); + $node = $baseObject; + + while (($prop = array_shift($path)) !== null) { + if (property_exists($node, $prop)) { + $val = $node->$prop; + $node = $node->$prop; + } else if (is_object($node) && isset($node->$prop)) { + $node = $node->{$prop}; + } else if ( method_exists($node, $prop)) { + $val = call_user_func(array($node, $prop)); + } + } + + return $val; + } } diff --git a/app/Listeners/HandleUserLoggedIn.php b/app/Listeners/HandleUserLoggedIn.php index bea1ab4df4b5..26f7cc455fc7 100644 --- a/app/Listeners/HandleUserLoggedIn.php +++ b/app/Listeners/HandleUserLoggedIn.php @@ -3,6 +3,7 @@ use Utils; use Auth; use Carbon; +use Session; use App\Events\UserLoggedIn; use App\Ninja\Repositories\AccountRepository; use Illuminate\Queue\InteractsWithQueue; @@ -32,13 +33,16 @@ class HandleUserLoggedIn { { $account = Auth::user()->account; - if (!Utils::isNinja() && empty($account->last_login)) { + if (!Utils::isNinja() && Auth::user()->id == 1 && empty($account->last_login)) { $this->accountRepo->registerUser(Auth::user()); } $account->last_login = Carbon::now()->toDateTimeString(); $account->save(); + $users = $this->accountRepo->loadAccounts(Auth::user()->id); + Session::put(SESSION_USER_ACCOUNTS, $users); + $account->loadLocalizationSettings(); } diff --git a/app/Listeners/HandleUserSettingsChanged.php b/app/Listeners/HandleUserSettingsChanged.php index e01a010c9dd1..f15966db9764 100644 --- a/app/Listeners/HandleUserSettingsChanged.php +++ b/app/Listeners/HandleUserSettingsChanged.php @@ -1,9 +1,9 @@ accountRepo = $accountRepo; } /** @@ -29,6 +29,9 @@ class HandleUserSettingsChanged { { $account = Auth::user()->account; $account->loadLocalizationSettings(); + + $users = $this->accountRepo->loadAccounts(Auth::user()->id); + Session::put(SESSION_USER_ACCOUNTS, $users); } } diff --git a/app/Models/Account.php b/app/Models/Account.php index 068143286aee..10ba19d99ecd 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -12,6 +12,10 @@ class Account extends Eloquent use SoftDeletes; protected $dates = ['deleted_at']; + protected $casts = [ + 'utf8_invoice' => 'boolean', + ]; + public function users() { return $this->hasMany('App\Models\User'); @@ -133,9 +137,17 @@ class Account extends Eloquent return false; } + /* + public function hasLogo() + { + file_exists($this->getLogoPath()); + } + */ + public function getLogoPath() { - return 'logo/'.$this->account_key.'.jpg'; + $fileName = 'logo/' . $this->account_key; + return file_exists($fileName.'.png') ? $fileName.'.png' : $fileName.'.jpg'; } public function getLogoWidth() @@ -164,7 +176,7 @@ class Account extends Eloquent { $counter = $isQuote && !$this->share_counter ? $this->quote_number_counter : $this->invoice_number_counter; $prefix .= $isQuote ? $this->quote_number_prefix : $this->invoice_number_prefix; - + // confirm the invoice number isn't already taken do { $number = $prefix.str_pad($counter, 4, "0", STR_PAD_LEFT); @@ -179,11 +191,14 @@ class Account extends Eloquent { // check if the user modified the invoice number if (!$isRecurring && $invoiceNumber != $this->getNextInvoiceNumber($isQuote)) { - $number = intval(preg_replace('/[^0-9]/', '', $invoiceNumber)); + // remove the prefix + $prefix = $isQuote ? $this->quote_number_prefix : $this->invoice_number_prefix; + $invoiceNumber = preg_replace('/^'.$prefix.'/', '', $invoiceNumber); + $invoiceNumber = intval(preg_replace('/[^0-9]/', '', $invoiceNumber)); if ($isQuote && !$this->share_counter) { - $this->quote_number_counter = $number + 1; + $this->quote_number_counter = $invoiceNumber + 1; } else { - $this->invoice_number_counter = $number + 1; + $this->invoice_number_counter = $invoiceNumber + 1; } // otherwise, just increment the counter } else { @@ -250,6 +265,12 @@ class Account extends Eloquent 'date', 'rate', 'hours', + 'balance', + 'from', + 'to', + 'invoice_to', + 'details', + 'invoice_no', ]; foreach ($fields as $field) { @@ -401,7 +422,7 @@ class Account extends Eloquent Account::updating(function ($account) { // Lithuanian requires UTF8 support - if (!Utils::isPro()) { - $account->utf8_invoices = ($account->language_id == 13) ? 1 : 0; + if (!Utils::isPro() && $account->language_id == 13) { + $account->utf8_invoices = true; } }); diff --git a/app/Models/AccountGateway.php b/app/Models/AccountGateway.php index 62c3456473ce..16d72076c394 100644 --- a/app/Models/AccountGateway.php +++ b/app/Models/AccountGateway.php @@ -34,5 +34,9 @@ class AccountGateway extends EntityModel public function isPaymentType($type) { return $this->getPaymentType() == $type; } + + public function isGateway($gatewayId) { + return $this->gateway_id == $gatewayId; + } } diff --git a/app/Models/Client.php b/app/Models/Client.php index a7a0a1b8dc97..f2357742e0bd 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -74,7 +74,7 @@ class Client extends EntityModel public function getName() { - return $this->getDisplayName(); + return $this->name; } public function getDisplayName() @@ -82,8 +82,9 @@ class Client extends EntityModel if ($this->name) { return $this->name; } - + $this->load('contacts'); + $contact = $this->contacts()->first(); return $contact->getDisplayName(); diff --git a/app/Models/Contact.php b/app/Models/Contact.php index b789d2f3708a..0856a6d431d4 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -38,6 +38,11 @@ class Contact extends EntityModel } */ + public function getName() + { + return $this->getDisplayName(); + } + public function getDisplayName() { if ($this->getFullName()) { diff --git a/app/Models/Country.php b/app/Models/Country.php index d5143e656258..219251a44cc4 100644 --- a/app/Models/Country.php +++ b/app/Models/Country.php @@ -4,7 +4,12 @@ use Eloquent; class Country extends Eloquent { - public $timestamps = false; + public $timestamps = false; protected $visible = ['id', 'name']; + + public function getName() + { + return $this->name; + } } diff --git a/app/Models/Currency.php b/app/Models/Currency.php index 4a2cbc21f835..944f9f2d8eaf 100644 --- a/app/Models/Currency.php +++ b/app/Models/Currency.php @@ -5,4 +5,9 @@ use Eloquent; class Currency extends Eloquent { public $timestamps = false; + + public function getName() + { + return $this->name; + } } diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index 98becf4258c1..bf44b6f6d886 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -77,4 +77,34 @@ class EntityModel extends Eloquent return $query; } + + public function getName() + { + return $this->public_id; + } + + // Remap ids to public_ids and show name + public function toPublicArray() + { + $data = $this->toArray(); + + foreach ($this->attributes as $key => $val) { + if (strpos($key, '_id')) { + list($field, $id) = explode('_', $key); + if ($field == 'account') { + // do nothing + } else { + $entity = @$this->$field; + if ($entity) { + $data["{$field}_name"] = $entity->getName(); + } + } + } + } + + $data = Utils::hideIds($data); + + return $data; + } + } diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index b11a4b28112f..166c5a4929d6 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -39,6 +39,14 @@ class Gateway extends Eloquent return '/images/gateways/logo_'.$this->provider.'.png'; } + public static function getPaymentTypeLinks() { + $data = []; + foreach (self::$paymentTypes as $type) { + $data[] = strtolower(str_replace('PAYMENT_TYPE_', '', $type)); + } + return $data; + } + public function getHelp() { $link = ''; diff --git a/app/Models/Industry.php b/app/Models/Industry.php index 569bb14ddc47..fe2d1fa1e2ac 100644 --- a/app/Models/Industry.php +++ b/app/Models/Industry.php @@ -5,4 +5,9 @@ use Eloquent; class Industry extends Eloquent { public $timestamps = false; + + public function getName() + { + return $this->name; + } } diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index b7895fda96a9..7941c81f4788 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -29,7 +29,10 @@ class Invitation extends EntityModel public function getLink() { - $this->load('account'); + if (!$this->account) { + $this->load('account'); + } + $url = SITE_URL; if ($this->account->subdomain) { @@ -41,4 +44,9 @@ class Invitation extends EntityModel return "{$url}/view/{$this->invitation_key}"; } + + public function getName() + { + return $this->invitation_key; + } } diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 9a57ce13d39a..27c0999c7a2c 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -43,6 +43,11 @@ class Invoice extends EntityModel return $this->belongsTo('App\Models\InvoiceDesign'); } + public function recurring_invoice() + { + return $this->belongsTo('App\Models\Invoice'); + } + public function invitations() { return $this->hasMany('App\Models\Invitation')->orderBy('invitations.contact_id'); @@ -247,8 +252,11 @@ class Invoice extends EntityModel } } -Invoice::created(function ($invoice) { +Invoice::creating(function ($invoice) { $invoice->account->incrementCounter($invoice->invoice_number, $invoice->is_quote, $invoice->recurring_invoice_id); +}); + +Invoice::created(function ($invoice) { Activity::createInvoice($invoice); }); @@ -262,4 +270,4 @@ Invoice::deleting(function ($invoice) { Invoice::restoring(function ($invoice) { Activity::restoreInvoice($invoice); -}); +}); \ No newline at end of file diff --git a/app/Models/InvoiceDesign.php b/app/Models/InvoiceDesign.php index a7010493bb50..d7682c24f742 100644 --- a/app/Models/InvoiceDesign.php +++ b/app/Models/InvoiceDesign.php @@ -2,22 +2,38 @@ use Eloquent; use Auth; +use Cache; +use App\Models\InvoiceDesign; class InvoiceDesign extends Eloquent { public $timestamps = false; - public function scopeAvailableDesigns($query) + public static function getDesigns($forceUtf8 = false) { - $designs = $query->where('id', '<=', \Auth::user()->maxInvoiceDesignId())->orderBy('id')->get(); + $account = Auth::user()->account; + $designs = Cache::get('invoiceDesigns'); + $utf8 = $forceUtf8 || $account->utf8_invoices; - foreach ($designs as $design) { - $fileName = public_path(strtolower("js/templates/{$design->name}.js")); - if (Auth::user()->account->utf8_invoices && file_exists($fileName)) { - $design->javascript = file_get_contents($fileName); + foreach ($designs as $design) { + if ($design->id > Auth::user()->maxInvoiceDesignId()) { + $designs->pull($design->id); + } + + if ($utf8) { + $design->javascript = $design->pdfmake; + } + $design->pdfmake = null; + + if ($design->id == CUSTOM_DESIGN) { + if ($utf8 && $account->custom_design) { + $design->javascript = $account->custom_design; + } else { + $designs->pop(); + } } } - + return $designs; } -} +} \ No newline at end of file diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 89041bba877a..ee382dece1b6 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -22,6 +22,11 @@ class Payment extends EntityModel return $this->belongsTo('App\Models\Client')->withTrashed(); } + public function user() + { + return $this->belongsTo('App\Models\User')->withTrashed(); + } + public function account() { return $this->belongsTo('App\Models\Account'); diff --git a/app/Models/Size.php b/app/Models/Size.php index 76a9dc91a975..99d1b12f5d0c 100644 --- a/app/Models/Size.php +++ b/app/Models/Size.php @@ -5,4 +5,9 @@ use Eloquent; class Size extends Eloquent { public $timestamps = false; + + public function getName() + { + return $this->name; + } } diff --git a/app/Models/Task.php b/app/Models/Task.php index a6be8204e7e7..4ccbf9688ab3 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -1,7 +1,7 @@ belongsTo('App\Models\Account'); } + public function invoice() + { + return $this->belongsTo('App\Models\Invoice'); + } + public function client() { return $this->belongsTo('App\Models\Client')->withTrashed(); } + + public static function calcStartTime($task) + { + $parts = json_decode($task->time_log) ?: []; + + if (count($parts)) { + return Utils::timestampToDateTimeString($parts[0][0]); + } else { + return ''; + } + } + + public function getStartTime() + { + return self::calcStartTime($this); + } + + public static function calcDuration($task) + { + $duration = 0; + $parts = json_decode($task->time_log) ?: []; + + foreach ($parts as $part) { + if (count($part) == 1 || !$part[1]) { + $duration += time() - $part[0]; + } else { + $duration += $part[1] - $part[0]; + } + } + + return $duration; + } + + public function getDuration() + { + return self::calcDuration($this); + } + + public function getCurrentDuration() + { + $parts = json_decode($this->time_log) ?: []; + $part = $parts[count($parts)-1]; + + if (count($part) == 1 || !$part[1]) { + return time() - $part[0]; + } else { + return 0; + } + } + + public function hasPreviousDuration() + { + $parts = json_decode($this->time_log) ?: []; + return count($parts) && (count($parts[0]) && $parts[0][1]); + } + + public function getHours() + { + return round($this->getDuration() / (60 * 60), 2); + } } Task::created(function ($task) { diff --git a/app/Models/User.php b/app/Models/User.php index 593d19e1486e..9343c686f666 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -48,6 +48,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon return $this->belongsTo('App\Models\Theme'); } + public function getName() + { + return $this->getDisplayName(); + } + public function getPersonType() { return PERSON_USER; @@ -95,7 +100,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon public function maxInvoiceDesignId() { - return $this->isPro() ? 10 : COUNT_FREE_DESIGNS; + return $this->isPro() ? 11 : (Utils::isNinja() ? COUNT_FREE_DESIGNS : COUNT_FREE_DESIGNS_SELF_HOST); } public function getDisplayName() @@ -128,6 +133,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon return Session::get(SESSION_COUNTER, 0); } + /* public function getPopOverText() { if (!Utils::isNinja() || !Auth::check() || Session::has('error')) { @@ -146,7 +152,8 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon return false; } - + */ + public function afterSave($success = true, $forced = false) { if ($this->email) { @@ -176,4 +183,33 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon return 'remember_token'; } + public function clearSession() + { + $keys = [ + RECENTLY_VIEWED, + SESSION_USER_ACCOUNTS, + SESSION_TIMEZONE, + SESSION_DATE_FORMAT, + SESSION_DATE_PICKER_FORMAT, + SESSION_DATETIME_FORMAT, + SESSION_CURRENCY, + SESSION_LOCALE, + ]; + + foreach ($keys as $key) { + Session::forget($key); + } + } + + public static function updateUser($user) + { + if ($user->password != !$user->getOriginal('password')) { + $user->failed_logins = 0; + } + } + } + +User::updating(function ($user) { + User::updateUser($user); +}); diff --git a/app/Models/UserAccount.php b/app/Models/UserAccount.php new file mode 100644 index 000000000000..a1cd15f89b2d --- /dev/null +++ b/app/Models/UserAccount.php @@ -0,0 +1,52 @@ +$field && $this->$field == $userId) { + return true; + } + } + return false; + } + + public function setUserId($userId) + { + if (self::hasUserId($userId)) { + return; + } + + for ($i=1; $i<=5; $i++) { + $field = "user_id{$i}"; + if (!$this->$field) { + $this->$field = $userId; + break; + } + } + } + + public function removeUserId($userId) + { + if (!$userId || !self::hasUserId($userId)) { + return; + } + + for ($i=1; $i<=5; $i++) { + $field = "user_id{$i}"; + if ($this->$field && $this->$field == $userId) { + $this->$field = null; + } + } + } +} diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php index 0936273c5c6e..f68633e83414 100644 --- a/app/Ninja/Mailers/ContactMailer.php +++ b/app/Ninja/Mailers/ContactMailer.php @@ -7,6 +7,7 @@ use URL; use App\Models\Invoice; use App\Models\Payment; use App\Models\Activity; +use App\Models\Gateway; use App\Events\InvoiceSent; class ContactMailer extends Mailer @@ -22,6 +23,8 @@ class ContactMailer extends Mailer $emailTemplate = $invoice->account->getEmailTemplate($entityType); $invoiceAmount = Utils::formatMoney($invoice->getRequestedAmount(), $invoice->client->getCurrencyId()); + $this->initClosure($invoice); + foreach ($invoice->invitations as $invitation) { if (!$invitation->user || !$invitation->user->email || $invitation->user->trashed()) { return false; @@ -39,28 +42,27 @@ class ContactMailer extends Mailer '$client' => $invoice->client->getDisplayName(), '$account' => $accountName, '$contact' => $invitation->contact->getDisplayName(), - '$amount' => $invoiceAmount + '$amount' => $invoiceAmount, + '$advancedRawInvoice->' => '$' ]; // Add variables for available payment types - foreach([PAYMENT_TYPE_CREDIT_CARD, PAYMENT_TYPE_PAYPAL, PAYMENT_TYPE_BITCOIN] as $type) { - if ($invoice->account->getGatewayByType($type)) { - - // Changes "PAYMENT_TYPE_CREDIT_CARD" to "$credit_card_link" - $gateway_slug = '$'.strtolower(str_replace('PAYMENT_TYPE_', '', $type)).'_link'; - - $variables[$gateway_slug] = URL::to("/payment/{$invitation->invitation_key}/{$type}"); - - } + foreach (Gateway::getPaymentTypeLinks() as $type) { + $variables["\${$type}_link"] = URL::to("/payment/{$invitation->invitation_key}/{$type}"); } $data['body'] = str_replace(array_keys($variables), array_values($variables), $emailTemplate); + $data['body'] = preg_replace_callback('/\{\{\$?(.*)\}\}/', $this->advancedTemplateHandler, $data['body']); $data['link'] = $invitation->getLink(); $data['entityType'] = $entityType; $data['invoice_id'] = $invoice->id; $fromEmail = $invitation->user->email; - $this->sendTo($invitation->contact->email, $fromEmail, $accountName, $subject, $view, $data); + $response = $this->sendTo($invitation->contact->email, $fromEmail, $accountName, $subject, $view, $data); + + if ($response !== true) { + return $response; + } Activity::emailInvoice($invitation); } @@ -71,6 +73,8 @@ class ContactMailer extends Mailer } Event::fire(new InvoiceSent($invoice)); + + return $response; } public function sendPaymentConfirmation(Payment $payment) @@ -90,8 +94,17 @@ class ContactMailer extends Mailer $data = ['body' => str_replace(array_keys($variables), array_values($variables), $emailTemplate)]; - $user = $payment->invitation->user; - $this->sendTo($payment->contact->email, $user->email, $accountName, $subject, $view, $data); + if ($payment->invitation) { + $user = $payment->invitation->user; + $contact = $payment->contact; + } else { + $user = $payment->user; + $contact = $payment->client->contacts[0]; + } + + if ($user->email && $contact->email) { + $this->sendTo($contact->email, $user->email, $accountName, $subject, $view, $data); + } } public function sendLicensePaymentConfirmation($name, $email, $amount, $license, $productId) @@ -116,4 +129,22 @@ class ContactMailer extends Mailer $this->sendTo($email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data); } + + private function initClosure($object) + { + $this->advancedTemplateHandler = function($match) use ($object) { + for ($i = 1; $i < count($match); $i++) { + $blobConversion = $match[$i]; + + if (isset($$blobConversion)) { + return $$blobConversion; + } else if (preg_match('/trans\(([\w\.]+)\)/', $blobConversion, $regexTranslation)) { + return trans($regexTranslation[1]); + } else if (strpos($blobConversion, '->') !== false) { + return Utils::stringToObjectResolution($object, $blobConversion); + } + + } + }; + } } diff --git a/app/Ninja/Mailers/Mailer.php b/app/Ninja/Mailers/Mailer.php index 21f82009b749..e727b2a9cef4 100644 --- a/app/Ninja/Mailers/Mailer.php +++ b/app/Ninja/Mailers/Mailer.php @@ -1,5 +1,6 @@ where('id', '=', $data['invoice_id'])->get()->first(); - if($invoice->account->pdf_email_attachment && file_exists($invoice->getPDFPath())) { - $message->attach( - $invoice->getPDFPath(), - array('as' => $invoice->getFileName(), 'mime' => 'application/pdf') - ); + $replyEmail = $fromEmail; + $fromEmail = CONTACT_EMAIL; + + if(isset($data['invoice_id'])) { + $invoice = Invoice::with('account')->where('id', '=', $data['invoice_id'])->get()->first(); + if($invoice->account->pdf_email_attachment && file_exists($invoice->getPDFPath())) { + $message->attach( + $invoice->getPDFPath(), + array('as' => $invoice->getFileName(), 'mime' => 'application/pdf') + ); + } } - } + + $message->to($toEmail) + ->from($fromEmail, $fromName) + ->replyTo($replyEmail, $fromName) + ->subject($subject); - //$message->setEncoder(\Swift_Encoding::get8BitEncoding()); - $message->to($toEmail)->from($fromEmail, $fromName)->replyTo($replyEmail, $fromName)->subject($subject); - }); + }); + + return true; + } catch (Exception $exception) { + if (method_exists($exception, 'getResponse')) { + $response = $exception->getResponse()->getBody()->getContents(); + $response = json_decode($response); + return nl2br($response->Message); + } else { + return $exception->getMessage(); + } + } } } diff --git a/app/Ninja/Repositories/AccountRepository.php b/app/Ninja/Repositories/AccountRepository.php index 2b7f66595e42..98ef973f674f 100644 --- a/app/Ninja/Repositories/AccountRepository.php +++ b/app/Ninja/Repositories/AccountRepository.php @@ -4,6 +4,8 @@ use Auth; use Request; use Session; use Utils; +use DB; +use stdClass; use App\Models\AccountGateway; use App\Models\Invitation; @@ -14,6 +16,7 @@ use App\Models\Language; use App\Models\Contact; use App\Models\Account; use App\Models\User; +use App\Models\UserAccount; class AccountRepository { @@ -244,4 +247,138 @@ class AccountRepository curl_exec($ch); curl_close($ch); } + + public function findUserAccounts($userId1, $userId2 = false) + { + $query = UserAccount::where('user_id1', '=', $userId1) + ->orWhere('user_id2', '=', $userId1) + ->orWhere('user_id3', '=', $userId1) + ->orWhere('user_id4', '=', $userId1) + ->orWhere('user_id5', '=', $userId1); + + if ($userId2) { + $query->orWhere('user_id1', '=', $userId2) + ->orWhere('user_id2', '=', $userId2) + ->orWhere('user_id3', '=', $userId2) + ->orWhere('user_id4', '=', $userId2) + ->orWhere('user_id5', '=', $userId2); + } + + return $query->first(['id', 'user_id1', 'user_id2', 'user_id3', 'user_id4', 'user_id5']); + } + + public function prepareUsersData($record) { + + if (!$record) { + return false; + } + + $userIds = []; + for ($i=1; $i<=5; $i++) { + $field = "user_id$i"; + if ($record->$field) { + $userIds[] = $record->$field; + } + } + + $users = User::with('account') + ->whereIn('id', $userIds) + ->get(); + + $data = []; + foreach ($users as $user) { + $item = new stdClass(); + $item->id = $record->id; + $item->user_id = $user->id; + $item->user_name = $user->getDisplayName(); + $item->account_id = $user->account->id; + $item->account_name = $user->account->getDisplayName(); + $item->pro_plan_paid = $user->account->pro_plan_paid; + $item->account_key = file_exists($user->account->getLogoPath()) ? $user->account->account_key : null; + $data[] = $item; + } + + return $data; + } + + public function loadAccounts($userId) { + $record = self::findUserAccounts($userId); + return self::prepareUsersData($record); + } + + public function syncAccounts($userId, $proPlanPaid) { + $users = self::loadAccounts($userId); + self::syncUserAccounts($users, $proPlanPaid); + } + + public function syncUserAccounts($users, $proPlanPaid = false) { + + if (!$proPlanPaid) { + foreach ($users as $user) { + if ($user->pro_plan_paid && $user->pro_plan_paid != '0000-00-00') { + $proPlanPaid = $user->pro_plan_paid; + break; + } + } + } + + if (!$proPlanPaid) { + return; + } + + $accountIds = []; + foreach ($users as $user) { + if ($user->pro_plan_paid != $proPlanPaid) { + $accountIds[] = $user->account_id; + } + } + + if (count($accountIds)) { + DB::table('accounts') + ->whereIn('id', $accountIds) + ->update(['pro_plan_paid' => $proPlanPaid]); + } + } + + public function associateAccounts($userId1, $userId2) { + + $record = self::findUserAccounts($userId1, $userId2); + + if ($record) { + foreach ([$userId1, $userId2] as $userId) { + if (!$record->hasUserId($userId)) { + $record->setUserId($userId); + } + } + } else { + $record = new UserAccount(); + $record->user_id1 = $userId1; + $record->user_id2 = $userId2; + } + + $record->save(); + + $users = self::prepareUsersData($record); + self::syncUserAccounts($users); + + return $users; + } + + public function unlinkAccount($account) { + foreach ($account->users as $user) { + if ($userAccount = self::findUserAccounts($user->id)) { + $userAccount->removeUserId($user->id); + $userAccount->save(); + } + } + } + + public function unlinkUser($userAccountId, $userId) { + + $userAccount = UserAccount::whereId($userAccountId)->first(); + if ($userAccount->hasUserId($userId)) { + $userAccount->removeUserId($userId); + $userAccount->save(); + } + } } diff --git a/app/Ninja/Repositories/InvoiceRepository.php b/app/Ninja/Repositories/InvoiceRepository.php index f4caa63ee2e2..ce0397d64b4d 100644 --- a/app/Ninja/Repositories/InvoiceRepository.php +++ b/app/Ninja/Repositories/InvoiceRepository.php @@ -536,4 +536,16 @@ class InvoiceRepository return count($invoices); } + + public function findOpenInvoices($clientId) + { + return Invoice::scope() + ->whereClientId($clientId) + ->whereIsQuote(false) + ->whereIsRecurring(false) + ->whereHasTasks(true) + ->where('balance', '>', 0) + ->select(['public_id', 'invoice_number']) + ->get(); + } } diff --git a/app/Ninja/Repositories/PaymentRepository.php b/app/Ninja/Repositories/PaymentRepository.php index 424847dde322..c8f69325c813 100644 --- a/app/Ninja/Repositories/PaymentRepository.php +++ b/app/Ninja/Repositories/PaymentRepository.php @@ -108,7 +108,14 @@ class PaymentRepository $payment->payment_type_id = $paymentTypeId; } - $payment->payment_date = Utils::toSqlDate($input['payment_date']); + if (isset($input['payment_date_sql'])) { + $payment->payment_date = $input['payment_date_sql']; + } elseif (isset($input['payment_date'])) { + $payment->payment_date = Utils::toSqlDate($input['payment_date']); + } else { + $payment->payment_date = date('Y-m-d'); + } + $payment->transaction_reference = trim($input['transaction_reference']); if (!$publicId) { diff --git a/app/Ninja/Repositories/TaskRepository.php b/app/Ninja/Repositories/TaskRepository.php index a601ff3a7d2f..4504e78fb7fa 100644 --- a/app/Ninja/Repositories/TaskRepository.php +++ b/app/Ninja/Repositories/TaskRepository.php @@ -23,7 +23,7 @@ class TaskRepository }) ->where('contacts.deleted_at', '=', null) ->where('clients.deleted_at', '=', null) - ->select('tasks.public_id', 'clients.name as client_name', 'clients.public_id as client_public_id', 'contacts.first_name', 'contacts.email', 'contacts.last_name', 'invoices.invoice_status_id', 'tasks.start_time', 'tasks.description', 'tasks.duration', 'tasks.is_deleted', 'tasks.deleted_at', 'invoices.invoice_number', 'invoices.public_id as invoice_public_id'); + ->select('tasks.public_id', 'clients.name as client_name', 'clients.public_id as client_public_id', 'contacts.first_name', 'contacts.email', 'contacts.last_name', 'invoices.invoice_status_id', 'tasks.description', 'tasks.is_deleted', 'tasks.deleted_at', 'invoices.invoice_number', 'invoices.public_id as invoice_public_id', 'tasks.is_running', 'tasks.time_log', 'tasks.created_at'); if ($clientPublicId) { $query->where('clients.public_id', '=', $clientPublicId); @@ -58,20 +58,22 @@ class TaskRepository } if (isset($data['description'])) { $task->description = trim($data['description']); - } - - if ($data['action'] == 'start') { - $task->start_time = Carbon::now()->toDateTimeString(); - $task->duration = -1; - } else if ($data['action'] == 'stop' && $task->duration == -1) { - $task->duration = strtotime('now') - strtotime($task->start_time); - } else if ($data['action'] == 'save' && $task->duration != -1) { - $task->start_time = $data['start_time']; - $task->duration = $data['duration']; } - $task->duration = max($task->duration, -1); + //$timeLog = $task->time_log ? json_decode($task->time_log, true) : []; + $timeLog = isset($data['time_log']) ? json_decode($data['time_log']) : []; + if ($data['action'] == 'start') { + $task->is_running = true; + $timeLog[] = [strtotime('now'), false]; + } else if ($data['action'] == 'resume') { + $task->is_running = true; + $timeLog[] = [strtotime('now'), false]; + } else if ($data['action'] == 'stop' && $task->is_running) { + $timeLog[count($timeLog)-1][1] = time(); + $task->is_running = false; + } + $task->time_log = json_encode($timeLog); $task->save(); return $task; diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index a55ecfd5b476..9efba90b91af 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -44,6 +44,10 @@ class AppServiceProvider extends ServiceProvider { $str .= '
  • '.trans("texts.quotes").'
  • '.trans("texts.new_quote").'
  • '; + } else if ($type == ENTITY_CLIENT) { + $str .= '
  • +
  • '.trans("texts.credits").'
  • +
  • '.trans("texts.new_credit").'
  • '; } $str .= ' diff --git a/bower.json b/bower.json index 11d0755064c3..a49c1497fc0e 100644 --- a/bower.json +++ b/bower.json @@ -2,25 +2,26 @@ "name": "hillelcoren/invoice-ninja", "version": "0.9.0", "dependencies": { - "jquery": "~1.11", - "bootstrap": "~3.*", - "jquery-ui": "~1.*", + "jquery": "1.11.3", + "bootstrap": "3.3.1", + "jquery-ui": "1.11.2", "datatables": "1.10.4", "datatables-bootstrap3": "*", - "knockout.js": "~3.*", - "knockout-mapping": "*", - "knockout-sortable": "*", + "knockout.js": "3.1.0", + "knockout-mapping": "2.4.1", + "knockout-sortable": "0.9.3", "font-awesome": "~4.*", - "underscore": "~1.*", - "jspdf": "*", - "bootstrap-datepicker": "~1.*", - "typeahead.js": "~0.9.3", - "accounting": "~0.*", - "spectrum": "~1.3.4", - "d3": "~3.4.11", + "underscore": "1.7.0", + "jspdf": "1.0.272", + "bootstrap-datepicker": "1.4.0", + "typeahead.js": "0.9.3", + "accounting": "0.3.2", + "spectrum": "1.3.4", + "d3": "3.4.11", "handsontable": "*", "pdfmake": "*", - "moment": "*" + "moment": "*", + "jsoneditor": "*" }, "resolutions": { "jquery": "~1.11" diff --git a/database/migrations/2015_05_27_121828_add_tasks.php b/database/migrations/2015_05_27_121828_add_tasks.php index b02b5fe702c7..c8a0efa9cf1a 100644 --- a/database/migrations/2015_05_27_121828_add_tasks.php +++ b/database/migrations/2015_05_27_121828_add_tasks.php @@ -21,7 +21,7 @@ class AddTasks extends Migration { $table->timestamps(); $table->softDeletes(); - $table->timestamp('start_time'); + $table->timestamp('start_time')->nullable(); $table->integer('duration')->nullable(); $table->string('description')->nullable(); $table->boolean('is_deleted')->default(false); diff --git a/database/migrations/2015_06_14_093410_enable_resuming_tasks.php b/database/migrations/2015_06_14_093410_enable_resuming_tasks.php new file mode 100644 index 000000000000..6a685782f1bb --- /dev/null +++ b/database/migrations/2015_06_14_093410_enable_resuming_tasks.php @@ -0,0 +1,58 @@ +boolean('is_running')->default(false); + $table->integer('break_duration')->nullable(); + $table->timestamp('resume_time')->nullable(); + $table->text('time_log')->nullable(); + }); + + $tasks = DB::table('tasks') + ->where('duration', '=', -1) + ->select('id', 'duration', 'start_time') + ->get(); + + foreach ($tasks as $task) { + $data = [ + 'is_running' => true, + 'duration' => 0, + + ]; + + DB::table('tasks') + ->where('id', $task->id) + ->update($data); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + Schema::table('tasks', function($table) + { + $table->dropColumn('is_running'); + $table->dropColumn('resume_time'); + $table->dropColumn('break_duration'); + $table->dropColumn('time_log'); + }); + } + +} diff --git a/database/migrations/2015_06_14_173025_multi_company_support.php b/database/migrations/2015_06_14_173025_multi_company_support.php new file mode 100644 index 000000000000..08f8cf243fc8 --- /dev/null +++ b/database/migrations/2015_06_14_173025_multi_company_support.php @@ -0,0 +1,42 @@ +increments('id'); + + $table->unsignedInteger('user_id1')->nullable(); + $table->unsignedInteger('user_id2')->nullable(); + $table->unsignedInteger('user_id3')->nullable(); + $table->unsignedInteger('user_id4')->nullable(); + $table->unsignedInteger('user_id5')->nullable(); + + $table->foreign('user_id1')->references('id')->on('users'); + $table->foreign('user_id2')->references('id')->on('users'); + $table->foreign('user_id3')->references('id')->on('users'); + $table->foreign('user_id4')->references('id')->on('users'); + $table->foreign('user_id5')->references('id')->on('users'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_accounts'); + } +} diff --git a/database/migrations/2015_07_07_160257_support_locking_account.php b/database/migrations/2015_07_07_160257_support_locking_account.php new file mode 100644 index 000000000000..cb1ef96320fd --- /dev/null +++ b/database/migrations/2015_07_07_160257_support_locking_account.php @@ -0,0 +1,46 @@ +smallInteger('failed_logins')->nullable(); + }); + + Schema::table('account_gateways', function($table) + { + $table->boolean('show_address')->default(true)->nullable(); + $table->boolean('update_address')->default(true)->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function($table) + { + $table->dropColumn('failed_logins'); + }); + + Schema::table('account_gateways', function($table) + { + $table->dropColumn('show_address'); + $table->dropColumn('update_address'); + }); + } + +} diff --git a/database/migrations/2015_07_08_114333_simplify_tasks.php b/database/migrations/2015_07_08_114333_simplify_tasks.php new file mode 100644 index 000000000000..b0136a33ec91 --- /dev/null +++ b/database/migrations/2015_07_08_114333_simplify_tasks.php @@ -0,0 +1,73 @@ +start_time); + if (!$task->time_log || !count(json_decode($task->time_log))) { + $task->time_log = json_encode([[$startTime, $startTime + $task->duration]]); + $task->save(); + } elseif ($task->getDuration() != intval($task->duration)) { + $task->time_log = json_encode([[$startTime, $startTime + $task->duration]]); + $task->save(); + } + } + + Schema::table('tasks', function($table) + { + $table->dropColumn('start_time'); + $table->dropColumn('duration'); + $table->dropColumn('break_duration'); + $table->dropColumn('resume_time'); + }); + + Schema::table('users', function($table) + { + $table->boolean('dark_mode')->default(false)->nullable(); + }); + + Schema::table('users', function($table) + { + $table->dropColumn('theme_id'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('tasks', function($table) + { + $table->timestamp('start_time')->nullable(); + $table->integer('duration')->nullable(); + $table->timestamp('resume_time')->nullable(); + $table->integer('break_duration')->nullable(); + }); + + Schema::table('users', function($table) + { + $table->dropColumn('dark_mode'); + }); + Schema::table('users', function($table) + { + $table->integer('theme_id')->nullable(); + }); + } + +} diff --git a/database/migrations/2015_07_19_081332_add_custom_design.php b/database/migrations/2015_07_19_081332_add_custom_design.php new file mode 100644 index 000000000000..d1cb7d27b162 --- /dev/null +++ b/database/migrations/2015_07_19_081332_add_custom_design.php @@ -0,0 +1,36 @@ +text('custom_design')->nullable(); + }); + + DB::table('invoice_designs')->insert(['id' => CUSTOM_DESIGN, 'name' => 'Custom']); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('accounts', function($table) + { + $table->dropColumn('custom_design'); + }); + } + +} diff --git a/database/migrations/2015_07_27_183830_add_pdfmake_support.php b/database/migrations/2015_07_27_183830_add_pdfmake_support.php new file mode 100644 index 000000000000..19ca03a25b92 --- /dev/null +++ b/database/migrations/2015_07_27_183830_add_pdfmake_support.php @@ -0,0 +1,34 @@ +text('pdfmake')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('invoice_designs', function($table) + { + $table->dropColumn('pdfmake'); + }); + } + +} diff --git a/database/seeds/PaymentLibrariesSeeder.php b/database/seeds/PaymentLibrariesSeeder.php index f6b0f80526ff..8f36a42fa2d6 100644 --- a/database/seeds/PaymentLibrariesSeeder.php +++ b/database/seeds/PaymentLibrariesSeeder.php @@ -5,6 +5,7 @@ use App\Models\PaymentTerm; use App\Models\Currency; use App\Models\DateFormat; use App\Models\DatetimeFormat; +use App\Models\InvoiceDesign; class PaymentLibrariesSeeder extends Seeder { @@ -16,6 +17,7 @@ class PaymentLibrariesSeeder extends Seeder $this->createPaymentTerms(); $this->createDateFormats(); $this->createDatetimeFormats(); + $this->createInvoiceDesigns(); } private function createGateways() { @@ -131,4 +133,33 @@ class PaymentLibrariesSeeder extends Seeder } } + private function createInvoiceDesigns() { + $designs = [ + 'Clean', + 'Bold', + 'Modern', + 'Plain', + 'Business', + 'Creative', + 'Elegant', + 'Hipster', + 'Playful', + 'Photo', + ]; + + foreach ($designs as $design) { + $fileName = storage_path() . '/templates/' . strtolower($design) . '.js'; + $pdfmake = file_get_contents($fileName); + if ($pdfmake) { + $record = InvoiceDesign::whereName($design)->first(); + if (!$record) { + $record = new InvoiceDesign; + $record->name = $design; + } + $record->pdfmake = $pdfmake; + $record->save(); + } + } + } + } diff --git a/public/css/built.css b/public/css/built.css index 43c588acb6fd..ab4839c61fd8 100644 --- a/public/css/built.css +++ b/public/css/built.css @@ -707,17 +707,15 @@ div.DTFC_LeftFootWrapper table { border-top: none; } /*! - * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;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.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.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:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-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);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.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;left:0;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-remove:before,.fa-close:before,.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-photo:before,.fa-image:before,.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-arrows: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-expand:before{content:"\f065"}.fa-compress: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-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart: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-o: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-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users: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-navicon:before,.fa-reorder:before,.fa-bars: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-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc: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-o:before{content:"\f0f7"}.fa-hospital-o: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-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-mail-reply-all:before,.fa-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-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v: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"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.3.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;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.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.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:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-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);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.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;left:0;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-remove:before,.fa-close:before,.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-photo:before,.fa-image:before,.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-arrows: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-expand:before{content:"\f065"}.fa-compress: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-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart: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-f:before,.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-o: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-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users: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-navicon:before,.fa-reorder:before,.fa-bars: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-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc: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-o:before{content:"\f0f7"}.fa-hospital-o: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-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-mail-reply-all:before,.fa-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-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v: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,.fa-gratipay: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"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"} /*! - * Datepicker for Bootstrap + * Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker) * * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * + * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ .datepicker { padding: 4px; @@ -787,13 +785,9 @@ div.DTFC_LeftFootWrapper table { .datepicker > div { display: none; } -.datepicker.days div.datepicker-days { - display: block; -} -.datepicker.months div.datepicker-months { - display: block; -} -.datepicker.years div.datepicker-years { +.datepicker.days .datepicker-days, +.datepicker.months .datepicker-months, +.datepicker.years .datepicker-years { display: block; } .datepicker table { @@ -1417,7 +1411,7 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active { .datepicker table tr td span.new { color: #999999; } -.datepicker th.datepicker-switch { +.datepicker .datepicker-switch { width: 145px; } .datepicker thead tr:first-child th, @@ -1434,13 +1428,16 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active { padding: 0 2px 0 5px; vertical-align: middle; } -.datepicker thead tr:first-child th.cw { +.datepicker thead tr:first-child .cw { cursor: default; background-color: transparent; } -.input-group.date .input-group-addon i { +.input-group.date .input-group-addon { cursor: pointer; } +.input-daterange { + width: 100%; +} .input-daterange input { text-align: center; } @@ -1465,37 +1462,6 @@ fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active { margin-left: -5px; margin-right: -5px; } -.datepicker.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - float: left; - display: none; - min-width: 160px; - list-style: none; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 5px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - *border-right-width: 2px; - *border-bottom-width: 2px; - color: #333333; - font-size: 13px; - line-height: 1.42857143; -} -.datepicker.dropdown-menu th, -.datepicker.datepicker-inline th, -.datepicker.dropdown-menu td, -.datepicker.datepicker-inline td { - padding: 0px 5px; -} /*** Spectrum Colorpicker v1.3.4 @@ -2467,6 +2433,8 @@ th {border-left: 1px solid #d26b26; } .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td { vertical-align: middle; border-top: none; +} +table.invoice-table>thead>tr>th, table.invoice-table>tbody>tr>th, table.invoice-table>tfoot>tr>th, table.invoice-table>thead>tr>td, table.invoice-table>tbody>tr>td, table.invoice-table>tfoot>tr>td { border-bottom: 1px solid #dfe0e1; } table.dataTable.no-footer { @@ -3267,4 +3235,96 @@ div.dataTables_length label { a .glyphicon, button .glyphicon { padding-left: 8px; -} \ No newline at end of file +} + +.pro-plan-modal { + background-color: #4b4b4b; + padding-bottom: 40px; + padding-right: 25px; + opacity:0.95 !important; +} + +.pro-plan-modal .left-side { + margin-top: 50px; +} + +.pro-plan-modal h2 { + color: #36c157; + font-size: 71px; + font-weight: 800; +} + +.pro-plan-modal img.price { + height: 90px; +} + +.pro-plan-modal a.button { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: #f38c4f; + background: -moz-linear-gradient(top, #f38c4f 0%, #db7134 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f38c4f), color-stop(100%,#db7134)); + background: -webkit-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -o-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -ms-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: linear-gradient(to bottom, #f38c4f 0%,#db7134 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f38c4f', endColorstr='#db7134',GradientType=0 ); + text-shadow: 1px 1px 1px rgba(0, 0, 0, .25); + width: 68%; + margin-top: 20px; + font-size: 28px; + color: #fff; + border-radius: 10px; + padding: 20px 0; + display: inline-block; + text-decoration: none; +} + +.pro-plan-modal a.button:hover { + background: #db7134; /* Old browsers */ + background: -moz-linear-gradient(top, #db7134 0%, #f38c4f 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db7134), color-stop(100%,#f38c4f)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* IE10+ */ + background: linear-gradient(to bottom, #db7134 0%,#f38c4f 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db7134', endColorstr='#f38c4f',GradientType=0 ); /* IE6-9 */ +} + + +.pro-plan-modal ul { + color: #fff; + list-style: none; + padding: 0 0 30px 0; + text-align: left; + white-space: pre-line; + margin: 0; +} + +.pro-plan-modal ul li { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: url('../images/pro_plan/check.png') no-repeat 0px 12px; + display: inline-block; + font-size: 17px; + line-height: 36px; + padding: 0 0 0 19px; +} + +.pro-plan-modal img.close { + width: 35px; + margin-top: 20px; +} + +ul.user-accounts div.account { + font-size: large; +} + +ul.user-accounts div.remove { + padding-top: 14px; + color: #BBB; + visibility: hidden; +} + +ul.user-accounts a:hover div.remove { + visibility: visible; +} + diff --git a/public/css/built.public.css b/public/css/built.public.css index 21488cd5ed95..05f86e3361a6 100644 --- a/public/css/built.public.css +++ b/public/css/built.public.css @@ -4,9 +4,9 @@ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}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}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:before,:after{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]: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}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@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';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before,.glyphicon-eur: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-lock:before{content:"\e033"}.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-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.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-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.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-bell:before{content:"\e123"}.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-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.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"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:hover,a:focus{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-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}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,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:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}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}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.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;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}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}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.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,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.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{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.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{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.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{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-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.42857143;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){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;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-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.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}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.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}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.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}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.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>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;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;max-width:100%;margin-bottom:5px;font-weight:700}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}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-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,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;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:400;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],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm,select.form-group-sm .form-control{height:30px;line-height:30px}textarea.input-sm,textarea.form-group-sm .form-control,select[multiple].input-sm,select[multiple].form-group-sm .form-control{height:auto}.input-lg,.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg,select.form-group-lg .form-control{height:46px;line-height:46px}textarea.input-lg,textarea.form-group-lg .form-control,select[multiple].input-lg,select[multiple].form-group-lg .form-control{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top: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;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.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 .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.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,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default.focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;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.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-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary:hover,.btn-primary:focus,.btn-primary.focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.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.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:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success.focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;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.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-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info.focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;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.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-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning.focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;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.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-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger.focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;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.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-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link:active,.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:#23527c;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:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.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;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none;visibility:hidden}.collapse.in{display:block;visibility:visible}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.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;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.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:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.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-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.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{content:"";border-top:0;border-bottom:4px solid}.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}.navbar-right .dropdown-menu-left{right:auto;left:0}}.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+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-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-top-left-radius:0;border-bottom-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-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.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,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.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,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.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-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;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:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].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,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].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:400;line-height:1;color:#555;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>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{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>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.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:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;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:#337ab7}.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.42857143;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{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.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:#337ab7}.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{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none;visibility:hidden}.tab-content>.active{display:block;visibility:visible}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important;visibility:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;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;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .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;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.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;-webkit-box-shadow:none;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}}.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,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.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;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@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-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.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:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.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}@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-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.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}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.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:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.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:#777}.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.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-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{color:#23527c;background-color:#eee;border-color:#ddd}.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:#337ab7;border-color:#337ab7}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;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-top-left-radius:6px;border-bottom-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-top-left-radius:3px;border-bottom-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 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:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#286090}.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:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#337ab7}.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:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 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,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-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-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.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-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}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{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.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,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{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:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.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,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.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>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-right:15px;padding-left:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;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,.panel-group .panel-heading+.panel-collapse>.list-group{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-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.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,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(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:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:absolute;top:0;right:0;left:0;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.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}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.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-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.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;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{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.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;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.next,.carousel-inner>.item.active.right{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.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,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-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;background-color:#000 \9;background-color:rgba(0,0,0,0);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,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.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}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} /*! - * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.2.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;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.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.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:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-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);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.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;left:0;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-remove:before,.fa-close:before,.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-photo:before,.fa-image:before,.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-arrows: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-expand:before{content:"\f065"}.fa-compress: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-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart: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-o: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-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users: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-navicon:before,.fa-reorder:before,.fa-bars: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-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc: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-o:before{content:"\f0f7"}.fa-hospital-o: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-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-mail-reply-all:before,.fa-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-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v: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"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.3.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;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.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.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:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-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);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.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;left:0;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-remove:before,.fa-close:before,.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-photo:before,.fa-image:before,.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-arrows: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-expand:before{content:"\f065"}.fa-compress: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-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart: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-f:before,.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-o: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-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users: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-navicon:before,.fa-reorder:before,.fa-bars: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-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc: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-o:before{content:"\f0f7"}.fa-hospital-o: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-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-mail-reply-all:before,.fa-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-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v: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,.fa-gratipay: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"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"} .combobox-container { margin-bottom: 5px; *zoom: 1; diff --git a/public/css/img/jsoneditor-icons.png b/public/css/img/jsoneditor-icons.png new file mode 100644 index 000000000000..7120088f9475 Binary files /dev/null and b/public/css/img/jsoneditor-icons.png differ diff --git a/public/css/jsoneditor.min.css b/public/css/jsoneditor.min.css new file mode 100644 index 000000000000..68d37f0f7c0c --- /dev/null +++ b/public/css/jsoneditor.min.css @@ -0,0 +1 @@ +.jsoneditor .field,.jsoneditor .readonly,.jsoneditor .value{border:1px solid transparent;min-height:16px;min-width:32px;padding:2px;margin:1px;word-wrap:break-word;float:left}.jsoneditor .field p,.jsoneditor .value p{margin:0}.jsoneditor .value{word-break:break-word}.jsoneditor .readonly{min-width:16px;color:gray}.jsoneditor .empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}.jsoneditor .field.empty{background-image:url(img/jsoneditor-icons.png);background-position:0 -144px}.jsoneditor .value.empty{background-image:url(img/jsoneditor-icons.png);background-position:-48px -144px}.jsoneditor .value.url{color:green;text-decoration:underline}.jsoneditor a.value.url:focus,.jsoneditor a.value.url:hover{color:red}.jsoneditor .separator{padding:3px 0;vertical-align:top;color:gray}.jsoneditor .field.highlight,.jsoneditor .field[contenteditable=true]:focus,.jsoneditor .field[contenteditable=true]:hover,.jsoneditor .value.highlight,.jsoneditor .value[contenteditable=true]:focus,.jsoneditor .value[contenteditable=true]:hover{background-color:#FFFFAB;border:1px solid #ff0;border-radius:2px}.jsoneditor .field.highlight-active,.jsoneditor .field.highlight-active:focus,.jsoneditor .field.highlight-active:hover,.jsoneditor .value.highlight-active,.jsoneditor .value.highlight-active:focus,.jsoneditor .value.highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}.jsoneditor div.tree button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background:url(img/jsoneditor-icons.png)}.jsoneditor div.tree button.collapsed{background-position:0 -48px}.jsoneditor div.tree button.expanded{background-position:0 -72px}.jsoneditor div.tree button.contextmenu{background-position:-48px -72px}.jsoneditor div.tree button.contextmenu.selected,.jsoneditor div.tree button.contextmenu:focus,.jsoneditor div.tree button.contextmenu:hover{background-position:-48px -48px}.jsoneditor div.tree :focus{outline:0}.jsoneditor div.tree button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}.jsoneditor div.tree button.invisible{visibility:hidden;background:0 0}.jsoneditor{color:#1A1A1A;border:1px solid #97B0F8;box-sizing:border-box;width:100%;height:100%;overflow:auto;position:relative;padding:0;line-height:100%}.jsoneditor,.jsoneditor div.outer{-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.jsoneditor div.tree table.tree{border-collapse:collapse;border-spacing:0;width:100%;margin:0}.jsoneditor div.outer{width:100%;height:100%;margin:-35px 0 0;padding:35px 0 0;box-sizing:border-box;overflow:hidden}.jsoneditor div.tree{width:100%;height:100%;position:relative;overflow:auto}.jsoneditor textarea.text{width:100%;height:100%;margin:0;box-sizing:border-box;border:none;background-color:#fff;resize:none}.jsoneditor .menu,.jsoneditor textarea.text{-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.jsoneditor tr.highlight{background-color:#FFFFAB}.jsoneditor div.tree button.dragarea{background:url(img/jsoneditor-icons.png)-72px -72px;cursor:move}.jsoneditor div.tree button.dragarea:focus,.jsoneditor div.tree button.dragarea:hover{background-position:-72px -48px}.jsoneditor td,.jsoneditor th,.jsoneditor tr{padding:0;margin:0}.jsoneditor td,.jsoneditor td.tree{vertical-align:top}.jsoneditor .field,.jsoneditor .value,.jsoneditor td,.jsoneditor textarea,.jsoneditor th{font-family:droid sans mono,consolas,monospace,courier new,courier,sans-serif;font-size:10pt;color:#1A1A1A}.jsoneditor-contextmenu{position:absolute;z-index:99999}.jsoneditor-contextmenu ul{position:relative;left:0;top:0;width:124px;background:#fff;border:1px solid #d3d3d3;box-shadow:2px 2px 12px rgba(128,128,128,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu ul li button{padding:0;margin:0;width:124px;height:24px;border:none;cursor:pointer;color:#4d4d4d;background:0 0;line-height:26px;text-align:left}.jsoneditor-contextmenu ul li button::-moz-focus-inner{padding:0;border:0}.jsoneditor-contextmenu ul li button:focus,.jsoneditor-contextmenu ul li button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}.jsoneditor-contextmenu ul li button.default{width:92px}.jsoneditor-contextmenu ul li button.expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}.jsoneditor-contextmenu div.icon{float:left;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url(img/jsoneditor-icons.png)}.jsoneditor-contextmenu ul li button div.expand{float:right;width:24px;height:24px;padding:0;margin:0 4px 0 0;background:url(img/jsoneditor-icons.png)0 -72px;opacity:.4}.jsoneditor-contextmenu ul li button.expand:focus div.expand,.jsoneditor-contextmenu ul li button.expand:hover div.expand,.jsoneditor-contextmenu ul li button:focus div.expand,.jsoneditor-contextmenu ul li button:hover div.expand,.jsoneditor-contextmenu ul li.selected div.expand{opacity:1}.jsoneditor-contextmenu .separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}.jsoneditor-contextmenu button.remove>.icon{background-position:-24px -24px}.jsoneditor-contextmenu button.remove:focus>.icon,.jsoneditor-contextmenu button.remove:hover>.icon{background-position:-24px 0}.jsoneditor-contextmenu button.append>.icon{background-position:0 -24px}.jsoneditor-contextmenu button.append:focus>.icon,.jsoneditor-contextmenu button.append:hover>.icon{background-position:0 0}.jsoneditor-contextmenu button.insert>.icon{background-position:0 -24px}.jsoneditor-contextmenu button.insert:focus>.icon,.jsoneditor-contextmenu button.insert:hover>.icon{background-position:0 0}.jsoneditor-contextmenu button.duplicate>.icon{background-position:-48px -24px}.jsoneditor-contextmenu button.duplicate:focus>.icon,.jsoneditor-contextmenu button.duplicate:hover>.icon{background-position:-48px 0}.jsoneditor-contextmenu button.sort-asc>.icon{background-position:-168px -24px}.jsoneditor-contextmenu button.sort-asc:focus>.icon,.jsoneditor-contextmenu button.sort-asc:hover>.icon{background-position:-168px 0}.jsoneditor-contextmenu button.sort-desc>.icon{background-position:-192px -24px}.jsoneditor-contextmenu button.sort-desc:focus>.icon,.jsoneditor-contextmenu button.sort-desc:hover>.icon{background-position:-192px 0}.jsoneditor-contextmenu ul li .selected{background-color:#D5DDF6}.jsoneditor-contextmenu ul li{overflow:hidden}.jsoneditor-contextmenu ul li ul{display:none;position:relative;left:-10px;top:0;border:none;box-shadow:inset 0 0 10px rgba(128,128,128,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.jsoneditor-contextmenu ul li ul li button{padding-left:24px}.jsoneditor-contextmenu ul li ul li button:focus,.jsoneditor-contextmenu ul li ul li button:hover{background-color:#f5f5f5}.jsoneditor-contextmenu button.type-string>.icon{background-position:-144px -24px}.jsoneditor-contextmenu button.type-string.selected>.icon,.jsoneditor-contextmenu button.type-string:focus>.icon,.jsoneditor-contextmenu button.type-string:hover>.icon{background-position:-144px 0}.jsoneditor-contextmenu button.type-auto>.icon{background-position:-120px -24px}.jsoneditor-contextmenu button.type-auto.selected>.icon,.jsoneditor-contextmenu button.type-auto:focus>.icon,.jsoneditor-contextmenu button.type-auto:hover>.icon{background-position:-120px 0}.jsoneditor-contextmenu button.type-object>.icon{background-position:-72px -24px}.jsoneditor-contextmenu button.type-object.selected>.icon,.jsoneditor-contextmenu button.type-object:focus>.icon,.jsoneditor-contextmenu button.type-object:hover>.icon{background-position:-72px 0}.jsoneditor-contextmenu button.type-array>.icon{background-position:-96px -24px}.jsoneditor-contextmenu button.type-array.selected>.icon,.jsoneditor-contextmenu button.type-array:focus>.icon,.jsoneditor-contextmenu button.type-array:hover>.icon{background-position:-96px 0}.jsoneditor-contextmenu button.type-modes>.icon{background-image:none;width:6px}.jsoneditor .menu{width:100%;height:35px;padding:2px;margin:0;overflow:hidden;box-sizing:border-box;color:#1A1A1A;background-color:#D5DDF6;border-bottom:1px solid #97B0F8}.jsoneditor .menu button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid #aec0f8;background:url(img/jsoneditor-icons.png)#e3eaf6;color:#4D4D4D;opacity:.8;font-family:arial,sans-serif;font-size:10pt;float:left}.jsoneditor .menu button:hover{background-color:#f0f2f5}.jsoneditor .menu button:active,.jsoneditor .menu button:focus{background-color:#fff}.jsoneditor .menu button:disabled{background-color:#e3eaf6}.jsoneditor .menu button.collapse-all{background-position:0 -96px}.jsoneditor .menu button.expand-all{background-position:0 -120px}.jsoneditor .menu button.undo{background-position:-24px -96px}.jsoneditor .menu button.undo:disabled{background-position:-24px -120px}.jsoneditor .menu button.redo{background-position:-48px -96px}.jsoneditor .menu button.redo:disabled{background-position:-48px -120px}.jsoneditor .menu button.compact{background-position:-72px -96px}.jsoneditor .menu button.format{background-position:-72px -120px}.jsoneditor .menu button.modes{background-image:none;width:auto;padding-left:6px;padding-right:6px}.jsoneditor .menu button.separator{margin-left:10px}.jsoneditor .menu a{font-family:arial,sans-serif;font-size:10pt;color:#97B0F8;vertical-align:middle}.jsoneditor .menu a:hover{color:red}.jsoneditor .menu a.poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}.jsoneditor .search .results,.jsoneditor .search input{font-family:arial,sans-serif;font-size:10pt;color:#1A1A1A;background:0 0}.jsoneditor .search{position:absolute;right:2px;top:2px}.jsoneditor .search .frame{border:1px solid #97B0F8;background-color:#fff;padding:0 2px;margin:0}.jsoneditor .search .frame table{border-collapse:collapse}.jsoneditor .search input{width:120px;border:none;outline:0;margin:1px}.jsoneditor .search .results{color:#4d4d4d;padding-right:5px;line-height:24px}.jsoneditor .search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(img/jsoneditor-icons.png);vertical-align:top}.jsoneditor .search button:hover{background-color:transparent}.jsoneditor .search button.refresh{width:18px;background-position:-99px -73px}.jsoneditor .search button.next{cursor:pointer;background-position:-124px -73px}.jsoneditor .search button.next:hover{background-position:-124px -49px}.jsoneditor .search button.previous{cursor:pointer;background-position:-148px -73px;margin-right:2px}.jsoneditor .search button.previous:hover{background-position:-148px -49px} \ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css index c8ec73d51825..6c31f3041907 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -83,6 +83,8 @@ th {border-left: 1px solid #d26b26; } .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td { vertical-align: middle; border-top: none; +} +table.invoice-table>thead>tr>th, table.invoice-table>tbody>tr>th, table.invoice-table>tfoot>tr>th, table.invoice-table>thead>tr>td, table.invoice-table>tbody>tr>td, table.invoice-table>tfoot>tr>td { border-bottom: 1px solid #dfe0e1; } table.dataTable.no-footer { @@ -883,4 +885,96 @@ div.dataTables_length label { a .glyphicon, button .glyphicon { padding-left: 8px; -} \ No newline at end of file +} + +.pro-plan-modal { + background-color: #4b4b4b; + padding-bottom: 40px; + padding-right: 25px; + opacity:0.95 !important; +} + +.pro-plan-modal .left-side { + margin-top: 50px; +} + +.pro-plan-modal h2 { + color: #36c157; + font-size: 71px; + font-weight: 800; +} + +.pro-plan-modal img.price { + height: 90px; +} + +.pro-plan-modal a.button { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: #f38c4f; + background: -moz-linear-gradient(top, #f38c4f 0%, #db7134 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f38c4f), color-stop(100%,#db7134)); + background: -webkit-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -o-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: -ms-linear-gradient(top, #f38c4f 0%,#db7134 100%); + background: linear-gradient(to bottom, #f38c4f 0%,#db7134 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f38c4f', endColorstr='#db7134',GradientType=0 ); + text-shadow: 1px 1px 1px rgba(0, 0, 0, .25); + width: 68%; + margin-top: 20px; + font-size: 28px; + color: #fff; + border-radius: 10px; + padding: 20px 0; + display: inline-block; + text-decoration: none; +} + +.pro-plan-modal a.button:hover { + background: #db7134; /* Old browsers */ + background: -moz-linear-gradient(top, #db7134 0%, #f38c4f 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#db7134), color-stop(100%,#f38c4f)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #db7134 0%,#f38c4f 100%); /* IE10+ */ + background: linear-gradient(to bottom, #db7134 0%,#f38c4f 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db7134', endColorstr='#f38c4f',GradientType=0 ); /* IE6-9 */ +} + + +.pro-plan-modal ul { + color: #fff; + list-style: none; + padding: 0 0 30px 0; + text-align: left; + white-space: pre-line; + margin: 0; +} + +.pro-plan-modal ul li { + font-family: 'roboto_slabregular', Georgia, Times, serif; + background: url('../images/pro_plan/check.png') no-repeat 0px 12px; + display: inline-block; + font-size: 17px; + line-height: 36px; + padding: 0 0 0 19px; +} + +.pro-plan-modal img.close { + width: 35px; + margin-top: 20px; +} + +ul.user-accounts div.account { + font-size: large; +} + +ul.user-accounts div.remove { + padding-top: 14px; + color: #BBB; + visibility: hidden; +} + +ul.user-accounts a:hover div.remove { + visibility: visible; +} + diff --git a/public/fonts/fontawesome-webfont.woff2 b/public/fonts/fontawesome-webfont.woff2 new file mode 100644 index 000000000000..3311d585145b Binary files /dev/null and b/public/fonts/fontawesome-webfont.woff2 differ diff --git a/public/images/pro_plan/check.png b/public/images/pro_plan/check.png new file mode 100644 index 000000000000..c6d41f3ce0e8 Binary files /dev/null and b/public/images/pro_plan/check.png differ diff --git a/public/images/pro_plan/close.png b/public/images/pro_plan/close.png new file mode 100644 index 000000000000..35abfda64743 Binary files /dev/null and b/public/images/pro_plan/close.png differ diff --git a/public/images/pro_plan/price.png b/public/images/pro_plan/price.png new file mode 100644 index 000000000000..41ec6ff0cd9c Binary files /dev/null and b/public/images/pro_plan/price.png differ diff --git a/public/js/built.js b/public/js/built.js index 06e46a9d8c1f..8902b492b635 100644 --- a/public/js/built.js +++ b/public/js/built.js @@ -27152,1688 +27152,24 @@ d[b]="undefined"!==f.getType(g)?g:f.visitModel(j,c,a);break;default:d[b]=c(j,a.p } }.call(this)); -/* ========================================================= - * bootstrap-datepicker.js - * Repo: https://github.com/eternicode/bootstrap-datepicker/ - * Demo: http://eternicode.github.io/bootstrap-datepicker/ - * Docs: http://bootstrap-datepicker.readthedocs.org/ - * Forked from http://www.eyecon.ro/bootstrap-datepicker - * ========================================================= - * Started by Stefan Petre; improvements by Andrew Rowls + contributors +/*! + * Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker) * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - -(function($, undefined){ - - var $window = $(window); - - function UTCDate(){ - return new Date(Date.UTC.apply(Date, arguments)); - } - function UTCToday(){ - var today = new Date(); - return UTCDate(today.getFullYear(), today.getMonth(), today.getDate()); - } - function alias(method){ - return function(){ - return this[method].apply(this, arguments); - }; - } - - var DateArray = (function(){ - var extras = { - get: function(i){ - return this.slice(i)[0]; - }, - contains: function(d){ - // Array.indexOf is not cross-browser; - // $.inArray doesn't work with Dates - var val = d && d.valueOf(); - for (var i=0, l=this.length; i < l; i++) - if (this[i].valueOf() === val) - return i; - return -1; - }, - remove: function(i){ - this.splice(i,1); - }, - replace: function(new_array){ - if (!new_array) - return; - if (!$.isArray(new_array)) - new_array = [new_array]; - this.clear(); - this.push.apply(this, new_array); - }, - clear: function(){ - this.length = 0; - }, - copy: function(){ - var a = new DateArray(); - a.replace(this); - return a; - } - }; - - return function(){ - var a = []; - a.push.apply(a, arguments); - $.extend(a, extras); - return a; - }; - })(); - - - // Picker object - - var Datepicker = function(element, options){ - this.dates = new DateArray(); - this.viewDate = UTCToday(); - this.focusDate = null; - - this._process_options(options); - - this.element = $(element); - this.isInline = false; - this.isInput = this.element.is('input'); - this.component = this.element.is('.date') ? this.element.find('.add-on, .input-group-addon, .btn') : false; - this.hasInput = this.component && this.element.find('input').length; - if (this.component && this.component.length === 0) - this.component = false; - - this.picker = $(DPGlobal.template); - this._buildEvents(); - this._attachEvents(); - - if (this.isInline){ - this.picker.addClass('datepicker-inline').appendTo(this.element); - } - else { - this.picker.addClass('datepicker-dropdown dropdown-menu'); - } - - if (this.o.rtl){ - this.picker.addClass('datepicker-rtl'); - } - - this.viewMode = this.o.startView; - - if (this.o.calendarWeeks) - this.picker.find('tfoot th.today, tfoot th.clear') - .attr('colspan', function(i, val){ - return parseInt(val) + 1; - }); - - this._allow_update = false; - - this.setStartDate(this._o.startDate); - this.setEndDate(this._o.endDate); - this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); - - this.fillDow(); - this.fillMonths(); - - this._allow_update = true; - - this.update(); - this.showMode(); - - if (this.isInline){ - this.show(); - } - }; - - Datepicker.prototype = { - constructor: Datepicker, - - _process_options: function(opts){ - // Store raw options for reference - this._o = $.extend({}, this._o, opts); - // Processed options - var o = this.o = $.extend({}, this._o); - - // Check if "de-DE" style date is available, if not language should - // fallback to 2 letter code eg "de" - var lang = o.language; - if (!dates[lang]){ - lang = lang.split('-')[0]; - if (!dates[lang]) - lang = defaults.language; - } - o.language = lang; - - switch (o.startView){ - case 2: - case 'decade': - o.startView = 2; - break; - case 1: - case 'year': - o.startView = 1; - break; - default: - o.startView = 0; - } - - switch (o.minViewMode){ - case 1: - case 'months': - o.minViewMode = 1; - break; - case 2: - case 'years': - o.minViewMode = 2; - break; - default: - o.minViewMode = 0; - } - - o.startView = Math.max(o.startView, o.minViewMode); - - // true, false, or Number > 0 - if (o.multidate !== true){ - o.multidate = Number(o.multidate) || false; - if (o.multidate !== false) - o.multidate = Math.max(0, o.multidate); - else - o.multidate = 1; - } - o.multidateSeparator = String(o.multidateSeparator); - - o.weekStart %= 7; - o.weekEnd = ((o.weekStart + 6) % 7); - - var format = DPGlobal.parseFormat(o.format); - if (o.startDate !== -Infinity){ - if (!!o.startDate){ - if (o.startDate instanceof Date) - o.startDate = this._local_to_utc(this._zero_time(o.startDate)); - else - o.startDate = DPGlobal.parseDate(o.startDate, format, o.language); - } - else { - o.startDate = -Infinity; - } - } - if (o.endDate !== Infinity){ - if (!!o.endDate){ - if (o.endDate instanceof Date) - o.endDate = this._local_to_utc(this._zero_time(o.endDate)); - else - o.endDate = DPGlobal.parseDate(o.endDate, format, o.language); - } - else { - o.endDate = Infinity; - } - } - - o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; - if (!$.isArray(o.daysOfWeekDisabled)) - o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); - o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){ - return parseInt(d, 10); - }); - - var plc = String(o.orientation).toLowerCase().split(/\s+/g), - _plc = o.orientation.toLowerCase(); - plc = $.grep(plc, function(word){ - return (/^auto|left|right|top|bottom$/).test(word); - }); - o.orientation = {x: 'auto', y: 'auto'}; - if (!_plc || _plc === 'auto') - ; // no action - else if (plc.length === 1){ - switch (plc[0]){ - case 'top': - case 'bottom': - o.orientation.y = plc[0]; - break; - case 'left': - case 'right': - o.orientation.x = plc[0]; - break; - } - } - else { - _plc = $.grep(plc, function(word){ - return (/^left|right$/).test(word); - }); - o.orientation.x = _plc[0] || 'auto'; - - _plc = $.grep(plc, function(word){ - return (/^top|bottom$/).test(word); - }); - o.orientation.y = _plc[0] || 'auto'; - } - }, - _events: [], - _secondaryEvents: [], - _applyEvents: function(evs){ - for (var i=0, el, ch, ev; i < evs.length; i++){ - el = evs[i][0]; - if (evs[i].length === 2){ - ch = undefined; - ev = evs[i][1]; - } - else if (evs[i].length === 3){ - ch = evs[i][1]; - ev = evs[i][2]; - } - el.on(ev, ch); - } - }, - _unapplyEvents: function(evs){ - for (var i=0, el, ev, ch; i < evs.length; i++){ - el = evs[i][0]; - if (evs[i].length === 2){ - ch = undefined; - ev = evs[i][1]; - } - else if (evs[i].length === 3){ - ch = evs[i][1]; - ev = evs[i][2]; - } - el.off(ev, ch); - } - }, - _buildEvents: function(){ - if (this.isInput){ // single input - this._events = [ - [this.element, { - focus: $.proxy(this.show, this), - keyup: $.proxy(function(e){ - if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1) - this.update(); - }, this), - keydown: $.proxy(this.keydown, this) - }] - ]; - } - else if (this.component && this.hasInput){ // component: input + button - this._events = [ - // For components that are not readonly, allow keyboard nav - [this.element.find('input'), { - focus: $.proxy(this.show, this), - keyup: $.proxy(function(e){ - if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1) - this.update(); - }, this), - keydown: $.proxy(this.keydown, this) - }], - [this.component, { - click: $.proxy(this.show, this) - }] - ]; - } - else if (this.element.is('div')){ // inline datepicker - this.isInline = true; - } - else { - this._events = [ - [this.element, { - click: $.proxy(this.show, this) - }] - ]; - } - this._events.push( - // Component: listen for blur on element descendants - [this.element, '*', { - blur: $.proxy(function(e){ - this._focused_from = e.target; - }, this) - }], - // Input: listen for blur on element - [this.element, { - blur: $.proxy(function(e){ - this._focused_from = e.target; - }, this) - }] - ); - - this._secondaryEvents = [ - [this.picker, { - click: $.proxy(this.click, this) - }], - [$(window), { - resize: $.proxy(this.place, this) - }], - [$(document), { - 'mousedown touchstart': $.proxy(function(e){ - // Clicked outside the datepicker, hide it - if (!( - this.element.is(e.target) || - this.element.find(e.target).length || - this.picker.is(e.target) || - this.picker.find(e.target).length - )){ - this.hide(); - } - }, this) - }] - ]; - }, - _attachEvents: function(){ - this._detachEvents(); - this._applyEvents(this._events); - }, - _detachEvents: function(){ - this._unapplyEvents(this._events); - }, - _attachSecondaryEvents: function(){ - this._detachSecondaryEvents(); - this._applyEvents(this._secondaryEvents); - }, - _detachSecondaryEvents: function(){ - this._unapplyEvents(this._secondaryEvents); - }, - _trigger: function(event, altdate){ - var date = altdate || this.dates.get(-1), - local_date = this._utc_to_local(date); - - this.element.trigger({ - type: event, - date: local_date, - dates: $.map(this.dates, this._utc_to_local), - format: $.proxy(function(ix, format){ - if (arguments.length === 0){ - ix = this.dates.length - 1; - format = this.o.format; - } - else if (typeof ix === 'string'){ - format = ix; - ix = this.dates.length - 1; - } - format = format || this.o.format; - var date = this.dates.get(ix); - return DPGlobal.formatDate(date, format, this.o.language); - }, this) - }); - }, - - show: function(){ - if (!this.isInline) - this.picker.appendTo('body'); - this.picker.show(); - this.place(); - this._attachSecondaryEvents(); - this._trigger('show'); - }, - - hide: function(){ - if (this.isInline) - return; - if (!this.picker.is(':visible')) - return; - this.focusDate = null; - this.picker.hide().detach(); - this._detachSecondaryEvents(); - this.viewMode = this.o.startView; - this.showMode(); - - if ( - this.o.forceParse && - ( - this.isInput && this.element.val() || - this.hasInput && this.element.find('input').val() - ) - ) - this.setValue(); - this._trigger('hide'); - }, - - remove: function(){ - this.hide(); - this._detachEvents(); - this._detachSecondaryEvents(); - this.picker.remove(); - delete this.element.data().datepicker; - if (!this.isInput){ - delete this.element.data().date; - } - }, - - _utc_to_local: function(utc){ - return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000)); - }, - _local_to_utc: function(local){ - return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000)); - }, - _zero_time: function(local){ - return local && new Date(local.getFullYear(), local.getMonth(), local.getDate()); - }, - _zero_utc_time: function(utc){ - return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate())); - }, - - getDates: function(){ - return $.map(this.dates, this._utc_to_local); - }, - - getUTCDates: function(){ - return $.map(this.dates, function(d){ - return new Date(d); - }); - }, - - getDate: function(){ - return this._utc_to_local(this.getUTCDate()); - }, - - getUTCDate: function(){ - return new Date(this.dates.get(-1)); - }, - - setDates: function(){ - var args = $.isArray(arguments[0]) ? arguments[0] : arguments; - this.update.apply(this, args); - this._trigger('changeDate'); - this.setValue(); - }, - - setUTCDates: function(){ - var args = $.isArray(arguments[0]) ? arguments[0] : arguments; - this.update.apply(this, $.map(args, this._utc_to_local)); - this._trigger('changeDate'); - this.setValue(); - }, - - setDate: alias('setDates'), - setUTCDate: alias('setUTCDates'), - - setValue: function(){ - var formatted = this.getFormattedDate(); - if (!this.isInput){ - if (this.component){ - this.element.find('input').val(formatted).change(); - } - } - else { - this.element.val(formatted).change(); - } - }, - - getFormattedDate: function(format){ - if (format === undefined) - format = this.o.format; - - var lang = this.o.language; - return $.map(this.dates, function(d){ - return DPGlobal.formatDate(d, format, lang); - }).join(this.o.multidateSeparator); - }, - - setStartDate: function(startDate){ - this._process_options({startDate: startDate}); - this.update(); - this.updateNavArrows(); - }, - - setEndDate: function(endDate){ - this._process_options({endDate: endDate}); - this.update(); - this.updateNavArrows(); - }, - - setDaysOfWeekDisabled: function(daysOfWeekDisabled){ - this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); - this.update(); - this.updateNavArrows(); - }, - - place: function(){ - if (this.isInline) - return; - var calendarWidth = this.picker.outerWidth(), - calendarHeight = this.picker.outerHeight(), - visualPadding = 10, - windowWidth = $window.width(), - windowHeight = $window.height(), - scrollTop = $window.scrollTop(); - - var parentsZindex = []; - this.element.parents().each(function() { - var itemZIndex = $(this).css('z-index'); - if ( itemZIndex !== 'auto' && itemZIndex !== 0 ) parentsZindex.push( parseInt( itemZIndex ) ); - }); - var zIndex = Math.max.apply( Math, parentsZindex ) + 10; - var offset = this.component ? this.component.parent().offset() : this.element.offset(); - var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false); - var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false); - var left = offset.left, - top = offset.top; - - this.picker.removeClass( - 'datepicker-orient-top datepicker-orient-bottom '+ - 'datepicker-orient-right datepicker-orient-left' - ); - - if (this.o.orientation.x !== 'auto'){ - this.picker.addClass('datepicker-orient-' + this.o.orientation.x); - if (this.o.orientation.x === 'right') - left -= calendarWidth - width; - } - // auto x orientation is best-placement: if it crosses a window - // edge, fudge it sideways - else { - // Default to left - this.picker.addClass('datepicker-orient-left'); - if (offset.left < 0) - left -= offset.left - visualPadding; - else if (offset.left + calendarWidth > windowWidth) - left = windowWidth - calendarWidth - visualPadding; - } - - // auto y orientation is best-situation: top or bottom, no fudging, - // decision based on which shows more of the calendar - var yorient = this.o.orientation.y, - top_overflow, bottom_overflow; - if (yorient === 'auto'){ - top_overflow = -scrollTop + offset.top - calendarHeight; - bottom_overflow = scrollTop + windowHeight - (offset.top + height + calendarHeight); - if (Math.max(top_overflow, bottom_overflow) === bottom_overflow) - yorient = 'top'; - else - yorient = 'bottom'; - } - this.picker.addClass('datepicker-orient-' + yorient); - if (yorient === 'top') - top += height; - else - top -= calendarHeight + parseInt(this.picker.css('padding-top')); - - this.picker.css({ - top: top, - left: left, - zIndex: zIndex - }); - }, - - _allow_update: true, - update: function(){ - if (!this._allow_update) - return; - - var oldDates = this.dates.copy(), - dates = [], - fromArgs = false; - if (arguments.length){ - $.each(arguments, $.proxy(function(i, date){ - if (date instanceof Date) - date = this._local_to_utc(date); - dates.push(date); - }, this)); - fromArgs = true; - } - else { - dates = this.isInput - ? this.element.val() - : this.element.data('date') || this.element.find('input').val(); - if (dates && this.o.multidate) - dates = dates.split(this.o.multidateSeparator); - else - dates = [dates]; - delete this.element.data().date; - } - - dates = $.map(dates, $.proxy(function(date){ - return DPGlobal.parseDate(date, this.o.format, this.o.language); - }, this)); - dates = $.grep(dates, $.proxy(function(date){ - return ( - date < this.o.startDate || - date > this.o.endDate || - !date - ); - }, this), true); - this.dates.replace(dates); - - if (this.dates.length) - this.viewDate = new Date(this.dates.get(-1)); - else if (this.viewDate < this.o.startDate) - this.viewDate = new Date(this.o.startDate); - else if (this.viewDate > this.o.endDate) - this.viewDate = new Date(this.o.endDate); - - if (fromArgs){ - // setting date by clicking - this.setValue(); - } - else if (dates.length){ - // setting date by typing - if (String(oldDates) !== String(this.dates)) - this._trigger('changeDate'); - } - if (!this.dates.length && oldDates.length) - this._trigger('clearDate'); - - this.fill(); - }, - - fillDow: function(){ - var dowCnt = this.o.weekStart, - html = ''; - if (this.o.calendarWeeks){ - var cell = ' '; - html += cell; - this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); - } - while (dowCnt < this.o.weekStart + 7){ - html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+''; - } - html += ''; - this.picker.find('.datepicker-days thead').append(html); - }, - - fillMonths: function(){ - var html = '', - i = 0; - while (i < 12){ - html += ''+dates[this.o.language].monthsShort[i++]+''; - } - this.picker.find('.datepicker-months td').html(html); - }, - - setRange: function(range){ - if (!range || !range.length) - delete this.range; - else - this.range = $.map(range, function(d){ - return d.valueOf(); - }); - this.fill(); - }, - - getClassNames: function(date){ - var cls = [], - year = this.viewDate.getUTCFullYear(), - month = this.viewDate.getUTCMonth(), - today = new Date(); - if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){ - cls.push('old'); - } - else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){ - cls.push('new'); - } - if (this.focusDate && date.valueOf() === this.focusDate.valueOf()) - cls.push('focused'); - // Compare internal UTC date with local today, not UTC today - if (this.o.todayHighlight && - date.getUTCFullYear() === today.getFullYear() && - date.getUTCMonth() === today.getMonth() && - date.getUTCDate() === today.getDate()){ - cls.push('today'); - } - if (this.dates.contains(date) !== -1) - cls.push('active'); - if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || - $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){ - cls.push('disabled'); - } - if (this.range){ - if (date > this.range[0] && date < this.range[this.range.length-1]){ - cls.push('range'); - } - if ($.inArray(date.valueOf(), this.range) !== -1){ - cls.push('selected'); - } - } - return cls; - }, - - fill: function(){ - var d = new Date(this.viewDate), - year = d.getUTCFullYear(), - month = d.getUTCMonth(), - startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, - startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, - endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, - endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, - todaytxt = dates[this.o.language].today || dates['en'].today || '', - cleartxt = dates[this.o.language].clear || dates['en'].clear || '', - tooltip; - if (isNaN(year) || isNaN(month)) return; - this.picker.find('.datepicker-days thead th.datepicker-switch') - .text(dates[this.o.language].months[month]+' '+year); - this.picker.find('tfoot th.today') - .text(todaytxt) - .toggle(this.o.todayBtn !== false); - this.picker.find('tfoot th.clear') - .text(cleartxt) - .toggle(this.o.clearBtn !== false); - this.updateNavArrows(); - this.fillMonths(); - var prevMonth = UTCDate(year, month-1, 28), - day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); - prevMonth.setUTCDate(day); - prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); - var nextMonth = new Date(prevMonth); - nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); - nextMonth = nextMonth.valueOf(); - var html = []; - var clsName; - while (prevMonth.valueOf() < nextMonth){ - if (prevMonth.getUTCDay() === this.o.weekStart){ - html.push(''); - if (this.o.calendarWeeks){ - // ISO 8601: First week contains first thursday. - // ISO also states week starts on Monday, but we can be more abstract here. - var - // Start of current week: based on weekstart/current date - ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), - // Thursday of this week - th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), - // First Thursday of year, year from thursday - yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), - // Calendar week: ms between thursdays, div ms per day, div 7 days - calWeek = (th - yth) / 864e5 / 7 + 1; - html.push(''+ calWeek +''); - - } - } - clsName = this.getClassNames(prevMonth); - clsName.push('day'); - - if (this.o.beforeShowDay !== $.noop){ - var before = this.o.beforeShowDay(this._utc_to_local(prevMonth)); - if (before === undefined) - before = {}; - else if (typeof(before) === 'boolean') - before = {enabled: before}; - else if (typeof(before) === 'string') - before = {classes: before}; - if (before.enabled === false) - clsName.push('disabled'); - if (before.classes) - clsName = clsName.concat(before.classes.split(/\s+/)); - if (before.tooltip) - tooltip = before.tooltip; - } - - clsName = $.unique(clsName); - html.push(''+prevMonth.getUTCDate() + ''); - tooltip = null; - if (prevMonth.getUTCDay() === this.o.weekEnd){ - html.push(''); - } - prevMonth.setUTCDate(prevMonth.getUTCDate()+1); - } - this.picker.find('.datepicker-days tbody').empty().append(html.join('')); - - var months = this.picker.find('.datepicker-months') - .find('th:eq(1)') - .text(year) - .end() - .find('span').removeClass('active'); - - $.each(this.dates, function(i, d){ - if (d.getUTCFullYear() === year) - months.eq(d.getUTCMonth()).addClass('active'); - }); - - if (year < startYear || year > endYear){ - months.addClass('disabled'); - } - if (year === startYear){ - months.slice(0, startMonth).addClass('disabled'); - } - if (year === endYear){ - months.slice(endMonth+1).addClass('disabled'); - } - - html = ''; - year = parseInt(year/10, 10) * 10; - var yearCont = this.picker.find('.datepicker-years') - .find('th:eq(1)') - .text(year + '-' + (year + 9)) - .end() - .find('td'); - year -= 1; - var years = $.map(this.dates, function(d){ - return d.getUTCFullYear(); - }), - classes; - for (var i = -1; i < 11; i++){ - classes = ['year']; - if (i === -1) - classes.push('old'); - else if (i === 10) - classes.push('new'); - if ($.inArray(year, years) !== -1) - classes.push('active'); - if (year < startYear || year > endYear) - classes.push('disabled'); - html += ''+year+''; - year += 1; - } - yearCont.html(html); - }, - - updateNavArrows: function(){ - if (!this._allow_update) - return; - - var d = new Date(this.viewDate), - year = d.getUTCFullYear(), - month = d.getUTCMonth(); - switch (this.viewMode){ - case 0: - if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){ - this.picker.find('.prev').css({visibility: 'hidden'}); - } - else { - this.picker.find('.prev').css({visibility: 'visible'}); - } - if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){ - this.picker.find('.next').css({visibility: 'hidden'}); - } - else { - this.picker.find('.next').css({visibility: 'visible'}); - } - break; - case 1: - case 2: - if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()){ - this.picker.find('.prev').css({visibility: 'hidden'}); - } - else { - this.picker.find('.prev').css({visibility: 'visible'}); - } - if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()){ - this.picker.find('.next').css({visibility: 'hidden'}); - } - else { - this.picker.find('.next').css({visibility: 'visible'}); - } - break; - } - }, - - click: function(e){ - e.preventDefault(); - var target = $(e.target).closest('span, td, th'), - year, month, day; - if (target.length === 1){ - switch (target[0].nodeName.toLowerCase()){ - case 'th': - switch (target[0].className){ - case 'datepicker-switch': - this.showMode(1); - break; - case 'prev': - case 'next': - var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1); - switch (this.viewMode){ - case 0: - this.viewDate = this.moveMonth(this.viewDate, dir); - this._trigger('changeMonth', this.viewDate); - break; - case 1: - case 2: - this.viewDate = this.moveYear(this.viewDate, dir); - if (this.viewMode === 1) - this._trigger('changeYear', this.viewDate); - break; - } - this.fill(); - break; - case 'today': - var date = new Date(); - date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); - - this.showMode(-2); - var which = this.o.todayBtn === 'linked' ? null : 'view'; - this._setDate(date, which); - break; - case 'clear': - var element; - if (this.isInput) - element = this.element; - else if (this.component) - element = this.element.find('input'); - if (element) - element.val("").change(); - this.update(); - this._trigger('changeDate'); - if (this.o.autoclose) - this.hide(); - break; - } - break; - case 'span': - if (!target.is('.disabled')){ - this.viewDate.setUTCDate(1); - if (target.is('.month')){ - day = 1; - month = target.parent().find('span').index(target); - year = this.viewDate.getUTCFullYear(); - this.viewDate.setUTCMonth(month); - this._trigger('changeMonth', this.viewDate); - if (this.o.minViewMode === 1){ - this._setDate(UTCDate(year, month, day)); - } - } - else { - day = 1; - month = 0; - year = parseInt(target.text(), 10)||0; - this.viewDate.setUTCFullYear(year); - this._trigger('changeYear', this.viewDate); - if (this.o.minViewMode === 2){ - this._setDate(UTCDate(year, month, day)); - } - } - this.showMode(-1); - this.fill(); - } - break; - case 'td': - if (target.is('.day') && !target.is('.disabled')){ - day = parseInt(target.text(), 10)||1; - year = this.viewDate.getUTCFullYear(); - month = this.viewDate.getUTCMonth(); - if (target.is('.old')){ - if (month === 0){ - month = 11; - year -= 1; - } - else { - month -= 1; - } - } - else if (target.is('.new')){ - if (month === 11){ - month = 0; - year += 1; - } - else { - month += 1; - } - } - this._setDate(UTCDate(year, month, day)); - } - break; - } - } - if (this.picker.is(':visible') && this._focused_from){ - $(this._focused_from).focus(); - } - delete this._focused_from; - }, - - _toggle_multidate: function(date){ - var ix = this.dates.contains(date); - if (!date){ - this.dates.clear(); - } - if (this.o.multidate === 1 && ix === 0){ - // single datepicker, don't remove selected date - } - else if (ix !== -1){ - this.dates.remove(ix); - } - else { - this.dates.push(date); - } - if (typeof this.o.multidate === 'number') - while (this.dates.length > this.o.multidate) - this.dates.remove(0); - }, - - _setDate: function(date, which){ - if (!which || which === 'date') - this._toggle_multidate(date && new Date(date)); - if (!which || which === 'view') - this.viewDate = date && new Date(date); - - this.fill(); - this.setValue(); - this._trigger('changeDate'); - var element; - if (this.isInput){ - element = this.element; - } - else if (this.component){ - element = this.element.find('input'); - } - if (element){ - element.change(); - } - if (this.o.autoclose && (!which || which === 'date')){ - this.hide(); - } - }, - - moveMonth: function(date, dir){ - if (!date) - return undefined; - if (!dir) - return date; - var new_date = new Date(date.valueOf()), - day = new_date.getUTCDate(), - month = new_date.getUTCMonth(), - mag = Math.abs(dir), - new_month, test; - dir = dir > 0 ? 1 : -1; - if (mag === 1){ - test = dir === -1 - // If going back one month, make sure month is not current month - // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) - ? function(){ - return new_date.getUTCMonth() === month; - } - // If going forward one month, make sure month is as expected - // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) - : function(){ - return new_date.getUTCMonth() !== new_month; - }; - new_month = month + dir; - new_date.setUTCMonth(new_month); - // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 - if (new_month < 0 || new_month > 11) - new_month = (new_month + 12) % 12; - } - else { - // For magnitudes >1, move one month at a time... - for (var i=0; i < mag; i++) - // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... - new_date = this.moveMonth(new_date, dir); - // ...then reset the day, keeping it in the new month - new_month = new_date.getUTCMonth(); - new_date.setUTCDate(day); - test = function(){ - return new_month !== new_date.getUTCMonth(); - }; - } - // Common date-resetting loop -- if date is beyond end of month, make it - // end of month - while (test()){ - new_date.setUTCDate(--day); - new_date.setUTCMonth(new_month); - } - return new_date; - }, - - moveYear: function(date, dir){ - return this.moveMonth(date, dir*12); - }, - - dateWithinRange: function(date){ - return date >= this.o.startDate && date <= this.o.endDate; - }, - - keydown: function(e){ - if (this.picker.is(':not(:visible)')){ - if (e.keyCode === 27) // allow escape to hide and re-show picker - this.show(); - return; - } - var dateChanged = false, - dir, newDate, newViewDate, - focusDate = this.focusDate || this.viewDate; - switch (e.keyCode){ - case 27: // escape - if (this.focusDate){ - this.focusDate = null; - this.viewDate = this.dates.get(-1) || this.viewDate; - this.fill(); - } - else - this.hide(); - e.preventDefault(); - break; - case 37: // left - case 39: // right - if (!this.o.keyboardNavigation) - break; - dir = e.keyCode === 37 ? -1 : 1; - if (e.ctrlKey){ - newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir); - newViewDate = this.moveYear(focusDate, dir); - this._trigger('changeYear', this.viewDate); - } - else if (e.shiftKey){ - newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir); - newViewDate = this.moveMonth(focusDate, dir); - this._trigger('changeMonth', this.viewDate); - } - else { - newDate = new Date(this.dates.get(-1) || UTCToday()); - newDate.setUTCDate(newDate.getUTCDate() + dir); - newViewDate = new Date(focusDate); - newViewDate.setUTCDate(focusDate.getUTCDate() + dir); - } - if (this.dateWithinRange(newDate)){ - this.focusDate = this.viewDate = newViewDate; - this.setValue(); - this.fill(); - e.preventDefault(); - } - break; - case 38: // up - case 40: // down - if (!this.o.keyboardNavigation) - break; - dir = e.keyCode === 38 ? -1 : 1; - if (e.ctrlKey){ - newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir); - newViewDate = this.moveYear(focusDate, dir); - this._trigger('changeYear', this.viewDate); - } - else if (e.shiftKey){ - newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir); - newViewDate = this.moveMonth(focusDate, dir); - this._trigger('changeMonth', this.viewDate); - } - else { - newDate = new Date(this.dates.get(-1) || UTCToday()); - newDate.setUTCDate(newDate.getUTCDate() + dir * 7); - newViewDate = new Date(focusDate); - newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7); - } - if (this.dateWithinRange(newDate)){ - this.focusDate = this.viewDate = newViewDate; - this.setValue(); - this.fill(); - e.preventDefault(); - } - break; - case 32: // spacebar - // Spacebar is used in manually typing dates in some formats. - // As such, its behavior should not be hijacked. - break; - case 13: // enter - focusDate = this.focusDate || this.dates.get(-1) || this.viewDate; - if (this.o.keyboardNavigation) { - this._toggle_multidate(focusDate); - dateChanged = true; - } - this.focusDate = null; - this.viewDate = this.dates.get(-1) || this.viewDate; - this.setValue(); - this.fill(); - if (this.picker.is(':visible')){ - e.preventDefault(); - if (this.o.autoclose) - this.hide(); - } - break; - case 9: // tab - this.focusDate = null; - this.viewDate = this.dates.get(-1) || this.viewDate; - this.fill(); - this.hide(); - break; - } - if (dateChanged){ - if (this.dates.length) - this._trigger('changeDate'); - else - this._trigger('clearDate'); - var element; - if (this.isInput){ - element = this.element; - } - else if (this.component){ - element = this.element.find('input'); - } - if (element){ - element.change(); - } - } - }, - - showMode: function(dir){ - if (dir){ - this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); - } - this.picker - .find('>div') - .hide() - .filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName) - .css('display', 'block'); - this.updateNavArrows(); - } - }; - - var DateRangePicker = function(element, options){ - this.element = $(element); - this.inputs = $.map(options.inputs, function(i){ - return i.jquery ? i[0] : i; - }); - delete options.inputs; - - $(this.inputs) - .datepicker(options) - .bind('changeDate', $.proxy(this.dateUpdated, this)); - - this.pickers = $.map(this.inputs, function(i){ - return $(i).data('datepicker'); - }); - this.updateDates(); - }; - DateRangePicker.prototype = { - updateDates: function(){ - this.dates = $.map(this.pickers, function(i){ - return i.getUTCDate(); - }); - this.updateRanges(); - }, - updateRanges: function(){ - var range = $.map(this.dates, function(d){ - return d.valueOf(); - }); - $.each(this.pickers, function(i, p){ - p.setRange(range); - }); - }, - dateUpdated: function(e){ - // `this.updating` is a workaround for preventing infinite recursion - // between `changeDate` triggering and `setUTCDate` calling. Until - // there is a better mechanism. - if (this.updating) - return; - this.updating = true; - - var dp = $(e.target).data('datepicker'), - new_date = dp.getUTCDate(), - i = $.inArray(e.target, this.inputs), - l = this.inputs.length; - if (i === -1) - return; - - $.each(this.pickers, function(i, p){ - if (!p.getUTCDate()) - p.setUTCDate(new_date); - }); - - if (new_date < this.dates[i]){ - // Date being moved earlier/left - while (i >= 0 && new_date < this.dates[i]){ - this.pickers[i--].setUTCDate(new_date); - } - } - else if (new_date > this.dates[i]){ - // Date being moved later/right - while (i < l && new_date > this.dates[i]){ - this.pickers[i++].setUTCDate(new_date); - } - } - this.updateDates(); - - delete this.updating; - }, - remove: function(){ - $.map(this.pickers, function(p){ p.remove(); }); - delete this.element.data().datepicker; - } - }; - - function opts_from_el(el, prefix){ - // Derive options from element data-attrs - var data = $(el).data(), - out = {}, inkey, - replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'); - prefix = new RegExp('^' + prefix.toLowerCase()); - function re_lower(_,a){ - return a.toLowerCase(); - } - for (var key in data) - if (prefix.test(key)){ - inkey = key.replace(replace, re_lower); - out[inkey] = data[key]; - } - return out; - } - - function opts_from_locale(lang){ - // Derive options from locale plugins - var out = {}; - // Check if "de-DE" style date is available, if not language should - // fallback to 2 letter code eg "de" - if (!dates[lang]){ - lang = lang.split('-')[0]; - if (!dates[lang]) - return; - } - var d = dates[lang]; - $.each(locale_opts, function(i,k){ - if (k in d) - out[k] = d[k]; - }); - return out; - } - - var old = $.fn.datepicker; - $.fn.datepicker = function(option){ - var args = Array.apply(null, arguments); - args.shift(); - var internal_return; - this.each(function(){ - var $this = $(this), - data = $this.data('datepicker'), - options = typeof option === 'object' && option; - if (!data){ - var elopts = opts_from_el(this, 'date'), - // Preliminary otions - xopts = $.extend({}, defaults, elopts, options), - locopts = opts_from_locale(xopts.language), - // Options priority: js args, data-attrs, locales, defaults - opts = $.extend({}, defaults, locopts, elopts, options); - if ($this.is('.input-daterange') || opts.inputs){ - var ropts = { - inputs: opts.inputs || $this.find('input').toArray() - }; - $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); - } - else { - $this.data('datepicker', (data = new Datepicker(this, opts))); - } - } - if (typeof option === 'string' && typeof data[option] === 'function'){ - internal_return = data[option].apply(data, args); - if (internal_return !== undefined) - return false; - } - }); - if (internal_return !== undefined) - return internal_return; - else - return this; - }; - - var defaults = $.fn.datepicker.defaults = { - autoclose: false, - beforeShowDay: $.noop, - calendarWeeks: false, - clearBtn: false, - daysOfWeekDisabled: [], - endDate: Infinity, - forceParse: true, - format: 'mm/dd/yyyy', - keyboardNavigation: true, - language: 'en', - minViewMode: 0, - multidate: false, - multidateSeparator: ',', - orientation: "auto", - rtl: false, - startDate: -Infinity, - startView: 0, - todayBtn: false, - todayHighlight: false, - weekStart: 0 - }; - var locale_opts = $.fn.datepicker.locale_opts = [ - 'format', - 'rtl', - 'weekStart' - ]; - $.fn.datepicker.Constructor = Datepicker; - var dates = $.fn.datepicker.dates = { - en: { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today", - clear: "Clear" - } - }; - - var DPGlobal = { - modes: [ - { - clsName: 'days', - navFnc: 'Month', - navStep: 1 - }, - { - clsName: 'months', - navFnc: 'FullYear', - navStep: 1 - }, - { - clsName: 'years', - navFnc: 'FullYear', - navStep: 10 - }], - isLeapYear: function(year){ - return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); - }, - getDaysInMonth: function(year, month){ - return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; - }, - validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, - nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, - parseFormat: function(format){ - // IE treats \0 as a string end in inputs (truncating the value), - // so it's a bad format delimiter, anyway - var separators = format.replace(this.validParts, '\0').split('\0'), - parts = format.match(this.validParts); - if (!separators || !separators.length || !parts || parts.length === 0){ - throw new Error("Invalid date format."); - } - return {separators: separators, parts: parts}; - }, - parseDate: function(date, format, language){ - if (!date) - return undefined; - if (date instanceof Date) - return date; - if (typeof format === 'string') - format = DPGlobal.parseFormat(format); - var part_re = /([\-+]\d+)([dmwy])/, - parts = date.match(/([\-+]\d+)([dmwy])/g), - part, dir, i; - if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){ - date = new Date(); - for (i=0; i < parts.length; i++){ - part = part_re.exec(parts[i]); - dir = parseInt(part[1]); - switch (part[2]){ - case 'd': - date.setUTCDate(date.getUTCDate() + dir); - break; - case 'm': - date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir); - break; - case 'w': - date.setUTCDate(date.getUTCDate() + dir * 7); - break; - case 'y': - date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir); - break; - } - } - return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0); - } - parts = date && date.match(this.nonpunctuation) || []; - date = new Date(); - var parsed = {}, - setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], - setters_map = { - yyyy: function(d,v){ - return d.setUTCFullYear(v); - }, - yy: function(d,v){ - return d.setUTCFullYear(2000+v); - }, - m: function(d,v){ - if (isNaN(d)) - return d; - v -= 1; - while (v < 0) v += 12; - v %= 12; - d.setUTCMonth(v); - while (d.getUTCMonth() !== v) - d.setUTCDate(d.getUTCDate()-1); - return d; - }, - d: function(d,v){ - return d.setUTCDate(v); - } - }, - val, filtered; - setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; - setters_map['dd'] = setters_map['d']; - date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); - var fparts = format.parts.slice(); - // Remove noop parts - if (parts.length !== fparts.length){ - fparts = $(fparts).filter(function(i,p){ - return $.inArray(p, setters_order) !== -1; - }).toArray(); - } - // Process remainder - function match_part(){ - var m = this.slice(0, parts[i].length), - p = parts[i].slice(0, m.length); - return m === p; - } - if (parts.length === fparts.length){ - var cnt; - for (i=0, cnt = fparts.length; i < cnt; i++){ - val = parseInt(parts[i], 10); - part = fparts[i]; - if (isNaN(val)){ - switch (part){ - case 'MM': - filtered = $(dates[language].months).filter(match_part); - val = $.inArray(filtered[0], dates[language].months) + 1; - break; - case 'M': - filtered = $(dates[language].monthsShort).filter(match_part); - val = $.inArray(filtered[0], dates[language].monthsShort) + 1; - break; - } - } - parsed[part] = val; - } - var _date, s; - for (i=0; i < setters_order.length; i++){ - s = setters_order[i]; - if (s in parsed && !isNaN(parsed[s])){ - _date = new Date(date); - setters_map[s](_date, parsed[s]); - if (!isNaN(_date)) - date = _date; - } - } - } - return date; - }, - formatDate: function(date, format, language){ - if (!date) - return ''; - if (typeof format === 'string') - format = DPGlobal.parseFormat(format); - var val = { - d: date.getUTCDate(), - D: dates[language].daysShort[date.getUTCDay()], - DD: dates[language].days[date.getUTCDay()], - m: date.getUTCMonth() + 1, - M: dates[language].monthsShort[date.getUTCMonth()], - MM: dates[language].months[date.getUTCMonth()], - yy: date.getUTCFullYear().toString().substring(2), - yyyy: date.getUTCFullYear() - }; - val.dd = (val.d < 10 ? '0' : '') + val.d; - val.mm = (val.m < 10 ? '0' : '') + val.m; - date = []; - var seps = $.extend([], format.separators); - for (var i=0, cnt = format.parts.length; i <= cnt; i++){ - if (seps.length) - date.push(seps.shift()); - date.push(val[format.parts[i]]); - } - return date.join(''); - }, - headTemplate: ''+ - ''+ - '«'+ - ''+ - '»'+ - ''+ - '', - contTemplate: '', - footTemplate: ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - ''+ - '' - }; - DPGlobal.template = '
    '+ - '
    '+ - ''+ - DPGlobal.headTemplate+ - ''+ - DPGlobal.footTemplate+ - '
    '+ - '
    '+ - '
    '+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - DPGlobal.footTemplate+ - '
    '+ - '
    '+ - '
    '+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - DPGlobal.footTemplate+ - '
    '+ - '
    '+ - '
    '; - - $.fn.datepicker.DPGlobal = DPGlobal; - - - /* DATEPICKER NO CONFLICT - * =================== */ - - $.fn.datepicker.noConflict = function(){ - $.fn.datepicker = old; - return this; - }; - - - /* DATEPICKER DATA-API - * ================== */ - - $(document).on( - 'focus.datepicker.data-api click.datepicker.data-api', - '[data-provide="datepicker"]', - function(e){ - var $this = $(this); - if ($this.data('datepicker')) - return; - e.preventDefault(); - // component click requires us to explicitly show it - $this.datepicker('show'); - } - ); - $(function(){ - $('[data-provide="datepicker-inline"]').datepicker(); - }); - -}(window.jQuery)); - + * Copyright 2012 Stefan Petre + * Improvements by Andrew Rowls + * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) + */ +!function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(a){return function(){return this[a].apply(this,arguments)}}function g(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp("^"+c.toLowerCase()+"([A-Z])");c=new RegExp("^"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function h(b){var c={};if(p[b]||(b=b.split("-")[0],p[b])){var d=p[b];return a.each(o,function(a,b){b in d&&(c[b]=d[b])}),c}}var i=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;d>c;c++)if(this[c].valueOf()===b)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new i;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),j=function(b,c){this._process_options(c),this.dates=new i,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=a(b),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=a(q.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot .today, tfoot .clear").attr("colspan",function(a,b){return parseInt(b)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.setDatesDisabled(this.o.datesDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};j.prototype={constructor:j,_process_options:function(e){this._o=a.extend({},this._o,e);var f=this.o=a.extend({},this._o),g=f.language;switch(p[g]||(g=g.split("-")[0],p[g]||(g=n.language)),f.language=g,f.startView){case 2:case"decade":f.startView=2;break;case 1:case"year":f.startView=1;break;default:f.startView=0}switch(f.minViewMode){case 1:case"months":f.minViewMode=1;break;case 2:case"years":f.minViewMode=2;break;default:f.minViewMode=0}f.startView=Math.max(f.startView,f.minViewMode),f.multidate!==!0&&(f.multidate=Number(f.multidate)||!1,f.multidate!==!1&&(f.multidate=Math.max(0,f.multidate))),f.multidateSeparator=String(f.multidateSeparator),f.weekStart%=7,f.weekEnd=(f.weekStart+6)%7;var h=q.parseFormat(f.format);if(f.startDate!==-1/0&&(f.startDate=f.startDate?f.startDate instanceof Date?this._local_to_utc(this._zero_time(f.startDate)):q.parseDate(f.startDate,h,f.language):-1/0),1/0!==f.endDate&&(f.endDate=f.endDate?f.endDate instanceof Date?this._local_to_utc(this._zero_time(f.endDate)):q.parseDate(f.endDate,h,f.language):1/0),f.daysOfWeekDisabled=f.daysOfWeekDisabled||[],a.isArray(f.daysOfWeekDisabled)||(f.daysOfWeekDisabled=f.daysOfWeekDisabled.split(/[,\s]*/)),f.daysOfWeekDisabled=a.map(f.daysOfWeekDisabled,function(a){return parseInt(a,10)}),f.datesDisabled=f.datesDisabled||[],!a.isArray(f.datesDisabled)){var i=[];i.push(q.parseDate(f.datesDisabled,h,f.language)),f.datesDisabled=i}f.datesDisabled=a.map(f.datesDisabled,function(a){return q.parseDate(a,h,f.language)});var j=String(f.orientation).toLowerCase().split(/\s+/g),k=f.orientation.toLowerCase();if(j=a.grep(j,function(a){return/^auto|left|right|top|bottom$/.test(a)}),f.orientation={x:"auto",y:"auto"},k&&"auto"!==k)if(1===j.length)switch(j[0]){case"top":case"bottom":f.orientation.y=j[0];break;case"left":case"right":f.orientation.x=j[0]}else k=a.grep(j,function(a){return/^left|right$/.test(a)}),f.orientation.x=k[0]||"auto",k=a.grep(j,function(a){return/^top|bottom$/.test(a)}),f.orientation.y=k[0]||"auto";else;if(f.defaultViewDate){var l=f.defaultViewDate.year||(new Date).getFullYear(),m=f.defaultViewDate.month||0,o=f.defaultViewDate.day||1;f.defaultViewDate=c(l,m,o)}else f.defaultViewDate=d();f.showOnFocus=f.showOnFocus!==b?f.showOnFocus:!0},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;fe?(this.picker.addClass("datepicker-orient-right"),n=k.left+m-b):this.picker.addClass("datepicker-orient-left");var p,q,r=this.o.orientation.y;if("auto"===r&&(p=-g+o-c,q=g+f-(o+l+c),r=Math.max(p,q)===q?"top":"bottom"),this.picker.addClass("datepicker-orient-"+r),"top"===r?o+=l:o-=c+parseInt(this.picker.css("padding-top")),this.o.rtl){var s=e-(n+m);this.picker.css({top:o,right:s,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return q.parseDate(a,this.o.format,this.o.language)},this)),c=a.grep(c,a.proxy(function(a){return athis.o.endDate||!a},this),!0),this.dates.replace(c),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate&&(this.viewDate=new Date(this.o.endDate)),d?this.setValue():c.length&&String(b)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&b.length&&this._trigger("clearDate"),this.fill(),this},fillDow:function(){var a=this.o.weekStart,b="";if(this.o.calendarWeeks){this.picker.find(".datepicker-days thead tr:first-child .datepicker-switch").attr("colspan",function(a,b){return parseInt(b)+1});var c=' ';b+=c}for(;a'+p[this.o.language].daysMin[a++%7]+"";b+="",this.picker.find(".datepicker-days thead").append(b)},fillMonths:function(){for(var a="",b=0;12>b;)a+=''+p[this.o.language].monthsShort[b++]+"";this.picker.find(".datepicker-months td").html(a)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],d=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth(),g=new Date;return b.getUTCFullYear()d||b.getUTCFullYear()===d&&b.getUTCMonth()>f)&&c.push("new"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push("focused"),this.o.todayHighlight&&b.getUTCFullYear()===g.getFullYear()&&b.getUTCMonth()===g.getMonth()&&b.getUTCDate()===g.getDate()&&c.push("today"),-1!==this.dates.contains(b)&&c.push("active"),(b.valueOf()this.o.endDate||-1!==a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled))&&c.push("disabled"),this.o.datesDisabled.length>0&&a.grep(this.o.datesDisabled,function(a){return e(b,a)}).length>0&&c.push("disabled","disabled-date"),this.range&&(b>this.range[0]&&b"),this.o.calendarWeeks)){var u=new Date(+n+(this.o.weekStart-n.getUTCDay()-7)%7*864e5),v=new Date(Number(u)+(11-u.getUTCDay())%7*864e5),w=new Date(Number(w=c(v.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),x=(v-w)/864e5/7+1;t.push(''+x+"")}if(s=this.getClassNames(n),s.push("day"),this.o.beforeShowDay!==a.noop){var y=this.o.beforeShowDay(this._utc_to_local(n));y===b?y={}:"boolean"==typeof y?y={enabled:y}:"string"==typeof y&&(y={classes:y}),y.enabled===!1&&s.push("disabled"),y.classes&&(s=s.concat(y.classes.split(/\s+/))),y.tooltip&&(d=y.tooltip)}s=a.unique(s),t.push('"+n.getUTCDate()+""),d=null,n.getUTCDay()===this.o.weekEnd&&t.push(""),n.setUTCDate(n.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(t.join(""));var z=this.picker.find(".datepicker-months").find("th:eq(1)").text(f).end().find("span").removeClass("active");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===f&&z.eq(b.getUTCMonth()).addClass("active")}),(h>f||f>j)&&z.addClass("disabled"),f===h&&z.slice(0,i).addClass("disabled"),f===j&&z.slice(k+1).addClass("disabled"),this.o.beforeShowMonth!==a.noop){var A=this;a.each(z,function(b,c){if(!a(c).hasClass("disabled")){var d=new Date(f,b,1),e=A.o.beforeShowMonth(d);e===!1&&a(c).addClass("disabled")}})}t="",f=10*parseInt(f/10,10);var B=this.picker.find(".datepicker-years").find("th:eq(1)").text(f+"-"+(f+9)).end().find("td");f-=1;for(var C,D=a.map(this.dates,function(a){return a.getUTCFullYear()}),E=-1;11>E;E++)C=["year"],-1===E?C.push("old"):10===E&&C.push("new"),-1!==a.inArray(f,D)&&C.push("active"),(h>f||f>j)&&C.push("disabled"),t+=''+f+"",f+=1;B.html(t)}},updateNavArrows:function(){if(this._allow_update){var a=new Date(this.viewDate),b=a.getUTCFullYear(),c=a.getUTCMonth();switch(this.viewMode){case 0:this.picker.find(".prev").css(this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()&&c<=this.o.startDate.getUTCMonth()?{visibility:"hidden"}:{visibility:"visible"}),this.picker.find(".next").css(1/0!==this.o.endDate&&b>=this.o.endDate.getUTCFullYear()&&c>=this.o.endDate.getUTCMonth()?{visibility:"hidden"}:{visibility:"visible"});break;case 1:case 2:this.picker.find(".prev").css(this.o.startDate!==-1/0&&b<=this.o.startDate.getUTCFullYear()?{visibility:"hidden"}:{visibility:"visible"}),this.picker.find(".next").css(1/0!==this.o.endDate&&b>=this.o.endDate.getUTCFullYear()?{visibility:"hidden"}:{visibility:"visible"})}}},click:function(b){b.preventDefault();var d,e,f,g=a(b.target).closest("span, td, th");if(1===g.length)switch(g[0].nodeName.toLowerCase()){case"th":switch(g[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var h=q.modes[this.viewMode].navStep*("prev"===g[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,h),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,h),1===this.viewMode&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"today":var i=new Date;i=c(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0),this.showMode(-2);var j="linked"===this.o.todayBtn?null:"view";this._setDate(i,j);break;case"clear":this.clearDates()}break;case"span":g.hasClass("disabled")||(this.viewDate.setUTCDate(1),g.hasClass("month")?(f=1,e=g.parent().find("span").index(g),d=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(c(d,e,f))):(f=1,e=0,d=parseInt(g.text(),10)||0,this.viewDate.setUTCFullYear(d),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(c(d,e,f))),this.showMode(-1),this.fill());break;case"td":g.hasClass("day")&&!g.hasClass("disabled")&&(f=parseInt(g.text(),10)||1,d=this.viewDate.getUTCFullYear(),e=this.viewDate.getUTCMonth(),g.hasClass("old")?0===e?(e=11,d-=1):e-=1:g.hasClass("new")&&(11===e?(e=0,d+=1):e+=1),this._setDate(c(d,e,f)))}this.picker.is(":visible")&&this._focused_from&&a(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),-1!==b?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&"date"!==b||this._toggle_multidate(a&&new Date(a)),b&&"view"!==b||(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&"view"===b||this._trigger("changeDate");var c;this.isInput?c=this.element:this.component&&(c=this.element.find("input")),c&&c.change(),!this.o.autoclose||b&&"date"!==b||this.hide()},moveMonth:function(a,c){if(!a)return b;if(!c)return a;var d,e,f=new Date(a.valueOf()),g=f.getUTCDate(),h=f.getUTCMonth(),i=Math.abs(c);if(c=c>0?1:-1,1===i)e=-1===c?function(){return f.getUTCMonth()===h}:function(){return f.getUTCMonth()!==d},d=h+c,f.setUTCMonth(d),(0>d||d>11)&&(d=(d+12)%12);else{for(var j=0;i>j;j++)f=this.moveMonth(f,c);d=f.getUTCMonth(),f.setUTCDate(g),e=function(){return d!==f.getUTCMonth()}}for(;e();)f.setUTCDate(--g),f.setUTCMonth(d);return f},moveYear:function(a,b){return this.moveMonth(a,12*b)},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(":visible"))return void(27===a.keyCode&&this.show());var b,c,e,f=!1,g=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;b=37===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+b),e=new Date(g),e.setUTCDate(g.getUTCDate()+b)),this.dateWithinRange(e)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;b=38===a.keyCode?-1:1,a.ctrlKey?(c=this.moveYear(this.dates.get(-1)||d(),b),e=this.moveYear(g,b),this._trigger("changeYear",this.viewDate)):a.shiftKey?(c=this.moveMonth(this.dates.get(-1)||d(),b),e=this.moveMonth(g,b),this._trigger("changeMonth",this.viewDate)):(c=new Date(this.dates.get(-1)||d()),c.setUTCDate(c.getUTCDate()+7*b),e=new Date(g),e.setUTCDate(g.getUTCDate()+7*b)),this.dateWithinRange(e)&&(this.focusDate=this.viewDate=e,this.setValue(),this.fill(),a.preventDefault());break;case 32:break;case 13:g=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(g),f=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(a.preventDefault(),"function"==typeof a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(f){this._trigger(this.dates.length?"changeDate":"clearDate");var h;this.isInput?h=this.element:this.component&&(h=this.element.find("input")),h&&h.change()}},showMode:function(a){a&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+a))),this.picker.children("div").hide().filter(".datepicker-"+q.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var k=function(b,c){this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,m.call(a(this.inputs),c).bind("changeDate",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a(b).data("datepicker")}),this.updateDates()};k.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(b){if(!this.updating){this.updating=!0;var c=a(b.target).data("datepicker"),d=c.getUTCDate(),e=a.inArray(b.target,this.inputs),f=e-1,g=e+1,h=this.inputs.length;if(-1!==e){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b.setUTCDate(d)}),d=0&&dthis.dates[g])for(;h>g&&d>this.dates[g];)this.pickers[g++].setUTCDate(d);this.updateDates(),delete this.updating}}},remove:function(){a.map(this.pickers,function(a){a.remove()}),delete this.element.data().datepicker}};var l=a.fn.datepicker,m=function(c){var d=Array.apply(null,arguments);d.shift();var e;return this.each(function(){var f=a(this),i=f.data("datepicker"),l="object"==typeof c&&c;if(!i){var m=g(this,"date"),o=a.extend({},n,m,l),p=h(o.language),q=a.extend({},n,p,m,l);if(f.hasClass("input-daterange")||q.inputs){var r={inputs:q.inputs||f.find("input").toArray()};f.data("datepicker",i=new k(this,a.extend(q,r)))}else f.data("datepicker",i=new j(this,q))}return"string"==typeof c&&"function"==typeof i[c]&&(e=i[c].apply(i,d),e!==b)?!1:void 0}),e!==b?e:this};a.fn.datepicker=m;var n=a.fn.datepicker.defaults={autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,container:"body"},o=a.fn.datepicker.locale_opts=["format","rtl","weekStart"];a.fn.datepicker.Constructor=j;var p=a.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},q={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(a){return a%4===0&&a%100!==0||a%400===0},getDaysInMonth:function(a,b){return[31,q.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(a){var b=a.replace(this.validParts,"\x00").split("\x00"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error("Invalid date format.");return{separators:b,parts:c}},parseDate:function(d,e,f){function g(){var a=this.slice(0,m[k].length),b=m[k].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!d)return b;if(d instanceof Date)return d;"string"==typeof e&&(e=q.parseFormat(e));var h,i,k,l=/([\-+]\d+)([dmwy])/,m=d.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(d)){for(d=new Date,k=0;kb;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};t.M=t.MM=t.mm=t.m,t.dd=t.d,d=c(d.getFullYear(),d.getMonth(),d.getDate(),0,0,0);var u=e.parts.slice();if(m.length!==u.length&&(u=a(u).filter(function(b,c){return-1!==a.inArray(c,s)}).toArray()),m.length===u.length){var v;for(k=0,v=u.length;v>k;k++){if(n=parseInt(m[k],10),h=u[k],isNaN(n))switch(h){case"MM":o=a(p[f].months).filter(g),n=a.inArray(o[0],p[f].months)+1;break;case"M":o=a(p[f].monthsShort).filter(g),n=a.inArray(o[0],p[f].monthsShort)+1}r[h]=n}var w,x;for(k=0;k=g;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join("")},headTemplate:'«»',contTemplate:'',footTemplate:''};q.template='
    '+q.headTemplate+""+q.footTemplate+'
    '+q.headTemplate+q.contTemplate+q.footTemplate+'
    '+q.headTemplate+q.contTemplate+q.footTemplate+"
    ",a.fn.datepicker.DPGlobal=q,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=l,this},a.fn.datepicker.version="1.4.0",a(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(b){var c=a(this);c.data("datepicker")||(b.preventDefault(),m.call(c,"show"))}),a(function(){m.call(a('[data-provide="datepicker-inline"]'))})}(window.jQuery); +!function(a){a.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery); +!function(a){a.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}(jQuery); +!function(a){a.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}(jQuery); +!function(a){a.fn.datepicker.dates.nl={days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag","zondag"],daysShort:["zo","ma","di","wo","do","vr","za","zo"],daysMin:["zo","ma","di","wo","do","vr","za","zo"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthsShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],today:"Vandaag",clear:"Wissen",weekStart:1,format:"dd-mm-yyyy"}}(jQuery); +!function(a){a.fn.datepicker.dates.fr={days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],daysShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam.","dim."],daysMin:["d","l","ma","me","j","v","s","d"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthsShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}(jQuery); +!function(a){a.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}(jQuery); +!function(a){a.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}(jQuery); +!function(a){a.fn.datepicker.dates.no={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I dag",clear:"Nullstill",weekStart:1,format:"dd.mm.yyyy"}}(jQuery); +!function(a){a.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy",clear:"Borrar",weekStart:1,format:"dd/mm/yyyy"}}(jQuery); +!function(a){a.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Idag",format:"yyyy-mm-dd",weekStart:1,clear:"Rensa"}}(jQuery); /*! * typeahead.js 0.9.3 * https://github.com/twitter/typeahead @@ -31543,33 +29879,51 @@ var isIE = /*@cc_on!@*/false || !!document.documentMode; // At least IE6 var invoiceOld; +var refreshTimer; function generatePDF(invoice, javascript, force, cb) { + if (!invoice || !javascript) { + return; + } + console.log('== generatePDF - force: %s', force); + if (force || !invoiceOld) { + refreshTimer = null; + } else { + if (refreshTimer) { + clearTimeout(refreshTimer); + } + refreshTimer = setTimeout(function() { + generatePDF(invoice, javascript, true, cb); + }, 500); + return; + } + invoice = calculateAmounts(invoice); - var a = copyInvoice(invoice); - var b = copyInvoice(invoiceOld); + var a = copyObject(invoice); + var b = copyObject(invoiceOld); if (!force && _.isEqual(a, b)) { return; } - pdfmakeMarker = "//pdfmake"; invoiceOld = invoice; - report_id = invoice.invoice_design_id; + pdfmakeMarker = "{"; if(javascript.slice(0, pdfmakeMarker.length) === pdfmakeMarker) { doc = GetPdfMake(invoice, javascript, cb); - //doc.getDataUrl(cb); } else { doc = GetPdf(invoice, javascript); doc.getDataUrl = function(cb) { cb( this.output("datauristring")); }; } + + if (cb) { + doc.getDataUrl(cb); + } + return doc; } -function copyInvoice(orig) { +function copyObject(orig) { if (!orig) return false; - var copy = JSON.stringify(orig); - var copy = JSON.parse(copy); - return copy; + return JSON.parse(JSON.stringify(orig)); } @@ -32240,8 +30594,12 @@ function getInvoiceDetails(invoice) { {'due_date': invoice.due_date}, ]; + if (NINJA.parseFloat(invoice.balance) < NINJA.parseFloat(invoice.amount)) { + fields.push({'total': formatMoney(invoice.amount, invoice.client.currency_id)}); + } + if (NINJA.parseFloat(invoice.partial)) { - fields.push({'total': formatMoney(invoice.total_amount, invoice.client.currency_id)}); + fields.push({'balance': formatMoney(invoice.total_amount, invoice.client.currency_id)}); } fields.push({'balance_due': formatMoney(invoice.balance_amount, invoice.client.currency_id)}) @@ -32297,12 +30655,16 @@ function displaySubtotals(doc, layout, invoice, y, rightAlignTitleX) } var paid = invoice.amount - invoice.balance; + if (paid) { + data.push({'total': formatMoney(invoice.amount, invoice.client.currency_id)}); + } + if (invoice.account.hide_paid_to_date != '1' || paid) { data.push({'paid_to_date': formatMoney(paid, invoice.client.currency_id)}); } if (NINJA.parseFloat(invoice.partial) && invoice.total_amount != invoice.subtotal_amount) { - data.push({'total': formatMoney(invoice.total_amount, invoice.client.currency_id)}); + data.push({'balance': formatMoney(invoice.total_amount, invoice.client.currency_id)}); } var options = { @@ -32588,7 +30950,7 @@ function displayInvoiceItems(doc, invoice, layout) { } shownItem = true; - var numLines = doc.splitTextToSize(item.notes, 200).length + 2; + var numLines = Math.max(doc.splitTextToSize(item.notes, 200).length, doc.splitTextToSize(item.product_key, 60).length) + 2; //console.log('num lines %s', numLines); var y = tableTop + (line * layout.tableRowHeight) + (2 * layout.tablePadding); @@ -33102,75 +31464,79 @@ function twoDigits(value) { } return value; } + +function toSnakeCase(str) { + if (!str) return ''; + return str.replace(/([A-Z])/g, function($1){return "_"+$1.toLowerCase();}); +} + +function getDescendantProp(obj, desc) { + var arr = desc.split("."); + while(arr.length && (obj = obj[arr.shift()])); + return obj; +} var NINJA = NINJA || {}; -function GetPdfMake(invoice, javascript, callback) { - var account = invoice.account; - var baseDD = { - pageMargins: [40, 40, 40, 40], - styles: { - bold: { - bold: true - }, - cost: { - alignment: 'right' - }, - quantity: { - alignment: 'right' - }, - tax: { - alignment: 'right' - }, - lineTotal: { - alignment: 'right' - }, - right: { - alignment: 'right' - }, - subtotals: { - alignment: 'right' - }, - termsLabel: { - bold: true, - margin: [0, 10, 0, 4] - } - }, - footer: function(){ - f = [{ text:invoice.invoice_footer?processVariables(invoice.invoice_footer):"", margin: [40, 0]}] - if (!invoice.is_pro && logoImages.imageLogo1) { - f.push({ - image: logoImages.imageLogo1, - width: 150, - margin: [40,0] - }); - } - return f; - }, +NINJA.TEMPLATES = { + CLEAN: "1", + BOLD:"2", + MODERN: "3", + NORMAL:"4", + BUSINESS:"5", + CREATIVE:"6", + ELEGANT:"7", + HIPSTER:"8", + PLAYFUL:"9", + PHOTO:"10" +}; - }; +function GetPdfMake(invoice, javascript, callback) { - eval(javascript); - dd = $.extend(true, baseDD, dd); + javascript = NINJA.decodeJavascript(invoice, javascript); - /* - pdfMake.fonts = { - wqy: { - normal: 'wqy.ttf', - bold: 'wqy.ttf', - italics: 'wqy.ttf', - bolditalics: 'wqy.ttf' + function jsonCallBack(key, val) { + if ((val+'').indexOf('$firstAndLast') === 0) { + var parts = val.split(':'); + return function (i, node) { + return (i === 0 || i === node.table.body.length) ? parseFloat(parts[1]) : 0; + }; + } else if ((val+'').indexOf('$none') === 0) { + return function (i, node) { + return 0; + }; + } else if ((val+'').indexOf('$notFirst') === 0) { + var parts = val.split(':'); + return function (i, node) { + return i === 0 ? 0 : parseFloat(parts[1]); + }; + } else if ((val+'').indexOf('$amount') === 0) { + var parts = val.split(':'); + return function (i, node) { + return parseFloat(parts[1]); + }; + } else if ((val+'').indexOf('$primaryColor') === 0) { + var parts = val.split(':'); + return NINJA.primaryColor || parts[1]; + } else if ((val+'').indexOf('$secondaryColor') === 0) { + var parts = val.split(':'); + return NINJA.secondaryColor || parts[1]; } - }; - */ - + + return val; + } + + + //console.log(javascript); + var dd = JSON.parse(javascript, jsonCallBack); + + if (!invoice.is_pro && dd.hasOwnProperty('footer') && dd.footer.hasOwnProperty('columns')) { + dd.footer.columns.push({image: logoImages.imageLogo1, alignment: 'right', width: 130}) + } + + //console.log(JSON.stringify(dd)); + /* - pdfMake.fonts = { - NotoSansCJKsc: { - normal: 'NotoSansCJKsc-Regular.ttf', - bold: 'NotoSansCJKsc-Medium.ttf', - italics: 'NotoSansCJKsc-Italic.ttf', - bolditalics: 'NotoSansCJKsc-Italic.ttf' - }, + var fonts = { Roboto: { normal: 'Roboto-Regular.ttf', bold: 'Roboto-Medium.ttf', @@ -33187,30 +31553,123 @@ function GetPdfMake(invoice, javascript, callback) { return doc; } +NINJA.decodeJavascript = function(invoice, javascript) +{ + var account = invoice.account; + var blankImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII='; + + // search/replace variables + var json = { + 'accountName': account.name || ' ', + 'accountLogo': window.accountLogo || blankImage, + 'accountDetails': NINJA.accountDetails(invoice), + 'accountAddress': NINJA.accountAddress(invoice), + 'invoiceDetails': NINJA.invoiceDetails(invoice), + 'invoiceDetailsHeight': NINJA.invoiceDetails(invoice).length * 22, + 'invoiceLineItems': NINJA.invoiceLines(invoice), + 'invoiceLineItemColumns': NINJA.invoiceColumns(invoice), + 'clientDetails': NINJA.clientDetails(invoice), + 'notesAndTerms': NINJA.notesAndTerms(invoice), + 'subtotals': NINJA.subtotals(invoice), + 'subtotalsHeight': NINJA.subtotals(invoice).length * 22, + 'subtotalsWithoutBalance': NINJA.subtotals(invoice, true), + 'balanceDue': formatMoney(invoice.balance_amount, invoice.client.currency_id), + 'invoiceFooter': account.invoice_footer || ' ', + 'invoiceNumber': invoice.invoice_number || ' ', + 'entityType': invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice, + 'entityTypeUC': (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase(), + 'fontSize': NINJA.fontSize, + 'fontSizeLarger': NINJA.fontSize + 1, + 'fontSizeLargest': NINJA.fontSize + 2, + } + + for (var key in json) { + var regExp = new RegExp('"\\$'+key+'"', 'g'); + var val = JSON.stringify(json[key]); + javascript = javascript.replace(regExp, val); + } + + // search/replace labels + var regExp = new RegExp('"\\$\\\w*?Label(UC)?(:)?(\\\?)?"', 'g'); + var matches = javascript.match(regExp); + + if (matches) { + for (var i=0; i= 0) { + if (!label) console.log('match: ' + field); + label = label.toUpperCase(); + } + if (match.indexOf(':') >= 0) { + label = label + ':'; + } + } else { + label = ' '; + } + javascript = javascript.replace(match, '"'+label+'"'); + } + } + + // search/replace values + var regExp = new RegExp('"\\$\\\w*?Value"', 'g'); + var matches = javascript.match(regExp); + + if (matches) { + for (var i=0; i= 0 && value != ' ') { + value = moment(value, 'YYYY-MM-DD').format('MMM D YYYY'); + } + javascript = javascript.replace(match, '"'+value+'"'); + } + } + + return javascript; +} + NINJA.notesAndTerms = function(invoice) { - var text = []; + var data = []; + if (invoice.public_notes) { - text.push({text:processVariables(invoice.public_notes), style:'notes'}); + data.push({text:invoice.public_notes, style: ['notes']}); + data.push({text:' '}); } if (invoice.terms) { - text.push({text:invoiceLabels.terms, style:'termsLabel'}); - text.push({text:processVariables(invoice.terms), style:'terms'}); + data.push({text:invoiceLabels.terms, style: ['termsLabel']}); + data.push({text:invoice.terms, style: ['terms']}); } - return text; + return NINJA.prepareDataList(data, 'notesAndTerms'); +} + +NINJA.invoiceColumns = function(invoice) +{ + if (invoice.has_taxes) { + return ["15%", "*", "auto", "auto", "auto", "15%"]; + } else { + return ["15%", "*", "auto", "auto", "15%"] + } } NINJA.invoiceLines = function(invoice) { var grid = [ [ - {text: invoiceLabels.item, style: 'tableHeader'}, - {text: invoiceLabels.description, style: 'tableHeader'}, - {text: invoiceLabels.unit_cost, style: 'tableHeader'}, - {text: invoiceLabels.quantity, style: 'tableHeader'}, - {text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'}, - {text: invoiceLabels.line_total, style: 'tableHeader'} + {text: invoiceLabels.item, style: ['tableHeader', 'itemTableHeader']}, + {text: invoiceLabels.description, style: ['tableHeader', 'descriptionTableHeader']}, + {text: invoiceLabels.unit_cost, style: ['tableHeader', 'costTableHeader']}, + {text: invoiceLabels.quantity, style: ['tableHeader', 'qtyTableHeader']}, + {text: invoice.has_taxes ? invoiceLabels.tax : '', style: ['tableHeader', 'taxTableHeader']}, + {text: invoiceLabels.line_total, style: ['tableHeader', 'lineTotalTableHeader']} ] ]; @@ -33220,23 +31679,26 @@ NINJA.invoiceLines = function(invoice) { var hideQuantity = invoice.account.hide_quantity == '1'; for (var i = 0; i < invoice.invoice_items.length; i++) { + var row = []; var item = invoice.invoice_items[i]; var cost = formatMoney(item.cost, currencyId, true); var qty = NINJA.parseFloat(item.qty) ? roundToTwo(NINJA.parseFloat(item.qty)) + '' : ''; var notes = item.notes; var productKey = item.product_key; - var tax = ""; + var tax = ''; + if (item.tax && parseFloat(item.tax.rate)) { tax = parseFloat(item.tax.rate); } else if (item.tax_rate && parseFloat(item.tax_rate)) { tax = parseFloat(item.tax_rate); } - + // show at most one blank line if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) { continue; } + shownItem = true; // process date variables @@ -33254,140 +31716,165 @@ NINJA.invoiceLines = function(invoice) { } lineTotal = formatMoney(lineTotal, currencyId); - rowStyle = i%2===0?'odd':'even'; + rowStyle = (i % 2 == 0) ? 'odd' : 'even'; + + row.push({style:["productKey", rowStyle], text:productKey || ' '}); // product key can be blank when selecting from a datalist + row.push({style:["notes", rowStyle], text:notes || ' '}); + row.push({style:["cost", rowStyle], text:cost}); + row.push({style:["quantity", rowStyle], text:qty || ' '}); - row[0] = {style:["productKey", rowStyle], text:productKey}; - row[1] = {style:["notes", rowStyle], text:notes}; - row[2] = {style:["cost", rowStyle], text:cost}; - row[3] = {style:["quantity", rowStyle], text:qty}; - row[4] = {style:["tax", rowStyle], text:""+tax}; - row[5] = {style:["lineTotal", rowStyle], text:lineTotal}; + if (invoice.has_taxes) { + row.push({style:["tax", rowStyle], text: tax+'' || ''}); + } + + row.push({style:["lineTotal", rowStyle], text:lineTotal || ' '}); grid.push(row); } - return grid; + return NINJA.prepareDataTable(grid, 'invoiceItems'); } -NINJA.subtotals = function(invoice) +NINJA.subtotals = function(invoice, removeBalance) { if (!invoice) { return; } - var data = [ - [invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)], - ]; + var account = invoice.account; + var data = []; + data.push([{text: invoiceLabels.subtotal}, {text: formatMoney(invoice.subtotal_amount, invoice.client.currency_id)}]); - if(invoice.discount_amount != 0) { - data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]); + if (invoice.discount_amount != 0) { + data.push([{text: invoiceLabels.discount}, {text: formatMoney(invoice.discount_amount, invoice.client.currency_id)}]); } - + if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 == '1') { - data.push([invoiceLabels.custom_invoice_label1, formatMoney(invoice.custom_value1, invoice.client.currency_id)]); + data.push([{text: account.custom_invoice_label1}, {text: formatMoney(invoice.custom_value1, invoice.client.currency_id)}]); } if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 == '1') { - data.push([invoiceLabels.custom_invoice_label2, formatMoney(invoice.custom_value2, invoice.client.currency_id)]); + data.push([{text: account.custom_invoice_label2}, {text: formatMoney(invoice.custom_value2, invoice.client.currency_id)}]); } - if(invoice.tax && invoice.tax.name || invoice.tax_name) { - data.push([invoiceLabels.tax, formatMoney(invoice.tax_amount, invoice.client.currency_id)]); + if (invoice.tax && invoice.tax.name || invoice.tax_name) { + data.push([{text: invoiceLabels.tax}, {text: formatMoney(invoice.tax_amount, invoice.client.currency_id)}]); } - - if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') { - data.push([invoiceLabels.custom_invoice_label1, formatMoney(invoice.custom_value1, invoice.client.currency_id)]); + + if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') { + data.push([{text: account.custom_invoice_label1}, {text: formatMoney(invoice.custom_value1, invoice.client.currency_id)}]); } if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 != '1') { - data.push([invoiceLabels.custom_invoice_label2, formatMoney(invoice.custom_value2, invoice.client.currency_id)]); - } - - var paid = invoice.amount - invoice.balance; - if (invoice.account.hide_paid_to_date != '1' || paid) { - data.push([invoiceLabels.paid_to_date, formatMoney(paid, invoice.client.currency_id)]); - } - - data.push([{text:invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due, style:'balanceDueLabel'}, - {text:formatMoney(invoice.balance_amount, invoice.client.currency_id), style:'balanceDueValue'}]); - return data; -} - -NINJA.accountDetails = function(account) { - var data = []; - if(account.name) data.push({text:account.name, style:'accountName'}); - if(account.id_number) data.push({text:account.id_number, style:'accountDetails'}); - if(account.vat_number) data.push({text:account.vat_number, style:'accountDetails'}); - if(account.work_email) data.push({text:account.work_email, style:'accountDetails'}); - if(account.work_phone) data.push({text:account.work_phone, style:'accountDetails'}); - return data; -} - -NINJA.accountAddress = function(account) { - var address = ''; - if (account.city || account.state || account.postal_code) { - address = ((account.city ? account.city + ', ' : '') + account.state + ' ' + account.postal_code).trim(); + data.push([{text: account.custom_invoice_label2}, {text: formatMoney(invoice.custom_value2, invoice.client.currency_id)}]); } - var data = []; - if(account.address1) data.push({text:account.address1, style:'accountDetails'}); - if(account.address2) data.push({text:account.address2, style:'accountDetails'}); - if(address) data.push({text:address, style:'accountDetails'}); - if(account.country) data.push({text:account.country.name, style: 'accountDetails'}); - if(account.custom_label1 && account.custom_value1) data.push({text:account.custom_label1 +' '+ account.custom_value1, style: 'accountDetails'}); - if(account.custom_label2 && account.custom_value2) data.push({text:account.custom_label2 +' '+ account.custom_value2, style: 'accountDetails'}); - return data; + + var paid = invoice.amount - invoice.balance; + if (invoice.account.hide_paid_to_date != '1' || paid) { + data.push([{text:invoiceLabels.paid_to_date}, {text:formatMoney(paid, invoice.client.currency_id)}]); + } + + if (!removeBalance) { + data.push([ + {text:invoice.is_quote ? invoiceLabels.balance_due : invoiceLabels.balance_due, style:['balanceDueLabel']}, + {text:formatMoney(invoice.balance_amount, invoice.client.currency_id), style:['balanceDue']} + ]); + } + + return NINJA.prepareDataPairs(data, 'subtotals'); +} + +NINJA.accountDetails = function(invoice) { + var account = invoice.account; + var data = [ + {text:account.name, style: ['accountName']}, + {text:account.id_number}, + {text:account.vat_number}, + {text:account.work_email}, + {text:account.work_phone} + ]; + return NINJA.prepareDataList(data, 'accountDetails'); +} + +NINJA.accountAddress = function(invoice) { + var account = invoice.account; + var cityStatePostal = ''; + if (account.city || account.state || account.postal_code) { + cityStatePostal = ((account.city ? account.city + ', ' : '') + account.state + ' ' + account.postal_code).trim(); + } + + var data = [ + {text: account.address1}, + {text: account.address2}, + {text: cityStatePostal}, + {text: account.country ? account.country.name : ''} + ]; + + return NINJA.prepareDataList(data, 'accountAddress'); } NINJA.invoiceDetails = function(invoice) { + var data = [ [ - invoice.is_quote ? invoiceLabels.quote_number : invoiceLabels.invoice_number, - {style: 'bold', text: invoice.invoice_number}, + {text: (invoice.is_quote ? invoiceLabels.quote_number : invoiceLabels.invoice_number), style: ['invoiceNumberLabel']}, + {text: invoice.invoice_number, style: ['invoiceNumber']} ], [ - invoice.is_quote ? invoiceLabels.quote_date : invoiceLabels.invoice_date, - invoice.invoice_date, + {text: invoiceLabels.po_number}, + {text: invoice.po_number} ], [ - invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due, - formatMoney(invoice.balance_amount, invoice.client.currency_id), + {text: invoiceLabels.invoice_date}, + {text: invoice.invoice_date} ], + [ + {text: invoiceLabels.due_date}, + {text: invoice.due_date} + ] ]; - return data; + if (NINJA.parseFloat(invoice.balance) < NINJA.parseFloat(invoice.amount)) { + data.push([ + {text: invoiceLabels.total}, + {text: formatMoney(invoice.amount, invoice.client.currency_id)} + ]); + } + + if (NINJA.parseFloat(invoice.partial)) { + data.push([ + {text: invoiceLabels.balance}, + {text: formatMoney(invoice.total_amount, invoice.client.currency_id)} + ]); + } + + data.push([ + {text: invoiceLabels.balance_due, style: ['invoiceDetailBalanceDueLabel']}, + {text: formatMoney(invoice.balance_amount, invoice.client.currency_id), style: ['invoiceDetailBalanceDue']} + ]) + + return NINJA.prepareDataPairs(data, 'invoiceDetails'); } -NINJA.clientDetails = function(invoice) { +NINJA.clientDetails = function(invoice) { var client = invoice.client; + var data; if (!client) { return; } + var contact = client.contacts[0]; + var clientName = client.name || (contact.first_name || contact.last_name ? (contact.first_name + ' ' + contact.last_name) : contact.email); + var clientEmail = client.contacts[0].email == clientName ? '' : client.contacts[0].email; - var fields = [ - getClientDisplayName(client), - client.id_number, - client.vat_number, - concatStrings(client.address1, client.address2), - concatStrings(client.city, client.state, client.postal_code), - client.country ? client.country.name : false, - invoice.contact && getClientDisplayName(client) != invoice.contact.email ? invoice.contact.email : false, - invoice.client.custom_value1 ? invoice.account['custom_client_label1'] + ' ' + invoice.client.custom_value1 : false, - invoice.client.custom_value2 ? invoice.account['custom_client_label2'] + ' ' + invoice.client.custom_value2 : false, + data = [ + {text:clientName || ' ', style: ['clientName']}, + {text:client.address1}, + {text:concatStrings(client.city, client.state, client.postal_code)}, + {text:client.country ? client.country.name : ''}, + {text:clientEmail} ]; - var data = []; - for (var i=0; i + * @version 4.2.1 + * @date 2015-06-13 + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){function n(e,t,i){if(!(this instanceof n))throw new Error('JSONEditor constructor called without "new".');var o=s.getInternetExplorerVersion();if(-1!=o&&9>o)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,i)}var o=i(1),r=i(2),s=i(3);n.modes={},n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var n=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){return this.json},n.prototype.setText=function(e){this.json=s.parse(e)},n.prototype.getText=function(){return JSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){return this.options&&this.options.name},n.prototype.setMode=function(e){var t,i,o=this.container,r=s.extend({},this.options);r.mode=e;var a=n.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{var l="text"==a.data;if(i=this.getName(),t=this[l?"getText":"get"](),this._delete(),s.clear(this),s.extend(this,a.mixin),this.create(o,r),this.setName(i),this[l?"setText":"set"](t),"function"==typeof a.load)try{a.load.call(this)}catch(c){}}catch(c){this._onError(c)}},n.prototype._onError=function(e){if("function"==typeof this.onError&&(s.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},n.registerMode=function(e){var t,i;if(s.isArray(e))for(t=0;te&&i.scrollTop>0?this.autoScrollStep=(n+s-e)/3:e>r-s&&o+i.scrollTop3?(i.scrollTop+=o/3,n.animateCallback=t,n.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=s,delete n.animateTimeout,delete n.animateCallback)};a()}else t&&t(!1)},c._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,l.addEventListener(this.frame,"focus",e,!0),l.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var i=document.createElement("button");i.className="expand-all",i.title="Expand all fields",i.onclick=function(){t.expandAll()},this.menu.appendChild(i);var n=document.createElement("button");if(n.title="Collapse all fields",n.className="collapse-all",n.onclick=function(){t.collapseAll()},this.menu.appendChild(n),this.history){var o=document.createElement("button");o.className="undo separator",o.title="Undo last action (Ctrl+Z)",o.onclick=function(){t._onUndo()},this.menu.appendChild(o),this.dom.undo=o;var s=document.createElement("button");s.className="redo",s.title="Redo (Ctrl+Shift+Z)",s.onclick=function(){t._onRedo()},this.menu.appendChild(s),this.dom.redo=s,this.history.onChange=function(){o.disabled=!t.history.canUndo(),s.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var c=a.create(this,this.options.modes,this.options.mode);this.menu.appendChild(c),this.dom.modeBox=c}this.options.search&&(this.searchBox=new r(this,this.menu))},c._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},c._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},c._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(u=t);var i=s.getNodeFromTarget(t);i&&i.onEvent(e)},c._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,n=e.shiftKey,o=!1;if(9==t&&setTimeout(function(){l.selectContentEditable(u)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),o=!0;else if(114==t||i&&71==t){var r=!0;n?this.searchBox.previous(r):this.searchBox.next(r),o=!0}this.history&&(i&&!n&&90==t?(this._onUndo(),o=!0):i&&n&&90==t&&(this._onRedo(),o=!0)),o&&(e.preventDefault(),e.stopPropagation())},c._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},e.exports=[{mode:"tree",mixin:c,data:"json"},{mode:"view",mixin:c,data:"json"},{mode:"form",mixin:c,data:"json"}]},function(e,t,i){var n;try{n=i(9)}catch(o){}var r=i(8),s=i(3),a={};a.create=function(e,t){t=t||{},this.options=t,t.indentation?this.indentation=Number(t.indentation):this.indentation=2;var i=t.ace?t.ace:n;this.mode="code"==t.mode?"code":"text","code"==this.mode&&"undefined"==typeof i&&(this.mode="text",s.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor")),this.theme=t.theme||"ace/theme/jsoneditor";var o=this;this.container=e,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){o._onKeyDown(e)},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var a=document.createElement("button");a.className="format",a.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(a),a.onclick=function(){try{o.format()}catch(e){o._onError(e)}};var l=document.createElement("button");if(l.className="compact",l.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(l),l.onclick=function(){try{o.compact()}catch(e){o._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var c=r.create(this,this.options.modes,this.options.mode);this.menu.appendChild(c),this.dom.modeBox=c}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var h=i.edit(this.editorDom);h.setTheme(this.theme),h.setShowPrintMargin(!1),h.setFontSize(13),h.getSession().setMode("ace/mode/json"),h.getSession().setTabSize(this.indentation),h.getSession().setUseSoftTabs(!0),h.getSession().setUseWrapMode(!0),this.editor=h;var u=document.createElement("a");u.appendChild(document.createTextNode("powered by ace")),u.href="http://ace.ajax.org",u.target="_blank",u.className="poweredBy",u.onclick=function(){window.open(u.href,u.target)},this.menu.appendChild(u),t.change&&h.on("change",function(){t.change()})}else{var d=document.createElement("textarea");d.className="text",d.spellcheck=!1,this.content.appendChild(d),this.textarea=d,t.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){t.change()}:this.textarea.onchange=function(){t.change()})}},a._onKeyDown=function(e){var t=e.which||e.keyCode,i=!1;220==t&&e.ctrlKey&&(e.shiftKey?this.compact():this.format(),i=!0),i&&(e.preventDefault(),e.stopPropagation())},a._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},a._onError=function(e){if("function"==typeof this.onError&&(s.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},a.compact=function(){var e=this.get(),t=JSON.stringify(e);this.setText(t)},a.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this.setText(t)},a.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},a.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},a.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},a.get=function(){var e,t=this.getText();try{e=s.parse(t)}catch(i){t=s.sanitize(t),e=s.parse(t)}return e},a.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},a.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},e.exports=[{mode:"text",mixin:a,data:"text",load:a.format},{mode:"code",mixin:a,data:"text",load:a.format}]},function(e,t,i){var n=i(12);t.parse=function(e){try{return JSON.parse(e)}catch(i){throw t.validate(e),i}},t.sanitize=function(e){function t(){return e.charAt(c)}function i(){return e.charAt(c+1)}function n(){return e.charAt(c-1)}function o(){for(var t=c-1;t>=0;){var i=e.charAt(t);if("{"===i)return!0;if(" "!==i&&"\n"!==i&&"\r"!==i)return!1;t--}return!1}function r(){for(c+=2;cn;n++){var r=i[n];r.style&&r.removeAttribute("style");var s=r.attributes;if(s)for(var a=s.length-1;a>=0;a--){var l=s[a];l.specified===!0&&r.removeAttribute(l.name)}t.stripFormatting(r)}},t.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},t.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},t.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},t.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},t.getSelectionOffset=function(){var e=t.getSelection();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer==e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null},t.setSelectionOffset=function(e){if(document.createRange&&window.getSelection){var i=window.getSelection();if(i){var n=document.createRange();n.setStart(e.container.firstChild,e.startOffset),n.setEnd(e.container.firstChild,e.endOffset),t.setSelection(n)}}},t.getInnerText=function(e,i){var n=void 0==i;if(n&&(i={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),e.nodeValue)return i.flush()+e.nodeValue;if(e.hasChildNodes()){for(var o=e.childNodes,r="",s=0,a=o.length;a>s;s++){var l=o[s];if("DIV"==l.nodeName||"P"==l.nodeName){var c=o[s-1],h=c?c.nodeName:void 0;h&&"DIV"!=h&&"P"!=h&&"BR"!=h&&(r+="\n",i.flush()),r+=t.getInnerText(l,i),i.set("\n")}else"BR"==l.nodeName?(r+=i.flush(),i.set("\n")):r+=t.getInnerText(l,i)}return r}return"P"==e.nodeName&&-1!=t.getInternetExplorerVersion()?i.flush():""},t.getInternetExplorerVersion=function(){if(-1==r){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,i=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=i.exec(t)&&(e=parseFloat(RegExp.$1))}r=e}return r},t.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var r=-1;t.addEventListener=function(e,i,n,o){if(e.addEventListener)return void 0===o&&(o=!1),"mousewheel"===i&&t.isFirefox()&&(i="DOMMouseScroll"),e.addEventListener(i,n,o),n;if(e.attachEvent){var r=function(){return n.call(e,window.event)};return e.attachEvent("on"+i,r),r}},t.removeEventListener=function(e,i,n,o){e.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===i&&t.isFirefox()&&(i="DOMMouseScroll"),e.removeEventListener(i,n,o)):e.detachEvent&&e.detachEvent("on"+i,n)}},function(e,t,i){function n(){this.locked=!1}n.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},n.prototype.unhighlight=function(){if(!this.locked){var e=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},n.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},n.prototype.lock=function(){this.locked=!0},n.prototype.unlock=function(){this.locked=!1},e.exports=n},function(e,t,i){function n(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},appendNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.appendChild(e.node)}},insertBeforeNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertBefore(e.node,e.beforeNode)}},insertAfterNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertAfter(e.node,e.afterNode)}},removeNode:{undo:function(e){var t=e.parent,i=t.childs[e.index]||t.append;t.insertBefore(e.node,i)},redo:function(e){e.parent.removeChild(e.node)}},duplicateNode:{undo:function(e){e.parent.removeChild(e.clone)},redo:function(e){e.parent.insertAfter(e.clone,e.node)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},moveNode:{undo:function(e){e.startParent.moveTo(e.node,e.startIndex)},redo:function(e){e.endParent.moveTo(e.node,e.endIndex)}},sort:{undo:function(e){var t=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){var t=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}var o=i(3);n.prototype.onChange=function(){},n.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index=0},n.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},n.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},n.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,n=this.activeResult.elem;"field"==n?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var o=this.results[this.resultIndex].node,r=this.results[this.resultIndex].elem;"field"==r?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(r)})},n.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},n.prototype._onDelayedSearch=function(e){this._clearDelay();var t=this;this.timeout=setTimeout(function(e){t._onSearch(e)},this.delay)},n.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,n=i.length>0?i:void 0;if(n!=this.lastText||t)if(this.lastText=n,this.results=this.editor.search(n),this._setActiveResult(void 0),void 0!=n){var o=this.results.length;switch(o){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=o+" results"}}else this.dom.results.innerHTML=""},n.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},n.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e.exports=n},function(e,t,i){function n(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null))}var o=i(10),r=i(11),s=i(3);n.prototype._updateEditability=function(){if(this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"===this.editor.options.mode&&"function"==typeof this.editor.options.editable)){var e=this.editor.options.editable({field:this.field,value:this.value,path:this.path()});"boolean"==typeof e?(this.editable.field=e,this.editable.value=e):("boolean"==typeof e.field&&(this.editable.field=e.field),"boolean"==typeof e.value&&(this.editable.value=e.value))}},n.prototype.path=function(){for(var e=this,t=[];e;){var i=void 0!=e.field?e.field:e.index;void 0!==i&&t.unshift(i),e=e.parent}return t},n.prototype.setParent=function(e){this.parent=e},n.prototype.setField=function(e,t){this.field=e,this.fieldEditable=t===!0},n.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},n.prototype.setValue=function(e,t){var i,o,r=this.childs;if(r)for(;r.length;)this.removeChild(r[0]);if(this.type=this._getType(e),t&&t!=this.type){if("string"!=t||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"==this.type){this.childs=[];for(var s=0,a=e.length;a>s;s++)i=e[s],void 0===i||i instanceof Function||(o=new n(this.editor,{value:i}),this.appendChild(o));this.value=""}else if("object"==this.type){this.childs=[];for(var l in e)e.hasOwnProperty(l)&&(i=e[l],void 0===i||i instanceof Function||(o=new n(this.editor,{field:l,value:i}),this.appendChild(o)));this.value=""}else this.childs=void 0,this.value=e},n.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},n.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},n.prototype.clone=function(){var e=new n(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var n=i.clone();n.setParent(e),t.push(n)}),e.childs=t}else e.childs=void 0;return e},n.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),e!==!1&&this.childs.forEach(function(t){t.expand(e)}))},n.prototype.collapse=function(e){this.childs&&(this.hideChilds(),e!==!1&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},n.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var n=this.getAppend(),o=t.nextSibling;o?i.insertBefore(n,o):i.appendChild(n),this.childs.forEach(function(e){i.insertBefore(e.getDom(),n),e.showChilds()})}}},n.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},n.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},n.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),n=i?i.parentNode:void 0;i&&n&&n.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var n=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),t instanceof a?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},n.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var n=this.childs[t]||this.append;this.moveBefore(e,n)},n.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var n=e.getDom(),o=t.getDom(),r=o?o.parentNode:void 0;o&&r&&r.insertBefore(n,o),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},n.prototype.search=function(e){var t,i=[],n=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var o=String(this.field).toLowerCase();t=o.indexOf(n),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var r=[];this.childs.forEach(function(t){r=r.concat(t.search(e))}),i=i.concat(r)}if(void 0!=n){var s=!1;0==r.length?this.collapse(s):this.expand(s)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(n),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},n.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},n.focusElement=void 0,n.prototype.focus=function(e){if(n.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),s.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),s.selectContentEditable(t.value)):t.menu.focus(); +break;case"field":t.field&&this.fieldEditable?(t.field.focus(),s.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),s.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),s.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),s.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},n.select=function(e){setTimeout(function(){s.selectContentEditable(e)},0)},n.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},n.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},n.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,n=t.length;n>i;i++)if(t[i].containsNode(e))return!0;return!1},n.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},n.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return this.updateDom({updateIndexes:!0}),i}}return void 0},n.prototype._remove=function(e){this.removeChild(e)},n.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,n=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var o=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0==e.field&&(e.field="")}),("string"==t||"auto"==t)&&(this.expanded=!0)):"array"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),("string"==t||"auto"==t)&&(this.expanded=!0)):this.expanded=!1,n&&(o?n.insertBefore(this.getDom(),o):n.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&("string"==e?this.value=String(this.value):this.value=this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},n.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=s.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var i=this._unescapeHTML(this.valueInnerText);t=this._stringCast(i)}if(t!==this.value){var n=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(o){if(this.value=void 0,e!==!0)throw o}},n.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,i="auto"==this.type?s.type(t):this.type,n="string"==i&&s.isUrl(t),o="";o=n&&!this.editable.value?"":"string"==i?"green":"number"==i?"red":"boolean"==i?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=o;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?s.addClassName(e,"empty"):s.removeClassName(e,"empty"),n?s.addClassName(e,"url"):s.removeClassName(e,"url"),"array"==i||"object"==i){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==i&&s.isUrl(t)?this.editable.value&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?s.addClassName(e,"highlight-active"):s.removeClassName(e,"highlight-active"),this.searchValue?s.addClassName(e,"highlight"):s.removeClassName(e,"highlight"),s.stripFormatting(e)}},n.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?s.addClassName(e,"empty"):s.removeClassName(e,"empty"),this.searchFieldActive?s.addClassName(e,"highlight-active"):s.removeClassName(e,"highlight-active"),this.searchField?s.addClassName(e,"highlight"):s.removeClassName(e,"highlight"),s.stripFormatting(e)}},n.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=s.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var i=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:i,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(n){if(this.field=void 0,e!==!0)throw n}},n.prototype.clearDom=function(){this.dom={}},n.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(this._updateEditability(),e.tr=document.createElement("tr"),e.tr.node=this,"tree"===this.editor.options.mode){var t=document.createElement("td");if(this.editable.field&&this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var n=document.createElement("td"),o=document.createElement("button");e.menu=o,o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",n.appendChild(e.menu),e.tr.appendChild(n)}var r=document.createElement("td");return e.tr.appendChild(r),e.tree=this._createDomTree(),r.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},n.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=s.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=s.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},n.prototype._onDrag=function(e){var t,i,o,r,l,c,h,u,d,g,f,p,m,v,A=e.pageY,w=e.pageX,C=!1;if(t=this.dom.tr,d=s.getAbsoluteTop(t),p=t.offsetHeight,d>A){i=t;do i=i.previousSibling,h=n.getNodeFromTarget(i),g=i?s.getAbsoluteTop(i):0;while(i&&g>A);h&&!h.parent&&(h=void 0),h||(c=t.parentNode.firstChild,i=c?c.nextSibling:void 0,h=n.getNodeFromTarget(i),h==this&&(h=void 0)),h&&(i=h.dom.tr,g=i?s.getAbsoluteTop(i):0,A>g+p&&(h=void 0)),h&&(h.parent.moveBefore(this,h),C=!0)}else if(l=this.expanded&&this.append?this.append.getDom():this.dom.tr,r=l?l.nextSibling:void 0){f=s.getAbsoluteTop(r),o=r;do u=n.getNodeFromTarget(o),o&&(m=o.nextSibling?s.getAbsoluteTop(o.nextSibling):0,v=o?m-f:0,1==u.parent.childs.length&&u.parent.childs[0]==this&&(d+=23)),o=o.nextSibling;while(o&&A>d+v);if(u&&u.parent){var E=w-this.drag.mouseX,F=Math.round(E/24/2),y=this.drag.level+F,b=u.getLevel();for(i=u.dom.tr.previousSibling;y>b&&i;){if(h=n.getNodeFromTarget(i),h==this||h._isChildOf(this));else{if(!(h instanceof a))break;var x=h.parent.childs;if(!(x.length>1||1==x.length&&x[0]!=this))break;u=n.getNodeFromTarget(i),b=u.getLevel()}i=i.previousSibling}l.nextSibling!=u.dom.tr&&(u.parent.moveBefore(this,u),C=!0)}}C&&(this.drag.mouseX=w,this.drag.level=this.getLevel()),this.editor.startAutoScroll(A),e.preventDefault()},n.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(s.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(s.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},n.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},n.prototype._createDomField=function(){return document.createElement("div")},n.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},n.prototype.updateValue=function(e){this.value=e,this.updateDom()},n.prototype.updateField=function(e){this.field=e,this.updateDom()},n.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){this.fieldEditable?(i.contentEditable=this.editable.field,i.spellcheck=!1,i.className="field"):i.className="readonly";var n;n=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(n)}var o=this.dom.value;if(o){var r=this.childs?this.childs.length:0;"array"==this.type?o.innerHTML="["+r+"]":"object"==this.type?o.innerHTML="{"+r+"}":o.innerHTML=this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&e.updateIndexes===!0&&this._updateDomIndexes(),e&&e.recurse===!0&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editable.value&&s.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=this.editable.value,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},n.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var n=document.createElement("tr");i.appendChild(n);var o=document.createElement("td");o.className="tree",n.appendChild(o),e.expand=this._createDomExpandButton(),o.appendChild(e.expand),e.tdExpand=o;var r=document.createElement("td");r.className="tree",n.appendChild(r),e.field=this._createDomField(),r.appendChild(e.field),e.tdField=r;var s=document.createElement("td");s.className="tree",n.appendChild(s),"object"!=this.type&&"array"!=this.type&&(s.appendChild(document.createTextNode(":")),s.className="separator"),e.tdSeparator=s;var a=document.createElement("td");return a.className="tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},n.prototype.onEvent=function(e){var t,i=e.type,n=e.target||e.srcElement,o=this.dom,r=this,a=this._hasChilds();if((n==o.drag||n==o.menu)&&("mouseover"==i?this.editor.highlighter.highlight(this):"mouseout"==i&&this.editor.highlighter.unhighlight()),"mousedown"==i&&n==o.drag&&this._onDragStart(e),"click"==i&&n==o.menu){var l=r.editor.highlighter;l.highlight(r),l.lock(),s.addClassName(o.menu,"selected"),this.showContextMenu(o.menu,function(){s.removeClassName(o.menu,"selected"),l.unlock(),l.unhighlight()})}if("click"==i&&n==o.expand&&a){var c=e.ctrlKey;this._onExpand(c)}var h=o.value;if(n==h)switch(i){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(h.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":(e.ctrlKey||!this.editable.value)&&s.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var u=o.field;if(n==u)switch(i){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(u.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var d=o.tree;if(n==d.parentNode)switch(i){case"click":var g=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXn[i]?t:e[i]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},n.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',i=s.parse(t);return i.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},n.prototype._escapeJSON=function(e){for(var t="",i=0,n=e.length;n>i;){var o=e.charAt(i);"\n"==o?t+="\\n":"\\"==o?(t+=o,i++,o=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(o)&&(t+="\\"),t+=o):t+='"'==o?'\\"':o,i++}return t};var a=r(n);e.exports=n},function(e,t,i){function n(e,t,i){function n(t){e.setMode(t);var i=e.dom&&e.dom.modeBox;i&&i.focus()}for(var r={code:{text:"Code",title:"Switch to code highlighter",click:function(){n("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){n("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){n("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){n("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){n("view")}}},s=[],a=0;a',a.appendChild(u),o.submenuTitle&&(u.title=o.submenuTitle),h=u}else{var d=document.createElement("div");d.className="expand",l.appendChild(d),h=l}h.onclick=function(){n._onExpandItem(s),h.focus()};var g=[];s.subItems=g;var f=document.createElement("ul");s.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,g,o.submenu)}else l.innerHTML='
    '+o.text;t.push(s)}})}this.dom={};var n=this,o=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var r=document.createElement("div");r.className="jsoneditor-contextmenu",o.menu=r;var s=document.createElement("ul");s.className="menu",r.appendChild(s),o.list=s,o.items=[];var a=document.createElement("button");o.focusButton=a;var l=document.createElement("li");l.style.overflow="hidden",l.style.height="0",l.appendChild(a),s.appendChild(l),i(s,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));n.maxHeight=Math.max(n.maxHeight,i)})}var o=i(3);n.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},n.visibleMenu=void 0,n.prototype.show=function(e){this.hide();var t=window.innerHeight,i=window.pageYOffset||document.scrollTop||0,r=t+i,s=e.offsetHeight,a=this.maxHeight,l=o.getAbsoluteLeft(e),c=o.getAbsoluteTop(e);r>c+s+a?(this.dom.menu.style.left=l+"px",this.dom.menu.style.top=c+s+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=l+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=t-c+"px"),document.body.appendChild(this.dom.menu);var h=this,u=this.dom.list;this.eventListeners.mousedown=o.addEventListener(document,"mousedown",function(e){var t=e.target;t==u||h._isChildOf(t,u)||(h.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=o.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=o.addEventListener(document,"keydown",function(e){h._onKeyDown(e)}),this.selection=o.getSelection(),this.anchor=e,setTimeout(function(){h.dom.focusButton.focus()},0),n.visibleMenu&&n.visibleMenu.hide(),n.visibleMenu=this},n.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var e in this.eventListeners)if(this.eventListeners.hasOwnProperty(e)){var t=this.eventListeners[e];t&&o.removeEventListener(document,e,t),delete this.eventListeners[e]}n.visibleMenu==this&&(n.visibleMenu=void 0)},n.prototype._onExpandItem=function(e){var t=this,i=e==this.expandedItem,n=this.expandedItem;if(n&&(n.ul.style.height="0",n.ul.style.padding="",setTimeout(function(){t.expandedItem!=n&&(n.ul.style.display="",o.removeClassName(n.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!i){var r=e.ul;r.style.display="block";r.clientHeight;setTimeout(function(){t.expandedItem==e&&(r.style.height=24*r.childNodes.length+"px",r.style.padding="5px 10px")},0),o.addClassName(r.parentNode,"selected"),this.expandedItem=e}},n.prototype._onKeyDown=function(e){var t,i,n,r,s=e.target,a=e.which,l=!1;27==a?(this.selection&&o.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):9==a?e.shiftKey?(t=this._getVisibleButtons(),i=t.indexOf(s),0==i&&(t[t.length-1].focus(),l=!0)):(t=this._getVisibleButtons(),i=t.indexOf(s),i==t.length-1&&(t[0].focus(),l=!0)):37==a?("expand"==s.className&&(t=this._getVisibleButtons(),i=t.indexOf(s),n=t[i-1],n&&n.focus()),l=!0):38==a?(t=this._getVisibleButtons(),i=t.indexOf(s),n=t[i-1],n&&"expand"==n.className&&(n=t[i-2]),n||(n=t[t.length-1]),n&&n.focus(),l=!0):39==a?(t=this._getVisibleButtons(),i=t.indexOf(s),r=t[i+1],r&&"expand"==r.className&&r.focus(),l=!0):40==a&&(t=this._getVisibleButtons(),i=t.indexOf(s),r=t[i+1],r&&"expand"==r.className&&(r=t[i+2]),r||(r=t[0]),r&&(r.focus(),l=!0),l=!0),l&&(e.stopPropagation(),e.preventDefault())},n.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},e.exports=n},function(e,t,i){function n(e){function t(e){this.editor=e,this.dom={}}return t.prototype=new e,t.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;this._updateEditability();var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editable.field){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var n=document.createElement("button");n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}var o=document.createElement("td"),r=document.createElement("div");return r.innerHTML="(empty)",r.className="readonly",o.appendChild(r),e.td=o,e.text=r,this.updateDom(),t},t.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var n=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},t.prototype.isVisible=function(){return 0==this.parent.childs.length},t.prototype.showContextMenu=function(t,i){var n=this,o=e.TYPE_TITLES,s=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){n._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:o.auto,click:function(){n._onAppend("","","auto")}},{text:"Array",className:"type-array",title:o.array,click:function(){n._onAppend("",[])}},{text:"Object",className:"type-object",title:o.object,click:function(){n._onAppend("",{})}},{text:"String",className:"type-string",title:o.string,click:function(){n._onAppend("","","string")}}]}],a=new r(s,{close:i});a.show(t)},t.prototype.onEvent=function(e){var t=e.type,i=e.target||e.srcElement,n=this.dom,r=n.menu;if(i==r&&("mouseover"==t?this.editor.highlighter.highlight(this.parent):"mouseout"==t&&this.editor.highlighter.unhighlight()), +"click"==t&&i==n.menu){var s=this.editor.highlighter;s.highlight(this.parent),s.lock(),o.addClassName(n.menu,"selected"),this.showContextMenu(n.menu,function(){o.removeClassName(n.menu,"selected"),s.unlock(),s.unhighlight()})}"keydown"==t&&this.onKeyDown(e)},t}var o=i(3),r=i(10);e.exports=n},function(e,t,i){var n=function(){var e={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,i,n,o,r,s){var a=r.length-1;switch(o){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g," ").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=r[a-1];case 13:this.$={};break;case 14:this.$=r[a-1];break;case 15:this.$=[r[a-2],r[a]];break;case 16:this.$={},this.$[r[a][0]]=r[a][1];break;case 17:this.$=r[a-2],r[a-2][r[a][0]]=r[a][1];break;case 18:this.$=[];break;case 19:this.$=r[a-1];break;case 20:this.$=[r[a]];break;case 21:this.$=r[a-2],r[a-2].push(r[a])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){function t(e){o.length=o.length-2*e,r.length=r.length-e,s.length=s.length-e}function i(){var e;return e=n.lexer.lex()||1,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,o=[0],r=[null],s=[],a=this.table,l="",c=0,h=0,u=0,d=2,g=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var f=this.lexer.yylloc;s.push(f),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,m,v,A,w,C,E,F,y,b={};;){if(v=o[o.length-1],this.defaultActions[v]?A=this.defaultActions[v]:(null==p&&(p=i()),A=a[v]&&a[v][p]),"undefined"==typeof A||!A.length||!A[0]){if(!u){y=[];for(C in a[v])this.terminals_[C]&&C>2&&y.push("'"+this.terminals_[C]+"'");var x="";x=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:f,expected:y})}if(3==u){if(p==g)throw new Error(x||"Parsing halted.");h=this.lexer.yyleng,l=this.lexer.yytext,c=this.lexer.yylineno,f=this.lexer.yylloc,p=i()}for(;;){if(d.toString()in a[v])break;if(0==v)throw new Error(x||"Parsing halted.");t(1),v=o[o.length-1]}m=p,p=d,v=o[o.length-1],A=a[v]&&a[v][d],u=3}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+p);switch(A[0]){case 1:o.push(p),r.push(this.lexer.yytext),s.push(this.lexer.yylloc),o.push(A[1]),p=null,m?(p=m,m=null):(h=this.lexer.yyleng,l=this.lexer.yytext,c=this.lexer.yylineno,f=this.lexer.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[A[1]][1],b.$=r[r.length-E],b._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},w=this.performAction.call(b,l,h,c,this.yy,A[1],r,s),"undefined"!=typeof w)return w;E&&(o=o.slice(0,-1*E*2),r=r.slice(0,-1*E),s=s.slice(0,-1*E)),o.push(this.productions_[A[1]][0]),r.push(b.$),s.push(b._$),F=a[o[o.length-2]][o[o.length-1]],o.push(F);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n,o;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;st[0].length)||(t=i,n=s,this.options.flex));s++);return t?(o=t[0].match(/\n.*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,r[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e?e:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return"undefined"!=typeof e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)}};return e.options={},e.performAction=function(e,t,i,n){switch(i){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},e.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],e.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},e}();return e.lexer=t,e}();t.parser=n,t.parse=n.parse.bind(n)},function(e,t,i){ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(e,t,i){t.isDark=!1,t.cssClass="ace-jsoneditor",t.cssText='.ace-jsoneditor .ace_gutter { background: #ebebeb; color: #333 } .ace-jsoneditor.ace_editor { font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif; line-height: 1.3; } .ace-jsoneditor .ace_print-margin { width: 1px; background: #e8e8e8 } .ace-jsoneditor .ace_scroller { background-color: #FFFFFF } .ace-jsoneditor .ace_text-layer { color: gray } .ace-jsoneditor .ace_variable { color: #1a1a1a } .ace-jsoneditor .ace_cursor { border-left: 2px solid #000000 } .ace-jsoneditor .ace_overwrite-cursors .ace_cursor { border-left: 0px; border-bottom: 1px solid #000000 } .ace-jsoneditor .ace_marker-layer .ace_selection { background: #D5DDF6 } .ace-jsoneditor.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px #FFFFFF; border-radius: 2px } .ace-jsoneditor .ace_marker-layer .ace_step { background: rgb(255, 255, 0) } .ace-jsoneditor .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF } .ace-jsoneditor .ace_marker-layer .ace_active-line { background: #FFFBD1 } .ace-jsoneditor .ace_gutter-active-line { background-color : #dcdcdc } .ace-jsoneditor .ace_marker-layer .ace_selected-word { border: 1px solid #D5DDF6 } .ace-jsoneditor .ace_invisible { color: #BFBFBF } .ace-jsoneditor .ace_keyword, .ace-jsoneditor .ace_meta, .ace-jsoneditor .ace_support.ace_constant.ace_property-value { color: #AF956F } .ace-jsoneditor .ace_keyword.ace_operator { color: #484848 } .ace-jsoneditor .ace_keyword.ace_other.ace_unit { color: #96DC5F } .ace-jsoneditor .ace_constant.ace_language { color: darkorange } .ace-jsoneditor .ace_constant.ace_numeric { color: red } .ace-jsoneditor .ace_constant.ace_character.ace_entity { color: #BF78CC } .ace-jsoneditor .ace_invalid { color: #FFFFFF; background-color: #FF002A; } .ace-jsoneditor .ace_fold { background-color: #AF956F; border-color: #000000 } .ace-jsoneditor .ace_storage, .ace-jsoneditor .ace_support.ace_class, .ace-jsoneditor .ace_support.ace_function, .ace-jsoneditor .ace_support.ace_other, .ace-jsoneditor .ace_support.ace_type { color: #C52727 } .ace-jsoneditor .ace_string { color: green } .ace-jsoneditor .ace_comment { color: #BCC8BA } .ace-jsoneditor .ace_entity.ace_name.ace_tag, .ace-jsoneditor .ace_entity.ace_other.ace_attribute-name { color: #606060 } .ace-jsoneditor .ace_markup.ace_underline { text-decoration: underline } .ace-jsoneditor .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y }';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)})},function(e,t,i){!function(){function e(e){var t=function(e,t){return o("",e,t)},r=i;e&&(i[e]||(i[e]={}),r=i[e]),r.define&&r.define.packaged||(n.original=r.define,r.define=n,r.define.packaged=!0),r.acequire&&r.acequire.packaged||(o.original=r.acequire,r.acequire=t,r.acequire.packaged=!0)}var t="ace",i=function(){return this}();if(t||"undefined"==typeof acequirejs){var n=function(e,t,i){return"string"!=typeof e?void(n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(i=t),n.modules||(n.modules={},n.payloads={}),n.payloads[e]=i,void(n.modules[e]=null))},o=function(e,t,i){if("[object Array]"===Object.prototype.toString.call(t)){for(var n=[],r=0,a=t.length;a>r;++r){var l=s(e,t[r]);if(!l&&o.original)return o.original.apply(window,arguments);n.push(l)}i&&i.apply(null,n)}else{if("string"==typeof t){var c=s(e,t);return!c&&o.original?o.original.apply(window,arguments):(i&&i(),c)}if(o.original)return o.original.apply(window,arguments)}},r=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return r(e,i[0])+"!"+r(e,i[1])}if("."==t.charAt(0)){var n=e.split("/").slice(0,-1).join("/");for(t=n+"/"+t;-1!==t.indexOf(".")&&o!=t;){var o=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=r(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],"function"==typeof i){var s={},a={id:t,uri:"",exports:s,packaged:!0},l=function(e,i){return o(t,e,i)},c=i(l,s,a);s=c||a.exports,n.modules[t]=s,delete n.payloads[t]}i=n.modules[t]=s||i}return i};e(t)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,i){"use strict";function n(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function o(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n1&&o(l,"")>-1&&(i=RegExp(this.source,r.replace.call(n(this),"g","")),r.replace.call(e.slice(l.index),i,function(){for(var e=1;el.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){function n(){}function o(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function r(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=f.call(arguments,1),o=function(){if(this instanceof o){var n=t.apply(this,i.concat(f.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(f.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,o.prototype=new n,n.prototype=null),o});var s,a,l,c,h,u=Function.prototype.call,d=Array.prototype,g=Object.prototype,f=d.slice,p=u.bind(g.toString),m=u.bind(g.hasOwnProperty);if((h=m(g,"__defineGetter__"))&&(s=u.bind(g.__defineGetter__),a=u.bind(g.__defineSetter__),l=u.bind(g.__lookupGetter__),c=u.bind(g.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];return i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),t+1==i.length,t+1==i.length?!0:void 0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:0>e&&(e=Math.max(i+e,0)),i>e+t||(t=i-e);var n=this.slice(e,e+t),o=f.call(arguments,2),r=o.length;if(e===i)r&&this.push.apply(this,o);else{var s=Math.min(t,i-e),a=e+s,l=a+r-s,c=i-a,h=i-s;if(a>l)for(var u=0;c>u;++u)this[l+u]=this[a+u];else if(l>a)for(u=c;u--;)this[l+u]=this[a+u];if(r&&e===h)this.length=h,this.push.apply(this,o);else for(this.length=h+r,u=0;r>u;++u)this[e+u]=o[u]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==p(e)});var A=Object("a"),w="a"!=A[0]||!(0 in A);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=O(this),i=w&&"[object String]"==p(this)?this.split(""):t,n=arguments[1],o=-1,r=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError;for(;++o>>0,o=Array(n),r=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var s=0;n>s;s++)s in i&&(o[s]=e.call(r,i[s],s,t));return o}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=O(this),n=w&&"[object String]"==p(this)?this.split(""):i,o=n.length>>>0,r=[],s=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var a=0;o>a;a++)a in n&&(t=n[a],e.call(s,t,a,i)&&r.push(t));return r}),Array.prototype.every||(Array.prototype.every=function(e){var t=O(this),i=w&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var r=0;n>r;r++)if(r in i&&!e.call(o,i[r],r,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=O(this),i=w&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0,o=arguments[1];if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");for(var r=0;n>r;r++)if(r in i&&e.call(o,i[r],r,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=O(this),i=w&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,r=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(r in i){o=i[r++];break}if(++r>=n)throw new TypeError("reduce of empty array with no initial value")}for(;n>r;r++)r in i&&(o=e.call(void 0,o,i[r],r,t));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=O(this),i=w&&"[object String]"==p(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=p(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,r=n-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(r in i){o=i[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}do r in this&&(o=e.call(void 0,o,i[r],r,t));while(r--);return o}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=w&&"[object String]"==p(this)?this.split(""):O(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=r(arguments[1])),n=n>=0?n:Math.max(0,i+n);i>n;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=w&&"[object String]"==p(this)?this.split(""):O(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,r(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:g)}),!Object.getOwnPropertyDescriptor){var C="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(C+e);if(m(e,t)){var i,n,o;if(i={enumerable:!0,configurable:!0},h){var r=e.__proto__;e.__proto__=g;var n=l(e,t),o=c(e,t);if(e.__proto__=r,n||o)return n&&(i.get=n),o&&(i.set=o),i}return i.value=e[t],i}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var E;E=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=E();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,i=new n,i.__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i}}if(Object.defineProperty){var F=o({}),y="undefined"==typeof document||o(document.createElement("div"));if(!F||!y)var b=Object.defineProperty}if(!Object.defineProperty||b){var x="Property description must be an object: ",S="Object.defineProperty called on non-object: ",$="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(S+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError(x+i);if(b)try{return b.call(Object,e,t,i)}catch(n){}if(m(i,"value"))if(h&&(l(e,t)||c(e,t))){var o=e.__proto__;e.__proto__=g,delete e[t],e[t]=i.value,e.__proto__=o}else e[t]=i.value;else{if(!h)throw new TypeError($);m(i,"get")&&s(e,t,i.get),m(i,"set")&&a(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)m(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(B){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var i=m(e,t);return delete e[t],i}),!Object.keys){var D=!0,k=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],L=k.length;for(var _ in{toString:null})D=!1;Object.keys=function N(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var N=[];for(var t in e)m(e,t)&&N.push(t);if(D)for(var i=0,n=L;n>i;i++){var o=k[i];m(e,o)&&N.push(o)}return N}}Date.now||(Date.now=function(){return(new Date).getTime()});var R=" \n \f\r   ᠎              \u2028\u2029\ufeff";if(!String.prototype.trim||R.trim()){R="["+R+"]";var T=new RegExp("^"+R+R+"*"),M=new RegExp(R+R+"*$");String.prototype.trim=function(){return String(this).replace(T,"").replace(M,"")}}var O=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,i){"use strict";if("undefined"!=typeof document){var n="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||n,e):document.createElement(e)},t.hasCssClass=function(e,t){var i=(e.className||"").split(/\s+/g);return-1!==i.indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var o=i.indexOf(t);if(-1==o)break;n=!1,i.splice(o,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){for(;n=0?(o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]:(o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((o.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isIPad=o.indexOf("iPad")>=0,t.isTouchPad=o.indexOf("TouchPad")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t,i){var n=s(t);if(!r.isMac&&a){if((a[91]||a[92])&&(n|=8),a.altGr){if(3==(3&n))return;a.altGr=0}if(18===i||17===i){var c="location"in t?t.location:t.keyLocation;if(17===i&&1===c)l=t.timeStamp;else if(18===i&&3===n&&2===c){var h=-l;l=t.timeStamp,h+=l,3>h&&(a.altGr=!0)}}}if(i in o.MODIFIER_KEYS){switch(o.MODIFIER_KEYS[i]){case"Alt":n=2;break;case"Shift":n=4;break;case"Ctrl":n=1;break;default:n=8}i=-1}if(8&n&&(91===i||93===i)&&(i=-1),!n&&13===i){var c="location"in t?t.location:t.keyLocation;if(3===c&&(e(t,n,-i),t.defaultPrevented))return}if(r.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return n||i in o.FUNCTION_KEYS||i in o.PRINTABLE_KEYS?e(t,n,i):!1}var o=e("./keys"),r=e("./useragent");t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){return e.removeEventListener?e.removeEventListener(t,i,!1):void(e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i))},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function o(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",o,!0),t.removeListener(document,"dragstart",o,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",o,!0),t.addListener(document,"dragstart",o,!0),o},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0, +e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,o){var s,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(0!==t.getButton(e)?c=0:e.detail>1?(c++,c>4&&(c=1)):c=1,r.isIE){var u=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-a)>5;(!l||u)&&(c=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[c-1]||600),1==c&&(s=e.clientX,a=e.clientY)}if(e._clicks=c,n[o]("mousedown",e),c>4)c=0;else if(c>1)return n[o](h[c],e)}),r.isOldIE&&t.addListener(e,"dblclick",function(e){c=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},i[c-1]||600),n[o]("mousedown",e),n[o](h[c],e)})};var s=!r.isMac||!r.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return o.KEY_MODS[s(e)]};var a=null,l=0;if(t.addCommandKeyListener=function(e,i){var o=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var s=null;o(e,"keydown",function(e){s=e.keyCode}),o(e,"keypress",function(e){return n(i,e,s)})}else{var l=null;o(e,"keydown",function(e){a[e.keyCode]=!0;var t=n(i,e,e.keyCode);return l=e.defaultPrevented,t}),o(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),o(e,"keyup",function(e){a[e.keyCode]=null}),a||(a=Object.create(null),o(window,"focus",function(e){a=Object.create(null)}))}},window.postMessage&&!r.isOldIE){var c=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+c;t.addListener(i,"message",function o(r){r.data==n&&(t.stopPropagation(r),t.removeListener(i,"message",o),e())}),i.postMessage(n,"*")}}t.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;n>i;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function(e){if("object"!=typeof e||!e)return e;var i=e.constructor;if(i===RegExp)return e;var n=i();for(var o in e)"object"==typeof e[o]?n[o]=t.deepCopy(e[o]):n[o]=e[o];return n},t.arrayToMap=function(e){for(var t={},i=0;ii?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var s=(e("../lib/dom"),e("../lib/event"),e("../lib/useragent"),0);(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,o=e.getButton();if(0!==o){var r=n.getSelectionRange(),s=r.isEmpty();return s&&n.selection.moveToPosition(i),void n.textInput.onContextMenu(e.domEvent)}return this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var o=r(this.$clickSelection,i);i=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),o=i.selection[e](n.row,n.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==s&&0>=a)t=this.$clickSelection.end,(o.end.row!=n.row||o.end.column!=n.column)&&(n=o.start);else if(1==a&&s>=0)t=this.$clickSelection.start,(o.start.row!=n.row||o.start.column!=n.column)&&(n=o.end);else if(-1==s&&1==a)n=o.end,t=o.start;else{var l=r(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>s||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session,o=n.getBracketRange(t);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor,o=n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return o||200>i?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(n.prototype),t.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var o=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=o.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){o.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){o.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(n.prototype),t.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function n(e){function t(){var t=u.getDocumentPosition().row,o=l.$annotations[t];if(!o)return i();var r=s.session.getLength();if(t==r){var a=s.renderer.pixelToScreenCoordinates(0,u.y).row,h=u.$pos;if(a>s.session.documentToScreenRow(h.row,h.column))return i()}if(d!=o)if(d=o.text.join("
    "),c.setHtml(d),c.show(),s.on("mousewheel",i),e.$tooltipFollowsMouse)n(u);else{var g=l.$cells[s.session.documentToScreenRow(t,0)].element,f=g.getBoundingClientRect(),p=c.getElement().style;p.left=f.right+"px",p.top=f.bottom+"px"}}function i(){h&&(h=clearTimeout(h)),d&&(c.hide(),d=null,s.removeEventListener("mousewheel",i))}function n(e){c.setPosition(e.x,e.y)}var s=e.editor,l=s.renderer.$gutterLayer,c=new o(s.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(s.isFocused()&&0==t.getButton()){var i=l.getRegion(t);if("foldWidgets"!=i){var n=t.getDocumentPosition().row,o=s.session.selection;if(t.getShiftKey())o.selectTo(n,0);else{if(2==t.domEvent.detail)return s.selectAll(),t.preventDefault();e.$clickSelection=s.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var h,u,d;e.editor.setDefaultHandler("guttermousemove",function(o){var s=o.domEvent.target||o.domEvent.srcElement;return r.hasCssClass(s,"ace_fold-widget")?i():(d&&e.$tooltipFollowsMouse&&n(o),u=o,void(h||(h=setTimeout(function(){h=null,u&&!e.isMousePressed?t():i()},50))))}),a.addListener(s.renderer.$gutter,"mouseout",function(e){u=null,d&&!h&&(h=setTimeout(function(){h=null,i()},50))}),s.on("changeSession",i)}function o(e){l.call(this,e)}var r=e("../lib/dom"),s=e("../lib/oop"),a=e("../lib/event"),l=e("../tooltip").Tooltip;s.inherits(o,l),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();e+=15,t+=15,e+o>i&&(e-=e+o-i),t+r>n&&(t-=20+r),l.prototype.setPosition.call(this,e,t)}}.call(o.prototype),t.GutterHandler=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=o.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(r.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(e){function t(e,t){var i=Date.now(),n=!t||e.row!=t.row,r=!t||e.column!=t.column;if(!B||n||r)m.$blockScrolling+=1,m.moveCursorToPosition(e),m.$blockScrolling-=1,B=i,D={x:C,y:E};else{var s=o(D.x,D.y,C,E);s>h?B=null:i-B>=c&&(m.renderer.scrollCursorIntoView(),B=null)}}function i(e,t){var i=Date.now(),n=m.renderer.layerConfig.lineHeight,o=m.renderer.layerConfig.characterWidth,r=m.renderer.scroller.getBoundingClientRect(),s={x:{left:C-r.left,right:r.right-C},y:{top:E-r.top,bottom:r.bottom-E}},a=Math.min(s.x.left,s.x.right),c=Math.min(s.y.top,s.y.bottom),h={row:e.row,column:e.column};2>=a/o&&(h.column+=s.x.left=c/n&&(h.row+=s.y.top=l&&m.renderer.scrollCursorIntoView(h):$=i:$=null}function n(){var e=b;b=m.renderer.screenToTextCoordinates(C,E),t(b,e),i(b,e)}function u(){y=m.selection.toOrientedRange(),w=m.session.addMarker(y,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(F),n(),F=setInterval(n,20),L=0,s.addListener(document,"mousemove",g)}function d(){clearInterval(F),m.session.removeMarker(w),w=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(y),m.$blockScrolling-=1,m.isFocused()&&!S&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),y=null,b=null,L=0,$=null,B=null,s.removeListener(document,"mousemove",g)}function g(){null==_&&(_=setTimeout(function(){null!=_&&w&&d()},20))}function f(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function p(e){var t=["copy","copymove","all","uninitialized"],i=["move","copymove","linkmove","all","uninitialized"],n=a.isMac?e.altKey:e.ctrlKey,o="uninitialized";try{o=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&t.indexOf(o)>=0?r="copy":i.indexOf(o)>=0?r="move":t.indexOf(o)>=0&&(r="copy"),r}var m=e.editor,v=r.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var A=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];A.forEach(function(t){e[t]=this[t]},this),m.addEventListener("mousedown",this.onMouseDown.bind(e));var w,C,E,F,y,b,x,S,$,B,D,k=m.container,L=0;this.onDragStart=function(e){if(this.cancelDrag||!k.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}y=m.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=m.getReadOnly()?"copy":"copyMove",a.isOpera&&(m.container.appendChild(v),v.scrollTop=0),i.setDragImage&&i.setDragImage(v,0,0),a.isOpera&&m.container.removeChild(v),i.clearData(),i.setData("Text",m.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(k.draggable=!1,S=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;x||"move"!=t||m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){return!m.getReadOnly()&&f(e.dataTransfer)?(C=e.clientX,E=e.clientY,w||u(),L++,e.dataTransfer.dropEffect=x=p(e),s.preventDefault(e)):void 0},this.onDragOver=function(e){return!m.getReadOnly()&&f(e.dataTransfer)?(C=e.clientX,E=e.clientY,w||(u(),L++),null!==_&&(_=null),e.dataTransfer.dropEffect=x=p(e),s.preventDefault(e)):void 0},this.onDragLeave=function(e){return L--,0>=L&&w?(d(),x=null,s.preventDefault(e)):void 0},this.onDrop=function(e){if(b){var t=e.dataTransfer;if(S)switch(x){case"move":y=y.contains(b.row,b.column)?{start:b,end:b}:m.moveText(y,b);break;case"copy":y=m.moveText(y,b,!0)}else{var i=t.getData("Text");y={start:b,end:m.session.insert(b,i)},m.focus(),x=null}return d(),s.preventDefault(e)}},s.addListener(k,"dragstart",this.onDragStart.bind(e)),s.addListener(k,"dragend",this.onDragEnd.bind(e)),s.addListener(k,"dragenter",this.onDragEnter.bind(e)),s.addListener(k,"dragover",this.onDragOver.bind(e)),s.addListener(k,"dragleave",this.onDragLeave.bind(e)),s.addListener(k,"drop",this.onDrop.bind(e));var _=null}function o(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var r=e("../lib/dom"),s=e("../lib/event"),a=e("../lib/useragent"),l=200,c=200,h=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var i=a.isWin?"default":"move";e.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&"dragReady"==this.state){var i=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if("dragWait"===this.state){var i=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton(),o=e.domEvent.detail||1;if(1===o&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in r&&(r.unselectable="on"),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var s=t.container;s.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),o=document.createElement("script");o.src=e,i.appendChild(o),o.onload=o.onreadystatechange=function(e,i){(i||!o.readyState||"loaded"==o.readyState||"complete"==o.readyState)&&(o=o.onload=o.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";var n={},o=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=r),i=i.slice();for(var s=0;sv;v++){var w=m[v];0===w.name.indexOf("data-ace-")&&(s[r(w.name.replace(/^data-ace-/,""))]=w.value)}var C=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var E in s)"undefined"!=typeof s[E]&&t.set(E,s[E])}function r(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var s=e("./lib/lang"),a=e("./lib/oop"),l=e("./lib/net"),c=e("./lib/event_emitter").EventEmitter,h=function(){return this}(),u={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!u.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return u[e]},t.set=function(e,t){if(!u.hasOwnProperty(e))throw new Error("Unknown config key: "+e);u[e]=t},t.all=function(){return s.copyObject(u)},a.implement(t,c),t.moduleUrl=function(e,t){if(u.$moduleUrls[e])return u.$moduleUrls[e];var i=e.split("/");t=t||i[i.length-2]||"";var n="snippets"==t?"/":"-",o=i[i.length-1];if("worker"==t&&"-"==n){var r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(r,"")}(!o||o==t)&&i.length>1&&(o=i[i.length-2]);var s=u[t+"Path"];return null==s?s=u.basePath:"/"==n&&(t=n=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+n+o+this.get("suffix")},t.setModuleUrl=function(e,t){return u.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var o,r;Array.isArray(i)&&(r=i[0],i=i[1]);try{o=e(i)}catch(s){}if(o&&!t.$loading[i])return n&&n(o);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})};return t.get("packaged")?void l.loadScript(t.moduleUrl(i,r),a):a()}},o(!0),t.init=o;var d={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var i=this.$options[e];if(!i)return void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+e+'"'));if(i.forwardTo)return this[i.forwardTo]&&this[i.forwardTo].setOption(e,t);i.handlesSet||(this["$"+e]=t),i&&i.set&&i.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+e+'"'))}},g={};t.defineOptions=function(e,t,i){return e.$options||(g[t]=e.$options={}),Object.keys(i).forEach(function(t){var n=i[t];"string"==typeof n&&(n={forwardTo:n}),n.name||(n.name=t),e.$options[n.name]=n,"initialValue"in n&&(e["$"+n.name]=n.initialValue)}),a.implement(e,d),this},t.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var i=e.$options[t];"value"in i&&e.setOption(t,i.value); +})},t.setDefaultValue=function(e,i,n){var o=g[e]||(g[e]={});o[i]&&(o.forwardTo?t.setDefaultValue(o.forwardTo,i,n):o[i].value=n)},t.setDefaultValues=function(e,i){Object.keys(i).forEach(function(n){t.setDefaultValue(e,n,i[n])})}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,i){"use strict";var n=e("../lib/event"),o=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("../config"),h=function(e){var t=this;this.editor=e,new r(this),new s(this),new l(this);var i=function(t){!e.isFocused()&&e.textInput&&e.textInput.moveToMouse(t),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener(a,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(n.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),n.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),o.isIE&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousemove",i))),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var c=e.renderer.$gutter;n.addListener(c,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(c,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(c,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(c,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(c,"mousedown",function(t){return e.focus(),n.preventDefault(t)}),e.on("mousemove",function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),o=e.session.selection.getRange(),r=e.renderer;r.setCursorStyle(!o.isEmpty()&&o.insideStart(n.row,n.column)?"default":"")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var r=this,s=function(e){if(e){if(o.isWebKit&&!e.which&&r.releaseMouse)return r.releaseMouse();r.x=e.clientX,r.y=e.clientY,t&&t(e),r.mouseEvent=new a(e,r.editor),r.$mouseMoved=!0}},l=function(e){clearInterval(h),c(),r[r.state+"End"]&&r[r.state+"End"](e),r.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),r.isMousePressed=!1,r.$onCaptureMouseMove=r.releaseMouse=null,e&&r.onMouseEvent("mouseup",e)},c=function(){r[r.state]&&r[r.state](),r.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});r.$onCaptureMouseMove=s,r.releaseMouse=n.capture(this.editor.container,s,l);var h=setInterval(c,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,i){"use strict";function n(e){e.on("click",function(t){var i=t.getDocumentPosition(),n=e.session,o=n.getFoldAt(i.row,i.column,1);o&&(t.getAccelKey()?n.removeFold(o):n.expandFold(o),t.stop())}),e.on("gutterclick",function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,o=e.session;o.foldWidgets&&o.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,o=e.session,r=o.getParentFoldRangeData(n,!0),s=r.range||r.firstRange;if(s){n=s.start.row;var a=o.getFoldAt(n,o.getLine(n).length,1);a?o.removeFold(a):(o.addFold("...",s),e.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}t.stop()}})}t.FoldHandler=n}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";var n=e("../lib/keys"),o=e("../lib/event"),r=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1==t?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&(r=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n),!(r&&r.command&&(s="null"==r.command?!0:a.exec(r.command,this.$editor,r.args,n),s&&n&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&o.stopEvent(n),s))););return s},this.onCommandKey=function(e,t,i){var o=n.keyCodeToString(i);this.$callKeyboardHandlers(t,o,i,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(r.prototype),t.KeyBinding=r}),ace.define("ace/range",["require","exports","module"],function(e,t,i){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},o=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(n.row,n.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return 0==this.compare(e,t)?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(n);return o?(n=o.start.row,i=o.end.row):i=n,t===!0?new s(n,0,i,this.session.getLine(i).length):new s(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-i,t.column).split(" ").length-1==i?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e,t=this.lead.row,i=this.lead.column,n=this.doc.getLine(t),o=n.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,i,1);return r?void this.moveCursorTo(r.end.row,r.end.column):((e=this.session.nonTokenRe.exec(o))&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=n.substring(i)),i>=n.length?(this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t=i?(this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft())):((r=this.session.tokenRe.exec(s))&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,i))},this.$shortWordEndIndex=function(e){var t,i,n=0,o=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(i=e[n])&&o.test(i);)n++;if(1>n)for(r.lastIndex=0;(i=e[n])&&!r.test(i);)if(r.lastIndex=0,n++,o.test(i)){if(n>2){n--;break}for(;(i=e[n])&&o.test(i);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==i.length){var r=this.doc.getLength();do e++,n=this.doc.getLine(e);while(r>e&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var s=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+s)},this.moveCursorShortWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;if(e=this.session.getFoldAt(t,i,-1))return this.moveCursorTo(e.start.row,e.start.column);var n=this.session.getLine(t).substring(0,i);if(0===i){do t--,n=this.doc.getLine(t);while(t>0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var r=o.stringReverse(n),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,i-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var n=this.session.screenToDocumentPosition(i.row+e,i.column);0!==e&&0===t&&n.row===this.lead.row&&n.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[n.row]&&n.row++,this.moveCursorTo(n.row,n.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var i=this.getCursor();return s.fromPoints(t,i)}catch(n){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=s.fromPoints(e[t].start,e[t].end);e.isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module"],function(e,t,i){"use strict";var n=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var i=this.states[t],n=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?c.onMatch=this.$applyToken:c.onMatch=c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+o+1)}):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),r[o]=l,o+=u,n.push(h),c.onMatch||(c.onMatch=null)}}n.length||(r[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){n=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],o=0,r=i.length;r>o;o++)t[o]&&(n[n.length]={type:i[o],value:t[o]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,o=0,r=n.length;r>o;o++)t[o+1]&&(i[i.length]={type:n[o],value:t[o+1]});return i},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,o={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,r,s,a,l){return n?n="]"!=a:a?n=!0:s?(i==o.stack&&(o.end=l+1,o.stack=-1),i--):r&&(i++,1!=r.length&&(o.stack=i,o.start=l)),e}),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))}return new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var i=t.slice(0);t=i[0],"#tmp"===t&&(i.shift(),t=i.shift())}else var i=[];var o=t||"start",r=this.states[o];r||(o="start",r=this.states[o]);var s=this.matchMappings[o],a=this.regExps[o];a.lastIndex=0;for(var l,c=[],h=0,u=0,d={type:null,value:""};l=a.exec(e);){var g=s.defaultToken,f=null,p=l[0],m=a.lastIndex;if(m-p.length>h){var v=e.substring(h,m-p.length);d.type==g?d.value+=v:(d.type&&c.push(d),d={type:g,value:v})}for(var A=0;An){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h1&&i[0]!==o&&i.unshift("#tmp",o),{tokens:c,state:i.length?i:o}},this.reportError=function(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout(function(){throw i})}}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/lang"),o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)t-=1,i+=e[t].value.length;return i}}).call(n.prototype),t.TokenIterator=n}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,r=e("./behaviour").Behaviour,s=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,h=function(){this.HighlightRules=o,this.$behaviour=new r};(function(){this.tokenRe=new RegExp("^["+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.packages.L+s.packages.Mn+s.packages.Mc+s.packages.Nd+s.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){function o(e){for(var t=i;n>=t;t++)e(r.getLine(t),t)}var r=t.doc,s=!0,l=!0,c=1/0,h=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var d=this.lineCommentStart.map(a.escapeRegExp).join("|"),g=this.lineCommentStart[0];else var d=a.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;d=new RegExp("^(\\s*)(?:"+d+") ?"),u=t.getUseSoftTabs();var f=function(e,t){var i=e.match(d);if(i){var n=i[1].length,o=i[0].length;A(e,n,o)||" "!=i[0][o-1]||o--,r.removeInLine(t,n,o)}},p=g+" ",m=function(e,t){(!s||/\S/.test(e))&&(A(e,c,c)?r.insertInLine({row:t,column:c},p):r.insertInLine({row:t,column:c},g))},v=function(e,t){return d.test(e)},A=function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%h!=0)return!1;for(var n=0;" "==e.charAt(i++);)n++;return h>2?n%h!=h-1:n%h==0}}else{if(!this.blockComment)return!1;var g=this.blockComment.start,w=this.blockComment.end,d=new RegExp("^(\\s*)(?:"+a.escapeRegExp(g)+")"),C=new RegExp("(?:"+a.escapeRegExp(w)+")\\s*$"),m=function(e,t){v(e,t)||(!s||/\S/.test(e))&&(r.insertInLine({row:t,column:e.length},w),r.insertInLine({row:t,column:c},g))},f=function(e,t){var i;(i=e.match(C))&&r.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(d))&&r.removeInLine(t,i[1].length,i[0].length)},v=function(e,i){if(d.test(e))return!0;for(var n=t.getTokens(i),o=0;oi&&(c=i),l&&!v(e,t)&&(l=!1)):E>e.length&&(E=e.length)}),c==1/0&&(c=E,s=!1,l=!1),u&&c%h!=0&&(c=Math.floor(c/h)*h),o(l?f:m)},this.toggleBlockComment=function(e,t,i,n){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=new l(t,n.row,n.column),h=a.getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(h&&/comment/.test(h.type)){for(var d,g;h&&/comment/.test(h.type);){var f=h.value.indexOf(o.start);if(-1!=f){var p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;d=new c(p,m,p,m+o.start.length);break}h=a.stepBackward()}for(var a=new l(t,n.row,n.column),h=a.getCurrentToken();h&&/comment/.test(h.type);){var f=h.value.indexOf(o.end);if(-1!=f){var p=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+f;g=new c(p,m,p,m+o.end.length);break}h=a.stepForward()}g&&t.remove(g),d&&(t.remove(d),r=d.start.row,s=-o.start.length)}else s=o.start.length,r=i.start.row,t.insert(i.end,o.end),t.insert(i.start,o.start);u.start.row==r&&(u.start.column+=s),u.end.row==r&&(u.end.column+=s),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;tr;r++)if("string"==typeof o[r].token)/keyword|support|storage/.test(o[r].token)&&i.push(o[r].regex);else if("object"==typeof o[r].token)for(var a=0,l=o[r].token.length;l>a;a++)if(/keyword|support|storage/.test(o[r].token[a])){var n=o[r].regex.match(/\(.+?\)/g)[a];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){var o=this.$keywordList||this.$createKeywordList();return o.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),t.Mode=h}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),"undefined"==typeof i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){n.implement(this,o),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,i=t.range;if((i.start.row!=i.end.row||i.start.row==this.row)&&!(i.start.row>this.row||i.start.row==this.row&&i.start.column>this.column)){var n=this.row,o=this.column,r=i.start,s=i.end;"insertText"===t.action?r.row===n&&r.column<=o?r.column===o&&this.$insertRight||(r.row===s.row?o+=s.column-r.column:(o-=r.column,n+=s.row-r.row)):r.row!==s.row&&r.row=o?r.column:Math.max(0,o-(s.column-r.column)):r.row!==s.row&&r.row=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):0>e?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),0>t&&(i.column=0),i}}).call(r.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,s=e("./anchor").Anchor,a=function(e){this.$lines=[],0===e.length?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength();this.remove(new r(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;return e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||0===t.length)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var i=this.$split(t),n=i.splice(0,1)[0],o=0==i.length?null:i.splice(i.length-1,1)[0];return e=this.insertInLine(e,n),null!==o&&(e=this.insertNewLine(e),e=this._insertLines(e.row,i),e=this.insertInLine(e,o||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(0==t.length)return{row:e,column:0};for(;t.length>61440;){var i=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=i.row}var n=[e,0];n.push.apply(n,t),this.$lines.splice.apply(this.$lines,n);var o=new r(e,0,e+t.length,0),s={action:"insertLines",range:o,lines:t};return this._signal("change",{data:s}),o.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length)); +var i={row:e.row+1,column:0},n={action:"insertText",range:r.fromPoints(e,i),text:this.getNewLineCharacter()};return this._signal("change",{data:n}),i},this.insertInLine=function(e,t){if(0==t.length)return e;var i=this.$lines[e.row]||"";this.$lines[e.row]=i.substring(0,e.column)+t+i.substring(e.column);var n={row:e.row,column:e.column+t.length},o={action:"insertText",range:r.fromPoints(e,n),text:t};return this._signal("change",{data:o}),n},this.remove=function(e){if(e instanceof r||(e=r.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end),e.isEmpty())return e.start;var t=e.start.row,i=e.end.row;if(e.isMultiLine()){var n=0==e.start.column?t:t+1,o=i-1;e.end.column>0&&this.removeInLine(i,0,e.end.column),o>=n&&this._removeLines(n,o),n!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,i){if(t!=i){var n=new r(e,t,e,i),o=this.getLine(e),s=o.substring(t,i),a=o.substring(0,t)+o.substring(i,o.length);this.$lines.splice(e,1,a);var l={action:"removeText",range:n,text:s};return this._signal("change",{data:l}),n.start}},this.removeLines=function(e,t){return 0>e||t>=this.getLength()?this.remove(new r(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var i=new r(e,0,t+1,0),n=this.$lines.splice(e,t-e+1),o={action:"removeLines",range:i,nl:this.getNewLineCharacter(),lines:n};return this._signal("change",{data:o}),n},this.removeNewLine=function(e){var t=this.getLine(e),i=this.getLine(e+1),n=new r(e,t.length,e+1,0),o=t+i;this.$lines.splice(e,2,o);var s={action:"removeText",range:n,text:this.getNewLineCharacter()};this._signal("change",{data:s})},this.replace=function(e,t){if(e instanceof r||(e=r.fromPoints(e.start,e.end)),0==t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;if(this.remove(e),t)var i=this.insert(e.start,t);else i=e.start;return i},this.applyDeltas=function(e){for(var t=0;t=0;t--){var i=e[t],n=r.fromPoints(i.range.start,i.range.end);"insertLines"==i.action?this._removeLines(n.start.row,n.end.row-1):"insertText"==i.action?this.remove(n):"removeLines"==i.action?this._insertLines(n.start.row,i.lines):"removeText"==i.action&&this.insert(n.start,i.text)}},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,o=t||0,r=i.length;r>o;o++)if(e-=i[o].length+n,0>e)return{row:o,column:e+i[o].length+n};return{row:r-1,column:i[r-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,o=0,r=Math.min(e.row,i.length),s=t||0;r>s;++s)o+=i[s].length+n;return o+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,o=i.doc;i.lines[t];)t++;var r=t,s=o.getLength(),a=0;for(i.running=!1;s>t;){i.$tokenizeRow(t),n=t;do t++;while(i.lines[t]);if(a++,a%5===0&&new Date-e>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,n>=r&&i.fireUpdateEvent(r,n)}}};(function(){n.implement(this,o),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,i=t.start.row,n=t.end.row-i;if(0===n)this.lines[i]=null;else if("removeText"==e.action||"removeLines"==e.action)this.lines.splice(i,n+1,null),this.states.splice(i,n+1,null);else{var o=Array(n+1);o.unshift(i,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(r.prototype),t.BackgroundTokenizer=r}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),o=(e("./lib/oop"),e("./range").Range),r=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l=s;a>=l;l++){var c=this.cache[l];null==c&&(c=n.getMatchOffsets(i.getLine(l),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new o(l,e.offset,l,e.offset+e.length)}),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(e,c[h].toScreenRange(i),this.clazz,r)}}}).call(r.prototype),t.SearchHighlight=r}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new o(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var o=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,o,r,s=0,a=this.folds,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(var c=0;ce)return{row:n.start.row,column:n.start.column+e};if(e-=n.placeholder.length,0>e)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(n.prototype),t.FoldLine=n}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range,o=n.comparePoints,r=function(){this.ranges=[]};(function(){this.comparePoints=o,this.pointIndex=function(e,t,i){for(var n=this.ranges,r=i||0;r0)){var l=o(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);0>i&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return 0>n?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.call(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);return t>=0?this.ranges.splice(t,1):void 0},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return o(e.start,t.start)});for(var i,n=t[0],r=1;rs||(0!=s||i.isEmpty()||n.isEmpty())&&(o(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),t.splice(r,1),e.push(n),n=i,r--)}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);return t>=0?this.ranges[t]:void 0},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.rown&&(n=-n-1);var o=this.pointIndex({row:t,column:0},n);0>o&&(o=-o-1);for(var r=[],s=n;o>s;s++)r.push(i[s]);return r},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){var t=e.data.range;if("i"==e.data.action[0])var i=t.start,n=t.end;else var n=t.start,i=t.end;for(var o=i.row,r=n.row,s=r-o,a=-i.column+n.column,l=this.ranges,c=0,h=l.length;h>c;c++){var u=l[c];if(!(u.end.rowo)break;if(u.start.row==o&&u.start.column>=i.column&&(u.start.column==i.column&&this.$insertRight||(u.start.column+=a,u.start.row+=s)),u.end.row==o&&u.end.column>=i.column){if(u.end.column==i.column&&this.$insertRight)continue;u.end.column==i.column&&a>0&&h-1>c&&u.end.column>u.start.column&&u.end.column==l[c+1].start.column&&(u.end.column-=a),u.end.column+=a,u.end.row+=s}}}if(0!=s&&h>c)for(;h>c;c++){var u=l[c];u.start.row+=s,u.end.row+=s}}}).call(r.prototype),t.RangeList=r}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,i){"use strict";function n(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function o(e,t){n(e.start,t),n(e.end,t)}function r(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function s(e,t){r(e.start,t),r(e.end,t)}var a=(e("../range").Range,e("../range_list").RangeList),l=e("../lib/oop"),c=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};l.inherits(c,a),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new c(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);o(e,this.start);for(var t=e.start.row,i=e.start.column,n=0,r=-1;n=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0),n;n=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,o=0;o=t){t>a&&(a>=e?n-=t-a:n=0);break}s>=e&&(n-=a>=e?s-a:s-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var i,n=this.$foldData,o=!1;e instanceof s?i=e:(i=new s(t,e),i.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,c=i.end.row,h=i.end.column;if(!(c>a||a==c&&h-2>=l))throw new Error("The range has to be at least 2 characters width");var u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(i);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var g=this.getFoldsInRange(i.range);g.length>0&&(this.removeFolds(g),g.forEach(function(e){i.addSubFold(e)}));for(var f=0;f0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var i,n;if(null==e?(i=new o(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new o(e,0,e,this.getLine(e).length):"row"in e?o.fromPoints(e,e):e,n=this.getFoldsInRangeList(i),t)this.removeFolds(n);else for(var r=n;r.length;)this.expandFolds(r),r=this.getFoldsInRangeList(i);return n.length?n:void 0},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,o){null==n&&(n=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var r=this.doc,s="";return e.walk(function(e,t,i,a){if(!(n>t)){if(t==n){if(o>i)return;a=Math.max(o,a)}s+=null!=e?e:r.getLine(t).substring(a,i)}},t,i),s},this.getDisplayLine=function(e,t,i,n){var o=this.getFoldLine(e);if(o)return this.getFoldDisplayLine(o,e,t,i,n);var r;return r=this.doc.getLine(e),r.substring(n||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var i=t.folds.map(function(e){return e.clone()});return new r(e,i)})},this.toggleFold=function(e){var t,i,n=this.selection,o=n.getRange();if(o.isEmpty()){var r=o.start;if(t=this.getFoldAt(r.row,r.column))return void this.expandFold(t);(i=this.findMatchingBracket(r))?1==o.comparePoint(i)?o.end=i:(o.start=i,o.start.column++,o.end.column--):(i=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==o.comparePoint(i)?o.end=i:o.start=i,o.start.column++):o=this.getCommentFoldRange(r.row,r.column)||o}else{var s=this.getFoldsInRange(o);if(e&&s.length)return void this.expandFolds(s);1==s.length&&(t=s[0])}if(t||(t=this.getFoldAt(o.start.row,o.start.column)),t&&t.range.toString()==o.toString())return void this.expandFold(t);var a="...";if(!o.isMultiLine()){if(a=this.getTextRange(o),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,o)},this.getCommentFoldRange=function(e,t,i){var n=new a(this,e,t),r=n.getCurrentToken();if(r&&/^comment|string/.test(r.type)){var s=new o,l=new RegExp(r.type.replace(/\..*/,"\\."));if(1!=i){do r=n.stepBackward();while(r&&l.test(r.type));n.stepForward()}if(s.start.row=n.getCurrentTokenRow(),s.start.column=n.getCurrentTokenColumn()+2,n=new a(this,e,t),-1!=i){do r=n.stepForward();while(r&&l.test(r.type));r=n.stepBackward()}else r=n.getCurrentToken();return s.end.row=n.getCurrentTokenRow(),s.end.column=n.getCurrentTokenColumn()+r.value.length-2,s}},this.foldAll=function(e,t,i){void 0==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength(),e=e||0;for(var o=e;t>o;o++)if(null==n[o]&&(n[o]=this.getFoldWidget(o)),"start"==n[o]){var r=this.getFoldWidgetRange(o);if(r&&r.isMultiLine()&&r.end.row<=t&&r.start.row>=e){o=r.end.row;try{var s=this.addFold("...",r);s&&(s.collapseChildren=i)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,o=e-1;o>=0;){var r=i[o];if(null==r&&(r=i[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(n||(n=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:n}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var i={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},n=this.$toggleFoldWidget(e,i);if(!n){var o=t.target||t.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),o="end"===i?-1:1,r=this.getFoldAt(e,-1===o?0:n.length,o);if(r)return void(t.children||t.all?this.removeFold(r):this.expandFold(r));var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1),r&&s.isEqual(r.range)))return void this.removeFold(r);if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,s.end.row,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.data,i=t.range,n=i.start.row,o=i.end.row-n;if(0===o)this.foldWidgets[n]=null;else if("removeText"==t.action||"removeLines"==t.action)this.foldWidgets.splice(n,o+1,null);else{var r=Array(o+1);r.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}}}var o=e("../range").Range,r=e("./fold_line").FoldLine,s=e("./fold").Fold,a=e("../token_iterator").TokenIterator;t.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),s=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(s||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],e);if(!a)return null;t=r.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a=this.$findOpeningBracket(s[2],e);if(!a)return null;t=r.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var n=this.$brackets[e],r=1,s=new o(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==n){if(r-=1,0==r)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l-=1}do a=s.stepBackward();while(a&&!i.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(e,t,i){var n=this.$brackets[e],r=1,s=new o(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;h>l;){var u=c.charAt(l);if(u==n){if(r-=1,0==r)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(r+=1);l+=1}do a=s.stepForward();while(a&&!i.test(a.type));if(null==a)break;l=0}return null}}}var o=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=n}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/lang"),r=e("./config"),s=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,h=e("./document").Document,u=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,g=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new a(this),r.resetOptions(this),this.setMode(t),r._signal("session",this)};(function(){function e(e){return 4352>e?!1:e>=4352&&4447>=e||e>=4515&&4519>=e||e>=4602&&4607>=e||e>=9001&&9002>=e||e>=11904&&11929>=e||e>=11931&&12019>=e||e>=12032&&12245>=e||e>=12272&&12283>=e||e>=12288&&12350>=e||e>=12353&&12438>=e||e>=12441&&12543>=e||e>=12549&&12589>=e||e>=12593&&12686>=e||e>=12688&&12730>=e||e>=12736&&12771>=e||e>=12784&&12830>=e||e>=12832&&12871>=e||e>=12880&&13054>=e||e>=13056&&19903>=e||e>=19968&&42124>=e||e>=42128&&42182>=e||e>=43360&&43388>=e||e>=44032&&55203>=e||e>=55216&&55238>=e||e>=55243&&55291>=e||e>=63744&&64255>=e||e>=65040&&65049>=e||e>=65072&&65106>=e||e>=65108&&65126>=e||e>=65128&&65131>=e||e>=65281&&65376>=e||e>=65504&&65510>=e}n.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;n>=i;){var o=i+n>>1,r=e[o];if(t>r)i=o+1;else{if(!(r>t))return o;n=o-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var i=this.$updateInternalDataOnChange(e);this.$fromUndo||!this.$undoManager||t.ignore||(this.$deltasDoc.push(t),i&&0!=i.length&&this.$deltasFold.push({action:"removeFolds",folds:i}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(t),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i,n=this.bgTokenizer.getTokens(e),o=0;if(null==t)r=n.length-1,o=this.getLine(e).length;else for(var r=0;r=t));r++);return(i=n[r])?(i.index=r,i.start=o-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[]; +for(var t=0;t0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var o=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))var o=/\s/;else var o=this.nonTokenRe;var r=t;if(r>0){do r--;while(r>=0&&i.charAt(r).match(o));r++}for(var s=t;se&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;a>l;l++){if(l>s){if(l=r.end.row+1,l>=a)break;r=this.$foldData[o++],s=r?r.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var o=e[n];"doc"==o.group?(this.doc.revertDeltas(o.deltas),i=this.$getUndoSelection(o.deltas,!0,i)):o.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;ne.end.column&&(r.start.column+=a),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=a)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,n),o.length){var l=e.start,h=r.start,s=h.row-l.row,a=h.column-l.column;this.addFolds(o.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=s,e.end.row+=s,e}))}return r},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;t>=n;n++)this.insert({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new c(0,0,0,0),n=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);i.start.row=o,i.end.row=o;for(var s=0;n>s&&" "==r.charAt(s);++s);n>s&&" "==r.charAt(s)?(i.start.column=s,i.end.column=s+1):(i.start.column=0,i.end.column=s),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),0>i){var n=this.getRowFoldStart(e+i);if(0>n)return 0;var o=n-e}else if(i>0){var n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;var o=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var o=t-e+1}var r=new c(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map(function(e){return e=e.clone(),e.start.row+=o,e.end.row+=o,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+o,a),s.length&&this.addFolds(s),o},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return 0>t?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),0>e)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1?(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t,i=this.$useWrapMode,n=e.data.action,o=e.data.range.start.row,r=e.data.range.end.row,s=e.data.range.start,a=e.data.range.end,l=null;if(-1!=n.indexOf("Lines")?(r="insertLines"==n?o+e.data.lines.length:o,t=e.data.lines?e.data.lines.length:r-o):t=r-o,this.$updating=!0,0!=t)if(-1!=n.indexOf("remove")){this[i?"$wrapData":"$rowLengthCache"].splice(o,t);var c=this.$foldData;l=this.getFoldsInRange(e.data.range),this.removeFolds(l);var h=this.getFoldLine(a.row),u=0;if(h){h.addRemoveChars(a.row,a.column,s.column-a.column),h.shiftRow(-t);var d=this.getFoldLine(o);d&&d!==h&&(d.merge(h),h=d),u=c.indexOf(h)+1}for(u;u=a.row&&h.shiftRow(-t)}r=o}else{var g=Array(t);g.unshift(o,0);var f=i?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,g);var c=this.$foldData,h=this.getFoldLine(o),u=0;if(h){var p=h.range.compareInside(s.row,s.column);0==p?(h=h.split(s.row,s.column),h&&(h.shiftRow(t),h.addRemoveChars(r,0,a.column-s.column))):-1==p&&(h.addRemoveChars(o,0,a.column-s.column),h.shiftRow(t)),u=c.indexOf(h)+1}for(u;u=o&&h.shiftRow(t)}}else{t=Math.abs(e.data.range.start.column-e.data.range.end.column),-1!=n.indexOf("remove")&&(l=this.getFoldsInRange(e.data.range),this.removeFolds(l),t=-t);var h=this.getFoldLine(o);h&&h.addRemoveChars(o,s.column,t)}return i&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,i?this.$updateWrapData(o,r):this.$updateRowLengthCache(o,r),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var i,n,o=this.doc.getAllLines(),r=this.getTabSize(),s=this.$wrapData,l=this.$wrapLimit,c=e;for(t=Math.min(t,o.length-1);t>=c;)n=this.getFoldLine(c,n),n?(i=[],n.walk(function(e,t,n,r){var s;if(null!=e){s=this.$getDisplayTokens(e,i.length),s[0]=a;for(var l=1;lt;){var u=s+t;if(e[u-1]>=f&&e[u]>=f)n(u);else if(e[u]!=a&&e[u]!=h){for(var d=Math.max(u-(c?10:t-(t>>2)),s-1);u>d&&e[u]d&&e[u]d&&e[u]==g;)u--}else for(;u>d&&e[u]d?n(++u):(u=s+t,e[u]==i&&u--,n(u))}else{for(u;u!=s-1&&e[u]!=a;u--);if(u>s){n(u);continue}for(u=s+t;uc;c++)s.push(m)}else 32==l?s.push(f):l>39&&48>l||l>57&&64>l?s.push(g):l>=4352&&e(l)?s.push(t,i):s.push(t)}return s},this.$getStringScreenWidth=function(t,i,n){if(0==i)return[0,0];null==i&&(i=1/0),n=n||0;var o,r;for(r=0;r=4352&&e(o)?2:1,!(n>i));r++);return[n,r]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(0>e)return{row:0,column:0};var i,n,o=0,r=0,s=0,a=0,l=this.$screenRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0)var s=l[c],o=this.$docRowCache[c],u=e>l[h-1];else var u=!h;for(var d=this.getLength()-1,g=this.getNextFoldLine(o),f=g?g.start.row:1/0;e>=s&&(a=this.getRowLength(o),!(s+a>e||o>=d));)s+=a,o++,o>f&&(o=g.end.row+1,g=this.getNextFoldLine(o,g),f=g?g.start.row:1/0),u&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(g&&g.start.row<=o)i=this.getFoldDisplayLine(g),o=g.start.row;else{if(e>=s+a||o>d)return{row:d,column:this.getLine(d).length};i=this.getLine(o),g=null}if(this.$useWrapMode){var p=this.$wrapData[o];if(p){var m=Math.floor(e-s);n=p[m],m>0&&p.length&&(r=p[m-1]||p[p.length-1],i=i.substring(r))}}return r+=this.$getStringScreenWidth(i,t)[1],this.$useWrapMode&&r>=n&&(r=n-1),g?g.idxToPosition(r):{row:o,column:r}},this.documentToScreenPosition=function(e,t){if("undefined"==typeof t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=0,o=null,r=null;r=this.getFoldAt(e,t,1),r&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0)var a=l[c],n=this.$screenRowCache[c],u=e>l[h-1];else var u=!h;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;e>a;){if(a>=g){if(s=d.end.row+1,s>e)break;d=this.getNextFoldLine(s,d),g=d?d.start.row:1/0}else s=a+1;n+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var f="";if(d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),o=d.start.row):(f=this.getLine(e).substring(0,t),o=e),this.$useWrapMode){var p=this.$wrapData[o];if(p){for(var m=0;f.length>=p[m];)n++,m++;f=f.substring(p[m-1]||0,f.length)}}return{row:n,column:this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,o=0,t=this.$foldData[o++],r=t?t.start.row:1/0;i>n;){var s=this.$wrapData[n];e+=s?s.length+1:1,n++,n>r&&(n=t.end.row+1,t=this.$foldData[o++],r=t?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,o=0;o=u;u++){for(var d=0;c>d;d++)if(-1==o[u+d].search(a[d]))continue e;var g=o[u],f=o[u+c-1],p=g.length-g.match(a[0])[0].length,m=f.match(a[c-1])[0].length;l&&l.end.row===u&&l.end.column>p||(s.push(l=new r(u,p,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;vv&&s[v].start.columnv&&s[d].end.column>E&&s[d].end.row==i.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;d>v;v++)s[v].start.row+=i.start.row,s[v].end.row+=i.start.row}return s},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var o=n.exec(e);if(!o||o[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var r=Math.min(e.length,e.length);r--;){var s=e[r];s&&s.toLowerCase()!=s?t[r]=t[r].toUpperCase():t[r]=t[r].toLowerCase()}t=t.join("")}return t}},this.$matchIterator=function(e,t){var i=this.$assembleRegExp(t);if(!i)return!1;var o,s=this,a=t.backwards;if(t.$isMultiLine)var l=i.length,c=function(t,n,s){var a=t.search(i[0]);if(-1!=a){for(var c=1;l>c;c++)if(t=e.getLine(n+c),-1==t.search(i[c]))return;var h=t.match(i[l-1])[0].length,u=new r(n,a,n+l-1,h);return 1==i.offset?(u.start.row--,u.start.column=Number.MAX_VALUE):s&&(u.start.column+=s),o(u)?!0:void 0}};else if(a)var c=function(e,t,r){for(var s=n.getMatchOffsets(e,i),a=s.length-1;a>=0;a--)if(o(s[a],t,r))return!0};else var c=function(e,t,r){for(var s=n.getMatchOffsets(e,i),a=0;a=s;n--)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=a,s=r.row;n>=s;n--)if(i(e.getLine(n),n))return}}:function(i){var n=r.row,o=e.getLine(n).substr(r.column);if(!i(o,n,r.column)){for(n+=1;a>=n;n++)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=s,a=r.row;a>=n;n++)if(i(e.getLine(n),n))return}};return{forEach:l}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function o(e,t){n.call(this,e,t),this.$singleCommand=!1}var r=e("../lib/keys"),s=e("../lib/useragent"),a=r.KEY_MODS;o.prototype=n.prototype,function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var o in n){var r=n[o];if(r==e)delete n[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(n[o]=r[0]))}}},this.bindKey=function(e,t,i){return"object"==typeof e&&(e=e[this.platform]),e?"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var n="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach(function(e){var t=this.parseKeys(e),i=a[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var r=this.parseKeys(e),s=a[r.hashId]+r.key;this._addCommandToBinding(n+s,t,i)},this):void 0},this._addCommandToBinding=function(e,t,i){var n,o=this.commandKeyBinding;t?!o[e]||this.$singleCommand?o[e]=t:(Array.isArray(o[e])?-1!=(n=o[e].indexOf(t))&&o[e].splice(n,1):o[e]=[o[e]],i||t.isDefault?o[e].unshift(t):o[e].push(t)):delete o[e]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),n=r[i];if(r.FUNCTION_KEYS[n])i=r.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=r.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=a[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){var o=a[t]+i,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&n>0&&(e.$keyChain=""),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=o}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,s=function(e,t){o.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(s,o),function(){n.implement(this,r),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var o={editor:t,command:e,args:i};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),o.returnValue===!1?!1:!0},this.toggleRecording=function(e){return this.$inReplay?void 0:(e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(s.prototype),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";function n(e,t){return{win:e,mac:t}}var o=e("../lib/lang"),r=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","Ctrl-E"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){r.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:n("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{ +name:"golineup",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:n("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:n("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"passKeysToBrowser",bindKey:n("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){return e.selection.isEmpty()?void e.remove("left"):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(o.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=e.session.doc.getLine(i.row),h=i.row+1;h<=n.row+1;h++){var u=o.stringTrimLeft(o.stringTrimRight(e.session.doc.getLine(h)));0!==u.length&&(u=" "+u),c+=u}n.row+10?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,o=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;v.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.removeEventListener("changeCursor",this.$onCursorChange),i.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)var n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new A(e.session,i.row,i.column),o=n.getCurrentToken();if(!o||-1===o.type.indexOf("tag-name"))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var r=o.value,s=0,a=n.stepBackward();if("<"==a.value){do a=o,o=n.stepForward(),o&&o.value===r&&-1!==o.type.indexOf("tag-name")&&("<"===a.value?s++:"=0)}else{do o=a,a=n.stepBackward(),o&&o.value===r&&-1!==o.type.indexOf("tag-name")&&("<"===a.value?s++:"=s);n.stepForward()}if(!o)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=n.getCurrentTokenRow(),c=n.getCurrentTokenColumn(),h=new g(l,c,l,c+o.value.length);t.$tagHighlight&&0!==h.compareRange(t.$backMarkers[t.$tagHighlight].range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),h&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(h,"ace_bracket","text"))}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t,i=e.data,n=i.range;t=n.start.row==n.end.row&&"insertLines"!=i.action&&"removeLines"!=i.action?n.end.row:1/0,this.renderer.updateLines(n.start.row,t,this.session.$useWrapMode),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new g(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,o=e.getLine(t.start.row),r=o.length,s=o.substring(Math.max(i,0),Math.min(n,r));if(!(i>=0&&/^[\w\d]/.test(s)||r>=n&&/[\w\d]$/.test(s))&&(s=o.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(s))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(!this.$readOnly){var t={text:e};this._signal("paste",t),this.insert(t.text,!0)}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),o=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var r=n.transformAction(i.getState(o.row),"insertion",this,i,e);r&&(e!==r.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=r.text)}if(" "==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var s=new g.fromPoints(o,o);s.end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();o=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(o.row);if(o.column>a.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);i.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,h=i.getState(o.row),a=i.getLine(o.row),u=n.checkOutdent(h,a,e);i.insert(o,e);if(r&&r.selection&&this.selection.setSelectionRange(2==r.selection.length?new g(o.row,c+r.selection[0],o.row,c+r.selection[1]):new g(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3])),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(h,a.slice(0,o.column),i.getTabString());i.insert({row:o.row+1,column:0},d)}u&&n.autoOutdent(h,i,o.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),o=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var r=i.getTextRange(t);if("\n"==r[r.length-1]){var s=i.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,o=this.session.getLine(e.row);tt.toLowerCase()?1:0});for(var n=new g(0,0,0,0),o=e.first;o<=e.last;o++){var r=t.getLine(o);n.start.row=o,n.end.row=o,n.end.column=r.length,t.replace(n,i[o-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex=t){var r={value:o[0],start:o.index,end:o.index+o[0].length};return r}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),o=this.session.getTextRange(n);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,i);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),e*=s!==r.end&&s>i?Math.pow(10,r.end-i-1):Math.pow(10,r.end-i),l+=e,l/=Math.pow(10,a);var c=l.toFixed(a),h=new g(t,r.start,t,r.end);this.session.replace(h,c),this.moveCursorTo(t,Math.max(r.start+1,i+c.length-r.value.length))}}},this.removeLines=function(){var e,t=this.$getSelectedRows();e=0===t.first||t.last+1=s;)r[a].moveBy(o,0),a--}t.fromOrientedRange(t.ranges[0]),t.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,o=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):t===!1&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),this.$blockScrolling--;var r=i.scrollTop;i.scrollBy(0,o*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new A(this.session,i.row,i.column),o=n.getCurrentToken(),r=o||n.stepForward();if(r){var s,a,l=!1,c={},h=i.column-r.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;h=0;--r)this.$tryReplace(i[r],e)&&n++;return this.selection.setSelectionRange(o),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return t=this.$search.replace(i,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var o=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(o)||this.$search.$options.needle,e||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var r=this.$search.find(this.session);return t.preventScroll?r:r?(this.revealRange(r,i),r):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",function(){n=!0}),s=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,r=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=r.top-s.offset;n=r.top>=0&&a+t.top<0?!0:r.topwindow.innerHeight?!1:null,null!=n&&(o.style.top=a+"px",o.style.left=r.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",r),this.renderer.removeEventListener("afterRender",a),this.renderer.removeEventListener("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(w.prototype),v.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),t.Editor=w}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),i},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(n.prototype),t.UndoManager=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){o.implement(this,s),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;ts&&(p=r.end.row+1,r=t.getNextFoldLine(p,r),s=r?r.start.row:1/0),p>o){for(;this.$cells.length>f+1;)g=this.$cells.pop(),this.element.removeChild(g.element);break}g=this.$cells[++f],g||(g={element:null,textNode:null,foldWidget:null},g.element=n.createElement("div"),g.textNode=document.createTextNode(""),g.element.appendChild(g.textNode),this.element.appendChild(g.element),this.$cells[f]=g);var m="ace_gutter-cell ";l[p]&&(m+=l[p]),c[p]&&(m+=c[p]),this.$annotations[p]&&(m+=this.$annotations[p].className),g.element.className!=m&&(g.element.className=m);var v=t.getRowLength(p)*e.lineHeight+"px";if(v!=g.element.style.height&&(g.element.style.height=v),a){var A=a[p];null==A&&(A=a[p]=t.getFoldWidget(p))}if(A){g.foldWidget||(g.foldWidget=n.createElement("span"),g.element.appendChild(g.foldWidget));var m="ace_fold-widget ace_"+A;m+="start"==A&&p==s&&pi.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../range").Range,o=e("../lib/dom"),r=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var o=n.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),n.renderer){var r=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;n.renderer(t,o,s,r,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,o,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,o,n.clazz,e):o.isMultiLine()?"text"==n.type?this.drawTextMarker(t,o,n.clazz,e):this.drawMultiLineMarker(t,o,n.clazz,e):this.drawSingleLineMarker(t,o,n.clazz+" ace_start",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,o,r){var s=t.start.row,a=new n(s,t.start.column,s,this.session.getScreenLastRowColumn(s));for(this.drawSingleLineMarker(e,a,i+" ace_start",o,1,r),s=t.end.row,a=new n(s,0,s,t.end.column),this.drawSingleLineMarker(e,a,i,o,0,r),s=t.start.row+1;s"),a=this.$getTop(t.end.row,n);var c=t.end.column*n.characterWidth;e.push("
    "),s=(t.end.row-t.start.row-1)*n.lineHeight,0>s||(a=this.$getTop(t.start.row+1,n),e.push("
    "))},this.drawSingleLineMarker=function(e,t,i,n,o,r){var s=n.lineHeight,a=(t.end.column+(o||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;e.push("
    ")},this.drawFullLineMarker=function(e,t,i,n,o){var r=this.$getTop(t.start.row,n),s=n.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,n)-r),e.push("
    ")},this.drawScreenLineMarker=function(e,t,i,n,o){var r=this.$getTop(t.start.row,n),s=n.lineHeight;e.push("
    ")}}).call(r.prototype),t.Marker=r}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,s),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=e?(this.EOL_CHAR=e,!0):void 0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;e+1>i;i++)t.push(this.showInvisibles?""+this.TAB_CHAR+r.stringRepeat(" ",i-1)+"":r.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",o="",s="";if(this.showInvisibles){n+=" ace_invisible",o=" ace_invisible_space",s=" ace_invisible_tab";var a=r.stringRepeat(this.SPACE_CHAR,this.tabSize),l=this.TAB_CHAR+r.stringRepeat(" ",this.tabSize-1)}else var a=r.stringRepeat(" ",this.tabSize),l=a;this.$tabStrings[" "]=""+a+"",this.$tabStrings[" "]=""+l+""}},this.updateLines=function(e,t,i){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),o=Math.min(i,e.lastRow),r=this.element.childNodes,s=0,a=e.firstRow;n>a;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}s++}for(var a=n,l=this.session.getNextFoldLine(a),c=l?l.start.row:1/0;;){if(a>c&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),c=l?l.start.row:1/0),a>o)break;var h=r[s++];if(h){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==c?l:!1),h.style.height=e.lineHeight*this.session.getRowLength(a)+"px",h.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(var n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRowt.lastRow){var o=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(o)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;;){if(r>a&&(r=s.end.row+1,s=this.session.getNextFoldLine(r,s),a=s?s.start.row:1/0),r>i)break;var l=o.createElement("div"),c=[];if(this.$renderLine(c,r,!1,r==a?s:!1),l.innerHTML=c.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(r)+"px";else for(;l.firstChild;)n.appendChild(l.firstChild);r++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,o=i,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;;){if(o>s&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),s=r?r.start.row:1/0),o>n)break;this.$useLineGroups()&&t.push("
    "),this.$renderLine(t,o,!1,o==s?r:!1),this.$useLineGroups()&&t.push("
    "),o++}this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var o=this,s=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,a=function(e,i,n,s,a){if(i)return o.showInvisibles?""+r.stringRepeat(o.SPACE_CHAR,e.length)+"":r.stringRepeat(" ",e.length);if("&"==e)return"&";if("<"==e)return"<";if(" "==e){var l=o.session.getScreenTabSize(t+s);return t+=l-1,o.$tabStrings[l]}if(" "==e){var c=o.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h=o.showInvisibles?o.SPACE_CHAR:"";return t+=1,""+h+""}return n?""+o.SPACE_CHAR+"":(t+=1,""+e+"")},l=n.replace(s,a);if(this.$textToken[i.type])e.push(l);else{var c="ace_"+i.type.replace(/\./g," ace_"),h="";"fold"==i.type&&(h=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return 0>=n||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(r.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):" "==t[0]?(e.push(r.stringRepeat(this.$tabStrings[" "],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var o=0,r=0,s=i[0],a=0,l=0;l=s;)a=this.$renderToken(e,a,c,h.substring(0,s-o)),h=h.substring(s-o),o=s,n||e.push("","
    "),r++,a=0,s=i[r]||Number.MAX_VALUE;0!=h.length&&(o+=h.length,a=this.$renderToken(e,a,c,h))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],o=n.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(i=this.$renderToken(e,i,n,o));for(var r=1;r"),o.length){var r=this.session.getRowSplitData(t);r&&r.length?this.$renderWrappedLine(e,o,r,i):this.$renderSimpleLine(e,o)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
    ")},this.$getFoldLineTokens=function(e,t){function i(e,t,i){for(var n=0,r=0;r+e[n].value.lengthi-t&&(s=s.substring(0,i-t)), +o.push({type:e[n].type,value:s}),r=t+s.length,n+=1}for(;i>r&&ni?{type:e[n].type,value:s.substring(0,i-r)}:e[n]),r+=s.length,n+=1}}var n=this.session,o=[],r=n.getTokens(e);return t.walk(function(e,t,s,a,l){null!=e?o.push({type:"fold",value:e}):(l&&(r=n.getTokens(t)),r.length&&i(r,a,s))},t.end.row,this.session.getLine(t.end.row).length),o},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n,o=e("../lib/dom"),r=function(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,o.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=(e?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var e=o.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&o.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e),n=this.$padding+i.column*this.config.characterWidth,o=(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:o}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;(void 0===t||0===t.length)&&(t=[{cursor:null}]);for(var i=0,o=t.length;o>i;i++){var r=this.getPixelPosition(t[i].cursor,!0);if(!((r.top>e.height+e.offset||r.top<0)&&i>1)){var s=(this.cursors[n++]||this.addCursor()).style;s.left=r.left+"px",s.top=r.top+"px",s.width=e.characterWidth+"px",s.height=e.lineHeight+"px"}}for(;this.cursors.length>n;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=r,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),t.Cursor=r}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/dom"),r=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=o.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=o.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)};(function(){n.implement(this,s),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=o.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),o=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(o.prototype),t.RenderLoop=o}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,c=t.FontMetrics=function(e,t){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=r.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=o.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&1>t?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="-100px",e.visibility="hidden",e.position="fixed",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var i={height:e.height,width:e.width/l}}else var i={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===i.width||0===i.height?null:i},this.$measureCharWidth=function(e){this.$main.innerHTML=r.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(c.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/dom"),r=e("./config"),s=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,g=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,p=e("./lib/event_emitter").EventEmitter,m='.ace_editor { position: relative; overflow: hidden; font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace; direction: ltr; } .ace_scroller { position: absolute; overflow: hidden; top: 0; bottom: 0; background-color: inherit; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; cursor: text; } .ace_content { position: absolute; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; min-width: 100%; } .ace_dragging .ace_scroller:before{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; content: \'\'; background: rgba(250, 250, 250, 0.01); z-index: 1000; } .ace_dragging.ace_dark .ace_scroller:before{ background: rgba(0, 0, 0, 0.01); } .ace_selecting, .ace_selecting * { cursor: text !important; } .ace_gutter { position: absolute; overflow : hidden; width: auto; top: 0; bottom: 0; left: 0; cursor: default; z-index: 4; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } .ace_gutter-active-line { position: absolute; left: 0; right: 0; } .ace_scroller.ace_scroll-left { box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; } .ace_gutter-cell { padding-left: 19px; padding-right: 6px; background-repeat: no-repeat; } .ace_gutter-cell.ace_error { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_warning { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); background-position: 2px center; } .ace_gutter-cell.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); background-position: 2px center; } .ace_dark .ace_gutter-cell.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); } .ace_scrollbar { position: absolute; right: 0; bottom: 0; z-index: 6; } .ace_scrollbar-inner { position: absolute; cursor: text; left: 0; top: 0; } .ace_scrollbar-v{ overflow-x: hidden; overflow-y: scroll; top: 0; } .ace_scrollbar-h { overflow-x: scroll; overflow-y: hidden; left: 0; } .ace_print-margin { position: absolute; height: 100%; } .ace_text-input { position: absolute; z-index: 0; width: 0.5em; height: 1em; opacity: 0; background: transparent; -moz-appearance: none; appearance: none; border: none; resize: none; outline: none; overflow: hidden; font: inherit; padding: 0 1px; margin: 0 -1px; text-indent: -1em; -ms-user-select: text; -moz-user-select: text; -webkit-user-select: text; user-select: text; } .ace_text-input.ace_composition { background: inherit; color: inherit; z-index: 1000; opacity: 1; text-indent: 0; } .ace_layer { z-index: 1; position: absolute; overflow: hidden; white-space: pre; height: 100%; width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; pointer-events: none; } .ace_gutter-layer { position: relative; width: auto; text-align: right; pointer-events: auto; } .ace_text-layer { font: inherit !important; } .ace_cjk { display: inline-block; text-align: center; } .ace_cursor-layer { z-index: 4; } .ace_cursor { z-index: 4; position: absolute; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; border-left: 2px solid } .ace_slim-cursors .ace_cursor { border-left-width: 1px; } .ace_overwrite-cursors .ace_cursor { border-left-width: 0; border-bottom: 1px solid; } .ace_hidden-cursors .ace_cursor { opacity: 0.2; } .ace_smooth-blinking .ace_cursor { -webkit-transition: opacity 0.18s; transition: opacity 0.18s; } .ace_editor.ace_multiselect .ace_cursor { border-left-width: 1px; } .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { position: absolute; z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; z-index: 5; } .ace_marker-layer .ace_bracket { position: absolute; z-index: 6; } .ace_marker-layer .ace_active-line { position: absolute; z-index: 2; } .ace_marker-layer .ace_selected-word { position: absolute; z-index: 4; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ace_line .ace_fold { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; display: inline-block; height: 11px; margin-top: -2px; vertical-align: middle; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); background-repeat: no-repeat, repeat-x; background-position: center center, top left; color: transparent; border: 1px solid black; border-radius: 2px; cursor: pointer; pointer-events: auto; } .ace_dark .ace_fold { } .ace_fold:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); } .ace_tooltip { background-color: #FFF; background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1)); background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1)); border: 1px solid gray; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; max-width: 100%; padding: 3px 4px; position: fixed; z-index: 999999; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; cursor: default; white-space: pre; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; } .ace_folding-enabled > .ace_gutter-cell { padding-right: 13px; } .ace_fold-widget { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0 -12px 0 1px; display: none; width: 11px; vertical-align: top; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; } .ace_folding-enabled .ace_fold-widget { display: inline-block; } .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); } .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); } .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } .ace_dark .ace_fold-widget { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); } .ace_dark .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget:hover { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } .ace_fold-widget.ace_invalid { background-color: #FFB4B4; border-color: #DE5555; } .ace_fade-fold-widgets .ace_fold-widget { -webkit-transition: opacity 0.4s ease 0.05s; transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { -webkit-transition: opacity 0.05s ease 0.05s; transition: opacity 0.05s ease 0.05s; opacity:1; } .ace_underline { text-decoration: underline; } .ace_bold { font-weight: bold; } .ace_nobold .ace_bold { font-weight: normal; } .ace_italic { font-style: italic; } .ace_error-marker { background-color: rgba(255, 0, 0,0.2); position: absolute; z-index: 9; } .ace_highlight-marker { background-color: rgba(255, 255, 0,0.2); position: absolute; z-index: 8; } ';o.importCssString(m,"ace_editor");var v=function(e,t){var i=this;this.container=e||o.createElement("div"),this.$keepTextAreaAtCursor=!s.isOldIE,o.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var n=this.$textLayer=new c(this.content);this.canvas=n.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),r.resetOptions(this),r._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;n||(n=o.clientHeight||o.scrollHeight),i||(i=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var o=0,r=this.$size,s={width:r.width,height:r.height,scrollerHeight:r.scrollerHeight,scrollerWidth:r.scrollerWidth};return n&&(e||r.height!=n)&&(r.height=n,o|=this.CHANGE_SIZE,r.scrollerHeight=r.height,this.$horizScroll&&(r.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),i&&(e||r.width!=i)&&(o|=this.CHANGE_SIZE,r.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",r.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)),r.$dirty=!i||!n,o&&this._signal("resize",s),o},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.lineHeight;if(!(0>t||t>e.height-n)){var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,n+=2}i-=this.scrollLeft,i>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,this.textarea.style.height=n+"px",this.textarea.style.width=o+"px",this.textarea.style.left=Math.min(i,this.$size.scrollerWidth-o)+"px",this.textarea.style.top=Math.min(t,this.$size.height-n)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|n,o.left=0|i,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top), +this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var o=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),o=n*this.lineHeight,r=this.scrollTop%this.lineHeight,s=t.scrollerHeight+this.lineHeight,a=this.$getLongestLine(),l=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-a-2*this.$padding<0),c=this.$horizScroll!==l;c&&(this.$horizScroll=l,this.scrollBarH.setVisible(l));var h=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;o+=h,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,o-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,a+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var u=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-o+h<0||this.scrollTop),d=this.$vScroll!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g,f,p=Math.ceil(s/this.lineHeight)-1,m=Math.max(0,Math.round((this.scrollTop-r)/this.lineHeight)),v=m+p,A=this.lineHeight;m=e.screenToDocumentRow(m,0);var w=e.getFoldLine(m);w&&(m=w.start.row),g=e.documentToScreenRow(m,0),f=e.getRowLength(m)*A,v=Math.min(e.screenToDocumentRow(v,0),e.getLength()-1),s=t.scrollerHeight+e.getRowLength(v)*A+f,r=this.scrollTop-g*A;var C=0;return this.layerConfig.width!=a&&(C=this.CHANGE_H_SCROLL),(c||d)&&(C=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(a=this.$getLongestLine())),this.layerConfig={width:a,padding:this.$padding,firstRow:m,firstRowScreen:g,lastRow:v,lineHeight:A,characterWidth:this.characterWidth,minHeight:s,maxHeight:o,offset:r,gutterOffset:Math.max(0,Math.ceil((r+t.height-t.scrollerHeight)/A)),height:this.$size.scrollerHeight},C},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;return e>i.lastRow+1||tr?(t&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-ao?(oi;++i)o.push(r(i/this.STEPS,e,t-e));return o},this.scrollToLine=function(e,t,i,n){var o=this.$cursorLayer.getPixelPosition({row:e,column:0}),r=o.top;t&&(r-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(r),i!==!1&&this.animateScrolling(s,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0],e==i))return}var r=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:r},clearInterval(this.$timer),n.session.setScrollTop(r.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){r.length?(n.session.setScrollTop(r.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return 0>t&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:0>e&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=(e+this.scrollLeft-i.left-this.$padding)/this.characterWidth,o=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),r=Math.round(n);return{row:o,column:r,side:n-r>0?1:-1}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=Math.round((e+this.scrollLeft-i.left-this.$padding)/this.characterWidth),o=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(o,Math.max(n,0))},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),o=this.$padding+Math.round(n.column*this.characterWidth),r=n.row*this.lineHeight;return{pageX:i.left+o-this.scrollLeft,pageY:i.top+r-this.scrollTop}},this.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(o.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function i(i){if(n.$themeId!=e)return t&&t();if(i.cssClass){o.importCssString(i.cssText,i.cssClass,n.container.ownerDocument),n.theme&&o.removeCssClass(n.container,n.theme.cssClass);var r="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&r!=n.$padding&&n.setPadding(r),n.$theme=i.cssClass,n.theme=i,o.addCssClass(n.container,i.cssClass),o.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}}var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)i(e);else{var s=e||this.$options.theme.initialValue;r.loadModule(["theme",s],i)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){o.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){o.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(v.prototype),r.defineOptions(v.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=e?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=o.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=v}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,a=e("../config"),l=function(t,n,o,r){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)r=r||a.moduleUrl(n.id,"worker");else{var s=this.$normalizePath;r=r||s(e.toUrl("ace/worker/worker.js",null,"_"));var l={};t.forEach(function(t){l[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var c=n.src,h=i(19),u=new h([c],{type:"application/javascript"}),d=(window.URL||window.webkitURL).createObjectURL(u);this.$worker=new Worker(d)}catch(g){if(!(g instanceof window.DOMException))throw g;var u=this.$workerBlob(r),f=window.URL||window.webkitURL,p=f.createObjectURL(u);this.$worker=new Worker(p),f.revokeObjectURL(p)}this.$worker.postMessage({init:!0,tlns:l,module:n.id,classname:o}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,o=new n;return o.append(t),o.getBlob("application/javascript")}}}).call(l.prototype);var c=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,o=!1,r=Object.create(s),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(o?setTimeout(c):c())},this.setEmitSync=function(e){o=e};var c=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&r._signal(e.event,e.data)};r.postMessage=function(e){l.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],function(e){for(n=new e[i](r);l.messageBuffer.length;)c()})};c.prototype=l.prototype,t.UIWorkerClient=c,t.WorkerClient=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),s=function(e,t,i,n,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){r.implement(this,o),this.setup=function(){var e=this,t=this.doc,i=this.session,o=this.$pos;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(o.row,o.column),this.markerId=i.addMarker(new n(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new n(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);e.others.push(n)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1),i.on("change",function(o){e.removeMarker(i.markerId),i.markerId=e.addMarker(new n(o.value.row,o.value.column,o.value.row,o.value.column+t.length),t.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&i.start.column<=this.pos.column+this.length+1){var r=i.start.column-this.pos.column;if(this.length+=o,!this.session.$fromUndo){if("insertText"===t.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};a.row===i.start.row&&i.start.column=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};a.row===i.start.row&&i.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;ei;i++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(s.prototype),t.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){function n(e,t){return e.row==t.row&&e.column==t.column}function o(e){var t=e.domEvent,i=t.altKey,o=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&s.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)return void e.editor.textInput.onContextMenu(e.domEvent);if(!a&&!i&&!l)return void(0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());if(0===c){var h,u=e.editor,d=u.selection,g=u.inMultiSelectMode,f=e.getDocumentPosition(),p=d.getCursor(),m=e.inSelection()||d.isEmpty()&&n(f,p),v=e.x,A=e.y,w=function(e){v=e.clientX,A=e.clientY},C=u.session,E=u.renderer.pixelToScreenCoordinates(v,A),F=E;if(u.$mouseHandler.$enableJumpToDef)a&&i||l&&i?h="add":i&&(h="block");else if(l&&!i){if(h="add",!g&&o)return}else i&&(h="block");if(h&&s.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==h){if(!g&&m)return;if(!g){var y=d.toOrientedRange();u.addSelectionMarker(y)}var b=d.rangeList.rangeAtPoint(f);u.$blockScrolling++,u.inVirtualSelectionMode=!0,o&&(b=null,y=d.ranges[0],u.removeSelectionMarker(y)),u.once("mouseup",function(){var e=d.toOrientedRange();b&&e.isEmpty()&&n(b.cursor,e.cursor)?d.substractPoint(e.cursor):(o?d.substractPoint(y.cursor):y&&(u.removeSelectionMarker(y),d.addRange(y)),d.addRange(e)),u.$blockScrolling--,u.inVirtualSelectionMode=!1})}else if("block"==h){e.stop(),u.inVirtualSelectionMode=!0;var x,S=[],$=function(){var e=u.renderer.pixelToScreenCoordinates(v,A),t=C.screenToDocumentPosition(e.row,e.column);n(F,e)&&n(t,d.lead)||(F=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(S),S=d.rectangularRangeBlock(F,E),u.$mouseHandler.$clickSelection&&1==S.length&&S[0].isEmpty()&&(S[0]=u.$mouseHandler.$clickSelection.clone()),S.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};g&&!l?d.toSingleRange():!g&&l&&(x=d.toOrientedRange(),u.addSelectionMarker(x)),o?E=C.documentToScreenPosition(d.lead):d.moveToPosition(f),F={row:-1,column:-1};var B=function(e){clearInterval(k),u.removeSelectionMarkers(S),S.length||(S=[d.toOrientedRange()]),u.$blockScrolling++,x&&(u.removeSelectionMarker(x),d.toSingleRange(x));for(var t=0;t1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);return t?(this.$onRemoveRange(t),t[0]):void 0},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0], +t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var i=this.getRange(),n=this.isBackwards(),o=i.start.row,r=i.end.row;if(o==r){if(n)var s=i.end,a=i.start;else var s=i.start,a=i.end;return this.addRange(l.fromPoints(a,a)),void this.addRange(l.fromPoints(s,s))}var c=[],h=this.getLineRange(o,!0);h.start.column=i.start.column,c.push(h);for(var u=o+1;r>u;u++)c.push(this.getLineRange(u,!0));h=this.getLineRange(r,!0),h.end.column=i.end.column,c.push(h),c.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),o=this.session.documentToScreenPosition(this.selectionAnchor),r=this.rectangularRangeBlock(n,o);r.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],r=e.columns&&(s=0),0>h&&(h=0),h==u&&(i=!0);for(var d=h;u>=d;d++){var g=l.fromPoints(this.session.screenToDocumentPosition(d,s),this.session.screenToDocumentPosition(d,a));if(g.isEmpty()){if(f&&o(g.end,f))break;var f=g.end}g.cursor=r?g.start:g.end,n.push(g)}if(c&&n.reverse(),!i){for(var p=n.length-1;n[p].isEmpty()&&p>0;)p--;if(p>0)for(var m=0;n[m].isEmpty();)m++;for(var v=p;v>=m;v--)n[v].isEmpty()&&n.splice(v,1)}return n}}.call(c.prototype);var v=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var o=t.indexOf(n);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(g.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(g.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,o=i&&i.keepOrder,r=1==i||i&&i.$byLines,s=this.session,a=this.selection,l=a.rangeList,h=(o?a:l).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=a._eventRegistry;a._eventRegistry={};var d=new c(s);this.inVirtualSelectionMode=!0;for(var g=h.length;g--;){if(r)for(;g>0&&h[g].start.row==h[g-1].end.row;)g--;d.fromOrientedRange(h[g]),d.index=g,this.selection=s.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===f||(n=f),d.toOrientedRange(h[g])}d.detach(),this.selection=s.selection=a,this.inVirtualSelectionMode=!1,a._eventRegistry=u,a.mergeOverlappingRanges();var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;nn.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,e);for(var o=n.length;o--;){var r=n[o];r.isEmpty()||this.session.remove(r),this.session.insert(r.start,i[o])}}},this.findAll=function(e,t,i){if(t=t||{},t.needle=e||t.needle,void 0==t.needle){var n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(n)}this.$search.set(t);var o=this.$search.findAll(this.session);if(!o.length)return 0;this.$blockScrolling+=1;var r=this.multiSelect;i||r.toSingleRange(o[0]);for(var s=o.length;s--;)r.addRange(o[s],!0);return n&&r.rangeList.rangeAtPoint(n.start)&&r.addRange(n,!0),this.$blockScrolling-=1,o.length},this.selectMoreLines=function(e,t){var i=this.selection.toOrientedRange(),n=i.cursor==i.end,o=this.session.documentToScreenPosition(i.cursor);this.selection.$desiredColumn&&(o.column=this.selection.$desiredColumn);var r=this.session.screenToDocumentPosition(o.row+e,o.column);if(i.isEmpty())var s=r;else var a=this.session.documentToScreenPosition(n?i.end:i.start),s=this.session.screenToDocumentPosition(a.row+e,a.column);if(n){var c=l.fromPoints(r,s);c.cursor=c.start}else{var c=l.fromPoints(s,r);c.cursor=c.end}if(c.desiredColumn=o.column,this.selection.inMultiSelectMode){if(t)var h=i.cursor}else this.selection.addRange(i);this.selection.addRange(c),h&&this.selection.substractPoint(h)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,o=n.length;o--;){var r=n[o];if(r.isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}}i.mergeOverlappingRanges();for(var a=[],o=n.length;o--;){var r=n[o];a.unshift(t.getTextRange(r))}0>e?a.unshift(a.pop()):a.push(a.shift());for(var o=n.length;o--;){var r=n[o],s=r.clone();t.replace(r,a[o]),r.start.row=s.start.row,r.start.column=s.start.column}},this.selectMore=function(e,t,i){var o=this.session,r=o.multiSelect,s=r.toOrientedRange();if(!s.isEmpty()||(s=o.getWordRange(s.start.row,s.start.column),s.cursor=-1==e?s.start:s.end,this.multiSelect.addRange(s),!i)){var a=o.getTextRange(s),l=n(o,a,e);l&&(l.cursor=-1==e?l.start:l.end,this.$blockScrolling+=1,this.session.unfold(l),this.multiSelect.addRange(l),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,o=i.filter(function(e){return e.cursor.row==n?!0:void(n=e.cursor.row)});if(i.length&&o.length!=i.length-1){o.forEach(function(e){t.substractPoint(e.cursor)});var r=0,s=1/0,a=i.map(function(t){var i=t.cursor,n=e.getLine(i.row),o=n.substr(i.column).search(/\S/g);return-1==o&&(o=0),i.column>r&&(r=i.column),s>o&&(s=o),o});i.forEach(function(t,i){var n=t.cursor,o=r-n.column,c=a[i]-s;o>c?e.insert(n,d.stringRepeat(" ",o-c)):e.remove(new l(n.row,n.column,n.row,n.column-o+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),h=c.start.row,u=c.end.row,g=h==u;if(g){var f,p=this.session.getLength();do f=this.session.getLine(u);while(/[=:]/.test(f)&&++u0);0>h&&(h=0),u>=p&&(u=p-1)}var m=this.session.doc.removeLines(h,u);m=this.$reAlignText(m,g),this.session.doc.insert({row:h,column:0},m.join("\n")+"\n"),g||(c.start.column=0,c.end.column=m[m.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){function i(e){return d.stringRepeat(" ",e)}function n(e){return e[2]?i(s)+e[2]+i(a-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?i(s+a-e[2].length)+e[2]+i(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function r(e){return e[2]?i(s)+e[2]+i(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var s,a,l,c=!0,h=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==s?(s=t[1].length,a=t[2].length,l=t[3].length,t):(s+a+l!=t[1].length+t[2].length+t[3].length&&(h=!1),s!=t[1].length&&(c=!1),s>t[1].length&&(s=t[1].length),at[3].length&&(l=t[3].length),t):[e]}).map(t?n:c?h?o:n:r)}}).call(v.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=r,e("./config").defineOptions(v.prototype,"editor",{enableMultiselect:{set:function(e){r(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",h)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",h))},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=i||r.length,l=e.getLength(),c=t,h=t;++t=u)break;h=t}}if(h>c){var d=e.getLine(h).length;return new n(c,a,h,d)}}},this.openingBracketBlock=function(e,t,i,o,r){var s={row:i,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,i,o,r){var s={row:i,column:o},a=e.$findOpeningBracket(t,s);return a?(a.column++,s.column--,n.fromPoints(a,s)):void 0}}).call(o.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter { background: #f0f0f0; color: #333; } .ace-tm .ace_print-margin { width: 1px; background: #e8e8e8; } .ace-tm .ace_fold { background-color: #6B72E6; } .ace-tm { background-color: #FFFFFF; color: black; } .ace-tm .ace_cursor { color: black; } .ace-tm .ace_invisible { color: rgb(191, 191, 191); } .ace-tm .ace_storage, .ace-tm .ace_keyword { color: blue; } .ace-tm .ace_constant { color: rgb(197, 6, 11); } .ace-tm .ace_constant.ace_buildin { color: rgb(88, 72, 246); } .ace-tm .ace_constant.ace_language { color: rgb(88, 92, 246); } .ace-tm .ace_constant.ace_library { color: rgb(6, 150, 14); } .ace-tm .ace_invalid { background-color: rgba(255, 0, 0, 0.1); color: red; } .ace-tm .ace_support.ace_function { color: rgb(60, 76, 114); } .ace-tm .ace_support.ace_constant { color: rgb(6, 150, 14); } .ace-tm .ace_support.ace_type, .ace-tm .ace_support.ace_class { color: rgb(109, 121, 222); } .ace-tm .ace_keyword.ace_operator { color: rgb(104, 118, 135); } .ace-tm .ace_string { color: rgb(3, 106, 7); } .ace-tm .ace_comment { color: rgb(76, 136, 107); } .ace-tm .ace_comment.ace_doc { color: rgb(0, 102, 255); } .ace-tm .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191); } .ace-tm .ace_constant.ace_numeric { color: rgb(0, 0, 205); } .ace-tm .ace_variable { color: rgb(49, 132, 149); } .ace-tm .ace_xml-pe { color: rgb(104, 104, 91); } .ace-tm .ace_entity.ace_name.ace_function { color: #0000A2; } .ace-tm .ace_heading { color: rgb(12, 7, 255); } .ace-tm .ace_list { color:rgb(185, 6, 144); } .ace-tm .ace_meta.ace_tag { color:rgb(0, 22, 142); } .ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0) } .ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255); } .ace-tm.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px white; border-radius: 2px; } .ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0); } .ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101); } .ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192); } .ace-tm .ace_marker-layer .ace_active-line { background: rgba(0, 0, 0, 0.07); } .ace-tm .ace_gutter-active-line { background-color : #dcdcdc; } .ace-tm .ace_marker-layer .ace_selected-word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250); } .ace-tm .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; } ';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}var o=(e("./lib/oop"),e("./lib/dom"));e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.data,n=i.range,o=n.start.row,r=n.end.row-o;if(0===r);else if("removeText"==i.action||"removeLines"==i.action){var s=t.splice(o+1,r);s.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var a=new Array(r);a.unshift(o,0),t.splice.apply(t,a),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,i){e&&(t=!1,e.row=i)}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=void 0),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var o=1/0,r=0;ra&&(a=0)),s.rowCount!=a&&(s.rowCount=a,s.row0&&!n[o];)o--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var s=o;r>=s;s++){var a=n[s];if(a&&a.el){a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(n.prototype),t.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e,t,i){for(var n=0,o=e.length-1;o>=n;){var r=n+o>>1,s=i(t,e[r]);if(s>0)n=r+1;else{if(!(0>s))return r;o=r-1}}return-(n+1)}function o(e,t,i){var o=e.getAnnotations().sort(a.comparePoints);if(o.length){var r=n(o,{row:t,column:-1},a.comparePoints);0>r&&(r=-r-1),r>=o.length-1?r=i>0?0:o.length-1:0===r&&0>i&&(r=o.length-1);var s=o[r];if(s&&i){if(s.row===t){do s=o[r+=i];while(s&&s.row===t);if(!s)return o.slice()}var l=[];t=s.row;do l[0>i?"unshift":"push"](s),s=o[r+=i];while(s&&s.row==t);return l.length&&l}}}var r=e("../line_widgets").LineWidgets,s=e("../lib/dom"),a=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new r(i),i.widgetManager.attach(e));var n=e.getCursorPosition(),a=n.row,l=i.lineWidgets&&i.lineWidgets[a];l?l.destroy():a-=t;var c,h=o(i,a,t);if(h){var u=h[0];n.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,n.row=u.row,c=e.renderer.$gutterLayer.$annotations[n.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(n.row),e.selection.moveToPosition(n);var d={row:n.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div")},g=d.el.appendChild(s.createElement("div")),f=d.el.appendChild(s.createElement("div"));f.className="error_widget_arrow "+c.className;var p=e.renderer.$cursorLayer.getPixelPosition(n).left;f.style.left=p+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+c.className,g.innerHTML=c.text.join("
    "),g.appendChild(s.createElement("div"));var m=function(e,t,i){return 0!==t||"esc"!==i&&"return"!==i?void 0:(d.destroy(),{command:"null"})};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},s.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; } ","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),o=e("./lib/event"),r=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.edit=function(e){if("string"==typeof e){var i=e;if(e=document.getElementById(i),!e)throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}else s=n.getInnerText(e),e.innerHTML="";var c=t.createEditSession(s),h=new r(new l(e));h.setSession(c);var u={document:c,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),o.addListener(window,"resize",u.onResize),h.on("destroy",function(){o.removeListener(window,"resize",u.onResize),u.editor.container.env=null}),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var i=new s(e,t);return i.setUndoManager(new a),i},t.EditSession=s,t.UndoManager=a}),function(){ace.acequire(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),e.exports=window.ace.acequire("ace/ace")},function(e,t,i){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};n.inherits(r,o),t.JsonHighlightRules=r}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var i=e.getLine(t),o=i.match(/^(\s*\})/);if(!o)return 0;var r=o[1].length,s=e.findMatchingBracket({row:t,column:r});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new n(t,0,t,r-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";var n,o=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],h={},u=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t]?n=h[t]:void(n=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,i,o,r){var s=i.getCursorPosition(),l=o.doc.getLine(s.row);if("{"==r){u(i);var c=i.getSelectionRange(),h=o.doc.getTextRange(c);if(""!==h&&"{"!==h&&i.getWrapBehavioursEnabled())return{text:"{"+h+"}",selection:!1};if(d.isSaneInsertion(i,o))return/[\]\}\)]/.test(l[s.column])||i.inMultiSelectMode?(d.recordAutoInsert(i,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(i,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){u(i);var g=l.substring(s.column,s.column+1);if("}"==g){var f=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==f&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){u(i);var p="";d.isMaybeInsertedClosing(s,l)&&(p=a.stringRepeat("}",n.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var g=l.substring(s.column,s.column+1);if("}"===g){var m=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!m)return null;var v=this.$getIndent(o.getLine(m.row))}else{if(!p)return void d.clearMaybeInsertedClosing();var v=this.$getIndent(l)}var A=v+o.getTabString();return{text:"\n"+A+"\n"+v+p,selection:[1,A.length,1,A.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){u(i);var a=o.doc.getLine(r.start.row),l=a.substring(r.end.column,r.end.column+1);if("}"==l)return r.end.column++,r;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,i,n,o){if("("==o){u(i);var r=i.getSelectionRange(),s=n.doc.getTextRange(r);if(""!==s&&i.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(i,n))return d.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){u(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var h=n.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==h&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,i,n,o){var r=n.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r){u(i);var s=n.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,i,n,o){if("["==o){u(i);var r=i.getSelectionRange(),s=n.doc.getTextRange(r);if(""!==s&&i.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(i,n))return d.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){u(i);var a=i.getCursorPosition(),l=n.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var h=n.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==h&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,i,n,o){var r=n.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r){u(i);var s=n.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,i,n,o){if('"'==o||"'"==o){u(i);var r=o,s=i.getSelectionRange(),a=n.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&i.getWrapBehavioursEnabled())return{text:r+a+r,selection:!1};var l=i.getCursorPosition(),c=n.doc.getLine(l.row),h=c.substring(l.column-1,l.column);if("\\"==h)return null;for(var g,f=n.getTokens(s.start.row),p=0,m=-1,v=0;vm&&(m=g.value.indexOf(r)),!(g.value.length+p>s.start.column));v++)p+=f[v].value.length;if(!g||0>m&&"comment"!==g.type&&("string"!==g.type||s.start.column!==g.value.length+p-1&&g.value.lastIndexOf(r)===g.value.length-1)){if(!d.isSaneInsertion(i,n))return;return{text:r+r,selection:[1,1]}}if(g&&"string"===g.type){var A=c.substring(l.column,l.column+1);if(A==r)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,i,n,o){var r=n.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==r||"'"==r)){u(i);var s=n.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==r)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new s(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){ +var o=new s(t,i.row,i.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,i){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=o.row,n.autoInsertedLineEnd=i+r.substr(o.column),n.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,i){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=o.row,n.maybeInsertedLineStart=r.substr(0,o.column)+i,n.maybeInsertedLineEnd=r.substr(o.column),n.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(d,r),t.CstyleBehaviour=d}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,r=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(s,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,i,n){var o=e.getLine(i),r=o.match(this.foldingStartMarker);if(r){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],i,s);var a=e.getCommentFoldRange(i,s+r[0].length,1);return a&&!a.isMultiLine()&&(n?a=this.getSectionRange(e,i):"all"!=t&&(a=null)),a}if("markbegin"!==t){var r=o.match(this.foldingStopMarker);if(r){var s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],i,s):e.getCommentFoldRange(i,s,-1)}}},this.getSectionRange=function(e,t){var i=e.getLine(t),n=i.search(/\S/),r=t,s=i.length;t+=1;for(var a=t,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=r)break;if(h.isMultiLine())t=h.end.row;else if(n==c)break}a=t}}return new o(r,s,a,e.getLine(a).length)}}.call(s.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};o.inherits(u,r),function(){this.getNextLineIndent=function(e,t,i){var n=this.$getIndent(t);if("start"==e){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(n+=i)}return n},this.checkOutdent=function(e,t,i){return this.$outdent.checkOutdent(t,i)},this.autoOutdent=function(e,t,i){this.$outdent.autoOutdent(t,i)},this.createWorker=function(e){var t=new h(["ace"],i(17),"JsonWorker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(u.prototype),t.Mode=u})},function(e,t,i){ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){"use strict";var n=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/event"),s=" .ace_search { background-color: #ddd; border: 1px solid #cbcbcb; border-top: 0 none; max-width: 325px; overflow: hidden; margin: 0; padding: 4px; padding-right: 6px; padding-bottom: 0; position: absolute; top: 0px; z-index: 99; white-space: normal; } .ace_search.left { border-left: 0 none; border-radius: 0px 0px 5px 0px; left: 0; } .ace_search.right { border-radius: 0px 0px 0px 5px; border-right: 0 none; right: 0; } .ace_search_form, .ace_replace_form { border-radius: 3px; border: 1px solid #cbcbcb; float: left; margin-bottom: 4px; overflow: hidden; } .ace_search_form.ace_nomatch { outline: 1px solid red; } .ace_search_field { background-color: white; border-right: 1px solid #cbcbcb; border: 0 none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float: left; height: 22px; outline: 0; padding: 0 7px; width: 214px; margin: 0; } .ace_searchbtn, .ace_replacebtn { background: #fff; border: 0 none; border-left: 1px solid #dcdcdc; cursor: pointer; float: left; height: 22px; margin: 0; padding: 0; position: relative; } .ace_searchbtn:last-child, .ace_replacebtn:last-child { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } .ace_searchbtn:disabled { background: none; cursor: default; } .ace_searchbtn { background-position: 50% 50%; background-repeat: no-repeat; width: 27px; } .ace_searchbtn.prev { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); } .ace_searchbtn.next { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); } .ace_searchbtn_close { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0; border-radius: 50%; border: 0 none; color: #656565; cursor: pointer; float: right; font: 16px/16px Arial; height: 14px; margin: 5px 1px 9px 5px; padding: 0; text-align: center; width: 14px; } .ace_searchbtn_close:hover { background-color: #656565; background-position: 50% 100%; color: white; } .ace_replacebtn.prev { width: 54px } .ace_replacebtn.next { width: 27px } .ace_button { margin-left: 2px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; overflow: hidden; opacity: 0.7; border: 1px solid rgba(100,100,100,0.23); padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; color: black; } .ace_button:hover { background-color: #eee; opacity:1; } .ace_button:active { background-color: #ddd; } .ace_button.checked { border-color: #3399ff; opacity:1; } .ace_search_options{ margin-bottom: 3px; text-align: right; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; }",a=e("../keyboard/hash_handler").HashHandler,l=e("../lib/keys");n.importCssString(s,"ace_searchbox");var c=''.replace(/>\s+/g,">"),h=function(e,t,i){var o=n.createElement("div");o.innerHTML=c,this.element=o.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;r.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),r.stopPropagation(e)}),r.addListener(e,"click",function(e){var i=e.target||e.srcElement,n=i.getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),r.stopPropagation(e)}),r.addCommandKeyListener(e,function(e,i,n){var o=l.keyCodeToString(n),s=t.$searchBarKb.findKeyCommand(i,o);s&&s.exec&&(s.exec(t),r.stopEvent(e))}),this.$onChange=o.delayedCall(function(){t.find(!1,!1)}),r.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),r.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),r.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new a,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),o=!i&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",o),this.editor._emit("findSearchBox",{match:!o}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(h.prototype),t.SearchBox=h,t.Search=function(e,t){var i=e.searchBox||new h(e);i.show(e.session.getTextRange(),t)}}),function(){ace.acequire(["ace/ext/searchbox"],function(){})}()},function(e,t,i){e.exports.id="ace/mode/json_worker",e.exports.src='"no use strict";(function(window){if(void 0===window.window||!window.document){window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console,window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;var chunks=id.split("/");if(!window.acequire.tlns)return console.log("unable to load "+id);chunks[0]=window.acequire.tlns[chunks[0]]||chunks[0];var path=chunks.join("/")+".js";return window.acequire.id=id,importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},window.initBaseUrls=function initBaseUrls(topLevelNamespaces){acequire.tlns=topLevelNamespaces},window.initSender=function initSender(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.command){if(!main[msg.command])throw Error("Unknown command:"+msg.command);main[msg.command].apply(main,msg.args)}else if(msg.init){initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}else msg.event&&sender&&sender._signal(msg.event,msg.data)}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var delta=e.data,range=delta.range;if(!(range.start.row==range.end.row&&range.start.row!=this.row||range.start.row>this.row||range.start.row==this.row&&range.start.column>this.column)){var row=this.row,column=this.column,start=range.start,end=range.end;"insertText"===delta.action?start.row===row&&column>=start.column?start.column===column&&this.$insertRight||(start.row===end.row?column+=end.column-start.column:(column-=start.column,row+=end.row-start.row)):start.row!==end.row&&row>start.row&&(row+=end.row-start.row):"insertLines"===delta.action?start.row===row&&0===column&&this.$insertRight||row>=start.row&&(row+=end.row-start.row):"removeText"===delta.action?start.row===row&&column>start.column?column=end.column>=column?start.column:Math.max(0,column-(end.column-start.column)):start.row!==end.row&&row>start.row?(end.row===row&&(column=Math.max(0,column-end.column)+start.column),row-=end.row-start.row):end.row===row&&(row-=end.row-start.row,column=Math.max(0,column-end.column)+start.column):"removeLines"==delta.action&&row>=start.row&&(row>=end.row?row-=end.row-start.row:(row=start.row,column=0)),this.setPosition(row,column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(text){this.$lines=[],0===text.length?this.$lines=[""]:Array.isArray(text)?this._insertLines(0,text):this.insert({row:0,column:0},text)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength();this.remove(new Range(0,0,len,this.getLine(len-1).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){if(range.start.row==range.end.row)return this.getLine(range.start.row).substring(range.start.column,range.end.column);var lines=this.getLines(range.start.row,range.end.row);lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;return range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column)),lines.join(this.getNewLineCharacter())},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):0>position.row&&(position.row=0),position},this.insert=function(position,text){if(!text||0===text.length)return position;position=this.$clipPosition(position),1>=this.getLength()&&this.$detectNewLine(text);var lines=this.$split(text),firstLine=lines.splice(0,1)[0],lastLine=0==lines.length?null:lines.splice(lines.length-1,1)[0];return position=this.insertInLine(position,firstLine),null!==lastLine&&(position=this.insertNewLine(position),position=this._insertLines(position.row,lines),position=this.insertInLine(position,lastLine||"")),position},this.insertLines=function(row,lines){return row>=this.getLength()?this.insert({row:row,column:0},"\\n"+lines.join("\\n")):this._insertLines(Math.max(row,0),lines)},this._insertLines=function(row,lines){if(0==lines.length)return{row:row,column:0};for(;lines.length>61440;){var end=this._insertLines(row,lines.slice(0,61440));lines=lines.slice(61440),row=end.row}var args=[row,0];args.push.apply(args,lines),this.$lines.splice.apply(this.$lines,args);var range=new Range(row,0,row+lines.length,0),delta={action:"insertLines",range:range,lines:lines};return this._signal("change",{data:delta}),range.end},this.insertNewLine=function(position){position=this.$clipPosition(position);var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column),this.$lines.splice(position.row+1,0,line.substring(position.column,line.length));var end={row:position.row+1,column:0},delta={action:"insertText",range:Range.fromPoints(position,end),text:this.getNewLineCharacter()};return this._signal("change",{data:delta}),end},this.insertInLine=function(position,text){if(0==text.length)return position;var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column)+text+line.substring(position.column);var end={row:position.row,column:position.column+text.length},delta={action:"insertText",range:Range.fromPoints(position,end),text:text};return this._signal("change",{data:delta}),end},this.remove=function(range){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),range.start=this.$clipPosition(range.start),range.end=this.$clipPosition(range.end),range.isEmpty())return range.start;var firstRow=range.start.row,lastRow=range.end.row;if(range.isMultiLine()){var firstFullRow=0==range.start.column?firstRow:firstRow+1,lastFullRow=lastRow-1;range.end.column>0&&this.removeInLine(lastRow,0,range.end.column),lastFullRow>=firstFullRow&&this._removeLines(firstFullRow,lastFullRow),firstFullRow!=firstRow&&(this.removeInLine(firstRow,range.start.column,this.getLine(firstRow).length),this.removeNewLine(range.start.row))}else this.removeInLine(firstRow,range.start.column,range.end.column);return range.start},this.removeInLine=function(row,startColumn,endColumn){if(startColumn!=endColumn){var range=new Range(row,startColumn,row,endColumn),line=this.getLine(row),removed=line.substring(startColumn,endColumn),newLine=line.substring(0,startColumn)+line.substring(endColumn,line.length);this.$lines.splice(row,1,newLine);var delta={action:"removeText",range:range,text:removed};return this._signal("change",{data:delta}),range.start}},this.removeLines=function(firstRow,lastRow){return 0>firstRow||lastRow>=this.getLength()?this.remove(new Range(firstRow,0,lastRow+1,0)):this._removeLines(firstRow,lastRow)},this._removeLines=function(firstRow,lastRow){var range=new Range(firstRow,0,lastRow+1,0),removed=this.$lines.splice(firstRow,lastRow-firstRow+1),delta={action:"removeLines",range:range,nl:this.getNewLineCharacter(),lines:removed};return this._signal("change",{data:delta}),removed},this.removeNewLine=function(row){var firstLine=this.getLine(row),secondLine=this.getLine(row+1),range=new Range(row,firstLine.length,row+1,0),line=firstLine+secondLine;this.$lines.splice(row,2,line);var delta={action:"removeText",range:range,text:this.getNewLineCharacter()};this._signal("change",{data:delta})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0==text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;if(this.remove(range),text)var end=this.insert(range.start,text);else end=range.start;return end},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);"insertLines"==delta.action?this.insertLines(range.start.row,delta.lines):"insertText"==delta.action?this.insert(range.start,delta.text):"removeLines"==delta.action?this._removeLines(range.start.row,range.end.row-1):"removeText"==delta.action&&this.remove(range)}},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);"insertLines"==delta.action?this._removeLines(range.start.row,range.end.row-1):"insertText"==delta.action?this.remove(range):"removeLines"==delta.action?this._insertLines(range.start.row,delta.lines):"removeText"==delta.action&&this.insert(range.start,delta.text)}},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function(obj){if("object"!=typeof obj||!obj)return obj;var cons=obj.constructor;if(cons===RegExp)return obj;var copy=cons();for(var key in obj)copy[key]="object"==typeof obj[key]?exports.deepCopy(obj[key]):obj[key];return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'").replace(/="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue();try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);return this.sender.emit("error",{row:pos.row,column:pos.column,text:e.message,type:"error"}),void 0}this.sender.emit("ok")}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;\nfor(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=" \\n \\f\\r   ᠎              \\u2028\\u2029";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'; +},function(e,t,i){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,i){(function(t){function i(){if(t.Blob)try{return new Blob(["asdf"],{type:"text/plain"}),Blob}catch(e){}var i=t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;return function(e,t){var n=new i,o=t.endings,r=t.type;if(o)for(var s=0,a=e.length;a>s;++s)n.append(e[s],o);else for(var s=0,a=e.length;a>s;++s)n.append(e[s]);return r?n.getBlob(r):n.getBlob()}}e.exports=i()}).call(t,function(){return this}())}])}); +//# sourceMappingURL=jsoneditor.map \ No newline at end of file diff --git a/public/js/pdf.pdfmake.js b/public/js/pdf.pdfmake.js index d408825d4796..ad7ad654067b 100644 --- a/public/js/pdf.pdfmake.js +++ b/public/js/pdf.pdfmake.js @@ -1,72 +1,65 @@ var NINJA = NINJA || {}; -function GetPdfMake(invoice, javascript, callback) { - var account = invoice.account; - var baseDD = { - pageMargins: [40, 40, 40, 40], - styles: { - bold: { - bold: true - }, - cost: { - alignment: 'right' - }, - quantity: { - alignment: 'right' - }, - tax: { - alignment: 'right' - }, - lineTotal: { - alignment: 'right' - }, - right: { - alignment: 'right' - }, - subtotals: { - alignment: 'right' - }, - termsLabel: { - bold: true, - margin: [0, 10, 0, 4] - } - }, - footer: function(){ - f = [{ text:invoice.invoice_footer?processVariables(invoice.invoice_footer):"", margin: [40, 0]}] - if (!invoice.is_pro && logoImages.imageLogo1) { - f.push({ - image: logoImages.imageLogo1, - width: 150, - margin: [40,0] - }); - } - return f; - }, +NINJA.TEMPLATES = { + CLEAN: "1", + BOLD:"2", + MODERN: "3", + NORMAL:"4", + BUSINESS:"5", + CREATIVE:"6", + ELEGANT:"7", + HIPSTER:"8", + PLAYFUL:"9", + PHOTO:"10" +}; - }; +function GetPdfMake(invoice, javascript, callback) { - eval(javascript); - dd = $.extend(true, baseDD, dd); + javascript = NINJA.decodeJavascript(invoice, javascript); - /* - pdfMake.fonts = { - wqy: { - normal: 'wqy.ttf', - bold: 'wqy.ttf', - italics: 'wqy.ttf', - bolditalics: 'wqy.ttf' + function jsonCallBack(key, val) { + if ((val+'').indexOf('$firstAndLast') === 0) { + var parts = val.split(':'); + return function (i, node) { + return (i === 0 || i === node.table.body.length) ? parseFloat(parts[1]) : 0; + }; + } else if ((val+'').indexOf('$none') === 0) { + return function (i, node) { + return 0; + }; + } else if ((val+'').indexOf('$notFirst') === 0) { + var parts = val.split(':'); + return function (i, node) { + return i === 0 ? 0 : parseFloat(parts[1]); + }; + } else if ((val+'').indexOf('$amount') === 0) { + var parts = val.split(':'); + return function (i, node) { + return parseFloat(parts[1]); + }; + } else if ((val+'').indexOf('$primaryColor') === 0) { + var parts = val.split(':'); + return NINJA.primaryColor || parts[1]; + } else if ((val+'').indexOf('$secondaryColor') === 0) { + var parts = val.split(':'); + return NINJA.secondaryColor || parts[1]; } - }; - */ - + + return val; + } + + + //console.log(javascript); + var dd = JSON.parse(javascript, jsonCallBack); + + if (!invoice.is_pro && dd.hasOwnProperty('footer') && dd.footer.hasOwnProperty('columns')) { + dd.footer.columns.push({image: logoImages.imageLogo1, alignment: 'right', width: 130}) + } + + //console.log(JSON.stringify(dd)); + /* - pdfMake.fonts = { - NotoSansCJKsc: { - normal: 'NotoSansCJKsc-Regular.ttf', - bold: 'NotoSansCJKsc-Medium.ttf', - italics: 'NotoSansCJKsc-Italic.ttf', - bolditalics: 'NotoSansCJKsc-Italic.ttf' - }, + var fonts = { Roboto: { normal: 'Roboto-Regular.ttf', bold: 'Roboto-Medium.ttf', @@ -83,30 +76,123 @@ function GetPdfMake(invoice, javascript, callback) { return doc; } +NINJA.decodeJavascript = function(invoice, javascript) +{ + var account = invoice.account; + var blankImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII='; + + // search/replace variables + var json = { + 'accountName': account.name || ' ', + 'accountLogo': window.accountLogo || blankImage, + 'accountDetails': NINJA.accountDetails(invoice), + 'accountAddress': NINJA.accountAddress(invoice), + 'invoiceDetails': NINJA.invoiceDetails(invoice), + 'invoiceDetailsHeight': NINJA.invoiceDetails(invoice).length * 22, + 'invoiceLineItems': NINJA.invoiceLines(invoice), + 'invoiceLineItemColumns': NINJA.invoiceColumns(invoice), + 'clientDetails': NINJA.clientDetails(invoice), + 'notesAndTerms': NINJA.notesAndTerms(invoice), + 'subtotals': NINJA.subtotals(invoice), + 'subtotalsHeight': NINJA.subtotals(invoice).length * 22, + 'subtotalsWithoutBalance': NINJA.subtotals(invoice, true), + 'balanceDue': formatMoney(invoice.balance_amount, invoice.client.currency_id), + 'invoiceFooter': account.invoice_footer || ' ', + 'invoiceNumber': invoice.invoice_number || ' ', + 'entityType': invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice, + 'entityTypeUC': (invoice.is_quote ? invoiceLabels.quote : invoiceLabels.invoice).toUpperCase(), + 'fontSize': NINJA.fontSize, + 'fontSizeLarger': NINJA.fontSize + 1, + 'fontSizeLargest': NINJA.fontSize + 2, + } + + for (var key in json) { + var regExp = new RegExp('"\\$'+key+'"', 'g'); + var val = JSON.stringify(json[key]); + javascript = javascript.replace(regExp, val); + } + + // search/replace labels + var regExp = new RegExp('"\\$\\\w*?Label(UC)?(:)?(\\\?)?"', 'g'); + var matches = javascript.match(regExp); + + if (matches) { + for (var i=0; i= 0) { + if (!label) console.log('match: ' + field); + label = label.toUpperCase(); + } + if (match.indexOf(':') >= 0) { + label = label + ':'; + } + } else { + label = ' '; + } + javascript = javascript.replace(match, '"'+label+'"'); + } + } + + // search/replace values + var regExp = new RegExp('"\\$\\\w*?Value"', 'g'); + var matches = javascript.match(regExp); + + if (matches) { + for (var i=0; i= 0 && value != ' ') { + value = moment(value, 'YYYY-MM-DD').format('MMM D YYYY'); + } + javascript = javascript.replace(match, '"'+value+'"'); + } + } + + return javascript; +} + NINJA.notesAndTerms = function(invoice) { - var text = []; + var data = []; + if (invoice.public_notes) { - text.push({text:processVariables(invoice.public_notes), style:'notes'}); + data.push({text:invoice.public_notes, style: ['notes']}); + data.push({text:' '}); } if (invoice.terms) { - text.push({text:invoiceLabels.terms, style:'termsLabel'}); - text.push({text:processVariables(invoice.terms), style:'terms'}); + data.push({text:invoiceLabels.terms, style: ['termsLabel']}); + data.push({text:invoice.terms, style: ['terms']}); } - return text; + return NINJA.prepareDataList(data, 'notesAndTerms'); +} + +NINJA.invoiceColumns = function(invoice) +{ + if (invoice.has_taxes) { + return ["15%", "*", "auto", "auto", "auto", "15%"]; + } else { + return ["15%", "*", "auto", "auto", "15%"] + } } NINJA.invoiceLines = function(invoice) { var grid = [ [ - {text: invoiceLabels.item, style: 'tableHeader'}, - {text: invoiceLabels.description, style: 'tableHeader'}, - {text: invoiceLabels.unit_cost, style: 'tableHeader'}, - {text: invoiceLabels.quantity, style: 'tableHeader'}, - {text: invoice.has_taxes?invoiceLabels.tax:'', style: 'tableHeader'}, - {text: invoiceLabels.line_total, style: 'tableHeader'} + {text: invoiceLabels.item, style: ['tableHeader', 'itemTableHeader']}, + {text: invoiceLabels.description, style: ['tableHeader', 'descriptionTableHeader']}, + {text: invoiceLabels.unit_cost, style: ['tableHeader', 'costTableHeader']}, + {text: invoiceLabels.quantity, style: ['tableHeader', 'qtyTableHeader']}, + {text: invoice.has_taxes ? invoiceLabels.tax : '', style: ['tableHeader', 'taxTableHeader']}, + {text: invoiceLabels.line_total, style: ['tableHeader', 'lineTotalTableHeader']} ] ]; @@ -116,23 +202,26 @@ NINJA.invoiceLines = function(invoice) { var hideQuantity = invoice.account.hide_quantity == '1'; for (var i = 0; i < invoice.invoice_items.length; i++) { + var row = []; var item = invoice.invoice_items[i]; var cost = formatMoney(item.cost, currencyId, true); var qty = NINJA.parseFloat(item.qty) ? roundToTwo(NINJA.parseFloat(item.qty)) + '' : ''; var notes = item.notes; var productKey = item.product_key; - var tax = ""; + var tax = ''; + if (item.tax && parseFloat(item.tax.rate)) { tax = parseFloat(item.tax.rate); } else if (item.tax_rate && parseFloat(item.tax_rate)) { tax = parseFloat(item.tax_rate); } - + // show at most one blank line if (shownItem && (!cost || cost == '0.00') && !notes && !productKey) { continue; } + shownItem = true; // process date variables @@ -150,140 +239,165 @@ NINJA.invoiceLines = function(invoice) { } lineTotal = formatMoney(lineTotal, currencyId); - rowStyle = i%2===0?'odd':'even'; + rowStyle = (i % 2 == 0) ? 'odd' : 'even'; + + row.push({style:["productKey", rowStyle], text:productKey || ' '}); // product key can be blank when selecting from a datalist + row.push({style:["notes", rowStyle], text:notes || ' '}); + row.push({style:["cost", rowStyle], text:cost}); + row.push({style:["quantity", rowStyle], text:qty || ' '}); - row[0] = {style:["productKey", rowStyle], text:productKey}; - row[1] = {style:["notes", rowStyle], text:notes}; - row[2] = {style:["cost", rowStyle], text:cost}; - row[3] = {style:["quantity", rowStyle], text:qty}; - row[4] = {style:["tax", rowStyle], text:""+tax}; - row[5] = {style:["lineTotal", rowStyle], text:lineTotal}; + if (invoice.has_taxes) { + row.push({style:["tax", rowStyle], text: tax+'' || ''}); + } + + row.push({style:["lineTotal", rowStyle], text:lineTotal || ' '}); grid.push(row); } - return grid; + return NINJA.prepareDataTable(grid, 'invoiceItems'); } -NINJA.subtotals = function(invoice) +NINJA.subtotals = function(invoice, removeBalance) { if (!invoice) { return; } - var data = [ - [invoiceLabels.subtotal, formatMoney(invoice.subtotal_amount, invoice.client.currency_id)], - ]; + var account = invoice.account; + var data = []; + data.push([{text: invoiceLabels.subtotal}, {text: formatMoney(invoice.subtotal_amount, invoice.client.currency_id)}]); - if(invoice.discount_amount != 0) { - data.push([invoiceLabels.discount, formatMoney(invoice.discount_amount, invoice.client.currency_id)]); + if (invoice.discount_amount != 0) { + data.push([{text: invoiceLabels.discount}, {text: formatMoney(invoice.discount_amount, invoice.client.currency_id)}]); } - + if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 == '1') { - data.push([invoiceLabels.custom_invoice_label1, formatMoney(invoice.custom_value1, invoice.client.currency_id)]); + data.push([{text: account.custom_invoice_label1}, {text: formatMoney(invoice.custom_value1, invoice.client.currency_id)}]); } if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 == '1') { - data.push([invoiceLabels.custom_invoice_label2, formatMoney(invoice.custom_value2, invoice.client.currency_id)]); + data.push([{text: account.custom_invoice_label2}, {text: formatMoney(invoice.custom_value2, invoice.client.currency_id)}]); } - if(invoice.tax && invoice.tax.name || invoice.tax_name) { - data.push([invoiceLabels.tax, formatMoney(invoice.tax_amount, invoice.client.currency_id)]); + if (invoice.tax && invoice.tax.name || invoice.tax_name) { + data.push([{text: invoiceLabels.tax}, {text: formatMoney(invoice.tax_amount, invoice.client.currency_id)}]); } - - if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') { - data.push([invoiceLabels.custom_invoice_label1, formatMoney(invoice.custom_value1, invoice.client.currency_id)]); + + if (NINJA.parseFloat(invoice.custom_value1) && invoice.custom_taxes1 != '1') { + data.push([{text: account.custom_invoice_label1}, {text: formatMoney(invoice.custom_value1, invoice.client.currency_id)}]); } if (NINJA.parseFloat(invoice.custom_value2) && invoice.custom_taxes2 != '1') { - data.push([invoiceLabels.custom_invoice_label2, formatMoney(invoice.custom_value2, invoice.client.currency_id)]); - } - - var paid = invoice.amount - invoice.balance; - if (invoice.account.hide_paid_to_date != '1' || paid) { - data.push([invoiceLabels.paid_to_date, formatMoney(paid, invoice.client.currency_id)]); - } - - data.push([{text:invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due, style:'balanceDueLabel'}, - {text:formatMoney(invoice.balance_amount, invoice.client.currency_id), style:'balanceDueValue'}]); - return data; -} - -NINJA.accountDetails = function(account) { - var data = []; - if(account.name) data.push({text:account.name, style:'accountName'}); - if(account.id_number) data.push({text:account.id_number, style:'accountDetails'}); - if(account.vat_number) data.push({text:account.vat_number, style:'accountDetails'}); - if(account.work_email) data.push({text:account.work_email, style:'accountDetails'}); - if(account.work_phone) data.push({text:account.work_phone, style:'accountDetails'}); - return data; -} - -NINJA.accountAddress = function(account) { - var address = ''; - if (account.city || account.state || account.postal_code) { - address = ((account.city ? account.city + ', ' : '') + account.state + ' ' + account.postal_code).trim(); + data.push([{text: account.custom_invoice_label2}, {text: formatMoney(invoice.custom_value2, invoice.client.currency_id)}]); } - var data = []; - if(account.address1) data.push({text:account.address1, style:'accountDetails'}); - if(account.address2) data.push({text:account.address2, style:'accountDetails'}); - if(address) data.push({text:address, style:'accountDetails'}); - if(account.country) data.push({text:account.country.name, style: 'accountDetails'}); - if(account.custom_label1 && account.custom_value1) data.push({text:account.custom_label1 +' '+ account.custom_value1, style: 'accountDetails'}); - if(account.custom_label2 && account.custom_value2) data.push({text:account.custom_label2 +' '+ account.custom_value2, style: 'accountDetails'}); - return data; + + var paid = invoice.amount - invoice.balance; + if (invoice.account.hide_paid_to_date != '1' || paid) { + data.push([{text:invoiceLabels.paid_to_date}, {text:formatMoney(paid, invoice.client.currency_id)}]); + } + + if (!removeBalance) { + data.push([ + {text:invoice.is_quote ? invoiceLabels.balance_due : invoiceLabels.balance_due, style:['balanceDueLabel']}, + {text:formatMoney(invoice.balance_amount, invoice.client.currency_id), style:['balanceDue']} + ]); + } + + return NINJA.prepareDataPairs(data, 'subtotals'); +} + +NINJA.accountDetails = function(invoice) { + var account = invoice.account; + var data = [ + {text:account.name, style: ['accountName']}, + {text:account.id_number}, + {text:account.vat_number}, + {text:account.work_email}, + {text:account.work_phone} + ]; + return NINJA.prepareDataList(data, 'accountDetails'); +} + +NINJA.accountAddress = function(invoice) { + var account = invoice.account; + var cityStatePostal = ''; + if (account.city || account.state || account.postal_code) { + cityStatePostal = ((account.city ? account.city + ', ' : '') + account.state + ' ' + account.postal_code).trim(); + } + + var data = [ + {text: account.address1}, + {text: account.address2}, + {text: cityStatePostal}, + {text: account.country ? account.country.name : ''} + ]; + + return NINJA.prepareDataList(data, 'accountAddress'); } NINJA.invoiceDetails = function(invoice) { + var data = [ [ - invoice.is_quote ? invoiceLabels.quote_number : invoiceLabels.invoice_number, - {style: 'bold', text: invoice.invoice_number}, + {text: (invoice.is_quote ? invoiceLabels.quote_number : invoiceLabels.invoice_number), style: ['invoiceNumberLabel']}, + {text: invoice.invoice_number, style: ['invoiceNumber']} ], [ - invoice.is_quote ? invoiceLabels.quote_date : invoiceLabels.invoice_date, - invoice.invoice_date, + {text: invoiceLabels.po_number}, + {text: invoice.po_number} ], [ - invoice.is_quote ? invoiceLabels.total : invoiceLabels.balance_due, - formatMoney(invoice.balance_amount, invoice.client.currency_id), + {text: invoiceLabels.invoice_date}, + {text: invoice.invoice_date} ], + [ + {text: invoiceLabels.due_date}, + {text: invoice.due_date} + ] ]; - return data; + if (NINJA.parseFloat(invoice.balance) < NINJA.parseFloat(invoice.amount)) { + data.push([ + {text: invoiceLabels.total}, + {text: formatMoney(invoice.amount, invoice.client.currency_id)} + ]); + } + + if (NINJA.parseFloat(invoice.partial)) { + data.push([ + {text: invoiceLabels.balance}, + {text: formatMoney(invoice.total_amount, invoice.client.currency_id)} + ]); + } + + data.push([ + {text: invoiceLabels.balance_due, style: ['invoiceDetailBalanceDueLabel']}, + {text: formatMoney(invoice.balance_amount, invoice.client.currency_id), style: ['invoiceDetailBalanceDue']} + ]) + + return NINJA.prepareDataPairs(data, 'invoiceDetails'); } -NINJA.clientDetails = function(invoice) { +NINJA.clientDetails = function(invoice) { var client = invoice.client; + var data; if (!client) { return; } + var contact = client.contacts[0]; + var clientName = client.name || (contact.first_name || contact.last_name ? (contact.first_name + ' ' + contact.last_name) : contact.email); + var clientEmail = client.contacts[0].email == clientName ? '' : client.contacts[0].email; - var fields = [ - getClientDisplayName(client), - client.id_number, - client.vat_number, - concatStrings(client.address1, client.address2), - concatStrings(client.city, client.state, client.postal_code), - client.country ? client.country.name : false, - invoice.contact && getClientDisplayName(client) != invoice.contact.email ? invoice.contact.email : false, - invoice.client.custom_value1 ? invoice.account['custom_client_label1'] + ' ' + invoice.client.custom_value1 : false, - invoice.client.custom_value2 ? invoice.account['custom_client_label2'] + ' ' + invoice.client.custom_value2 : false, + data = [ + {text:clientName || ' ', style: ['clientName']}, + {text:client.address1}, + {text:concatStrings(client.city, client.state, client.postal_code)}, + {text:client.country ? client.country.name : ''}, + {text:clientEmail} ]; - var data = []; - for (var i=0; i=0;f--)if(g[f]!=j[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!h(a[e],b[e]))return!1;return!0}function k(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function l(a,b,c,d){var e;m.isString(c)&&(d=c,c=null);try{b()}catch(g){e=g}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&f(e,c,"Missing expected exception"+d),!a&&k(e,c)&&f(e,c,"Got unwanted exception"+d),a&&e&&c&&!k(e,c)||!a&&e)throw e}var m=a("util/"),n=Array.prototype.slice,o=Object.prototype.hasOwnProperty,p=b.exports=g;p.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=e(this),this.generatedMessage=!0);var b=a.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,g=b.name,h=d.indexOf("\n"+g);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},m.inherits(p.AssertionError,Error),p.fail=f,p.ok=g,p.equal=function(a,b,c){a!=b&&f(a,b,c,"==",p.equal)},p.notEqual=function(a,b,c){a==b&&f(a,b,c,"!=",p.notEqual)},p.deepEqual=function(a,b,c){h(a,b)||f(a,b,c,"deepEqual",p.deepEqual)},p.notDeepEqual=function(a,b,c){h(a,b)&&f(a,b,c,"notDeepEqual",p.notDeepEqual)},p.strictEqual=function(a,b,c){a!==b&&f(a,b,c,"===",p.strictEqual)},p.notStrictEqual=function(a,b,c){a===b&&f(a,b,c,"!==",p.notStrictEqual)},p["throws"]=function(){l.apply(this,[!0].concat(n.call(arguments)))},p.doesNotThrow=function(){l.apply(this,[!1].concat(n.call(arguments)))},p.ifError=function(a){if(a)throw a};var q=Object.keys||function(a){var b=[];for(var c in a)o.call(a,c)&&b.push(c);return b}},{"util/":39}],3:[function(){},{}],4:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],5:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],6:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],8:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead=hb&&(a.ins_h=(a.ins_h<=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=hb&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":4,"./adler32":5,"./crc32":7,"./messages":12,"./trees":13}],9:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],10:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Ab=c.lencode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a; -i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":4}],12:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],13:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":4}],14:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}],15:[function(a,b,c){(function(b,d){function e(a){if(ac.UNZIP)throw new TypeError("Bad argument");this.mode=a,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function f(a,b){for(var c=0;cc.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+a.chunkSize);if(a.windowBits&&(a.windowBitsc.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+a.windowBits);if(a.level&&(a.levelc.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+a.level);if(a.memLevel&&(a.memLevelc.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+a.memLevel);if(a.strategy&&a.strategy!=c.Z_FILTERED&&a.strategy!=c.Z_HUFFMAN_ONLY&&a.strategy!=c.Z_RLE&&a.strategy!=c.Z_FIXED&&a.strategy!=c.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+a.strategy);if(a.dictionary&&!d.isBuffer(a.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new p.Zlib(b);var e=this;this._hadError=!1,this._binding.onerror=function(a,b){e._binding=null,e._hadError=!0;var d=new Error(a);d.errno=b,d.code=c.codes[b],e.emit("error",d)};var f=c.Z_DEFAULT_COMPRESSION;"number"==typeof a.level&&(f=a.level);var g=c.Z_DEFAULT_STRATEGY;"number"==typeof a.strategy&&(g=a.strategy),this._binding.init(a.windowBits||c.Z_DEFAULT_WINDOWBITS,f,a.memLevel||c.Z_DEFAULT_MEMLEVEL,g,a.dictionary),this._buffer=new d(this._chunkSize),this._offset=0,this._closed=!1,this._level=f,this._strategy=g,this.once("end",this.close)}var o=a("_stream_transform"),p=a("./binding"),q=a("util"),r=a("assert").ok;p.Z_MIN_WINDOWBITS=8,p.Z_MAX_WINDOWBITS=15,p.Z_DEFAULT_WINDOWBITS=15,p.Z_MIN_CHUNK=64,p.Z_MAX_CHUNK=1/0,p.Z_DEFAULT_CHUNK=16384,p.Z_MIN_MEMLEVEL=1,p.Z_MAX_MEMLEVEL=9,p.Z_DEFAULT_MEMLEVEL=8,p.Z_MIN_LEVEL=-1,p.Z_MAX_LEVEL=9,p.Z_DEFAULT_LEVEL=p.Z_DEFAULT_COMPRESSION,Object.keys(p).forEach(function(a){a.match(/^Z/)&&(c[a]=p[a])}),c.codes={Z_OK:p.Z_OK,Z_STREAM_END:p.Z_STREAM_END,Z_NEED_DICT:p.Z_NEED_DICT,Z_ERRNO:p.Z_ERRNO,Z_STREAM_ERROR:p.Z_STREAM_ERROR,Z_DATA_ERROR:p.Z_DATA_ERROR,Z_MEM_ERROR:p.Z_MEM_ERROR,Z_BUF_ERROR:p.Z_BUF_ERROR,Z_VERSION_ERROR:p.Z_VERSION_ERROR},Object.keys(c.codes).forEach(function(a){c.codes[c.codes[a]]=a}),c.Deflate=g,c.Inflate=h,c.Gzip=i,c.Gunzip=j,c.DeflateRaw=k,c.InflateRaw=l,c.Unzip=m,c.createDeflate=function(a){return new g(a)},c.createInflate=function(a){return new h(a)},c.createDeflateRaw=function(a){return new k(a)},c.createInflateRaw=function(a){return new l(a)},c.createGzip=function(a){return new i(a)},c.createGunzip=function(a){return new j(a)},c.createUnzip=function(a){return new m(a)},c.deflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new g(b),a,c)},c.deflateSync=function(a,b){return f(new g(b),a)},c.gzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new i(b),a,c)},c.gzipSync=function(a,b){return f(new i(b),a)},c.deflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new k(b),a,c)},c.deflateRawSync=function(a,b){return f(new k(b),a)},c.unzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new m(b),a,c)},c.unzipSync=function(a,b){return f(new m(b),a)},c.inflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new h(b),a,c)},c.inflateSync=function(a,b){return f(new h(b),a)},c.gunzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new j(b),a,c)},c.gunzipSync=function(a,b){return f(new j(b),a)},c.inflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new l(b),a,c)},c.inflateRawSync=function(a,b){return f(new l(b),a)},q.inherits(n,o),n.prototype.params=function(a,d,e){if(ac.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+a);if(d!=c.Z_FILTERED&&d!=c.Z_HUFFMAN_ONLY&&d!=c.Z_RLE&&d!=c.Z_FIXED&&d!=c.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+d);if(this._level!==a||this._strategy!==d){var f=this;this.flush(p.Z_SYNC_FLUSH,function(){f._binding.params(a,d),f._hadError||(f._level=a,f._strategy=d,e&&e())})}else b.nextTick(e)},n.prototype.reset=function(){return this._binding.reset()},n.prototype._flush=function(a){this._transform(new d(0),"",a)},n.prototype.flush=function(a,c){var e=this._writableState;if(("function"==typeof a||void 0===a&&!c)&&(c=a,a=p.Z_FULL_FLUSH),e.ended)c&&b.nextTick(c);else if(e.ending)c&&this.once("end",c);else if(e.needDrain){var f=this;this.once("drain",function(){f.flush(c)})}else this._flushFlag=a,this.write(new d(0),"",c)},n.prototype.close=function(a){if(a&&b.nextTick(a),!this._closed){this._closed=!0,this._binding.close();var c=this;b.nextTick(function(){c.emit("close")})}},n.prototype._transform=function(a,b,c){var e,f=this._writableState,g=f.ending||f.ended,h=g&&(!a||f.length===a.length);if(null===!a&&!d.isBuffer(a))return c(new Error("invalid input"));h?e=p.Z_FINISH:(e=this._flushFlag,a.length>=f.length&&(this._flushFlag=this._opts.flush||p.Z_NO_FLUSH));this._processChunk(a,e,c)},n.prototype._processChunk=function(a,b,c){function e(k,n){if(!i._hadError){var o=g-n;if(r(o>=0,"have should not go down"),o>0){var p=i._buffer.slice(i._offset,i._offset+o);i._offset+=o,j?i.push(p):(l.push(p),m+=p.length)}if((0===n||i._offset>=i._chunkSize)&&(g=i._chunkSize,i._offset=0,i._buffer=new d(i._chunkSize)),0===n){if(h+=f-k,f=k,!j)return!0;var q=i._binding.write(b,a,h,f,i._buffer,i._offset,i._chunkSize);return q.callback=e,void(q.buffer=a)}return j?void c():!1}}var f=a&&a.length,g=this._chunkSize-this._offset,h=0,i=this,j="function"==typeof c;if(!j){var k,l=[],m=0;this.on("error",function(a){k=a});do var n=this._binding.writeSync(b,a,h,f,this._buffer,this._offset,g);while(!this._hadError&&e(n[0],n[1]));if(this._hadError)throw k;var o=d.concat(l,m);return this.close(),o}var p=this._binding.write(b,a,h,f,this._buffer,this._offset,g);p.buffer=a,p.callback=e},q.inherits(g,n),q.inherits(h,n),q.inherits(i,n),q.inherits(j,n),q.inherits(k,n),q.inherits(l,n),q.inherits(m,n)}).call(this,a("_process"),a("buffer").Buffer)},{"./binding":15,_process:24,_stream_transform:34,assert:2,buffer:17,util:39}],17:[function(a,b,c){function d(a,b,c){if(!(this instanceof d))return new d(a,b,c);var e,f=typeof a;if("number"===f)e=+a;else if("string"===f)e=d.byteLength(a,b);else{if("object"!==f||null===a)throw new TypeError("must start with number, buffer, array or string");"Buffer"===a.type&&K(a.data)&&(a=a.data),e=+a.length}if(e>L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");0>e?e=0:e>>>=0;var g=this;d.TYPED_ARRAY_SUPPORT?g=d._augment(new Uint8Array(e)):(g.length=e,g._isBuffer=!0);var h;if(d.TYPED_ARRAY_SUPPORT&&"number"==typeof a.byteLength)g._set(a);else if(A(a))if(d.isBuffer(a))for(h=0;e>h;h++)g[h]=a.readUInt8(h);else for(h=0;e>h;h++)g[h]=(a[h]%256+256)%256;else if("string"===f)g.write(a,0,b);else if("number"===f&&!d.TYPED_ARRAY_SUPPORT&&!c)for(h=0;e>h;h++)g[h]=0;return e>0&&e<=d.poolSize&&(g.parent=M),g}function e(a,b,c){if(!(this instanceof e))return new e(a,b,c);var f=new d(a,b,c);return delete f.parent,f}function f(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function g(a,b,c,d){var e=G(C(b,a.length-c),a,c,d);return e}function h(a,b,c,d){var e=G(D(b),a,c,d);return e}function i(a,b,c,d){return h(a,b,c,d)}function j(a,b,c,d){var e=G(F(b),a,c,d);return e}function k(a,b,c,d){var e=G(E(b,a.length-c),a,c,d);return e}function l(a,b,c){return I.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function m(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=H(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+H(e)}function n(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function o(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function p(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=B(a[f]);return e}function q(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function s(a,b,c,e,f,g){if(!d.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>f||g>b)throw new RangeError("value is out of bounds");if(c+e>a.length)throw new RangeError("index out of range")}function t(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function u(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function v(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function w(a,b,c,d,e){return e||v(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(a,b,c,d,23,4),c+4}function x(a,b,c,d,e){return e||v(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(a,b,c,d,52,8),c+8}function y(a){if(a=z(a).replace(O,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function z(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function A(a){return K(a)||d.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function B(a){return 16>a?"0"+a.toString(16):a.toString(16)}function C(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536,e=null}else e&&((b-=3)>-1&&f.push(239,191,189),e=null);if(128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(2097152>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function D(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function F(a){return I.toByteArray(y(a))}function G(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function H(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var I=a("base64-js"),J=a("ieee754"),K=a("is-array");c.Buffer=d,c.SlowBuffer=e,c.INSPECT_MAX_BYTES=50,d.poolSize=8192;var L=1073741823,M={};d.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);return b.foo=function(){return 42},42===b.foo()&&"function"==typeof b.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(c){return!1}}(),d.isBuffer=function(a){return!(null==a||!a._isBuffer)},d.compare=function(a,b){if(!d.isBuffer(a)||!d.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,e=b.length,f=0,g=Math.min(c,e);g>f&&a[f]===b[f];f++);return f!==g&&(c=a[f],e=b[f]),e>c?-1:c>e?1:0},d.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(a,b){if(!K(a))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===a.length)return new d(0);if(1===a.length)return a[0];var c;if(void 0===b)for(b=0,c=0;c>>1;break;case"utf8":case"utf-8":c=C(a).length;break;case"base64":c=F(a).length;break;default:c=a.length}return c},d.prototype.length=void 0,d.prototype.parent=void 0,d.prototype.toString=function(a,b,c){var d=!1;if(b>>>=0,c=void 0===c||1/0===c?this.length:c>>>0,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return p(this,b,c);case"utf8":case"utf-8":return m(this,b,c);case"ascii":return n(this,b,c);case"binary":return o(this,b,c);case"base64":return l(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}},d.prototype.equals=function(a){if(!d.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:0===d.compare(this,a)},d.prototype.inspect=function(){var a="",b=c.INSPECT_MAX_BYTES;return this.length>0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),""},d.prototype.compare=function(a){if(!d.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:d.compare(this,a)},d.prototype.get=function(a){return this.readUInt8(a)},d.prototype.set=function(a,b){return this.writeUInt8(a,b)},d.prototype.write=function(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var e=d;d=b,b=c,c=e}if(b=Number(b)||0,0>c||0>b||b>this.length)throw new RangeError("attempt to write outside buffer bounds");var l=this.length-b;c?(c=Number(c),c>l&&(c=l)):c=l,d=String(d||"utf8").toLowerCase();var m;switch(d){case"hex":m=f(this,a,b,c);break;case"utf8":case"utf-8":m=g(this,a,b,c);break;case"ascii":m=h(this,a,b,c);break;case"binary":m=i(this,a,b,c);break;case"base64":m=j(this,a,b,c);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=k(this,a,b,c);break;default:throw new TypeError("Unknown encoding: "+d)}return m},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a);var e;if(d.TYPED_ARRAY_SUPPORT)e=d._augment(this.subarray(a,b));else{var f=b-a;e=new d(f,void 0,!0);for(var g=0;f>g;g++)e[g]=this[g+a]}return e.length&&(e.parent=this.parent||this),e},d.prototype.readUIntLE=function(a,b,c){a>>>=0,b>>>=0,c||r(a,b,this.length);for(var d=this[a],e=1,f=0;++f>>=0,b>>>=0,c||r(a,b,this.length);for(var d=this[a+--b],e=1;b>0&&(e*=256);)d+=this[a+--b]*e;return d},d.prototype.readUInt8=function(a,b){return b||r(a,1,this.length),this[a]},d.prototype.readUInt16LE=function(a,b){return b||r(a,2,this.length),this[a]|this[a+1]<<8},d.prototype.readUInt16BE=function(a,b){return b||r(a,2,this.length),this[a]<<8|this[a+1] -},d.prototype.readUInt32LE=function(a,b){return b||r(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},d.prototype.readUInt32BE=function(a,b){return b||r(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},d.prototype.readIntLE=function(a,b,c){a>>>=0,b>>>=0,c||r(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},d.prototype.readIntBE=function(a,b,c){a>>>=0,b>>>=0,c||r(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},d.prototype.readInt8=function(a,b){return b||r(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},d.prototype.readInt16LE=function(a,b){b||r(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},d.prototype.readInt16BE=function(a,b){b||r(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},d.prototype.readInt32LE=function(a,b){return b||r(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},d.prototype.readInt32BE=function(a,b){return b||r(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},d.prototype.readFloatLE=function(a,b){return b||r(a,4,this.length),J.read(this,a,!0,23,4)},d.prototype.readFloatBE=function(a,b){return b||r(a,4,this.length),J.read(this,a,!1,23,4)},d.prototype.readDoubleLE=function(a,b){return b||r(a,8,this.length),J.read(this,a,!0,52,8)},d.prototype.readDoubleBE=function(a,b){return b||r(a,8,this.length),J.read(this,a,!1,52,8)},d.prototype.writeUIntLE=function(a,b,c,d){a=+a,b>>>=0,c>>>=0,d||s(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f>>0&255;return b+c},d.prototype.writeUIntBE=function(a,b,c,d){a=+a,b>>>=0,c>>>=0,d||s(this,a,b,c,Math.pow(2,8*c),0);var e=c-1,f=1;for(this[b+e]=255&a;--e>=0&&(f*=256);)this[b+e]=a/f>>>0&255;return b+c},d.prototype.writeUInt8=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,1,255,0),d.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=a,b+1},d.prototype.writeUInt16LE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):t(this,a,b,!0),b+2},d.prototype.writeUInt16BE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,2,65535,0),d.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):t(this,a,b,!1),b+2},d.prototype.writeUInt32LE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):u(this,a,b,!0),b+4},d.prototype.writeUInt32BE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,4,4294967295,0),d.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):u(this,a,b,!1),b+4},d.prototype.writeIntLE=function(a,b,c,d){a=+a,b>>>=0,d||s(this,a,b,c,Math.pow(2,8*c-1)-1,-Math.pow(2,8*c-1));var e=0,f=1,g=0>a?1:0;for(this[b]=255&a;++e>0)-g&255;return b+c},d.prototype.writeIntBE=function(a,b,c,d){a=+a,b>>>=0,d||s(this,a,b,c,Math.pow(2,8*c-1)-1,-Math.pow(2,8*c-1));var e=c-1,f=1,g=0>a?1:0;for(this[b+e]=255&a;--e>=0&&(f*=256);)this[b+e]=(a/f>>0)-g&255;return b+c},d.prototype.writeInt8=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,1,127,-128),d.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),0>a&&(a=255+a+1),this[b]=a,b+1},d.prototype.writeInt16LE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):t(this,a,b,!0),b+2},d.prototype.writeInt16BE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,2,32767,-32768),d.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):t(this,a,b,!1),b+2},d.prototype.writeInt32LE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,4,2147483647,-2147483648),d.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):u(this,a,b,!0),b+4},d.prototype.writeInt32BE=function(a,b,c){return a=+a,b>>>=0,c||s(this,a,b,4,2147483647,-2147483648),0>a&&(a=4294967295+a+1),d.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):u(this,a,b,!1),b+4},d.prototype.writeFloatLE=function(a,b,c){return w(this,a,b,!0,c)},d.prototype.writeFloatBE=function(a,b,c){return w(this,a,b,!1,c)},d.prototype.writeDoubleLE=function(a,b,c){return x(this,a,b,!0,c)},d.prototype.writeDoubleBE=function(a,b,c){return x(this,a,b,!1,c)},d.prototype.copy=function(a,b,c,e){var f=this;if(c||(c=0),e||0===e||(e=this.length),b>=a.length&&(b=a.length),b||(b=0),e>0&&c>e&&(e=c),e===c)return 0;if(0===a.length||0===f.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=f.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),a.length-bg||!d.TYPED_ARRAY_SUPPORT)for(var h=0;g>h;h++)a[h+b]=this[h+c];else a._set(this.subarray(c,c+g),b);return g},d.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=C(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},d.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(d.TYPED_ARRAY_SUPPORT)return new d(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var N=d.prototype;d._augment=function(a){return a.constructor=d,a._isBuffer=!0,a._get=a.get,a._set=a.set,a.get=N.get,a.set=N.set,a.write=N.write,a.toString=N.toString,a.toLocaleString=N.toString,a.toJSON=N.toJSON,a.equals=N.equals,a.compare=N.compare,a.copy=N.copy,a.slice=N.slice,a.readUIntLE=N.readUIntLE,a.readUIntBE=N.readUIntBE,a.readUInt8=N.readUInt8,a.readUInt16LE=N.readUInt16LE,a.readUInt16BE=N.readUInt16BE,a.readUInt32LE=N.readUInt32LE,a.readUInt32BE=N.readUInt32BE,a.readIntLE=N.readIntLE,a.readIntBE=N.readIntBE,a.readInt8=N.readInt8,a.readInt16LE=N.readInt16LE,a.readInt16BE=N.readInt16BE,a.readInt32LE=N.readInt32LE,a.readInt32BE=N.readInt32BE,a.readFloatLE=N.readFloatLE,a.readFloatBE=N.readFloatBE,a.readDoubleLE=N.readDoubleLE,a.readDoubleBE=N.readDoubleBE,a.writeUInt8=N.writeUInt8,a.writeUIntLE=N.writeUIntLE,a.writeUIntBE=N.writeUIntBE,a.writeUInt16LE=N.writeUInt16LE,a.writeUInt16BE=N.writeUInt16BE,a.writeUInt32LE=N.writeUInt32LE,a.writeUInt32BE=N.writeUInt32BE,a.writeIntLE=N.writeIntLE,a.writeIntBE=N.writeIntBE,a.writeInt8=N.writeInt8,a.writeInt16LE=N.writeInt16LE,a.writeInt16BE=N.writeInt16BE,a.writeInt32LE=N.writeInt32LE,a.writeInt32BE=N.writeInt32BE,a.writeFloatLE=N.writeFloatLE,a.writeFloatBE=N.writeFloatBE,a.writeDoubleLE=N.writeDoubleLE,a.writeDoubleBE=N.writeDoubleBE,a.fill=N.fill,a.inspect=N.inspect,a.toArrayBuffer=N.toArrayBuffer,a};var O=/[^+\/0-9A-z\-]/g},{"base64-js":18,ieee754:19,"is-array":20}],18:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],19:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],20:[function(a,b){var c=Array.isArray,d=Object.prototype.toString;b.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},{}],21:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,"function"==typeof console.trace)}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],22:[function(a,b){b.exports="function"==typeof Object.create?function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],23:[function(a,b){b.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},{}],24:[function(a,b){function c(){if(!g){g=!0;for(var a,b=f.length;b;){a=f,f=[];for(var c=-1;++cc;c++)b(a[c],c)}b.exports=d;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=a("core-util-is");h.inherits=a("inherits");var i=a("./_stream_readable"),j=a("./_stream_writable");h.inherits(d,i),f(g(j.prototype),function(a){d.prototype[a]||(d.prototype[a]=j.prototype[a])})}).call(this,a("_process"))},{"./_stream_readable":28,"./_stream_writable":30,_process:24,"core-util-is":31,inherits:22}],27:[function(a,b){function c(a){return this instanceof c?void d.call(this,a):new c(a)}b.exports=c;var d=a("./_stream_transform"),e=a("core-util-is");e.inherits=a("inherits"),e.inherits(c,d),c.prototype._transform=function(a,b,c){c(null,a)}},{"./_stream_transform":29,"core-util-is":31,inherits:22}],28:[function(a,b){(function(c){function d(b,c){var d=a("./_stream_duplex");b=b||{};var e=b.highWaterMark,f=b.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!b.objectMode,c instanceof d&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.defaultEncoding=b.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(C||(C=a("string_decoder/").StringDecoder),this.decoder=new C(b.encoding),this.encoding=b.encoding)}function e(b){a("./_stream_duplex");return this instanceof e?(this._readableState=new d(b,this),this.readable=!0,void A.call(this)):new e(b)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(B.isNullOrUndefined(c))b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=E)a=E;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||B.isNull(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||B.isString(b)||B.isNullOrUndefined(b)||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(D("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?c.nextTick(function(){m(a)}):m(a))}function m(a){D("emit readable"),a.emit("readable"),s(a)}function n(a,b){b.readingMore||(b.readingMore=!0,c.nextTick(function(){o(a,b)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,c.nextTick(function(){b.endEmitted||0!==b.length||(b.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var x=a("isarray"),y=a("buffer").Buffer;e.ReadableState=d;var z=a("events").EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=a("stream"),B=a("core-util-is");B.inherits=a("inherits");var C,D=a("util");D=D&&D.debuglog?D.debuglog("stream"):function(){},B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return B.isString(a)&&!c.objectMode&&(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(b){return C||(C=a("string_decoder/").StringDecoder),this._readableState.decoder=new C(b),this._readableState.encoding=b,this};var E=8388608;e.prototype.read=function(a){D("read",a);var b=this._readableState,c=a;if((!B.isNumber(a)||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return D("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?u(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;D("need readable",d),(0===b.length||b.length-a0?t(a,b):null,B.isNull(e)&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&u(this),B.isNull(e)||this.emit("data",e),e},e.prototype._read=function(){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){D("onunpipe"),a===l&&f()}function e(){D("onend"),a.end()}function f(){D("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){D("ondata");var c=a.write(b);!1===c&&(D("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){D("onerror",b),k(),a.removeListener("error",h),0===z.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){D("onfinish"),a.removeListener("close",i),k()}function k(){D("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,D("pipe count=%d opts=%j",m.pipesCount,b);var n=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,o=n?e:f;m.endEmitted?c.nextTick(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(D("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var d=A.prototype.on.call(this,a,b);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var e=this._readableState;if(!e.readableListening)if(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading)e.length&&l(this,e);else{var f=this;c.nextTick(function(){D("readable nexttick read 0"),f.read(0)})}}return d},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(D("resume"),a.flowing=!0,a.reading||(D("resume read 0"),this.read(0)),q(this,a)),this},e.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(D("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(D("wrapped data"),b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)B.isFunction(a[e])&&B.isUndefined(this[e])&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){D("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=t}).call(this,a("_process"))},{"./_stream_duplex":26,_process:24,buffer:17,"core-util-is":31,events:21,inherits:22,isarray:23,stream:36,"string_decoder/":37,util:3}],29:[function(a,b){function c(a,b){this.afterTransform=function(a,c){return d(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function d(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,h.isNullOrUndefined(c)||a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length1){for(var c=[],d=0;d=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:17}],38:[function(a,b){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],39:[function(a,b,c){(function(b,d){function e(a,b){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(b)?d.showHidden=b:b&&c._extend(d,b),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a){return a}function h(a){var b={};return a.forEach(function(a){b[a]=!0}),b}function i(a,b,d){if(a.customInspect&&b&&A(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,b);if(f)return f;var g=Object.keys(b),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(b)),z(b)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(b);if(0===g.length){if(A(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(w(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(y(b))return a.stylize(Date.prototype.toString.call(b),"date");if(z(b))return k(b)}var r="",s=!1,u=["{","}"];if(o(b)&&(s=!0,u=["[","]"]),A(b)){var v=b.name?": "+b.name:"";r=" [Function"+v+"]"}if(w(b)&&(r=" "+RegExp.prototype.toString.call(b)),y(b)&&(r=" "+Date.prototype.toUTCString.call(b)),z(b)&&(r=" "+k(b)),0===g.length&&(!s||0==b.length))return u[0]+r+u[1];if(0>d)return w(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var x;return x=s?l(a,b,d,p,g):g.map(function(c){return m(a,b,d,p,c,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(D(b,String(g))?m(a,b,c,d,String(g),!0):"");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),D(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var E=/%[sdj%]/g;c.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},c.deprecate=function(a,e){function f(){if(!g){if(b.throwDeprecation)throw new Error(e);b.traceDeprecation,g=!0}return a.apply(this,arguments)}if(v(d.process))return function(){return c.deprecate(a,e).apply(this,arguments)};if(b.noDeprecation===!0)return a;var g=!1;return f};var F,G={};c.debuglog=function(a){if(v(F)&&(F=b.env.NODE_DEBUG||""),a=a.toUpperCase(),!G[a])if(new RegExp("\\b"+a+"\\b","i").test(F)){{b.pid}G[a]=function(){c.format.apply(c,arguments)}}else G[a]=function(){};return G[a]},c.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=o,c.isBoolean=p,c.isNull=q,c.isNullOrUndefined=r,c.isNumber=s,c.isString=t,c.isSymbol=u,c.isUndefined=v,c.isRegExp=w,c.isObject=x,c.isDate=y,c.isError=z,c.isFunction=A,c.isPrimitive=B,c.isBuffer=a("./support/isBuffer");c.log=function(){},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":38,_process:24,inherits:22}],40:[function(b,c,d){(function(b){(function(){function e(a,b){if(a!==b){var c=a===a,d=b===b;if(a>b||!c||"undefined"==typeof a&&d)return 1;if(b>a||!d||"undefined"==typeof b&&c)return-1}return 0}function f(a,b,c){if(b!==b)return q(a,c);for(var d=(c||0)-1,e=a.length;++d-1;);return c}function k(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function l(a,b){return e(a.criteria,b.criteria)||a.index-b.index}function m(a,b){for(var c=-1,d=a.criteria,f=b.criteria,g=d.length;++c=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function t(a,b){for(var c=-1,d=a.length,e=-1,f=[];++cb,d=pd(0,a.length,this.views),e=d.start,f=d.end,g=f-e,h=this.dropCount,i=ph(g,this.takeCount-h),j=c?f:e-1,k=this.iteratees,l=k?k.length:0,m=0,n=[];a:for(;g--&&i>m;){j+=b;for(var o=-1,p=a[j];++od&&(d=e)}return d}function ec(a){for(var b=-1,c=a.length,d=vh;++be&&(d=e)}return d}function fc(a,b,c,d){var e=-1,f=a.length;for(d&&f&&(c=a[++e]);++e=200&&Fh(b),j=b.length;i&&(g=Wb,h=!1,b=i);a:for(;++eb&&(b=-b>e?0:e+b),c="undefined"==typeof c||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Eg(e);++d=200,i=h&&Fh(),j=[];i?(d=Wb,g=!1):(h=!1,i=b?[]:j);a:for(;++c=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)?d=f+1:e=f}return e}return Wc(a,b,ug,c)}function Wc(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h="undefined"==typeof b;f>e;){var i=ah((e+f)/2),j=c(a[i]),k=j===j;if(g)var l=k||d;else l=h?k&&(d||"undefined"!=typeof j):d?b>=j:b>j;l?e=i+1:f=i}return ph(f,xh)}function Xc(a,b,c){if("function"!=typeof a)return ug;if("undefined"==typeof b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function Yc(a){return Zg.call(a,0)}function Zc(a,b,c){for(var d=c.length,e=-1,f=oh(a.length-d,0),g=-1,h=b.length,i=Eg(f+h);++gb||null==c)return c;if(b>3&&vd(arguments[1],arguments[2],arguments[3])&&(b=2),b>3&&"function"==typeof arguments[b-2])var d=Xc(arguments[--b-1],arguments[b--],5);else b>2&&"function"==typeof arguments[b-1]&&(d=arguments[--b]);for(var e=0;++eu){var z=h?Yb(h):null,A=oh(j-u,0),D=o?y:null,E=o?null:y,F=o?w:null,I=o?null:w;b|=o?G:H,b&=~(o?H:G),p||(b&=~(B|C));var J=fd(a,b,c,F,D,I,E,z,i,A);return J.placeholder=x,J}}var K=m?c:this;return n&&(a=K[s]),h&&(w=Bd(w,h)),l&&i=b||!mh(b))return"";var e=b-d;return c=null==c?" ":c+"",ig(c,$g(e/c.length)).slice(0,e)}function hd(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Eg(h+j);++ii))return!1;for(;k&&++hi:i>e)||i===d&&i===f)&&(e=i,f=a)}),f}function nd(a,c,d){var e=b.callback||sg;return e=e===sg?oc:e,d?e(a,c,d):e}function od(a,c,d){var e=b.indexOf||Sd;return e=e===Sd?f:e,a?e(a,c,d):e}function pd(a,b,c){for(var d=-1,e=c?c.length:0;++d-1&&a%1==0&&b>a}function vd(a,b,c){if(!uf(c))return!1;var d=typeof b;if("number"==d)var e=c.length,f=wd(e)&&ud(b,e);else f="string"==d&&b in c;return f&&c[b]===a}function wd(a){return"number"==typeof a&&a>-1&&a%1==0&&Ah>=a}function xd(a){return a===a&&(0===a?1/a>0:!uf(a))}function yd(a,b){var c=a[1],d=b[1],e=c|d,f=J|I,g=B|C,h=f|g|D|F,i=c&J&&!(d&J),j=c&I&&!(d&I),k=(j?a:b)[7],l=(i?a:b)[8],m=!(c>=I&&d>g||c>g&&d>=I),n=e>=f&&h>=e&&(I>c||(j||i)&&k.length<=l);if(!m&&!n)return a;d&B&&(a[2]=b[2],e|=c&B?0:D);var o=b[3];if(o){var p=a[3];a[3]=p?Zc(p,o,b[4]):Yb(o),a[4]=p?t(a[3],S):Yb(b[4])}return o=b[5],o&&(p=a[5],a[5]=p?$c(p,o,b[6]):Yb(o),a[6]=p?t(a[5],S):Yb(b[6])),o=b[7],o&&(a[7]=Yb(o)),d&J&&(a[8]=null==a[8]?b[8]:ph(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function zd(a,b){a=Fd(a);for(var c=-1,d=b.length,e={};++cd;)g[++f]=Qc(a,d,d+=b);return g}function Hd(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++bb?0:b)):[]}function Kd(a,b,c){var d=a?a.length:0;return d?((c?vd(a,b,c):null==b)&&(b=1),b=d-(+b||0),Qc(a,0,0>b?0:b)):[]}function Ld(a,b,c){var d=a?a.length:0;if(!d)return[];for(b=nd(b,c,3);d--&&b(a[d],d,a););return Qc(a,0,d+1)}function Md(a,b,c){var d=a?a.length:0;if(!d)return[];var e=-1;for(b=nd(b,c,3);++ec?oh(d+c,0):c||0;else if(c){var e=Vc(a,b),g=a[e];return(b===b?b===g:g!==g)?e:-1}return f(a,b,c)}function Td(a){return Kd(a,1)}function Ud(){for(var a=[],b=-1,c=arguments.length,d=[],e=od(),g=e==f;++b=120&&Fh(b&&h)))}c=a.length;var i=a[0],j=-1,k=i?i.length:0,l=[],m=d[0];a:for(;++jc?oh(d+c,0):ph(c||0,d-1))+1;else if(c){e=Vc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return q(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Xd(){var a=arguments[0];if(!a||!a.length)return a;for(var b=0,c=od(),d=arguments.length;++b-1;)gh.call(a,e,1);return a}function Yd(a){return Nc(a||[],xc(arguments,!1,!1,1))}function Zd(a,b,c){var d=-1,e=a?a.length:0,f=[];for(b=nd(b,c,3);++db?0:b)):[]}function de(a,b,c){var d=a?a.length:0;return d?((c?vd(a,b,c):null==b)&&(b=1),b=d-(+b||0),Qc(a,0>b?0:b)):[]}function ee(a,b,c){var d=a?a.length:0;if(!d)return[];for(b=nd(b,c,3);d--&&b(a[d],d,a););return Qc(a,d+1)}function fe(a,b,c){var d=a?a.length:0;if(!d)return[];var e=-1;for(b=nd(b,c,3);++e>>0,d=Eg(c);++bc?oh(d+c,0):c||0:0,"string"==typeof a||!Ph(a)&&Bf(a)?d>c&&a.indexOf(b,c)>-1:od(a,b,c)>-1):!1}function we(a,b,c){var d=Ph(a)?ac:uc;return("function"!=typeof b||"undefined"!=typeof c)&&(b=nd(b,c,3)),d(a,b)}function xe(a,b,c){var d=Ph(a)?bc:vc;return b=nd(b,c,3),d(a,b)}function ye(a,b,c){if(Ph(a)){var d=Nd(a,b,c);return d>-1?a[d]:z}return b=nd(b,c,3),wc(a,b,sc)}function ze(a,b,c){return b=nd(b,c,3),wc(a,b,tc)}function Ae(a,b){return ye(a,Jc(b))}function Be(a,b,c){return"function"==typeof b&&"undefined"==typeof c&&Ph(a)?Zb(a,b):sc(a,Xc(b,c,3)) -}function Ce(a,b,c){return"function"==typeof b&&"undefined"==typeof c&&Ph(a)?_b(a,b):tc(a,Xc(b,c,3))}function De(a,b){return Ec(a,b,Qc(arguments,2))}function Ee(a,b,c){var d=Ph(a)?cc:Ic;return b=nd(b,c,3),d(a,b)}function Fe(a,b){return Ee(a,Mc(b+""))}function Ge(a,b,c,d){var e=Ph(a)?fc:Pc;return e(a,nd(b,d,4),c,arguments.length<3,sc)}function He(a,b,c,d){var e=Ph(a)?gc:Pc;return e(a,nd(b,d,4),c,arguments.length<3,tc)}function Ie(a,b,c){var d=Ph(a)?bc:vc;return b=nd(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function Je(a,b,c){if(c?vd(a,b,c):null==b){a=Ed(a);var d=a.length;return d>0?a[Oc(0,d-1)]:z}var e=Ke(a);return e.length=ph(0>b?0:+b||0,e.length),e}function Ke(a){a=Ed(a);for(var b=-1,c=a.length,d=Eg(c);++b3&&vd(b[1],b[2],b[3])&&(b=[a,b[1]]);var c=-1,d=a?a.length:0,e=xc(b,!1,!1,1),f=wd(d)?Eg(d):[];return sc(a,function(a){for(var b=e.length,d=Eg(b);b--;)d[b]=null==a?z:a[e[b]];f[++c]={criteria:d,index:c,value:a}}),g(f,m)}function Pe(a,b){return xe(a,Jc(b))}function Qe(a,b){if(!tf(b)){if(!tf(a))throw new Ng(R);var c=a;a=b,b=c}return a=mh(a=+a)?a:0,function(){return--a<1?b.apply(this,arguments):void 0}}function Re(a,b,c){return c&&vd(a,b,c)&&(b=null),b=a&&null==b?a.length:oh(+b||0,0),id(a,J,null,null,null,null,b)}function Se(a,b){var c;if(!tf(b)){if(!tf(a))throw new Ng(R);var d=a;a=b,b=d}return function(){return--a>0?c=b.apply(this,arguments):b=null,c}}function Te(a,b){var c=B;if(arguments.length>2){var d=Qc(arguments,2),e=t(d,Te.placeholder);c|=G}return id(a,c,b,d,e)}function Ue(a){return nc(a,arguments.length>1?xc(arguments,!1,!1,1):Of(a))}function Ve(a,b){var c=B|C;if(arguments.length>2){var d=Qc(arguments,2),e=t(d,Ve.placeholder);c|=G}return id(b,c,a,d,e)}function We(a,b,c){c&&vd(a,b,c)&&(b=null);var d=id(a,E,null,null,null,null,null,b);return d.placeholder=We.placeholder,d}function Xe(a,b,c){c&&vd(a,b,c)&&(b=null);var d=id(a,F,null,null,null,null,null,b);return d.placeholder=Xe.placeholder,d}function Ye(a,b,c){function d(){m&&_g(m),i&&_g(i),i=m=n=z}function e(){var c=b-(Oh()-k);if(0>=c||c>b){i&&_g(i);var d=n;i=m=n=z,d&&(o=Oh(),j=a.apply(l,h),m||i||(h=l=null))}else m=fh(e,c)}function f(){m&&_g(m),i=m=n=z,(q||p!==b)&&(o=Oh(),j=a.apply(l,h),m||i||(h=l=null))}function g(){if(h=arguments,k=Oh(),l=this,n=q&&(m||!r),p===!1)var c=r&&!m;else{i||r||(o=k);var d=p-(k-o),g=0>=d||d>p;g?(i&&(i=_g(i)),o=k,j=a.apply(l,h)):i||(i=fh(f,d))}return g&&m?m=_g(m):m||b===p||(m=fh(e,b)),c&&(g=!0,j=a.apply(l,h)),!g||m||i||(h=l=null),j}var h,i,j,k,l,m,n,o=0,p=!1,q=!0;if(!tf(a))throw new Ng(R);if(b=0>b?0:b,c===!0){var r=!0;q=!1}else uf(c)&&(r=c.leading,p="maxWait"in c&&oh(+c.maxWait||0,b),q="trailing"in c?c.trailing:q);return g.cancel=d,g}function Ze(a){return qc(a,1,arguments,1)}function $e(a,b){return qc(a,b,arguments,2)}function _e(){var a=arguments,b=a.length;if(!b)return function(){};if(!ac(a,tf))throw new Ng(R);return function(){for(var c=0,d=a[c].apply(this,arguments);++cb)return function(){};if(!ac(a,tf))throw new Ng(R);return function(){for(var c=b,d=a[c].apply(this,arguments);c--;)d=a[c].call(this,d);return d}}function bf(a,b){if(!tf(a)||b&&!tf(b))throw new Ng(R);var c=function(){var d=c.cache,e=b?b.apply(this,arguments):arguments[0];if(d.has(e))return d.get(e);var f=a.apply(this,arguments);return d.set(e,f),f};return c.cache=new bf.Cache,c}function cf(a){if(!tf(a))throw new Ng(R);return function(){return!a.apply(this,arguments)}}function df(a){return Se(a,2)}function ef(a){var b=Qc(arguments,1),c=t(b,ef.placeholder);return id(a,G,null,b,c)}function ff(a){var b=Qc(arguments,1),c=t(b,ff.placeholder);return id(a,H,null,b,c)}function gf(a){var b=xc(arguments,!1,!1,1);return id(a,I,null,null,null,b)}function hf(a,b,c){var d=!0,e=!0;if(!tf(a))throw new Ng(R);return c===!1?d=!1:uf(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Pb.leading=d,Pb.maxWait=+b,Pb.trailing=e,Ye(a,b,Pb)}function jf(a,b){return b=null==b?ug:b,id(b,G,null,[a],[])}function kf(a,b,c,d){return"boolean"!=typeof b&&null!=b&&(d=c,c=vd(a,b,d)?null:b,b=!1),c="function"==typeof c&&Xc(c,d,1),pc(a,b,c)}function lf(a,b,c){return b="function"==typeof b&&Xc(b,c,1),pc(a,!0,b)}function mf(a){var b=r(a)?a.length:z;return wd(b)&&Vg.call(a)==T||!1}function nf(a){return a===!0||a===!1||r(a)&&Vg.call(a)==V||!1}function of(a){return r(a)&&Vg.call(a)==W||!1}function pf(a){return a&&1===a.nodeType&&r(a)&&Vg.call(a).indexOf("Element")>-1||!1}function qf(a){if(null==a)return!0;var b=a.length;return wd(b)&&(Ph(a)||Bf(a)||mf(a)||r(a)&&tf(a.splice))?!b:!Th(a).length}function rf(a,b,c,d){if(c="function"==typeof c&&Xc(c,d,3),!c&&xd(a)&&xd(b))return a===b;var e=c?c(a,b):z;return"undefined"==typeof e?Fc(a,b,c):!!e}function sf(a){return r(a)&&"string"==typeof a.message&&Vg.call(a)==X||!1}function tf(a){return"function"==typeof a||!1}function uf(a){var b=typeof a;return"function"==b||a&&"object"==b||!1}function vf(a,b,c,d){var e=Th(b),f=e.length;if(c="function"==typeof c&&Xc(c,d,3),!c&&1==f){var g=e[0],h=b[g];if(xd(h))return null!=a&&h===a[g]&&Tg.call(a,g)}for(var i=Eg(f),j=Eg(f);f--;)h=i[f]=b[e[f]],j[f]=xd(h);return Hc(a,e,i,j,c)}function wf(a){return zf(a)&&a!=+a}function xf(a){return null==a?!1:Vg.call(a)==Y?Xg.test(Rg.call(a)):r(a)&&Cb.test(a)||!1}function yf(a){return null===a}function zf(a){return"number"==typeof a||r(a)&&Vg.call(a)==$||!1}function Af(a){return r(a)&&Vg.call(a)==ab||!1}function Bf(a){return"string"==typeof a||r(a)&&Vg.call(a)==cb||!1}function Cf(a){return r(a)&&wd(a.length)&&Nb[Vg.call(a)]||!1}function Df(a){return"undefined"==typeof a}function Ef(a){var b=a?a.length:0;return wd(b)?b?Yb(a):[]:Yf(a)}function Ff(a){return mc(a,Rf(a))}function Gf(a,b,c){var d=Dh(a);return c&&vd(a,b,c)&&(b=null),b?mc(b,d,Th(b)):d}function Hf(a){if(null==a)return a;var b=Yb(arguments);return b.push(ic),Sh.apply(z,b)}function If(a,b,c){return b=nd(b,c,3),wc(a,b,Bc,!0)}function Jf(a,b,c){return b=nd(b,c,3),wc(a,b,Cc,!0)}function Kf(a,b,c){return("function"!=typeof b||"undefined"!=typeof c)&&(b=Xc(b,c,3)),yc(a,b,Rf)}function Lf(a,b,c){return b=Xc(b,c,3),zc(a,b,Rf)}function Mf(a,b,c){return("function"!=typeof b||"undefined"!=typeof c)&&(b=Xc(b,c,3)),Bc(a,b)}function Nf(a,b,c){return b=Xc(b,c,3),zc(a,b,Th)}function Of(a){return Dc(a,Rf(a))}function Pf(a,b){return a?Tg.call(a,b):!1}function Qf(a,b,c){c&&vd(a,b,c)&&(b=null);for(var d=-1,e=Th(a),f=e.length,g={};++d0;++dc?0:+c||0,d))-b.length,c>=0&&a.indexOf(b,c)==c}function cg(a){return a=h(a),a&&ub.test(a)?a.replace(sb,o):a}function dg(a){return a=h(a),a&&Gb.test(a)?a.replace(Fb,"\\$&"):a}function eg(a,b,c){a=h(a),b=+b;var d=a.length;if(d>=b||!mh(b))return a;var e=(b-d)/2,f=ah(e),g=$g(e);return c=gd("",g,c),c.slice(0,f)+a+c}function fg(a,b,c){return a=h(a),a&&gd(a,b,c)+a}function gg(a,b,c){return a=h(a),a&&a+gd(a,b,c)}function hg(a,b,c){return c&&vd(a,b,c)&&(b=0),sh(a,b)}function ig(a,b){var c="";if(a=h(a),b=+b,1>b||!a||!mh(b))return c;do b%2&&(c+=a),b=ah(b/2),a+=a;while(b);return c}function jg(a,b,c){return a=h(a),c=null==c?0:ph(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function kg(a,c,d){var e=b.templateSettings;d&&vd(a,c,d)&&(c=d=null),a=h(a),c=kc(kc({},d||c),e,jc);var f,g,i=kc(kc({},c.imports),e.imports,jc),j=Th(i),k=Tc(i,j),l=0,m=c.interpolate||Eb,n="__p += '",o=Lg((c.escape||Eb).source+"|"+m.source+"|"+(m===xb?yb:Eb).source+"|"+(c.evaluate||Eb).source+"|$","g"),q="//# sourceURL="+("sourceURL"in c?c.sourceURL:"lodash.templateSources["+ ++Mb+"]")+"\n";a.replace(o,function(b,c,d,e,h,i){return d||(d=e),n+=a.slice(l,i).replace(Ib,p),c&&(f=!0,n+="' +\n__e("+c+") +\n'"),h&&(g=!0,n+="';\n"+h+";\n__p += '"),d&&(n+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),l=i+b.length,b}),n+="';\n";var r=c.variable;r||(n="with (obj) {\n"+n+"\n}\n"),n=(g?n.replace(ob,""):n).replace(pb,"$1").replace(qb,"$1;"),n="function("+(r||"obj")+") {\n"+(r?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+n+"return __p\n}";var s=rg(function(){return Hg(j,q+"return "+n).apply(z,k)});if(s.source=n,sf(s))throw s;return s}function lg(a,b,c){var d=a;return(a=h(a))?(c?vd(d,b,c):null==b)?a.slice(v(a),w(a)+1):(b+="",a.slice(j(a,b),k(a,b)+1)):a}function mg(a,b,c){var d=a;return a=h(a),a?a.slice((c?vd(d,b,c):null==b)?v(a):j(a,b+"")):a}function ng(a,b,c){var d=a;return a=h(a),a?(c?vd(d,b,c):null==b)?a.slice(0,w(a)+1):a.slice(0,k(a,b+"")+1):a}function og(a,b,c){c&&vd(a,b,c)&&(b=null);var d=K,e=L;if(null!=b)if(uf(b)){var f="separator"in b?b.separator:f;d="length"in b?+b.length||0:d,e="omission"in b?h(b.omission):e}else d=+b||0;if(a=h(a),d>=a.length)return a;var g=d-e.length;if(1>g)return e;var i=a.slice(0,g);if(null==f)return i+e;if(Af(f)){if(a.slice(g).search(f)){var j,k,l=a.slice(0,g);for(f.global||(f=Lg(f.source,(zb.exec(f)||"")+"g")),f.lastIndex=0;j=f.exec(l);)k=j.index;i=i.slice(0,null==k?g:k)}}else if(a.indexOf(f,g)!=g){var m=i.lastIndexOf(f);m>-1&&(i=i.slice(0,m))}return i+e}function pg(a){return a=h(a),a&&tb.test(a)?a.replace(rb,x):a}function qg(a,b,c){return c&&vd(a,b,c)&&(b=null),a=h(a),a.match(b||Jb)||[]}function rg(a){try{return a()}catch(b){return sf(b)?b:Gg(b)}}function sg(a,b,c){return c&&vd(a,b,c)&&(b=null),r(a)?vg(a):oc(a,b)}function tg(a){return function(){return a}}function ug(a){return a}function vg(a){return Jc(pc(a,!0))}function wg(a,b,c){if(null==c){var d=uf(b),e=d&&Th(b),f=e&&e.length&&Dc(b,e);(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Dc(b,Th(b)));var g=!0,h=-1,i=tf(a),j=f.length;c===!1?g=!1:uf(c)&&"chain"in c&&(g=c.chain);for(;++ha||!mh(a))return[];var d=-1,e=Eg(ph(a,wh));for(b=Xc(b,c,1);++dd?e[d]=b(d):b(d);return e}function Dg(a){var b=++Ug;return h(a)+b}a=a?$b.defaults(Vb.Object(),a,$b.pick(Vb,Lb)):Vb;var Eg=a.Array,Fg=a.Date,Gg=a.Error,Hg=a.Function,Ig=a.Math,Jg=a.Number,Kg=a.Object,Lg=a.RegExp,Mg=a.String,Ng=a.TypeError,Og=Eg.prototype,Pg=Kg.prototype,Qg=(Qg=a.window)&&Qg.document,Rg=Hg.prototype.toString,Sg=Mc("length"),Tg=Pg.hasOwnProperty,Ug=0,Vg=Pg.toString,Wg=a._,Xg=Lg("^"+dg(Vg).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Yg=xf(Yg=a.ArrayBuffer)&&Yg,Zg=xf(Zg=Yg&&new Yg(0).slice)&&Zg,$g=Ig.ceil,_g=a.clearTimeout,ah=Ig.floor,bh=xf(bh=Kg.getPrototypeOf)&&bh,ch=Og.push,dh=Pg.propertyIsEnumerable,eh=xf(eh=a.Set)&&eh,fh=a.setTimeout,gh=Og.splice,hh=xf(hh=a.Uint8Array)&&hh,ih=(Og.unshift,xf(ih=a.WeakMap)&&ih),jh=function(){try{var b=xf(b=a.Float64Array)&&b,c=new b(new Yg(10),0,1)&&b}catch(d){}return c}(),kh=xf(kh=Eg.isArray)&&kh,lh=xf(lh=Kg.create)&&lh,mh=a.isFinite,nh=xf(nh=Kg.keys)&&nh,oh=Ig.max,ph=Ig.min,qh=xf(qh=Fg.now)&&qh,rh=xf(rh=Jg.isFinite)&&rh,sh=a.parseInt,th=Ig.random,uh=Jg.NEGATIVE_INFINITY,vh=Jg.POSITIVE_INFINITY,wh=Ig.pow(2,32)-1,xh=wh-1,yh=wh>>>1,zh=jh?jh.BYTES_PER_ELEMENT:0,Ah=Ig.pow(2,53)-1,Bh=ih&&new ih,Ch=b.support={};!function(){Ch.funcDecomp=!xf(a.WinRTError)&&Hb.test(y),Ch.funcNames="string"==typeof Hg.name;try{Ch.dom=11===Qg.createDocumentFragment().nodeType}catch(b){Ch.dom=!1}try{Ch.nonEnumArgs=!dh.call(arguments,1)}catch(b){Ch.nonEnumArgs=!0}}(0,0),b.templateSettings={escape:vb,evaluate:wb,interpolate:xb,variable:"",imports:{_:b}};var Dh=function(){function b(){}return function(c){if(uf(c)){b.prototype=c;var d=new b;b.prototype=null}return d||a.Object()}}(),Eh=Bh?function(a,b){return Bh.set(a,b),a}:ug;Zg||(Yc=Yg&&hh?function(a){var b=a.byteLength,c=jh?ah(b/zh):0,d=c*zh,e=new Yg(b);if(c){var f=new jh(e,0,c);f.set(new jh(a,0,c))}return b!=d&&(f=new hh(e,d),f.set(new hh(a,d))),e}:tg(null));var Fh=lh&&eh?function(a){return new Ub(a)}:tg(null),Gh=Bh?function(a){return Bh.get(a)}:yg,Hh=function(){var a=0,b=0;return function(c,d){var e=Oh(),f=N-(e-b);if(b=e,f>0){if(++a>=M)return c}else a=0;return Eh(c,d)}}(),Ih=_c(function(a,b,c){Tg.call(a,c)?++a[c]:a[c]=1}),Jh=_c(function(a,b,c){Tg.call(a,c)?a[c].push(b):a[c]=[b]}),Kh=_c(function(a,b,c){a[c]=b}),Lh=ed(dc),Mh=ed(ec,!0),Nh=_c(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),Oh=qh||function(){return(new Fg).getTime()},Ph=kh||function(a){return r(a)&&wd(a.length)&&Vg.call(a)==U||!1};Ch.dom||(pf=function(a){return a&&1===a.nodeType&&r(a)&&!Rh(a)||!1});var Qh=rh||function(a){return"number"==typeof a&&mh(a)};(tf(/x/)||hh&&!tf(hh))&&(tf=function(a){return Vg.call(a)==Y});var Rh=bh?function(a){if(!a||Vg.call(a)!=_)return!1;var b=a.valueOf,c=xf(b)&&(c=bh(b))&&bh(c);return c?a==c||bh(a)==c:Cd(a)}:Cd,Sh=ad(kc),Th=nh?function(a){if(a)var b=a.constructor,c=a.length;return"function"==typeof b&&b.prototype===a||"function"!=typeof a&&c&&wd(c)?Dd(a):uf(a)?nh(a):[]}:Dd,Uh=ad(Kc),Vh=cd(function(a,b,c){return b=b.toLowerCase(),a+(c?b.charAt(0).toUpperCase()+b.slice(1):b)}),Wh=cd(function(a,b,c){return a+(c?"-":"")+b.toLowerCase()});8!=sh(Kb+"08")&&(hg=function(a,b,c){return(c?vd(a,b,c):null==b)?b=0:b&&(b=+b),a=lg(a),sh(a,b||(Bb.test(a)?16:10))});var Xh=cd(function(a,b,c){return a+(c?"_":"")+b.toLowerCase()}),Yh=cd(function(a,b,c){return a+(c?" ":"")+(b.charAt(0).toUpperCase()+b.slice(1))});return c.prototype=b.prototype,db.prototype["delete"]=Qb,db.prototype.get=Rb,db.prototype.has=Sb,db.prototype.set=Tb,Ub.prototype.push=Xb,bf.Cache=db,b.after=Qe,b.ary=Re,b.assign=Sh,b.at=ue,b.before=Se,b.bind=Te,b.bindAll=Ue,b.bindKey=Ve,b.callback=sg,b.chain=ne,b.chunk=Gd,b.compact=Hd,b.constant=tg,b.countBy=Ih,b.create=Gf,b.curry=We,b.curryRight=Xe,b.debounce=Ye,b.defaults=Hf,b.defer=Ze,b.delay=$e,b.difference=Id,b.drop=Jd,b.dropRight=Kd,b.dropRightWhile=Ld,b.dropWhile=Md,b.filter=xe,b.flatten=Qd,b.flattenDeep=Rd,b.flow=_e,b.flowRight=af,b.forEach=Be,b.forEachRight=Ce,b.forIn=Kf,b.forInRight=Lf,b.forOwn=Mf,b.forOwnRight=Nf,b.functions=Of,b.groupBy=Jh,b.indexBy=Kh,b.initial=Td,b.intersection=Ud,b.invert=Qf,b.invoke=De,b.keys=Th,b.keysIn=Rf,b.map=Ee,b.mapValues=Sf,b.matches=vg,b.memoize=bf,b.merge=Uh,b.mixin=wg,b.negate=cf,b.omit=Tf,b.once=df,b.pairs=Uf,b.partial=ef,b.partialRight=ff,b.partition=Nh,b.pick=Vf,b.pluck=Fe,b.property=zg,b.propertyOf=Ag,b.pull=Xd,b.pullAt=Yd,b.range=Bg,b.rearg=gf,b.reject=Ie,b.remove=Zd,b.rest=$d,b.shuffle=Ke,b.slice=_d,b.sortBy=Ne,b.sortByAll=Oe,b.take=ce,b.takeRight=de,b.takeRightWhile=ee,b.takeWhile=fe,b.tap=oe,b.throttle=hf,b.thru=pe,b.times=Cg,b.toArray=Ef,b.toPlainObject=Ff,b.transform=Xf,b.union=ge,b.uniq=he,b.unzip=ie,b.values=Yf,b.valuesIn=Zf,b.where=Pe,b.without=je,b.wrap=jf,b.xor=ke,b.zip=le,b.zipObject=me,b.backflow=af,b.collect=Ee,b.compose=af,b.each=Be,b.eachRight=Ce,b.extend=Sh,b.iteratee=sg,b.methods=Of,b.object=me,b.select=xe,b.tail=$d,b.unique=he,wg(b,b),b.attempt=rg,b.camelCase=Vh,b.capitalize=_f,b.clone=kf,b.cloneDeep=lf,b.deburr=ag,b.endsWith=bg,b.escape=cg,b.escapeRegExp=dg,b.every=we,b.find=ye,b.findIndex=Nd,b.findKey=If,b.findLast=ze,b.findLastIndex=Od,b.findLastKey=Jf,b.findWhere=Ae,b.first=Pd,b.has=Pf,b.identity=ug,b.includes=ve,b.indexOf=Sd,b.isArguments=mf,b.isArray=Ph,b.isBoolean=nf,b.isDate=of,b.isElement=pf,b.isEmpty=qf,b.isEqual=rf,b.isError=sf,b.isFinite=Qh,b.isFunction=tf,b.isMatch=vf,b.isNaN=wf,b.isNative=xf,b.isNull=yf,b.isNumber=zf,b.isObject=uf,b.isPlainObject=Rh,b.isRegExp=Af,b.isString=Bf,b.isTypedArray=Cf,b.isUndefined=Df,b.kebabCase=Wh,b.last=Vd,b.lastIndexOf=Wd,b.max=Lh,b.min=Mh,b.noConflict=xg,b.noop=yg,b.now=Oh,b.pad=eg,b.padLeft=fg,b.padRight=gg,b.parseInt=hg,b.random=$f,b.reduce=Ge,b.reduceRight=He,b.repeat=ig,b.result=Wf,b.runInContext=y,b.size=Le,b.snakeCase=Xh,b.some=Me,b.sortedIndex=ae,b.sortedLastIndex=be,b.startCase=Yh,b.startsWith=jg,b.template=kg,b.trim=lg,b.trimLeft=mg,b.trimRight=ng,b.trunc=og,b.unescape=pg,b.uniqueId=Dg,b.words=qg,b.all=we,b.any=Me,b.contains=ve,b.detect=ye,b.foldl=Ge,b.foldr=He,b.head=Pd,b.include=ve,b.inject=Ge,wg(b,function(){var a={};return Bc(b,function(c,d){b.prototype[d]||(a[d]=c)}),a}(),!1),b.sample=Je,b.prototype.sample=function(a){return this.__chain__||null!=a?this.thru(function(b){return Je(b,a)}):Je(this.value())},b.VERSION=A,Zb(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){b[a].placeholder=b}),Zb(["filter","map","takeWhile"],function(a,b){var c=b==O;d.prototype[a]=function(a,d){var e=this.clone(),f=e.filtered,g=e.iteratees||(e.iteratees=[]);return e.filtered=f||c||b==Q&&e.dir<0,g.push({iteratee:nd(a,d,3),type:b}),e}}),Zb(["drop","take"],function(a,b){var c=a+"Count",e=a+"While";d.prototype[a]=function(d){d=null==d?1:oh(+d||0,0);var e=this.clone();if(e.filtered){var f=e[c];e[c]=b?ph(f,d):f+d}else{var g=e.views||(e.views=[]);g.push({size:d,type:a+(e.dir<0?"Right":"")})}return e},d.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()},d.prototype[a+"RightWhile"]=function(a,b){return this.reverse()[e](a,b).reverse()}}),Zb(["first","last"],function(a,b){var c="take"+(b?"Right":"");d.prototype[a]=function(){return this[c](1).value()[0]}}),Zb(["initial","rest"],function(a,b){var c="drop"+(b?"":"Right");d.prototype[a]=function(){return this[c](1)}}),Zb(["pluck","where"],function(a,b){var c=b?"filter":"map",e=b?Jc:Mc;d.prototype[a]=function(a){return this[c](e(b?a:a+""))}}),d.prototype.dropWhile=function(a,b){var c,d,e=this.dir<0;return a=nd(a,b,3),this.filter(function(b,f,g){return c=c&&(e?d>f:f>d),d=f,c||(c=!a(b,f,g))})},d.prototype.reject=function(a,b){return a=nd(a,b,3),this.filter(function(b,c,d){return!a(b,c,d)})},d.prototype.slice=function(a,b){a=null==a?0:+a||0;var c=0>a?this.takeRight(-a):this.drop(a);return"undefined"!=typeof b&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c},Bc(d.prototype,function(a,e){var f=b[e],g=/^(?:first|last)$/.test(e);b.prototype[e]=function(){var e=this.__wrapped__,h=arguments,i=this.__chain__,j=!!this.__actions__.length,k=e instanceof d,l=k&&!j;if(g&&!i)return l?a.call(e):f.call(b,this.value());var m=function(a){var c=[a];return ch.apply(c,h),f.apply(b,c)};if(k||Ph(e)){var n=l?e:new d(this),o=a.apply(n,h);if(!g&&(j||o.actions)){var p=o.actions||(o.actions=[]);p.push({func:pe,args:[m],thisArg:b})}return new c(o,i)}return this.thru(m)}}),Zb(["concat","join","pop","push","shift","sort","splice","unshift"],function(a){var c=Og[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(a);b.prototype[a]=function(){var a=arguments;return e&&!this.__chain__?c.apply(this.value(),a):this[d](function(b){return c.apply(b,a)})}}),d.prototype.clone=s,d.prototype.reverse=Z,d.prototype.value=bb,b.prototype.chain=qe,b.prototype.reverse=re,b.prototype.toString=se,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=te,b.prototype.collect=b.prototype.map,b.prototype.head=b.prototype.first,b.prototype.select=b.prototype.filter,b.prototype.tail=b.prototype.rest,b}var z,A="3.1.0",B=1,C=2,D=4,E=8,F=16,G=32,H=64,I=128,J=256,K=30,L="...",M=150,N=16,O=0,P=1,Q=2,R="Expected a function",S="__lodash_placeholder__",T="[object Arguments]",U="[object Array]",V="[object Boolean]",W="[object Date]",X="[object Error]",Y="[object Function]",Z="[object Map]",$="[object Number]",_="[object Object]",ab="[object RegExp]",bb="[object Set]",cb="[object String]",db="[object WeakMap]",eb="[object ArrayBuffer]",fb="[object Float32Array]",gb="[object Float64Array]",hb="[object Int8Array]",ib="[object Int16Array]",jb="[object Int32Array]",kb="[object Uint8Array]",lb="[object Uint8ClampedArray]",mb="[object Uint16Array]",nb="[object Uint32Array]",ob=/\b__p \+= '';/g,pb=/\b(__p \+=) '' \+/g,qb=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rb=/&(?:amp|lt|gt|quot|#39|#96);/g,sb=/[&<>"'`]/g,tb=RegExp(rb.source),ub=RegExp(sb.source),vb=/<%-([\s\S]+?)%>/g,wb=/<%([\s\S]+?)%>/g,xb=/<%=([\s\S]+?)%>/g,yb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zb=/\w*$/,Ab=/^\s*function[ \n\r\t]+\w/,Bb=/^0[xX]/,Cb=/^\[object .+?Constructor\]$/,Db=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Eb=/($^)/,Fb=/[.*+?^${}()|[\]\/\\]/g,Gb=RegExp(Fb.source),Hb=/\bthis\b/,Ib=/['\n\r\u2028\u2029\\]/g,Jb=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"{2,}(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Kb=" \f \n\r\u2028\u2029 ᠎              ",Lb=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window","WinRTError"],Mb=-1,Nb={};Nb[fb]=Nb[gb]=Nb[hb]=Nb[ib]=Nb[jb]=Nb[kb]=Nb[lb]=Nb[mb]=Nb[nb]=!0,Nb[T]=Nb[U]=Nb[eb]=Nb[V]=Nb[W]=Nb[X]=Nb[Y]=Nb[Z]=Nb[$]=Nb[_]=Nb[ab]=Nb[bb]=Nb[cb]=Nb[db]=!1;var Ob={};Ob[T]=Ob[U]=Ob[eb]=Ob[V]=Ob[W]=Ob[fb]=Ob[gb]=Ob[hb]=Ob[ib]=Ob[jb]=Ob[$]=Ob[_]=Ob[ab]=Ob[cb]=Ob[kb]=Ob[lb]=Ob[mb]=Ob[nb]=!0,Ob[X]=Ob[Y]=Ob[Z]=Ob[bb]=Ob[db]=!1;var Pb={leading:!1,maxWait:0,trailing:!1},Qb={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Rb={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Sb={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Tb={"function":!0,object:!0},Ub={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vb=Tb[typeof window]&&window!==(this&&this.window)?window:this,Wb=Tb[typeof d]&&d&&!d.nodeType&&d,Xb=Tb[typeof c]&&c&&!c.nodeType&&c,Yb=Wb&&Xb&&"object"==typeof b&&b;!Yb||Yb.global!==Yb&&Yb.window!==Yb&&Yb.self!==Yb||(Vb=Yb);var Zb=Xb&&Xb.exports===Wb&&Wb,$b=y();"function"==typeof a&&"object"==typeof a.amd&&a.amd?(Vb._=$b,a(function(){return $b})):Wb&&Xb?Zb?(Xb.exports=$b)._=$b:Wb._=$b:Vb._=$b}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],41:[function(a,b){(function(){var a;a=function(){function a(a){this.data=null!=a?a:[],this.pos=0,this.length=this.data.length}return a.prototype.readByte=function(){return this.data[this.pos++]},a.prototype.writeByte=function(a){return this.data[this.pos++]=a},a.prototype.byteAt=function(a){return this.data[a]},a.prototype.readBool=function(){return!!this.readByte()},a.prototype.writeBool=function(a){return this.writeByte(a?1:0)},a.prototype.readUInt32=function(){var a,b,c,d;return a=16777216*this.readByte(),b=this.readByte()<<16,c=this.readByte()<<8,d=this.readByte(),a+b+c+d},a.prototype.writeUInt32=function(a){return this.writeByte(a>>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt32=function(){var a;return a=this.readUInt32(),a>=2147483648?a-4294967296:a},a.prototype.writeInt32=function(a){return 0>a&&(a+=4294967296),this.writeUInt32(a)},a.prototype.readUInt16=function(){var a,b;return a=this.readByte()<<8,b=this.readByte(),a|b},a.prototype.writeUInt16=function(a){return this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt16=function(){var a;return a=this.readUInt16(),a>=32768?a-65536:a},a.prototype.writeInt16=function(a){return 0>a&&(a+=65536),this.writeUInt16(a)},a.prototype.readString=function(a){var b,c,d;for(c=[],b=d=0;a>=0?a>d:d>a;b=a>=0?++d:--d)c[b]=String.fromCharCode(this.readByte());return c.join("")},a.prototype.writeString=function(a){var b,c,d,e;for(e=[],b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(this.writeByte(a.charCodeAt(b)));return e},a.prototype.stringAt=function(a,b){return this.pos=a,this.readString(b)},a.prototype.readShort=function(){return this.readInt16()},a.prototype.writeShort=function(a){return this.writeInt16(a)},a.prototype.readLongLong=function(){var a,b,c,d,e,f,g,h;return a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte(),e=this.readByte(),f=this.readByte(),g=this.readByte(),h=this.readByte(),128&a?-1*(72057594037927940*(255^a)+281474976710656*(255^b)+1099511627776*(255^c)+4294967296*(255^d)+16777216*(255^e)+65536*(255^f)+256*(255^g)+(255^h)+1):72057594037927940*a+281474976710656*b+1099511627776*c+4294967296*d+16777216*e+65536*f+256*g+h},a.prototype.writeLongLong=function(a){var b,c;return b=Math.floor(a/4294967296),c=4294967295&a,this.writeByte(b>>24&255),this.writeByte(b>>16&255),this.writeByte(b>>8&255),this.writeByte(255&b),this.writeByte(c>>24&255),this.writeByte(c>>16&255),this.writeByte(c>>8&255),this.writeByte(255&c)},a.prototype.readInt=function(){return this.readInt32()},a.prototype.writeInt=function(a){return this.writeInt32(a)},a.prototype.slice=function(a,b){return this.data.slice(a,b)},a.prototype.read=function(a){var b,c,d;for(b=[],c=d=0;a>=0?a>d:d>a;c=a>=0?++d:--d)b.push(this.readByte());return b},a.prototype.write=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.writeByte(b));return e},a}(),b.exports=a}).call(this)},{}],42:[function(a,b){(function(c){(function(){var d,e,f,g,h,i,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=a("stream"),h=a("fs"),e=a("./object"),g=a("./reference"),f=a("./page"),d=function(b){function d(a){var b,c,e,f;if(this.options=null!=a?a:{},d.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null!=(e=this.options.compress)?e:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){f=this.options.info;for(b in f)c=f[b],this.info[b]=c}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.addPage()}var i;return k(d,b),i=function(a){var b,c,e;e=[];for(c in a)b=a[c],e.push(d.prototype[c]=b);return e},i(a("./mixins/color")),i(a("./mixins/vector")),i(a("./mixins/fonts")),i(a("./mixins/text")),i(a("./mixins/images")),i(a("./mixins/annotations")),d.prototype.addPage=function(a){var b;return null==a&&(a=this.options),this.options.bufferPages||this.flushPages(),this.page=new f(this,a),this._pageBuffer.push(this.page),b=this._root.data.Pages.data,b.Kids.push(this.page.dictionary),b.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this},d.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},d.prototype.switchToPage=function(a){var b;if(!(b=this._pageBuffer[a-this._pageBufferStart]))throw new Error("switchToPage("+a+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1));return this.page=b},d.prototype.flushPages=function(){var a,b,c,d;for(b=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=b.length,c=0,d=b.length;d>c;c++)a=b[c],a.end()},d.prototype.ref=function(a){var b;return b=new g(this,this._offsets.length+1,a),this._offsets.push(null),this._waiting++,b},d.prototype._read=function(){},d.prototype._write=function(a){return c.isBuffer(a)||(a=new c(a+"\n","binary")),this.push(a),this._offset+=a.length},d.prototype.addContent=function(a){return this.page.write(a),this},d.prototype._refEnd=function(a){return this._offsets[a.id-1]=a.offset,0===--this._waiting&&this._ended?(this._finalize(),this._ended=!1):void 0},d.prototype.write=function(a,b){var c;return c=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),this.pipe(h.createWriteStream(a)),this.end(),this.once("end",b)},d.prototype.output=function(){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},d.prototype.end=function(){var a,b,c,d,f,g;this.flushPages(),this._info=this.ref(),f=this.info;for(b in f)d=f[b],"string"==typeof d&&(d=e.s(d,!0)),this._info.data[b]=d;this._info.end(),g=this._fontFamilies;for(c in g)a=g[c],a.embed();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},d.prototype._finalize=function(){var a,b,c,d,f;for(b=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),f=this._offsets,c=0,d=f.length;d>c;c++)a=f[c],a=("0000000000"+a).slice(-10),this._write(a+" 00000 n ");return this._write("trailer"),this._write(e.convert({Size:this._offsets.length,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+b),this._write("%%EOF"),this.push(null)},d.prototype.toString=function(){return"[object PDFDocument]"},d}(i.Readable),b.exports=d}).call(this)}).call(this,a("buffer").Buffer)},{"./mixins/annotations":66,"./mixins/color":67,"./mixins/fonts":68,"./mixins/images":69,"./mixins/text":70,"./mixins/vector":71,"./object":72,"./page":73,"./reference":75,buffer:17,fs:"fs",stream:36}],43:[function(a,b){(function(c,d){(function(){var e,f,g,h,i;h=a("./font/ttf"),e=a("./font/afm"),g=a("./font/subset"),i=a("fs"),f=function(){function a(a,d,f,i){if(this.document=a,this.id=i,"string"==typeof d){if(d in b)return this.isAFM=!0,this.font=new e(b[d]()),void this.registerAFM(d); -if(/\.(ttf|ttc)$/i.test(d))this.font=h.open(d,f);else{if(!/\.dfont$/i.test(d))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromDFont(d,f)}}else if(c.isBuffer(d))this.font=h.fromBuffer(d,f);else if(d instanceof Uint8Array)this.font=h.fromBuffer(new c(d),f);else{if(!(d instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromBuffer(new c(new Uint8Array(d)),f)}this.subset=new g(this.font),this.registerTTF()}var b,f;return b={Courier:function(){return i.readFileSync(d+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return i.readFileSync(d+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return i.readFileSync(d+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return i.readFileSync(d+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return i.readFileSync(d+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return i.readFileSync(d+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return i.readFileSync(d+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return i.readFileSync(d+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return i.readFileSync(d+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return i.readFileSync(d+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return i.readFileSync(d+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return i.readFileSync(d+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return i.readFileSync(d+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return i.readFileSync(d+"/font/data/ZapfDingbats.afm","utf8")}},a.prototype.use=function(a){var b;return null!=(b=this.subset)?b.use(a):void 0},a.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},a.prototype.encode=function(a){var b;return this.isAFM?this.font.encodeText(a):(null!=(b=this.subset)?b.encodeText(a):void 0)||a},a.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},a.prototype.registerTTF=function(){var a,b,c,d,e;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var b,c,d,e;for(d=this.font.bbox,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(Math.round(a*this.scaleFactor));return e}.call(this),this.stemV=0,this.font.post.exists?(d=this.font.post.italic_angle,b=d>>16,c=255&d,b&!0&&(b=-((65535^b)+1)),this.italicAngle=+(""+b+"."+c)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(e=this.familyClass)||2===e||3===e||4===e||5===e||7===e,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},a.prototype.embedTTF=function(){var a,b,c,d,e,g,h,i;return d=this.subset.encode(),h=this.document.ref(),h.write(d),h.data.Length1=h.uncompressedLength,h.end(),e=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:h,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),e.end(),g=+Object.keys(this.subset.cmap)[0],a=function(){var a,b;a=this.subset.cmap,b=[];for(c in a)i=a[c],b.push(Math.round(this.font.widthOfGlyph(i)));return b}.call(this),b=this.document.ref(),b.end(f(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:e,FirstChar:g,LastChar:g+a.length-1,Widths:a,Encoding:"MacRomanEncoding",ToUnicode:b},this.dictionary.end()},f=function(a){var b,c,d,e,f,g,h;for(f="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",c=Object.keys(a).sort(function(a,b){return a-b}),d=[],g=0,h=c.length;h>g;g++)b=c[g],d.length>=100&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar",d=[]),e=("0000"+a[b].toString(16)).slice(-4),b=(+b).toString(16),d.push("<"+b+"><"+e+">");return d.length&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar\n"),f+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},a.prototype.registerAFM=function(a){var b;return this.name=a,b=this.font,this.ascender=b.ascender,this.decender=b.decender,this.bbox=b.bbox,this.lineGap=b.lineGap,b},a.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},a.prototype.widthOfString=function(a,b){var c,d,e,f,g,h;for(a=""+a,f=0,d=g=0,h=a.length;h>=0?h>g:g>h;d=h>=0?++g:--g)c=a.charCodeAt(d),f+=this.font.widthOfGlyph(this.font.characterToGlyph(c))||0;return e=b/1e3,f*e},a.prototype.lineHeight=function(a,b){var c;return null==b&&(b=!1),c=b?this.lineGap:0,(this.ascender+c-this.decender)/1e3*a},a}(),b.exports=f}).call(this)}).call(this,a("buffer").Buffer,"/node_modules/pdfkit/js")},{"./font/afm":44,"./font/subset":47,"./font/ttf":59,buffer:17,fs:"fs"}],44:[function(a,b){(function(){var c,d;d=a("fs"),c=function(){function a(a){var b,d;this.contents=a,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.parse(),this.charWidths=function(){var a,b;for(b=[],d=a=0;255>=a;d=++a)b.push(this.glyphWidths[c[d]]);return b}.call(this),this.bbox=function(){var a,c,d,e;for(d=this.attributes.FontBBox.split(/\s+/),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(+b);return e}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var b,c;return a.open=function(b){return new a(d.readFileSync(b,"utf8"))},a.prototype.parse=function(){var a,b,c,d,e,f,g,h,i,j;for(f="",j=this.contents.split("\n"),h=0,i=j.length;i>h;h++)if(c=j[h],d=c.match(/^Start(\w+)/))f=d[1];else if(d=c.match(/^End(\w+)/))f="";else switch(f){case"FontMetrics":d=c.match(/(^\w+)\s+(.*)/),b=d[1],g=d[2],(a=this.attributes[b])?(Array.isArray(a)||(a=this.attributes[b]=[a]),a.push(g)):this.attributes[b]=g;break;case"CharMetrics":if(!/^CH?\s/.test(c))continue;e=c.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[e]=+c.match(/\bWX\s+(\d+)\s*;/)[1]}},b={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},a.prototype.encodeText=function(a){var c,d,e,f,g;for(e="",d=f=0,g=a.length;g>=0?g>f:f>g;d=g>=0?++f:--f)c=a.charCodeAt(d),c=b[c]||c,e+=String.fromCharCode(c);return e},a.prototype.characterToGlyph=function(a){return c[b[a]||a]},a.prototype.widthOfGlyph=function(a){return this.glyphWidths[a]},c=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),a}(),b.exports=c}).call(this)},{fs:"fs"}],45:[function(a,b){(function(){var c,d,e,NameTable,f;f=a("fs"),d=a("../data"),e=a("./directory"),NameTable=a("./tables/name"),c=function(){function a(a){this.contents=new d(a),this.parse(this.contents)}return a.open=function(b){var c;return c=f.readFileSync(b),new a(c)},a.prototype.parse=function(a){var b,c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;for(i=a.readInt(),t=a.readInt(),h=a.readInt(),s=a.readInt(),this.map={},a.pos=t+24,D=a.readShort()+t,x=a.readShort()+t,a.pos=D,u=a.readShort(),n=E=0;u>=E;n=E+=1){for(C=a.readString(4),v=a.readShort(),B=a.readShort(),this.map[C]={list:[],named:{}},A=a.pos,a.pos=D+B,p=F=0;v>=F;p=F+=1)o=a.readShort(),y=a.readShort(),b=a.readByte(),c=a.readByte()<<16,f=a.readByte()<<8,g=a.readByte(),j=i+(0|c|f|g),m=a.readUInt32(),k={id:o,attributes:b,offset:j,handle:m},z=a.pos,-1!==y&&t+s>x+y?(a.pos=x+y,q=a.readByte(),k.name=a.readString(q)):"sfnt"===C&&(a.pos=k.offset,r=a.readUInt32(),l={},l.contents=new d(a.slice(a.pos,a.pos+r)),l.directory=new e(l.contents),w=new NameTable(l),k.name=w.fontName[0].raw),a.pos=z,this.map[C].list.push(k),k.name&&(this.map[C].named[k.name]=k);a.pos=A}},a.prototype.getNamedFont=function(a){var b,c,d,e,f,g;if(b=this.contents,e=b.pos,c=null!=(g=this.map.sfnt)?g.named[a]:void 0,!c)throw new Error("Font "+a+" not found in DFont file.");return b.pos=c.offset,d=b.readUInt32(),f=b.slice(b.pos,b.pos+d),b.pos=e,f},a}(),b.exports=c}).call(this)},{"../data":41,"./directory":46,"./tables/name":56,fs:"fs"}],46:[function(a,b){(function(c){(function(){var d,e,f=[].slice;d=a("../data"),e=function(){function a(a){var b,c,d,e;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},c=d=0,e=this.tableCount;e>=0?e>d:d>e;c=e>=0?++d:--d)b={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[b.tag]=b}var b;return a.prototype.encode=function(a){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=Object.keys(a).length,j=Math.log(2),m=16*Math.floor(Math.log(p)/j),h=Math.floor(m/j),l=16*p-m,f=new d,f.writeInt(this.scalarType),f.writeShort(p),f.writeShort(m),f.writeShort(h),f.writeShort(l),g=16*p,k=f.pos+g,i=null,q=[];for(r in a)for(o=a[r],f.writeString(r),f.writeInt(b(o)),f.writeInt(k),f.writeInt(o.length),q=q.concat(o),"head"===r&&(i=k),k+=o.length;k%4;)q.push(0),k++;return f.write(q),n=b(f.data),e=2981146554-n,f.pos=i+8,f.writeUInt32(e),new c(f.data)},b=function(a){var b,c,e,g,h;for(a=f.call(a);a.length%4;)a.push(0);for(e=new d(a),c=0,b=g=0,h=a.length;h>g;b=g+=4)c+=e.readUInt32();return 4294967295&c},a}(),b.exports=e}).call(this)}).call(this,a("buffer").Buffer)},{"../data":41,buffer:17}],47:[function(a,b){(function(){var CmapTable,c,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};CmapTable=a("./tables/cmap"),d=a("./utils"),c=function(){function a(a){this.font=a,this.subset={},this.unicodes={},this.next=33}return a.prototype.use=function(a){var b,c,d;{if("string"!=typeof a)return this.unicodes[a]?void 0:(this.subset[this.next]=a,this.unicodes[a]=this.next++);for(b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)this.use(a.charCodeAt(b))}},a.prototype.encodeText=function(a){var b,c,d,e,f;for(d="",c=e=0,f=a.length;f>=0?f>e:e>f;c=f>=0?++e:--e)b=this.unicodes[a.charCodeAt(c)],d+=String.fromCharCode(b);return d},a.prototype.generateCmap=function(){var a,b,c,d,e;d=this.font.cmap.tables[0].codeMap,a={},e=this.subset;for(b in e)c=e[b],a[b]=d[c];return a},a.prototype.glyphIDs=function(){var a,b,c,d,f,g;d=this.font.cmap.tables[0].codeMap,a=[0],g=this.subset;for(b in g)c=g[b],f=d[c],null!=f&&e.call(a,f)<0&&a.push(f);return a.sort()},a.prototype.glyphsFor=function(a){var b,c,d,e,f,g,h;for(d={},f=0,g=a.length;g>f;f++)e=a[f],d[e]=this.font.glyf.glyphFor(e);b=[];for(e in d)c=d[e],(null!=c?c.compound:void 0)&&b.push.apply(b,c.glyphIDs);if(b.length>0){h=this.glyphsFor(b);for(e in h)c=h[e],d[e]=c}return d},a.prototype.encode=function(){var a,b,c,e,f,g,h,i,j,k,l,m,n,o,p,q,r;a=CmapTable.encode(this.generateCmap(),"unicode"),e=this.glyphsFor(this.glyphIDs()),m={0:0},q=a.charMap;for(b in q)g=q[b],m[g.old]=g["new"];l=a.maxGlyphID;for(n in e)n in m||(m[n]=l++);j=d.invert(m),k=Object.keys(j).sort(function(a,b){return a-b}),o=function(){var a,b,c;for(c=[],a=0,b=k.length;b>a;a++)f=k[a],c.push(j[f]);return c}(),c=this.font.glyf.encode(e,o,m),h=this.font.loca.encode(c.offsets),i=this.font.name.encode(),this.postscriptName=i.postscriptName,this.cmap={},r=a.charMap;for(b in r)g=r[b],this.cmap[b]=g.old;return p={cmap:a.table,glyf:c.table,loca:h.table,hmtx:this.font.hmtx.encode(o),hhea:this.font.hhea.encode(o),maxp:this.font.maxp.encode(o),post:this.font.post.encode(o),name:i.table,head:this.font.head.encode(h)},this.font.os2.exists&&(p["OS/2"]=this.font.os2.raw()),this.font.directory.encode(p)},a}(),b.exports=c}).call(this)},{"./tables/cmap":49,"./utils":60}],48:[function(a,b){(function(){var a;a=function(){function a(a){var b;this.file=a,b=this.file.directory.tables[this.tag],this.exists=!!b,b&&(this.offset=b.offset,this.length=b.length,this.parse(this.file.contents))}return a.prototype.parse=function(){},a.prototype.encode=function(){},a.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},a}(),b.exports=a}).call(this)},{}],49:[function(a,b){(function(){var c,CmapTable,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=a("../table"),d=a("../../data"),CmapTable=function(a){function CmapTable(){return CmapTable.__super__.constructor.apply(this,arguments)}return g(CmapTable,a),CmapTable.prototype.tag="cmap",CmapTable.prototype.parse=function(a){var b,d,e,f;for(a.pos=this.offset,this.version=a.readUInt16(),e=a.readUInt16(),this.tables=[],this.unicode=null,d=f=0;e>=0?e>f:f>e;d=e>=0?++f:--f)b=new c(a,this.offset),this.tables.push(b),b.isUnicode&&null==this.unicode&&(this.unicode=b);return!0},CmapTable.encode=function(a,b){var e,f;return null==b&&(b="macroman"),e=c.encode(a,b),f=new d,f.writeUInt16(0),f.writeUInt16(1),e.table=f.data.concat(e.subtable),e},CmapTable}(e),c=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;switch(this.platformID=a.readUInt16(),this.encodingID=a.readShort(),this.offset=b+a.readInt(),l=a.pos,a.pos=this.offset,this.format=a.readUInt16(),this.length=a.readUInt16(),this.language=a.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(h=r=0;256>r;h=++r)this.codeMap[h]=a.readByte();break;case 4:for(n=a.readUInt16(),m=n/2,a.pos+=6,e=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),a.pos+=2,p=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),i=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),j=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),d=(this.length-a.pos+this.offset)/2,g=function(){var b,c;for(c=[],h=b=0;d>=0?d>b:b>d;h=d>=0?++b:--b)c.push(a.readUInt16());return c}(),h=s=0,u=e.length;u>s;h=++s)for(q=e[h],o=p[h],c=t=o;q>=o?q>=t:t>=q;c=q>=o?++t:--t)0===j[h]?f=c+i[h]:(k=j[h]/2+(c-o)-(m-h),f=g[k]||0,0!==f&&(f+=i[h])),this.codeMap[c]=65535&f}a.pos=l}return a.encode=function(a,b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;switch(F=new d,g=Object.keys(a).sort(function(a,b){return a-b}),b){case"macroman":for(p=0,q=function(){var a,b;for(b=[],o=a=0;256>a;o=++a)b.push(0);return b}(),s={0:0},f={},G=0,K=g.length;K>G;G++)e=g[G],null==s[U=a[e]]&&(s[U]=++p),f[e]={old:a[e],"new":s[a[e]]},q[e]=s[a[e]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(q),y={charMap:f,subtable:F.data,maxGlyphID:p+1};case"unicode":for(D=[],l=[],t=0,s={},c={},r=j=null,H=0,L=g.length;L>H;H++)e=g[H],v=a[e],null==s[v]&&(s[v]=++t),c[e]={old:v,"new":s[v]},h=s[v]-e,(null==r||h!==j)&&(r&&l.push(r),D.push(e),j=h),r=e;for(r&&l.push(r),l.push(65535),D.push(65535),A=D.length,B=2*A,z=2*Math.pow(Math.log(A)/Math.LN2,2),m=Math.log(z/2)/Math.LN2,x=2*A-z,i=[],w=[],n=[],o=I=0,M=D.length;M>I;o=++I){if(C=D[o],k=l[o],65535===C){i.push(0),w.push(0);break}if(E=c[C]["new"],C-E>=32768)for(i.push(0),w.push(2*(n.length+A-o)),e=J=C;k>=C?k>=J:J>=k;e=k>=C?++J:--J)n.push(c[e]["new"]);else i.push(E-C),w.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*A+2*n.length),F.writeUInt16(0),F.writeUInt16(B),F.writeUInt16(z),F.writeUInt16(m),F.writeUInt16(x),S=0,N=l.length;N>S;S++)e=l[S],F.writeUInt16(e);for(F.writeUInt16(0),T=0,O=D.length;O>T;T++)e=D[T],F.writeUInt16(e);for(V=0,P=i.length;P>V;V++)h=i[V],F.writeUInt16(h);for(W=0,Q=w.length;Q>W;W++)u=w[W],F.writeUInt16(u);for(X=0,R=n.length;R>X;X++)p=n[X],F.writeUInt16(p);return y={charMap:c,subtable:F.data,maxGlyphID:t+1}}},a}(),b.exports=CmapTable}).call(this)},{"../../data":41,"../table":48}],50:[function(a,b){(function(){var c,d,GlyfTable,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},i=[].slice;f=a("../table"),d=a("../../data"),GlyfTable=function(a){function GlyfTable(){return GlyfTable.__super__.constructor.apply(this,arguments)}return h(GlyfTable,a),GlyfTable.prototype.tag="glyf",GlyfTable.prototype.parse=function(){return this.cache={}},GlyfTable.prototype.glyphFor=function(a){var b,f,g,h,i,j,k,l,m,n;return a in this.cache?this.cache[a]:(h=this.file.loca,b=this.file.contents,f=h.indexOf(a),g=h.lengthOf(a),0===g?this.cache[a]=null:(b.pos=this.offset+f,j=new d(b.read(g)),i=j.readShort(),l=j.readShort(),n=j.readShort(),k=j.readShort(),m=j.readShort(),this.cache[a]=-1===i?new c(j,l,n,k,m):new e(j,i,l,n,k,m),this.cache[a]))},GlyfTable.prototype.encode=function(a,b,c){var d,e,f,g,h,i;for(g=[],f=[],h=0,i=b.length;i>h;h++)e=b[h],d=a[e],f.push(g.length),d&&(g=g.concat(d.encode(c)));return f.push(g.length),{table:g,offsets:f}},GlyfTable}(f),e=function(){function a(a,b,c,d,e,f){this.raw=a,this.numberOfContours=b,this.xMin=c,this.yMin=d,this.xMax=e,this.yMax=f,this.compound=!1}return a.prototype.encode=function(){return this.raw.data},a}(),c=function(){function a(a,d,h,i,j){var k,l;for(this.raw=a,this.xMin=d,this.yMin=h,this.xMax=i,this.yMax=j,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],k=this.raw;;){if(l=k.readShort(),this.glyphOffsets.push(k.pos),this.glyphIDs.push(k.readShort()),!(l&c))break;k.pos+=l&b?4:2,l&g?k.pos+=8:l&e?k.pos+=4:l&f&&(k.pos+=2)}}var b,c,e,f,g,h;return b=1,f=8,c=32,e=64,g=128,h=256,a.prototype.encode=function(a){var b,c,e,f,g,h;for(e=new d(i.call(this.raw.data)),h=this.glyphIDs,b=f=0,g=h.length;g>f;b=++f)c=h[b],e.pos=this.glyphOffsets[b],e.writeShort(a[c]);return e.data},a}(),b.exports=GlyfTable}).call(this)},{"../../data":41,"../table":48}],51:[function(a,b){(function(){var c,HeadTable,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../table"),c=a("../../data"),HeadTable=function(a){function HeadTable(){return HeadTable.__super__.constructor.apply(this,arguments)}return f(HeadTable,a),HeadTable.prototype.tag="head",HeadTable.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.revision=a.readInt(),this.checkSumAdjustment=a.readInt(),this.magicNumber=a.readInt(),this.flags=a.readShort(),this.unitsPerEm=a.readShort(),this.created=a.readLongLong(),this.modified=a.readLongLong(),this.xMin=a.readShort(),this.yMin=a.readShort(),this.xMax=a.readShort(),this.yMax=a.readShort(),this.macStyle=a.readShort(),this.lowestRecPPEM=a.readShort(),this.fontDirectionHint=a.readShort(),this.indexToLocFormat=a.readShort(),this.glyphDataFormat=a.readShort()},HeadTable.prototype.encode=function(a){var b;return b=new c,b.writeInt(this.version),b.writeInt(this.revision),b.writeInt(this.checkSumAdjustment),b.writeInt(this.magicNumber),b.writeShort(this.flags),b.writeShort(this.unitsPerEm),b.writeLongLong(this.created),b.writeLongLong(this.modified),b.writeShort(this.xMin),b.writeShort(this.yMin),b.writeShort(this.xMax),b.writeShort(this.yMax),b.writeShort(this.macStyle),b.writeShort(this.lowestRecPPEM),b.writeShort(this.fontDirectionHint),b.writeShort(a.type),b.writeShort(this.glyphDataFormat),b.data},HeadTable}(d),b.exports=HeadTable}).call(this)},{"../../data":41,"../table":48}],52:[function(a,b){(function(){var c,HheaTable,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../table"),c=a("../../data"),HheaTable=function(a){function HheaTable(){return HheaTable.__super__.constructor.apply(this,arguments)}return f(HheaTable,a),HheaTable.prototype.tag="hhea",HheaTable.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.ascender=a.readShort(),this.decender=a.readShort(),this.lineGap=a.readShort(),this.advanceWidthMax=a.readShort(),this.minLeftSideBearing=a.readShort(),this.minRightSideBearing=a.readShort(),this.xMaxExtent=a.readShort(),this.caretSlopeRise=a.readShort(),this.caretSlopeRun=a.readShort(),this.caretOffset=a.readShort(),a.pos+=8,this.metricDataFormat=a.readShort(),this.numberOfMetrics=a.readUInt16()},HheaTable.prototype.encode=function(a){var b,d,e,f;for(d=new c,d.writeInt(this.version),d.writeShort(this.ascender),d.writeShort(this.decender),d.writeShort(this.lineGap),d.writeShort(this.advanceWidthMax),d.writeShort(this.minLeftSideBearing),d.writeShort(this.minRightSideBearing),d.writeShort(this.xMaxExtent),d.writeShort(this.caretSlopeRise),d.writeShort(this.caretSlopeRun),d.writeShort(this.caretOffset),b=e=0,f=8;f>=0?f>e:e>f;b=f>=0?++e:--e)d.writeByte(0);return d.writeShort(this.metricDataFormat),d.writeUInt16(a.length),d.data},HheaTable}(d),b.exports=HheaTable}).call(this)},{"../../data":41,"../table":48}],53:[function(a,b){(function(){var c,HmtxTable,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../table"),c=a("../../data"),HmtxTable=function(a){function HmtxTable(){return HmtxTable.__super__.constructor.apply(this,arguments)}return f(HmtxTable,a),HmtxTable.prototype.tag="hmtx",HmtxTable.prototype.parse=function(a){var b,c,d,e,f,g,h,i;for(a.pos=this.offset,this.metrics=[],b=f=0,h=this.file.hhea.numberOfMetrics;h>=0?h>f:f>h;b=h>=0?++f:--f)this.metrics.push({advance:a.readUInt16(),lsb:a.readInt16()});for(d=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var c,e;for(e=[],b=c=0;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readInt16());return e}(),this.widths=function(){var a,b,c,d;for(c=this.metrics,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.advance);return d}.call(this),c=this.widths[this.widths.length-1],i=[],b=g=0;d>=0?d>g:g>d;b=d>=0?++g:--g)i.push(this.widths.push(c));return i},HmtxTable.prototype.forGlyph=function(a){var b;return a in this.metrics?this.metrics[a]:b={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[a-this.metrics.length]}},HmtxTable.prototype.encode=function(a){var b,d,e,f,g;for(e=new c,f=0,g=a.length;g>f;f++)b=a[f],d=this.forGlyph(b),e.writeUInt16(d.advance),e.writeUInt16(d.lsb);return e.data},HmtxTable}(d),b.exports=HmtxTable}).call(this)},{"../../data":41,"../table":48}],54:[function(a,b){(function(){var c,LocaTable,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../table"),c=a("../../data"),LocaTable=function(a){function LocaTable(){return LocaTable.__super__.constructor.apply(this,arguments)}return f(LocaTable,a),LocaTable.prototype.tag="loca",LocaTable.prototype.parse=function(a){var b,c;return a.pos=this.offset,b=this.file.head.indexToLocFormat,this.offsets=0===b?function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=2)e.push(2*a.readUInt16());return e}.call(this):function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=4)e.push(a.readUInt32());return e}.call(this)},LocaTable.prototype.indexOf=function(a){return this.offsets[a]},LocaTable.prototype.lengthOf=function(a){return this.offsets[a+1]-this.offsets[a]},LocaTable.prototype.encode=function(a){var b,d,e,f,g,h,i,j,k,l,m;for(f=new c,g=0,j=a.length;j>g;g++)if(d=a[g],d>65535){for(m=this.offsets,h=0,k=m.length;k>h;h++)b=m[h],f.writeUInt32(b);return e={format:1,table:f.data}}for(i=0,l=a.length;l>i;i++)b=a[i],f.writeUInt16(b/2);return e={format:0,table:f.data}},LocaTable}(d),b.exports=LocaTable}).call(this)},{"../../data":41,"../table":48}],55:[function(a,b){(function(){var c,MaxpTable,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../table"),c=a("../../data"),MaxpTable=function(a){function MaxpTable(){return MaxpTable.__super__.constructor.apply(this,arguments)}return f(MaxpTable,a),MaxpTable.prototype.tag="maxp",MaxpTable.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.numGlyphs=a.readUInt16(),this.maxPoints=a.readUInt16(),this.maxContours=a.readUInt16(),this.maxCompositePoints=a.readUInt16(),this.maxComponentContours=a.readUInt16(),this.maxZones=a.readUInt16(),this.maxTwilightPoints=a.readUInt16(),this.maxStorage=a.readUInt16(),this.maxFunctionDefs=a.readUInt16(),this.maxInstructionDefs=a.readUInt16(),this.maxStackElements=a.readUInt16(),this.maxSizeOfInstructions=a.readUInt16(),this.maxComponentElements=a.readUInt16(),this.maxComponentDepth=a.readUInt16()},MaxpTable.prototype.encode=function(a){var b;return b=new c,b.writeInt(this.version),b.writeUInt16(a.length),b.writeUInt16(this.maxPoints),b.writeUInt16(this.maxContours),b.writeUInt16(this.maxCompositePoints),b.writeUInt16(this.maxComponentContours),b.writeUInt16(this.maxZones),b.writeUInt16(this.maxTwilightPoints),b.writeUInt16(this.maxStorage),b.writeUInt16(this.maxFunctionDefs),b.writeUInt16(this.maxInstructionDefs),b.writeUInt16(this.maxStackElements),b.writeUInt16(this.maxSizeOfInstructions),b.writeUInt16(this.maxComponentElements),b.writeUInt16(this.maxComponentDepth),b.data},MaxpTable}(d),b.exports=MaxpTable}).call(this)},{"../../data":41,"../table":48}],56:[function(a,b){(function(){var c,d,NameTable,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=a("../table"),c=a("../../data"),f=a("../utils"),NameTable=function(a){function NameTable(){return NameTable.__super__.constructor.apply(this,arguments)}var b;return h(NameTable,a),NameTable.prototype.tag="name",NameTable.prototype.parse=function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o;for(a.pos=this.offset,f=a.readShort(),b=a.readShort(),i=a.readShort(),c=[],g=l=0;b>=0?b>l:l>b;g=b>=0?++l:--l)c.push({platformID:a.readShort(),encodingID:a.readShort(),languageID:a.readShort(),nameID:a.readShort(),length:a.readShort(),offset:this.offset+i+a.readShort()});for(j={},g=m=0,n=c.length;n>m;g=++m)e=c[g],a.pos=e.offset,k=a.readString(e.length),h=new d(k,e),null==j[o=e.nameID]&&(j[o]=[]),j[e.nameID].push(h);return this.strings=j,this.copyright=j[0],this.fontFamily=j[1],this.fontSubfamily=j[2],this.uniqueSubfamily=j[3],this.fontName=j[4],this.version=j[5],this.postscriptName=j[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""),this.trademark=j[7],this.manufacturer=j[8],this.designer=j[9],this.description=j[10],this.vendorUrl=j[11],this.designerUrl=j[12],this.license=j[13],this.licenseUrl=j[14],this.preferredFamily=j[15],this.preferredSubfamily=j[17],this.compatibleFull=j[18],this.sampleText=j[19]},b="AAAAAA",NameTable.prototype.encode=function(){var a,e,g,h,i,j,k,l,m,n,o,p,q,r;m={},r=this.strings;for(a in r)o=r[a],m[a]=o;i=new d(""+b+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),m[6]=[i],b=f.successorOf(b),j=0;for(a in m)e=m[a],null!=e&&(j+=e.length);n=new c,k=new c,n.writeShort(0),n.writeShort(j),n.writeShort(6+12*j);for(g in m)if(e=m[g],null!=e)for(p=0,q=e.length;q>p;p++)l=e[p],n.writeShort(l.platformID),n.writeShort(l.encodingID),n.writeShort(l.languageID),n.writeShort(g),n.writeShort(l.length),n.writeShort(k.pos),k.writeString(l.raw);return h={postscriptName:i.raw,table:n.data.concat(k.data)}},NameTable}(e),b.exports=NameTable,d=function(){function a(a,b){this.raw=a,this.length=a.length,this.platformID=b.platformID,this.encodingID=b.encodingID,this.languageID=b.languageID -}return a}()}).call(this)},{"../../data":41,"../table":48,"../utils":60}],57:[function(a,b){(function(){var OS2Table,c,d={}.hasOwnProperty,e=function(a,b){function c(){this.constructor=a}for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};c=a("../table"),OS2Table=function(a){function OS2Table(){return OS2Table.__super__.constructor.apply(this,arguments)}return e(OS2Table,a),OS2Table.prototype.tag="OS/2",OS2Table.prototype.parse=function(a){var b;return a.pos=this.offset,this.version=a.readUInt16(),this.averageCharWidth=a.readShort(),this.weightClass=a.readUInt16(),this.widthClass=a.readUInt16(),this.type=a.readShort(),this.ySubscriptXSize=a.readShort(),this.ySubscriptYSize=a.readShort(),this.ySubscriptXOffset=a.readShort(),this.ySubscriptYOffset=a.readShort(),this.ySuperscriptXSize=a.readShort(),this.ySuperscriptYSize=a.readShort(),this.ySuperscriptXOffset=a.readShort(),this.ySuperscriptYOffset=a.readShort(),this.yStrikeoutSize=a.readShort(),this.yStrikeoutPosition=a.readShort(),this.familyClass=a.readShort(),this.panose=function(){var c,d;for(d=[],b=c=0;10>c;b=++c)d.push(a.readByte());return d}(),this.charRange=function(){var c,d;for(d=[],b=c=0;4>c;b=++c)d.push(a.readInt());return d}(),this.vendorID=a.readString(4),this.selection=a.readShort(),this.firstCharIndex=a.readShort(),this.lastCharIndex=a.readShort(),this.version>0&&(this.ascent=a.readShort(),this.descent=a.readShort(),this.lineGap=a.readShort(),this.winAscent=a.readShort(),this.winDescent=a.readShort(),this.codePageRange=function(){var c,d;for(d=[],b=c=0;2>c;b=++c)d.push(a.readInt());return d}(),this.version>1)?(this.xHeight=a.readShort(),this.capHeight=a.readShort(),this.defaultChar=a.readShort(),this.breakChar=a.readShort(),this.maxContext=a.readShort()):void 0},OS2Table.prototype.encode=function(){return this.raw()},OS2Table}(c),b.exports=OS2Table}).call(this)},{"../table":48}],58:[function(a,b){(function(){var c,PostTable,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../table"),c=a("../../data"),PostTable=function(a){function PostTable(){return PostTable.__super__.constructor.apply(this,arguments)}var b;return f(PostTable,a),PostTable.prototype.tag="post",PostTable.prototype.parse=function(a){var b,c,d,e,f;switch(a.pos=this.offset,this.format=a.readInt(),this.italicAngle=a.readInt(),this.underlinePosition=a.readShort(),this.underlineThickness=a.readShort(),this.isFixedPitch=a.readInt(),this.minMemType42=a.readInt(),this.maxMemType42=a.readInt(),this.minMemType1=a.readInt(),this.maxMemType1=a.readInt(),this.format){case 65536:break;case 131072:for(d=a.readUInt16(),this.glyphNameIndex=[],b=e=0;d>=0?d>e:e>d;b=d>=0?++e:--e)this.glyphNameIndex.push(a.readUInt16());for(this.names=[],f=[];a.pos=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readUInt32());return e}.call(this)}},PostTable.prototype.glyphFor=function(a){var c;switch(this.format){case 65536:return b[a]||".notdef";case 131072:return c=this.glyphNameIndex[a],257>=c?b[c]:this.names[c-258]||".notdef";case 151552:return b[a+this.offsets[a]]||".notdef";case 196608:return".notdef";case 262144:return this.map[a]||65535}},PostTable.prototype.encode=function(a){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(!this.exists)return null;if(i=this.raw(),196608===this.format)return i;for(l=new c(i.slice(0,32)),l.writeUInt32(131072),l.pos=32,f=[],k=[],m=0,p=a.length;p>m;m++)d=a[m],h=this.glyphFor(d),g=b.indexOf(h),-1!==g?f.push(g):(f.push(257+k.length),k.push(h));for(l.writeUInt16(Object.keys(a).length),n=0,q=f.length;q>n;n++)e=f[n],l.writeUInt16(e);for(o=0,r=k.length;r>o;o++)j=k[o],l.writeByte(j.length),l.writeString(j);return l.data},b=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\nbracketleft backslash bracketright asciicircum underscore grave\na b c d e f g h i j k l m n o p q r s t u v w x y z\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),PostTable}(d),b.exports=PostTable}).call(this)},{"../../data":41,"../table":48}],59:[function(a,b){(function(){var CmapTable,c,d,e,GlyfTable,HeadTable,HheaTable,HmtxTable,LocaTable,MaxpTable,NameTable,OS2Table,PostTable,f,g;g=a("fs"),d=a("../data"),c=a("./dfont"),e=a("./directory"),NameTable=a("./tables/name"),HeadTable=a("./tables/head"),CmapTable=a("./tables/cmap"),HmtxTable=a("./tables/hmtx"),HheaTable=a("./tables/hhea"),MaxpTable=a("./tables/maxp"),PostTable=a("./tables/post"),OS2Table=a("./tables/os2"),LocaTable=a("./tables/loca"),GlyfTable=a("./tables/glyf"),f=function(){function a(a,b){var c,e,f,g,h,i,j,k,l;if(this.rawData=a,c=this.contents=new d(a),"ttcf"===c.readString(4)){if(!b)throw new Error("Must specify a font name for TTC files.");for(i=c.readInt(),f=c.readInt(),h=[],e=j=0;f>=0?f>j:j>f;e=f>=0?++j:--j)h[e]=c.readInt();for(e=k=0,l=h.length;l>k;e=++k)if(g=h[e],c.pos=g,this.parse(),this.name.postscriptName===b)return;throw new Error("Font "+b+" not found in TTC file.")}c.pos=0,this.parse()}return a.open=function(b,c){var d;return d=g.readFileSync(b),new a(d,c)},a.fromDFont=function(b,d){var e;return e=c.open(b),new a(e.getNamedFont(d))},a.fromBuffer=function(b,d){var e,f,g;try{if(g=new a(b,d),!(g.head.exists&&g.name.exists&&g.cmap.exists||(e=new c(b),g=new a(e.getNamedFont(d)),g.head.exists&&g.name.exists&&g.cmap.exists)))throw new Error("Invalid TTF file in DFont");return g}catch(h){throw f=h,new Error("Unknown font format in buffer: "+f.message)}},a.prototype.parse=function(){return this.directory=new e(this.contents),this.head=new HeadTable(this),this.name=new NameTable(this),this.cmap=new CmapTable(this),this.hhea=new HheaTable(this),this.maxp=new MaxpTable(this),this.hmtx=new HmtxTable(this),this.post=new PostTable(this),this.os2=new OS2Table(this),this.loca=new LocaTable(this),this.glyf=new GlyfTable(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},a.prototype.characterToGlyph=function(a){var b;return(null!=(b=this.cmap.unicode)?b.codeMap[a]:void 0)||0},a.prototype.widthOfGlyph=function(a){var b;return b=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(a).advance*b},a}(),b.exports=f}).call(this)},{"../data":41,"./dfont":45,"./directory":46,"./tables/cmap":49,"./tables/glyf":50,"./tables/head":51,"./tables/hhea":52,"./tables/hmtx":53,"./tables/loca":54,"./tables/maxp":55,"./tables/name":56,"./tables/os2":57,"./tables/post":58,fs:"fs"}],60:[function(a,b,c){(function(){c.successorOf=function(a){var b,c,d,e,f,g,h,i,j,k;for(c="abcdefghijklmnopqrstuvwxyz",i=c.length,k=a,e=a.length;e>=0;){if(h=a.charAt(--e),isNaN(h)){if(f=c.indexOf(h.toLowerCase()),-1===f)j=h,d=!0;else if(j=c.charAt((f+1)%i),g=h===h.toUpperCase(),g&&(j=j.toUpperCase()),d=f+1>=i,d&&0===e){b=g?"A":"a",k=b+j+k.slice(1);break}}else if(j=+h+1,d=j>9,d&&(j=0),d&&0===e){k="1"+j+k.slice(1);break}if(k=k.slice(0,e)+j+k.slice(e+1),!d)break}return k},c.invert=function(a){var b,c,d;c={};for(b in a)d=a[b],c[d]=b;return c}}).call(this)},{}],61:[function(a,b){(function(){var a,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};a=function(){function a(a){this.doc=a,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return a.prototype.stop=function(a,b,c){return null==c&&(c=1),c=Math.max(0,Math.min(1,c)),this.stops.push([a,this.doc._normalizeColor(b),c]),this},a.prototype.embed=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,k=this.stops[this.stops.length-1],k[0]<1&&this.stops.push([1,k[1],k[2]]),a=[],d=[],C=[],j=E=0,H=this.stops.length-1;H>=0?H>E:E>H;j=H>=0?++E:--E)d.push(0,1),j+2!==this.stops.length&&a.push(this.stops[j+1][0]),e=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[j+0][1],C1:this.stops[j+1][1],N:1}),C.push(e),e.end();if(1===C.length?e=C[0]:(e=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:C,Bounds:a,Encode:d}),e.end()),this.id="Sh"+ ++this.doc._gradCount,l=this.doc._ctm.slice(),m=l[0],n=l[1],q=l[2],t=l[3],u=l[4],v=l[5],I=this.transform,o=I[0],p=I[1],r=I[2],s=I[3],b=I[4],c=I[5],l[0]=m*o+q*p,l[1]=n*o+t*p,l[2]=m*r+q*s,l[3]=n*r+t*s,l[4]=m*b+q*c+u,l[5]=n*b+t*c+v,A=this.shader(e),A.end(),x=this.doc.ref({Type:"Pattern",PatternType:2,Shading:A,Matrix:function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)D=l[a],c.push(+D.toFixed(5));return c}()}),this.doc.page.patterns[this.id]=x,x.end(),this.stops.some(function(a){return a[2]<1})){for(g=this.opacityGradient(),g._colorSpace="DeviceGray",J=this.stops,F=0,G=J.length;G>F;F++)B=J[F],g.stop(B[0],[B[2]]);g=g.embed(),h=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),h.end(),y=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:g.data.Shading}}),y.end(),f=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:h,Resources:y}),f.end("/Sh1 sh"),z=this.doc.ref({Type:"Mask",S:"Luminosity",G:f}),z.end(),i=this.doc.ref({Type:"ExtGState",SMask:z}),this.opacity_id=++this.doc._opacityCount,w="Gs"+this.opacity_id,this.doc.page.ext_gstates[w]=i,i.end()}return x}},a.prototype.apply=function(a){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+a),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},a}(),c=function(a){function b(a,c,d,e,f){this.doc=a,this.x1=c,this.y1=d,this.x2=e,this.y2=f,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.x2,this.y2)},b}(a),d=function(a){function b(a,c,d,e,f,g,h){this.doc=a,this.x1=c,this.y1=d,this.r1=e,this.x2=f,this.y2=g,this.r2=h,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},b}(a),b.exports={PDFGradient:a,PDFLinearGradient:c,PDFRadialGradient:d}}).call(this)},{}],62:[function(a,b){(function(c){(function(){var d,e,f,g,h;h=a("fs"),d=a("./data"),e=a("./image/jpeg"),g=a("./image/png"),f=function(){function a(){}return a.open=function(a,b){var d,f;if(c.isBuffer(a))d=a;else if(f=/^data:.+;base64,(.*)$/.exec(a))d=new c(f[1],"base64");else if(d=h.readFileSync(a),!d)return;if(255===d[0]&&216===d[1])return new e(d,b);if(137===d[0]&&"PNG"===d.toString("ascii",1,4))return new g(d,b);throw new Error("Unknown image format.")},a}(),b.exports=f}).call(this)}).call(this,a("buffer").Buffer)},{"./data":41,"./image/jpeg":63,"./image/png":64,buffer:17,fs:"fs"}],63:[function(a,b){(function(){var c,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};d=a("fs"),c=function(){function a(a,c){var d,f,g;if(this.data=a,this.label=c,65496!==a.readUInt16BE(0))throw"SOI not found in JPEG";for(g=2;g=0));)g+=a.readUInt16BE(g);if(e.call(b,f)<0)throw"Invalid JPEG.";g+=2,this.bits=a[g++],this.height=a.readUInt16BE(g),g+=2,this.width=a.readUInt16BE(g),g+=2,d=a[g++],this.colorSpace=function(){switch(d){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var b;return b=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],a.prototype.embed=function(a){return this.obj?void 0:(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},a}(),b.exports=c}).call(this)},{fs:"fs"}],64:[function(a,b){(function(c){(function(){var d,e,f;f=a("zlib"),d=a("png-js"),e=function(){function a(a,b){this.label=b,this.image=new d(a),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return a.prototype.embed=function(a){var b,d,e,f,g,h,i,j;if(this.document=a,!this.obj){if(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(e=a.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=e,e.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(d=a.ref(),d.end(new c(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,d]),this.image.transparency.grayscale)return g=this.image.transparency.greyscale,this.obj.data.Mask=[g,g];if(this.image.transparency.rgb){for(f=this.image.transparency.rgb,b=[],i=0,j=f.length;j>i;i++)h=f[i],b.push(h,h);return this.obj.data.Mask=b}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},a.prototype.finalize=function(){var a;return this.alphaChannel&&(a=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),a.end(this.alphaChannel),this.obj.data.SMask=a),this.obj.end(this.imgData),this.image=null,this.imgData=null},a.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(a){return function(b){var d,e,g,h,i,j,k,l,m;for(g=a.image.colors*a.image.bits/8,m=a.width*a.height,j=new c(m*g),e=new c(m),i=l=d=0,k=b.length;k>i;)j[l++]=b[i++],j[l++]=b[i++],j[l++]=b[i++],e[d++]=b[i++];return h=0,f.deflate(j,function(b,c){if(a.imgData=c,b)throw b;return 2===++h?a.finalize():void 0}),f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return 2===++h?a.finalize():void 0})}}(this))},a.prototype.loadIndexedAlphaChannel=function(){var a;return a=this.image.transparency.indexed,this.image.decodePixels(function(b){return function(d){var e,g,h,i,j;for(e=new c(b.width*b.height),g=0,h=i=0,j=d.length;j>i;h=i+=1)e[g++]=a[d[h]];return f.deflate(e,function(a,c){if(b.alphaChannel=c,a)throw a;return b.finalize()})}}(this))},a}(),b.exports=e}).call(this)}).call(this,a("buffer").Buffer)},{buffer:17,"png-js":81,zlib:16}],65:[function(a,b){(function(){var c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};c=a("events").EventEmitter,d=a("linebreak"),e=function(a){function b(a,b){var c;this.document=a,this.indent=b.indent||0,this.characterSpacing=b.characterSpacing||0,this.wordSpacing=0===b.wordSpacing,this.columns=b.columns||1,this.columnGap=null!=(c=b.columnGap)?c:18,this.lineWidth=(b.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=b.ellipsis,this.continuedX=0,null!=b.height?(this.height=b.height,this.maxY=this.startY+b.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(a){return function(b){var c;return c=a.continuedX||a.indent,a.document.x+=c,a.lineWidth-=c,a.once("line",function(){return a.document.x-=c,a.lineWidth+=c,b.continued&&!a.continuedX&&(a.continuedX=a.indent),b.continued?void 0:a.continuedX=0})}}(this)),this.on("lastLine",function(a){return function(b){var c;return c=b.align,"justify"===c&&(b.align="left"),a.lastLine=!0,a.once("line",function(){return a.document.y+=b.paragraphGap||0,b.align=c,a.lastLine=!1})}}(this))}return g(b,a),b.prototype.wordWidth=function(a){return this.document.widthOfString(a,this)+this.characterSpacing+this.wordSpacing},b.prototype.eachWord=function(a,b){var c,e,f,g,h,i,j,k,l,m;for(e=new d(a),h=null,m={};c=e.nextBreak();){if(l=a.slice((null!=h?h.position:void 0)||0,c.position),k=null!=m[l]?m[l]:m[l]=this.wordWidth(l),k>this.lineWidth+this.continuedX)for(i=h,f={};l.length;){for(g=l.length;k>this.spaceLeft;)k=this.wordWidth(l.slice(0,--g));if(f.required=gthis.maxY||f>this.maxY)&&this.nextSection(),c="",g=0,h=0,e=0,i=this.document.y,d=function(a){return function(){return b.textWidth=g+a.wordSpacing*(h-1),b.wordCount=h,b.lineWidth=a.lineWidth,i=a.document.y,a.emit("line",c,b,a),e++}}(this),this.emit("sectionStart",b,this),this.eachWord(a,function(a){return function(e,f,i,j){var k,l;if((null==j||j.required)&&(a.emit("firstLine",b,a),a.spaceLeft=a.lineWidth),f<=a.spaceLeft&&(c+=e,g+=f,h++),i.required||f>a.spaceLeft){if(i.required&&a.emit("lastLine",b,a),k=a.document.currentLineHeight(!0),null!=a.height&&a.ellipsis&&a.document.y+2*k>a.maxY&&a.column>=a.columns){for(a.ellipsis===!0&&(a.ellipsis="…"),c=c.replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);g>a.lineWidth;)c=c.slice(0,-1).replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);c+=a.ellipsis}return d(),a.document.y+k>a.maxY&&(l=a.nextSection(),!l)?(h=0,c="",!1):i.required?(f>a.spaceLeft&&(c=e,g=f,h=1,d()),a.spaceLeft=a.lineWidth,c="",g=0,h=0):(a.spaceLeft=a.lineWidth-f,c=e,g=f,h=1)}return a.spaceLeft-=f}}(this)),h>0&&(this.emit("lastLine",b,this),d()),this.emit("sectionEnd",b,this),b.continued===!0?(e>1&&(this.continuedX=0),this.continuedX+=b.textWidth,this.document.y=i):this.document.x=this.startX},b.prototype.nextSection=function(a){var b;if(this.emit("sectionEnd",a,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(b=this.document).fillColor.apply(b,this.document._fillColor),this.emit("pageBreak",a,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",a,this);return this.emit("sectionStart",a,this),!0},b}(c),b.exports=e}).call(this)},{events:21,linebreak:79}],66:[function(a,b){(function(){var c;c=a("../object"),b.exports={annotate:function(a,b,d,e,f){var g,h,i;f.Type="Annot",f.Rect=this._convertRect(a,b,d,e),f.Border=[0,0,0],"Link"!==f.Subtype&&null==f.C&&(f.C=this._normalizeColor(f.color||[0,0,0])),delete f.color,"string"==typeof f.Dest&&(f.Dest=c.s(f.Dest));for(g in f)i=f[g],f[g[0].toUpperCase()+g.slice(1)]=i;return h=this.ref(f),this.page.annotations.push(h),h.end(),this},note:function(a,b,d,e,f,g){return null==g&&(g={}),g.Subtype="Text",g.Contents=c.s(f,!0),g.Name="Comment",null==g.color&&(g.color=[243,223,92]),this.annotate(a,b,d,e,g)},link:function(a,b,d,e,f,g){return null==g&&(g={}),g.Subtype="Link",g.A=this.ref({S:"URI",URI:c.s(f)}),g.A.end(),this.annotate(a,b,d,e,g)},_markup:function(a,b,d,e,f){var g,h,i,j,k;return null==f&&(f={}),k=this._convertRect(a,b,d,e),g=k[0],i=k[1],h=k[2],j=k[3],f.QuadPoints=[g,j,h,j,g,i,h,i],f.Contents=c.s(""),this.annotate(a,b,d,e,f)},highlight:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Highlight",null==e.color&&(e.color=[241,238,148]),this._markup(a,b,c,d,e)},underline:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Underline",this._markup(a,b,c,d,e)},strike:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="StrikeOut",this._markup(a,b,c,d,e)},lineAnnotation:function(a,b,d,e,f){return null==f&&(f={}),f.Subtype="Line",f.Contents=c.s(""),f.L=[a,this.page.height-b,d,this.page.height-e],this.annotate(a,b,d,e,f)},rectAnnotation:function(a,b,d,e,f){return null==f&&(f={}),f.Subtype="Square",f.Contents=c.s(""),this.annotate(a,b,d,e,f)},ellipseAnnotation:function(a,b,d,e,f){return null==f&&(f={}),f.Subtype="Circle",f.Contents=c.s(""),this.annotate(a,b,d,e,f)},textAnnotation:function(a,b,d,e,f,g){return null==g&&(g={}),g.Subtype="FreeText",g.Contents=c.s(f,!0),g.DA=c.s(""),this.annotate(a,b,d,e,g)},_convertRect:function(a,b,c,d){var e,f,g,h,i,j,k,l,m;return l=b,b+=d,k=a+c,m=this._ctm,e=m[0],f=m[1],g=m[2],h=m[3],i=m[4],j=m[5],a=e*a+g*b+i,b=f*a+h*b+j,k=e*k+g*l+i,l=f*k+h*l+j,[a,b,k,l]}}}).call(this)},{"../object":72}],67:[function(a,b){(function(){var c,d,e,f,g;g=a("../gradient"),c=g.PDFGradient,d=g.PDFLinearGradient,e=g.PDFRadialGradient,b.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(a){var b,d;return a instanceof c?a:("string"==typeof a&&("#"===a.charAt(0)?(4===a.length&&(a=a.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),b=parseInt(a.slice(1),16),a=[b>>16,b>>8&255,255&b]):f[a]&&(a=f[a])),Array.isArray(a)?(3===a.length?a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/255);return e}():4===a.length&&(a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/100);return e}()),a):null)},_setColor:function(a,b){var d,e,f,g;return(a=this._normalizeColor(a))?(this._sMasked&&(d=this.ref({Type:"ExtGState",SMask:"None"}),d.end(),e="Gs"+ ++this._opacityCount,this.page.ext_gstates[e]=d,this.addContent("/"+e+" gs"),this._sMasked=!1),f=b?"SCN":"scn",a instanceof c?(this._setColorSpace("Pattern",b),a.apply(f)):(g=4===a.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(g,b),a=a.join(" "),this.addContent(""+a+" "+f)),!0):!1},_setColorSpace:function(a,b){var c;return c=b?"CS":"cs",this.addContent("/"+a+" "+c)},fillColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!1),c&&this.fillOpacity(b),this._fillColor=[a,b],this},strokeColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!0),c&&this.strokeOpacity(b),this},opacity:function(a){return this._doOpacity(a,a),this},fillOpacity:function(a){return this._doOpacity(a,null),this},strokeOpacity:function(a){return this._doOpacity(null,a),this},_doOpacity:function(a,b){var c,d,e,f,g;if(null!=a||null!=b)return null!=a&&(a=Math.max(0,Math.min(1,a))),null!=b&&(b=Math.max(0,Math.min(1,b))),e=""+a+"_"+b,this._opacityRegistry[e]?(g=this._opacityRegistry[e],c=g[0],f=g[1]):(c={Type:"ExtGState"},null!=a&&(c.ca=a),null!=b&&(c.CA=b),c=this.ref(c),c.end(),d=++this._opacityCount,f="Gs"+d,this._opacityRegistry[e]=[c,f]),this.page.ext_gstates[f]=c,this.addContent("/"+f+" gs")},linearGradient:function(a,b,c,e){return new d(this,a,b,c,e)},radialGradient:function(a,b,c,d,f,g){return new e(this,a,b,c,d,f,g)}},f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},{"../gradient":61}],68:[function(a,b){(function(){var c;c=a("../font"),b.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(a,b,d){var e,f,g,h;return"number"==typeof b&&(d=b,b=null),"string"==typeof a&&this._registeredFonts[a]?(e=a,h=this._registeredFonts[a],a=h.src,b=h.family):(e=b||a,"string"!=typeof e&&(e=null)),null!=d&&this.fontSize(d),(f=this._fontFamilies[e])?(this._font=f,this):(g="F"+ ++this._fontCount,this._font=new c(this,a,b,g),(f=this._fontFamilies[this._font.name])?(this._font=f,this):(e&&(this._fontFamilies[e]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(a){return this._fontSize=a,this},currentLineHeight:function(a){return null==a&&(a=!1),this._font.lineHeight(this._fontSize,a)},registerFont:function(a,b,c){return this._registeredFonts[a]={src:b,family:c},this}}}).call(this)},{"../font":43}],69:[function(a,b){(function(c){(function(){var d;d=a("../image"),b.exports={initImages:function(){return this._imageRegistry={},this._imageCount=0},image:function(a,b,e,f){var g,h,i,j,k,l,m,n,o,p,q,r,s,t;return null==f&&(f={}),"object"==typeof b&&(f=b,b=null),b=null!=(r=null!=b?b:f.x)?r:this.x,e=null!=(s=null!=e?e:f.y)?s:this.y,c.isBuffer(a)||(l=this._imageRegistry[a]),l||(l=d.open(a,"I"+ ++this._imageCount),l.embed(this),c.isBuffer(a)||(this._imageRegistry[a]=l)),null==(p=this.page.xobjects)[q=l.label]&&(p[q]=l.obj),n=f.width||l.width,j=f.height||l.height,f.width&&!f.height?(o=n/l.width,n=l.width*o,j=l.height*o):f.height&&!f.width?(k=j/l.height,n=l.width*k,j=l.height*k):f.scale?(n=l.width*f.scale,j=l.height*f.scale):f.fit&&(t=f.fit,i=t[0],g=t[1],h=i/g,m=l.width/l.height,m>h?(n=i,j=i/m):(j=g,n=g*m),"center"===f.align?b=b+i/2-n/2:"right"===f.align&&(b=b+i-n),"center"===f.valign?e=e+g/2-j/2:"bottom"===f.valign&&(e=e+g-j)),this.y===e&&(this.y+=j),this.save(),this.transform(n,0,0,-j,b,e+j),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this)}).call(this,a("buffer").Buffer)},{"../image":62,buffer:17}],70:[function(a,b){(function(){var c;c=a("../line_wrapper"),b.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(a){return this._lineGap=a,this},moveDown:function(a){return null==a&&(a=1),this.y+=this.currentLineHeight(!0)*a+this._lineGap,this},moveUp:function(a){return null==a&&(a=1),this.y-=this.currentLineHeight(!0)*a+this._lineGap,this},_text:function(a,b,d,e,f){var g,h,i,j,k;if(e=this._initOptions(b,d,e),a=""+a,e.wordSpacing&&(a=a.replace(/\s{2,}/g," ")),e.width)h=this._wrapper,h||(h=new c(this,e),h.on("line",f)),this._wrapper=e.continued?h:null,this._textOptions=e.continued?e:null,h.wrap(a,e);else for(k=a.split("\n"),i=0,j=k.length;j>i;i++)g=k[i],f(g,e);return this},text:function(a,b,c,d){return this._text(a,b,c,d,this._line.bind(this))},widthOfString:function(a,b){return null==b&&(b={}),this._font.widthOfString(a,this._fontSize)+(b.characterSpacing||0)*(a.length-1)},heightOfString:function(a,b){var c,d,e,f;return null==b&&(b={}),e=this.x,f=this.y,b=this._initOptions(b),b.height=1/0,d=b.lineGap||this._lineGap||0,this._text(a,this.x,this.y,b,function(a){return function(){return a.y+=a.currentLineHeight(!0)+d}}(this)),c=this.y-f,this.x=e,this.y=f,c},list:function(a,b,d,e,f){var g,h,i,j,k,l,m,n;return e=this._initOptions(b,d,e),n=Math.round(this._font.ascender/1e3*this._fontSize/3),i=e.textIndent||5*n,j=e.bulletIndent||8*n,l=1,k=[],m=[],g=function(a){var b,c,d,e,f;for(f=[],b=d=0,e=a.length;e>d;b=++d)c=a[b],Array.isArray(c)?(l++,g(c),f.push(l--)):(k.push(c),f.push(m.push(l))); -return f},g(a),f=new c(this,e),f.on("line",this._line.bind(this)),l=1,h=0,f.on("firstLine",function(a){return function(){var b,c;return(c=m[h++])!==l&&(b=j*(c-l),a.x+=b,f.lineWidth-=b,l=c),a.circle(a.x-i+n,a.y+n+n/2,n),a.fill()}}(this)),f.on("sectionStart",function(a){return function(){var b;return b=i+j*(l-1),a.x+=b,f.lineWidth-=b}}(this)),f.on("sectionEnd",function(a){return function(){var b;return b=i+j*(l-1),a.x-=b,f.lineWidth+=b}}(this)),f.wrap(k.join("\n"),e),this.x-=i,this},_initOptions:function(a,b,c){var d,e,f,g;if(null==a&&(a={}),null==c&&(c={}),"object"==typeof a&&(c=a,a=null),c=function(){var a,b,d;b={};for(a in c)d=c[a],b[a]=d;return b}(),this._textOptions){g=this._textOptions;for(d in g)f=g[d],"continued"!==d&&null==c[d]&&(c[d]=f)}return null!=a&&(this.x=a),null!=b&&(this.y=b),c.lineBreak!==!1&&(e=this.page.margins,null==c.width&&(c.width=this.page.width-this.x-e.right)),c.columns||(c.columns=0),null==c.columnGap&&(c.columnGap=18),c},_line:function(a,b,c){var d;return null==b&&(b={}),this._fragment(a,this.x,this.y,b),d=b.lineGap||this._lineGap||0,c?this.y+=this.currentLineHeight(!0)+d:this.x+=this.widthOfString(a)},_fragment:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(a=""+a,0!==a.length){if(e=d.align||"left",r=d.wordSpacing||0,f=d.characterSpacing||0,d.width)switch(e){case"right":p=this.widthOfString(a.replace(/\s+$/,""),d),b+=d.lineWidth-p;break;case"center":b+=d.lineWidth/2-d.textWidth/2;break;case"justify":s=a.trim().split(/\s+/),p=this.widthOfString(a.replace(/\s+/g,""),d),o=this.widthOfString(" ")+f,r=Math.max(0,(d.lineWidth-p)/Math.max(1,s.length-1)-o)}if(n=d.textWidth+r*(d.wordCount-1)+f*(a.length-1),d.link&&this.link(b,c,n,this.currentLineHeight(),d.link),(d.underline||d.strike)&&(this.save(),d.stroke||this.strokeColor.apply(this,this._fillColor),k=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(k),h=d.underline?1:2,l=c+this.currentLineHeight()/h,d.underline&&(l-=k),this.moveTo(b,l),this.lineTo(b+n,l),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),c=this.page.height-c-this._font.ascender/1e3*this._fontSize,null==(t=this.page.fonts)[w=this._font.id]&&(t[w]=this._font.ref()),this._font.use(a),this.addContent("BT"),this.addContent(""+b+" "+c+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),m=d.fill&&d.stroke?2:d.stroke?1:0,m&&this.addContent(""+m+" Tr"),f&&this.addContent(""+f+" Tc"),r){for(s=a.trim().split(/\s+/),r+=this.widthOfString(" ")+f,r*=1e3/this._fontSize,g=[],u=0,v=s.length;v>u;u++)q=s[u],i=this._font.encode(q),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),g.push("<"+i+"> "+-r);this.addContent("["+g.join(" ")+"] TJ")}else i=this._font.encode(a),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),this.addContent("<"+i+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},{"../line_wrapper":65}],71:[function(a,b){(function(){var c,d,e=[].slice;d=a("../path"),c=4*((Math.sqrt(2)-1)/3),b.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(a){return this.addContent(""+a+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(a){return"string"==typeof a&&(a=this._CAP_STYLES[a.toUpperCase()]),this.addContent(""+a+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(a){return"string"==typeof a&&(a=this._JOIN_STYLES[a.toUpperCase()]),this.addContent(""+a+" j")},miterLimit:function(a){return this.addContent(""+a+" M")},dash:function(a,b){var c,d,e;return null==b&&(b={}),null==a?this:(d=null!=(e=b.space)?e:a,c=b.phase||0,this.addContent("["+a+" "+d+"] "+c+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(a,b){return this.addContent(""+a+" "+b+" m")},lineTo:function(a,b){return this.addContent(""+a+" "+b+" l")},bezierCurveTo:function(a,b,c,d,e,f){return this.addContent(""+a+" "+b+" "+c+" "+d+" "+e+" "+f+" c")},quadraticCurveTo:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" v")},rect:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" re")},roundedRect:function(a,b,c,d,e){return null==e&&(e=0),this.moveTo(a+e,b),this.lineTo(a+c-e,b),this.quadraticCurveTo(a+c,b,a+c,b+e),this.lineTo(a+c,b+d-e),this.quadraticCurveTo(a+c,b+d,a+c-e,b+d),this.lineTo(a+e,b+d),this.quadraticCurveTo(a,b+d,a,b+d-e),this.lineTo(a,b+e),this.quadraticCurveTo(a,b,a+e,b)},ellipse:function(a,b,d,e){var f,g,h,i,j,k;return null==e&&(e=d),a-=d,b-=e,f=d*c,g=e*c,h=a+2*d,j=b+2*e,i=a+d,k=b+e,this.moveTo(a,k),this.bezierCurveTo(a,k-g,i-f,b,i,b),this.bezierCurveTo(i+f,b,h,k-g,h,k),this.bezierCurveTo(h,k+g,i+f,j,i,j),this.bezierCurveTo(i-f,j,a,k+g,a,k),this.closePath()},circle:function(a,b,c){return this.ellipse(a,b,c)},polygon:function(){var a,b,c,d;for(b=1<=arguments.length?e.call(arguments,0):[],this.moveTo.apply(this,b.shift()),c=0,d=b.length;d>c;c++)a=b[c],this.lineTo.apply(this,a);return this.closePath()},path:function(a){return d.apply(this,a),this},_windingRule:function(a){return/even-?odd/.test(a)?"*":""},fill:function(a,b){return/(even-?odd)|(non-?zero)/.test(a)&&(b=a,a=null),a&&this.fillColor(a),this.addContent("f"+this._windingRule(b))},stroke:function(a){return a&&this.strokeColor(a),this.addContent("S")},fillAndStroke:function(a,b,c){var d;return null==b&&(b=a),d=/(even-?odd)|(non-?zero)/,d.test(a)&&(c=a,a=null),d.test(b)&&(c=b,b=a),a&&(this.fillColor(a),this.strokeColor(b)),this.addContent("B"+this._windingRule(c))},clip:function(a){return this.addContent("W"+this._windingRule(a)+" n")},transform:function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;return g=this._ctm,h=g[0],i=g[1],j=g[2],k=g[3],l=g[4],m=g[5],g[0]=h*a+j*b,g[1]=i*a+k*b,g[2]=h*c+j*d,g[3]=i*c+k*d,g[4]=h*e+j*f+l,g[5]=i*e+k*f+m,o=function(){var g,h,i,j;for(i=[a,b,c,d,e,f],j=[],g=0,h=i.length;h>g;g++)n=i[g],j.push(+n.toFixed(5));return j}().join(" "),this.addContent(""+o+" cm")},translate:function(a,b){return this.transform(1,0,0,1,a,b)},rotate:function(a,b){var c,d,e,f,g,h,i,j;return null==b&&(b={}),d=a*Math.PI/180,c=Math.cos(d),e=Math.sin(d),f=h=0,null!=b.origin&&(j=b.origin,f=j[0],h=j[1],g=f*c-h*e,i=f*e+h*c,f-=g,h-=i),this.transform(c,e,-e,c,f,h)},scale:function(a,b,c){var d,e,f;return null==b&&(b=a),null==c&&(c={}),2===arguments.length&&(b=a,c=b),d=e=0,null!=c.origin&&(f=c.origin,d=f[0],e=f[1],d-=a*d,e-=b*e),this.transform(a,0,0,b,d,e)}}}).call(this)},{"../path":74}],72:[function(a,b){(function(c){(function(){var d,e;d=function(){function a(){}var b,d;return b=function(a,b){return(Array(b+1).join("0")+a).slice(-b)},a.convert=function(c){var d,f,g,h,i;if(Array.isArray(c))return f=function(){var b,e,f;for(f=[],b=0,e=c.length;e>b;b++)d=c[b],f.push(a.convert(d));return f}().join(" "),"["+f+"]";if("string"==typeof c)return"/"+c;if(null!=c?c.isString:void 0)return"("+c+")";if(c instanceof e)return c.toString();if(c instanceof Date)return"(D:"+b(c.getUTCFullYear(),4)+b(c.getUTCMonth(),2)+b(c.getUTCDate(),2)+b(c.getUTCHours(),2)+b(c.getUTCMinutes(),2)+b(c.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(c)){h=["<<"];for(g in c)i=c[g],h.push("/"+g+" "+a.convert(i));return h.push(">>"),h.join("\n")}return""+c},d=function(a){var b,c,d,e,f;if(d=a.length,1&d)throw new Error("Buffer length must be even");for(c=e=0,f=d-1;f>e;c=e+=2)b=a[c],a[c]=a[c+1],a[c+1]=b;return a},a.s=function(a,b){return null==b&&(b=!1),a=a.replace(/\\/g,"\\\\\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),b&&(a=d(new c(""+a,"ucs-2")).toString("binary")),{isString:!0,toString:function(){return a}}},a}(),b.exports=d,e=a("./reference")}).call(this)}).call(this,a("buffer").Buffer)},{"./reference":75,buffer:17}],73:[function(a,b){(function(){var a;a=function(){function a(a,d){var e;this.document=a,null==d&&(d={}),this.size=d.size||"letter",this.layout=d.layout||"portrait",this.margins="number"==typeof d.margin?{top:d.margin,left:d.margin,bottom:d.margin,right:d.margin}:d.margins||b,e=Array.isArray(this.size)?this.size:c[this.size.toUpperCase()],this.width=e["portrait"===this.layout?0:1],this.height=e["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Font?b.Font:b.Font={}}}(this)},xobjects:{get:function(a){return function(){var b;return null!=(b=a.resources.data).XObject?b.XObject:b.XObject={}}}(this)},ext_gstates:{get:function(a){return function(){var b;return null!=(b=a.resources.data).ExtGState?b.ExtGState:b.ExtGState={}}}(this)},patterns:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Pattern?b.Pattern:b.Pattern={}}}(this)},annotations:{get:function(a){return function(){var b;return null!=(b=a.dictionary.data).Annots?b.Annots:b.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var b,c;return a.prototype.maxY=function(){return this.height-this.margins.bottom},a.prototype.write=function(a){return this.content.write(a)},a.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},b={top:72,left:72,bottom:72,right:72},c={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},a}(),b.exports=a}).call(this)},{}],74:[function(a,b){(function(){var a;a=function(){function a(){}var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.apply=function(a,c){var d;return d=g(c),b(d,a)},f={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},g=function(a){var b,c,d,e,g,h,i,j,k;for(i=[],b=[],e="",g=!1,h=0,j=0,k=a.length;k>j;j++)if(c=a[j],null!=f[c])h=f[c],d&&(e.length>0&&(b[b.length]=+e),i[i.length]={cmd:d,args:b},b=[],e="",g=!1),d=c;else if(" "===c||","===c||"-"===c&&e.length>0&&"e"!==e[e.length-1]||"."===c&&g){if(0===e.length)continue;b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e,g="."===c,e="-"===c||"."===c?c:""}else e+=c,"."===c&&(g=!0);return e.length>0&&(b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e),i[i.length]={cmd:d,args:b},i},d=e=h=i=m=n=0,b=function(a,b){var c,f,g,k,l;for(d=e=h=i=m=n=0,f=g=0,k=a.length;k>g;f=++g)c=a[f],"function"==typeof j[l=c.cmd]&&j[l](b,c.args);return d=e=h=i=0},j={M:function(a,b){return d=b[0],e=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},m:function(a,b){return d+=b[0],e+=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},C:function(a,b){return d=b[4],e=b[5],h=b[2],i=b[3],a.bezierCurveTo.apply(a,b)},c:function(a,b){return a.bezierCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e,b[4]+d,b[5]+e),h=d+b[2],i=e+b[3],d+=b[4],e+=b[5]},S:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),b[0],b[1],b[2],b[3]),h=b[0],i=b[1],d=b[2],e=b[3]},s:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),d+b[0],e+b[1],d+b[2],e+b[3]),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},Q:function(a,b){return h=b[0],i=b[1],d=b[2],e=b[3],a.quadraticCurveTo(b[0],b[1],d,e)},q:function(a,b){return a.quadraticCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},T:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,b[0],b[1]),h=d-(h-d),i=e-(i-e),d=b[0],e=b[1]},t:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,d+b[0],e+b[1]),d+=b[0],e+=b[1]},A:function(a,b){return l(a,d,e,b),d=b[5],e=b[6]},a:function(a,b){return b[5]+=d,b[6]+=e,l(a,d,e,b),d=b[5],e=b[6]},L:function(a,b){return d=b[0],e=b[1],h=i=null,a.lineTo(d,e)},l:function(a,b){return d+=b[0],e+=b[1],h=i=null,a.lineTo(d,e)},H:function(a,b){return d=b[0],h=i=null,a.lineTo(d,e)},h:function(a,b){return d+=b[0],h=i=null,a.lineTo(d,e)},V:function(a,b){return e=b[0],h=i=null,a.lineTo(d,e)},v:function(a,b){return e+=b[0],h=i=null,a.lineTo(d,e)},Z:function(a){return a.closePath(),d=m,e=n},z:function(a){return a.closePath(),d=m,e=n}},l=function(a,b,d,e){var f,g,h,i,j,l,m,n,o,p,q,r,s;for(l=e[0],m=e[1],j=e[2],i=e[3],p=e[4],g=e[5],h=e[6],o=c(g,h,l,m,i,p,j,b,d),s=[],q=0,r=o.length;r>q;q++)n=o[q],f=k.apply(null,n),s.push(a.bezierCurveTo.apply(a,f));return s},c=function(a,b,c,d,e,f,g,j,k){var l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K;for(y=g*(Math.PI/180),x=Math.sin(y),p=Math.cos(y),c=Math.abs(c),d=Math.abs(d),h=p*(j-a)*.5+x*(k-b)*.5,i=p*(k-b)*.5-x*(j-a)*.5,s=h*h/(c*c)+i*i/(d*d),s>1&&(s=Math.sqrt(s),c*=s,d*=s),l=p/c,m=x/c,n=-x/d,o=p/d,E=l*j+m*k,H=n*j+o*k,F=l*a+m*b,I=n*a+o*b,q=(F-E)*(F-E)+(I-H)*(I-H),w=1/q-.25,0>w&&(w=0),v=Math.sqrt(w),f===e&&(v=-v),G=.5*(E+F)-v*(I-H),J=.5*(H+I)+v*(F-E),z=Math.atan2(H-J,E-G),A=Math.atan2(I-J,F-G),D=A-z,0>D&&1===f?D+=2*Math.PI:D>0&&0===f&&(D-=2*Math.PI),u=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),t=[],r=K=0;u>=0?u>K:K>u;r=u>=0?++K:--K)B=z+r*D/u,C=z+(r+1)*D/u,t[r]=[G,J,B,C,c,d,x,p];return t},k=function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s,t;return i=h*e,j=-g*f,k=g*e,l=h*f,n=.5*(d-c),m=8/3*Math.sin(.5*n)*Math.sin(.5*n)/Math.sin(n),o=a+Math.cos(c)-m*Math.sin(c),r=b+Math.sin(c)+m*Math.cos(c),q=a+Math.cos(d),t=b+Math.sin(d),p=q+m*Math.sin(d),s=t-m*Math.cos(d),[i*o+j*r,k*o+l*r,i*p+j*s,k*p+l*s,i*q+j*t,k*q+l*t]},a}(),b.exports=a}).call(this)},{}],75:[function(a,b){(function(c){(function(){var d,e,f,g=function(a,b){return function(){return a.apply(b,arguments)}};f=a("zlib"),e=function(){function a(a,b,c){this.document=a,this.id=b,this.data=null!=c?c:{},this.finalize=g(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return a.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=f.createDeflate(),this.deflate.on("data",function(a){return function(b){return a.chunks.push(b),a.data.Length+=b.length}}(this)),this.deflate.on("end",this.finalize)},a.prototype.write=function(a){var b;return c.isBuffer(a)||(a=new c(a+"\n","binary")),this.uncompressedLength+=a.length,null==(b=this.data).Length&&(b.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(a)):(this.chunks.push(a),this.data.Length+=a.length)},a.prototype.end=function(a){return("string"==typeof a||c.isBuffer(a))&&this.write(a),this.deflate?this.deflate.end():this.finalize()},a.prototype.finalize=function(){var a,b,c,e;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(d.convert(this.data)),this.chunks.length){for(this.document._write("stream"),e=this.chunks,b=0,c=e.length;c>b;b++)a=e[b],this.document._write(a);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},a.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},a}(),b.exports=e,d=a("./object")}).call(this)}).call(this,a("buffer").Buffer)},{"./object":72,buffer:17,zlib:16}],76:[function(a,b){var c,d=[].slice;c=function(){function a(a){var b,c;null==a&&(a={}),this.data=a.data||[],this.highStart=null!=(b=a.highStart)?b:0,this.errorValue=null!=(c=a.errorValue)?c:-1}var b,c,e,f,g,h,i,j,k,l,m,n,o,p,q,r;return n=11,p=5,o=n-p,m=65536>>n,g=1<>p,k=1024>>p,h=l+k,r=h,q=32,f=r+q,c=1<a||a>1114111?this.errorValue:55296>a||a>56319&&65535>=a?(b=(this.data[a>>p]<=a?(b=(this.data[l+(a-55296>>p)]<>n)],b=this.data[b+(a>>p&i)],b=(b<=55296&&56319>=a&&b>=56320&&57343>=b?(this.pos++,1024*(a-55296)+(b-56320)+65536):a},m=function(a){switch(a){case c:return d;case t:case u:case y:return d;case i:return r;default:return a}},p=function(a){switch(a){case o:case q:return f;case g:return e;case v:return x;default:return a}},a.prototype.nextCharClass=function(a){return null==a&&(a=!1),m(A.get(this.nextCodePoint()))},b=function(){function a(a,b){this.position=a,this.required=null!=b?b:!1}return a}(),a.prototype.nextBreak=function(){var a,c,d;for(null==this.curClass&&(this.curClass=p(this.nextCharClass()));this.pos=this.string.length?this.lastPosa;e=++a)b.push(String.fromCharCode(this.data[this.pos++]));return b}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(b);break;case"IDAT":for(e=k=0;b>k;e=k+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(b),i=255-this.transparency.indexed.length,i>0)for(e=l=0;i>=0?i>l:l>i;e=i>=0?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(b)[0];break;case 2:this.transparency.rgb=this.read(b)}break;case"tEXt":j=this.read(b),f=j.indexOf(0),g=String.fromCharCode.apply(String,j.slice(0,f)),this.text[g]=String.fromCharCode.apply(String,j.slice(f+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(m=this.colorType)||6===m,d=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*d,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new c(this.imgData));default:this.pos+=b}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return a.decode=function(b,c){return e.readFile(b,function(b,d){var e;return e=new a(d),e.decode(function(a){return c(a)})})},a.load=function(b){var c;return c=e.readFileSync(b),new a(c)},a.prototype.read=function(a){var b,c,d;for(d=[],b=c=0;a>=0?a>c:c>a;b=a>=0?++c:--c)d.push(this.data[this.pos++]);return d},a.prototype.readUInt32=function(){var a,b,c,d;return a=this.data[this.pos++]<<24,b=this.data[this.pos++]<<16,c=this.data[this.pos++]<<8,d=this.data[this.pos++],a|b|c|d},a.prototype.readUInt16=function(){var a,b;return a=this.data[this.pos++]<<8,b=this.data[this.pos++],a|b},a.prototype.decodePixels=function(a){var b=this;return f.inflate(this.imgData,function(d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;if(d)throw d;for(q=b.pixelBitlength/8,u=q*b.width,r=new c(u*b.height),k=e.length,t=0,s=0,g=0;k>s;){switch(e[s++]){case 0:for(i=x=0;u>x;i=x+=1)r[g++]=e[s++];break;case 1:for(i=y=0;u>y;i=y+=1)f=e[s++],j=q>i?0:r[g-q],r[g++]=(f+j)%256;break;case 2:for(i=z=0;u>z;i=z+=1)f=e[s++],h=(i-i%q)/q,v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(v+f)%256;break;case 3:for(i=A=0;u>A;i=A+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(f+Math.floor((j+v)/2))%256;break;case 4:for(i=B=0;u>B;i=B+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],0===t?v=w=0:(v=r[(t-1)*u+h*q+i%q],w=h&&r[(t-1)*u+(h-1)*q+i%q]),l=j+v-w,m=Math.abs(l-j),o=Math.abs(l-v),p=Math.abs(l-w),n=o>=m&&p>=m?j:p>=o?v:w,r[g++]=(f+n)%256;break;default:throw new Error("Invalid filter algorithm: "+e[s-1])}t++}return a(r)})},a.prototype.decodePalette=function(){var a,b,d,e,f,g,h,i,j,k;for(e=this.palette,h=this.transparency.indexed||[],g=new c(h.length+e.length),f=0,d=e.length,a=0,b=i=0,j=e.length;j>i;b=i+=3)g[f++]=e[b],g[f++]=e[b+1],g[f++]=e[b+2],g[f++]=null!=(k=h[a++])?k:255;return g},a.prototype.copyToImageData=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(d=this.colors,k=null,c=this.hasAlphaChannel,this.palette.length&&(k=null!=(m=this._decodedPalette)?m:this._decodedPalette=this.decodePalette(),d=4,c=!0),e=(null!=a?a.data:void 0)||a,j=e.length,g=k||b,f=h=0,1===d)for(;j>f;)i=k?4*b[f/4]:h,l=g[i++],e[f++]=l,e[f++]=l,e[f++]=l,e[f++]=c?g[i++]:255,h=i;else for(;j>f;)i=k?4*b[f/4]:h,e[f++]=g[i++],e[f++]=g[i++],e[f++]=g[i++],e[f++]=c?g[i++]:255,h=i},a.prototype.decode=function(a){var b,d=this;return b=new c(this.width*this.height*4),this.decodePixels(function(c){return d.copyToImageData(b,c),a(b)})},a}()}).call(this)}).call(this,a("buffer").Buffer)},{buffer:17,fs:"fs",zlib:16}],82:[function(a,b){(function(c){"use strict";function d(a,b,c){this.docDefinition=a,this.fonts=b||g,this.vfs=c}var e=a("../printer"),f=a("../../libs/fileSaver"),g={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};d.prototype._createDoc=function(a,b){var d=new e(this.fonts);d.fs.bindFS(this.vfs);var f,g=d.createPdfKitDocument(this.docDefinition,a),h=[];g.on("data",function(a){h.push(a)}),g.on("end",function(){f=c.concat(h),b(f,g._pdfMakePages)}),g.end()},d.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},d.prototype.open=function(){var a=window.open("","_blank");try{this.getDataUrl(function(b){a.location.href=b})}catch(b){throw a.close(),b}},d.prototype.print=function(){this.getDataUrl(function(a){var b=document.createElement("iframe");b.style.position="absolute",b.style.left="-99999px",b.src=a,b.onload=function(){function a(){document.body.removeChild(b),document.removeEventListener("click",a)}document.addEventListener("click",a,!1)},document.body.appendChild(b)},{autoPrint:!0})},d.prototype.download=function(a,b){"function"==typeof a&&(b=a,a=null),a=a||"file.pdf",this.getBuffer(function(c){f(new Blob([c],{type:"application/pdf"}),a),"function"==typeof b&&b()})},d.prototype.getBase64=function(a,b){if(!a)throw"getBase64 is an async method and needs a callback argument";this._createDoc(b,function(b){a(b.toString("base64"))})},d.prototype.getDataUrl=function(a,b){if(!a)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(b,function(b){a("data:application/pdf;base64,"+b.toString("base64"))})},d.prototype.getBuffer=function(a,b){if(!a)throw"getBuffer is an async method and needs a callback argument";this._createDoc(b,function(b){a(b)})},b.exports={createPdf:function(a){return new d(a,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(this,a("buffer").Buffer)},{"../../libs/fileSaver":1,"../printer":92,buffer:17}],83:[function(a,b){"use strict";function c(a,b){var c=[],f=0,g=0,h=[],i=0,j=0,k=[],l=b;a.forEach(function(a){d(a)?(c.push(a),f+=a._minWidth,g+=a._maxWidth):e(a)?(h.push(a),i=Math.max(i,a._minWidth),j=Math.max(j,a._maxWidth)):k.push(a)}),k.forEach(function(a){"string"==typeof a.width&&/\d+%/.test(a.width)&&(a.width=parseFloat(a.width)*l/100),a._calcWidth=a.width=b)c.forEach(function(a){a._calcWidth=a._minWidth}),h.forEach(function(a){a._calcWidth=i});else{if(b>n)c.forEach(function(a){a._calcWidth=a._maxWidth,b-=a._calcWidth});else{var o=b-m,p=n-m;c.forEach(function(a){var c=a._maxWidth-a._minWidth;a._calcWidth=a._minWidth+c*o/p,b-=a._calcWidth})}if(h.length>0){var q=b/h.length;h.forEach(function(a){a._calcWidth=q})}}}function d(a){return"auto"===a.width}function e(a){return null===a.width||void 0===a.width||"*"===a.width||"star"===a.width}function f(a){for(var b={min:0,max:0},c={min:0,max:0},f=0,g=0,h=a.length;h>g;g++){var i=a[g];e(i)?(c.min=Math.max(c.min,i._minWidth),c.max=Math.max(c.max,i._maxWidth),f++):d(i)?(b.min+=i._minWidth,b.max+=i._maxWidth):(b.min+=void 0!==i.width&&i.width||i._minWidth,b.max+=void 0!==i.width&&i.width||i._maxWidth)}return f&&(b.min+=f*c.min,b.max+=f*c.max),b}b.exports={buildColumnWidths:c,measureMinMax:f,isAutoColumn:d,isStarColumn:e}},{}],84:[function(a,b){"use strict";function c(a,b,c,f,g,h){this.textTools=new d(a),this.styleStack=new e(b,c),this.imageMeasure=f,this.tableLayouts=g,this.images=h,this.autoImageIndex=1}var d=a("./textTools"),e=a("./styleContextStack"),f=a("./columnCalculator"),g=a("./helpers").fontStringify,h=a("./helpers").pack,i=a("./qrEnc.js");c.prototype.measureDocument=function(a){return this.measureNode(a)},c.prototype.measureNode=function(a){function b(a){var b=a._margin;return b&&(a._minWidth+=b[0]+b[2],a._maxWidth+=b[0]+b[2]),a}function c(){function b(a,b){return a.marginLeft||a.marginTop||a.marginRight||a.marginBottom?[a.marginLeft||b[0]||0,a.marginTop||b[1]||0,a.marginRight||b[2]||0,a.marginBottom||b[3]||0]:b}function c(a){for(var b={},c=a.length-1;c>=0;c--){var e=a[c],f=d.styleStack.styleDictionary[e];for(var g in f)f.hasOwnProperty(g)&&(b[g]=f[g])}return b}function e(a){return"number"==typeof a||a instanceof Number?a=[a,a,a,a]:a instanceof Array&&2===a.length&&(a=[a[0],a[1],a[0],a[1]]),a}var f=[void 0,void 0,void 0,void 0];if(a.style){var g=a.style instanceof Array?a.style:[a.style],h=c(g);h&&(f=b(h,f)),h.margin&&(f=e(h.margin))}return f=b(a,f),a.margin&&(f=e(a.margin)),void 0===f[0]&&void 0===f[1]&&void 0===f[2]&&void 0===f[3]?null:f}a instanceof Array?a={stack:a}:("string"==typeof a||a instanceof String)&&(a={text:a});var d=this;return this.styleStack.auto(a,function(){if(a._margin=c(a),a.columns)return b(d.measureColumns(a));if(a.stack)return b(d.measureVerticalContainer(a));if(a.ul)return b(d.measureList(!1,a));if(a.ol)return b(d.measureList(!0,a));if(a.table)return b(d.measureTable(a));if(void 0!==a.text)return b(d.measureLeaf(a));if(a.image)return b(d.measureImage(a));if(a.canvas)return b(d.measureCanvas(a));if(a.qr)return b(d.measureQr(a));throw"Unrecognized document structure: "+JSON.stringify(a,g)})},c.prototype.convertIfBase64Image=function(a){if(/^data:image\/(jpeg|jpg|png);base64,/.test(a.image)){var b="$$pdfmake$$"+this.autoImageIndex++;this.images[b]=a.image,a.image=b}},c.prototype.measureImage=function(a){this.images&&this.convertIfBase64Image(a);var b=this.imageMeasure.measureImage(a.image);if(a.fit){var c=b.width/b.height>a.fit[0]/a.fit[1]?a.fit[0]/b.width:a.fit[1]/b.height;a._width=a._minWidth=a._maxWidth=b.width*c,a._height=b.height*c}else a._width=a._minWidth=a._maxWidth=a.width||b.width,a._height=a.height||b.height*a._width/b.width;return a._alignment=this.styleStack.getProperty("alignment"),a},c.prototype.measureLeaf=function(a){var b=this.textTools.buildInlines(a.text,this.styleStack);return a._inlines=b.items,a._minWidth=b.minWidth,a._maxWidth=b.maxWidth,a},c.prototype.measureVerticalContainer=function(a){var b=a.stack;a._minWidth=0,a._maxWidth=0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]),a._minWidth=Math.max(a._minWidth,b[c]._minWidth),a._maxWidth=Math.max(a._maxWidth,b[c]._maxWidth);return a},c.prototype.gapSizeForList=function(a,b){if(a){var c=b.length.toString().replace(/./g,"9");return this.textTools.sizeOfString(c+". ",this.styleStack)}return this.textTools.sizeOfString("9. ",this.styleStack)},c.prototype.buildMarker=function(a,b,c,d){var e;if(a)e={_inlines:this.textTools.buildInlines(b,c).items};else{var f=d.fontSize/6;e={canvas:[{x:f,y:d.height/d.lineHeight+d.decender-d.fontSize/3,r1:f,r2:f,type:"ellipse",color:"black"}]}}return e._minWidth=e._maxWidth=d.width,e._minHeight=e._maxHeight=d.height,e},c.prototype.measureList=function(a,b){var c=this.styleStack.clone(),d=a?b.ol:b.ul;b._gapSize=this.gapSizeForList(a,d),b._minWidth=0,b._maxWidth=0;for(var e=1,f=0,g=d.length;g>f;f++){var h=d[f]=this.measureNode(d[f]),i=e++ +". ";h.ol||h.ul||(h.listMarker=this.buildMarker(a,h.counter||i,c,b._gapSize)),b._minWidth=Math.max(b._minWidth,d[f]._minWidth+b._gapSize.width),b._maxWidth=Math.max(b._maxWidth,d[f]._maxWidth+b._gapSize.width)}return b},c.prototype.measureColumns=function(a){var b=a.columns;a._gap=this.styleStack.getProperty("columnGap")||0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]);var e=f.measureMinMax(b);return a._minWidth=e.min+a._gap*(b.length-1),a._maxWidth=e.max+a._gap*(b.length-1),a},c.prototype.measureTable=function(a){function b(a,b){return function(){return null!==b&&"object"==typeof b&&(b.fillColor=a.styleStack.getProperty("fillColor")),a.measureNode(b)}}function c(b){var c=a.layout;("string"==typeof a.layout||a instanceof String)&&(c=b[c]);var d={hLineWidth:function(){return 1},vLineWidth:function(){return 1},hLineColor:function(){return"black"},vLineColor:function(){return"black"},paddingLeft:function(){return 4},paddingRight:function(){return 4},paddingTop:function(){return 2},paddingBottom:function(){return 2}};return h(d,c)}function d(b){for(var c=[],d=0,e=0,f=0,g=a.table.widths.length;g>f;f++){var h=e+b.vLineWidth(f,a)+b.paddingLeft(f,a);c.push(h),d+=h,e=b.paddingRight(f,a)}return d+=e+b.vLineWidth(a.table.widths.length,a),{total:d,offsets:c}}function e(){for(var b,c,d=0,e=p.length;e>d;d++){var f=p[d],h=g(f.col,f.span,a._offsets),i=f.minWidth-h.minWidth,j=f.maxWidth-h.maxWidth;if(i>0)for(b=i/f.span,c=0;c0)for(b=j/f.span,c=0;cf;f++)e.minWidth+=a.table.widths[b+f]._minWidth+(f?d.offsets[b+f]:0),e.maxWidth+=a.table.widths[b+f]._maxWidth+(f?d.offsets[b+f]:0);return e}function i(a,b,c){for(var d=1;c>d;d++)a[b+d]={_span:!0,_minWidth:0,_maxWidth:0,rowSpan:a[b].rowSpan}}function j(a,b,c,d){for(var e=1;d>e;e++)a.body[b+e][c]={_span:!0,_minWidth:0,_maxWidth:0,fillColor:a.body[b][c].fillColor}}function k(a){if(a.table.widths||(a.table.widths="auto"),"string"==typeof a.table.widths||a.table.widths instanceof String)for(a.table.widths=[a.table.widths];a.table.widths.lengthb;b++){var d=a.table.widths[b];("number"==typeof d||d instanceof Number||"string"==typeof d||d instanceof String)&&(a.table.widths[b]={width:d})}}k(a),a._layout=c(this.tableLayouts),a._offsets=d(a._layout);var l,m,n,o,p=[];for(l=0,n=a.table.body[0].length;n>l;l++){var q=a.table.widths[l];for(q._minWidth=0,q._maxWidth=0,m=0,o=a.table.body.length;o>m;m++){var r=a.table.body[m],s=r[l];if(!s._span){s=r[l]=this.styleStack.auto(s,b(this,s)),s.colSpan&&s.colSpan>1?(i(r,l,s.colSpan),p.push({col:l,span:s.colSpan,minWidth:s._minWidth,maxWidth:s._maxWidth})):(q._minWidth=Math.max(q._minWidth,s._minWidth),q._maxWidth=Math.max(q._maxWidth,s._maxWidth))}s.rowSpan&&s.rowSpan>1&&j(a.table,m,l,s.rowSpan)}}e();var t=f.measureMinMax(a.table.widths);return a._minWidth=t.min+a._offsets.total,a._maxWidth=t.max+a._offsets.total,a},c.prototype.measureCanvas=function(a){for(var b=0,c=0,d=0,e=a.canvas.length;e>d;d++){var f=a.canvas[d];switch(f.type){case"ellipse":b=Math.max(b,f.x+f.r1),c=Math.max(c,f.y+f.r2);break;case"rect":b=Math.max(b,f.x+f.w),c=Math.max(c,f.y+f.h);break;case"line":b=Math.max(b,f.x1,f.x2),c=Math.max(c,f.y1,f.y2);break;case"polyline":for(var g=0,h=f.points.length;h>g;g++)b=Math.max(b,f.points[g].x),c=Math.max(c,f.points[g].y)}}return a._minWidth=a._maxWidth=b,a._minHeight=a._maxHeight=c,a},c.prototype.measureQr=function(a){return a=i.measure(a),a._alignment=this.styleStack.getProperty("alignment"),a},b.exports=c},{"./columnCalculator":83,"./helpers":87,"./qrEnc.js":93,"./styleContextStack":95,"./textTools":98}],85:[function(a,b){"use strict";function c(a,b){this.pages=[],this.pageMargins=b,this.x=b.left,this.availableWidth=a.width-b.left-b.right,this.availableHeight=0,this.page=-1,this.snapshots=[],this.endingCell=null,this.tracker=new f,this.addPage(a)}function d(a,b){return void 0===a?b:"landscape"===a?"landscape":"portrait"}function e(a,b){var c;return c=a.page>b.page?a:b.page>a.page?b:a.y>b.y?a:b,{page:c.page,x:c.x,y:c.y,availableHeight:c.availableHeight,availableWidth:c.availableWidth}}var f=a("./traversalTracker");c.prototype.beginColumnGroup=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,bottomMost:{y:this.y,page:this.page},endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth}),this.lastColumnWidth=0},c.prototype.beginColumn=function(a,b,c){var d=this.snapshots[this.snapshots.length-1];this.calculateBottomMost(d),this.endingCell=c,this.page=d.page,this.x=this.x+this.lastColumnWidth+(b||0),this.y=d.y,this.availableWidth=a,this.availableHeight=d.availableHeight,this.lastColumnWidth=a},c.prototype.calculateBottomMost=function(a){this.endingCell?(this.saveContextInEndingCell(this.endingCell),this.endingCell=null):a.bottomMost=e(this,a.bottomMost)},c.prototype.markEnding=function(a){this.page=a._columnEndingContext.page,this.x=a._columnEndingContext.x,this.y=a._columnEndingContext.y,this.availableWidth=a._columnEndingContext.availableWidth,this.availableHeight=a._columnEndingContext.availableHeight,this.lastColumnWidth=a._columnEndingContext.lastColumnWidth},c.prototype.saveContextInEndingCell=function(a){a._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},c.prototype.completeColumnGroup=function(){var a=this.snapshots.pop();this.calculateBottomMost(a),this.endingCell=null,this.x=a.x,this.y=a.bottomMost.y,this.page=a.bottomMost.page,this.availableWidth=a.availableWidth,this.availableHeight=a.bottomMost.availableHeight,this.lastColumnWidth=a.lastColumnWidth},c.prototype.addMargin=function(a,b){this.x+=a,this.availableWidth-=a+(b||0)},c.prototype.moveDown=function(a){return this.y+=a,this.availableHeight-=a,this.availableHeight>0},c.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},c.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this};var g=function(a,b){return b=d(b,a.pageSize.orientation),b!==a.pageSize.orientation?{orientation:b,width:a.pageSize.height,height:a.pageSize.width}:{orientation:a.pageSize.orientation,width:a.pageSize.width,height:a.pageSize.height}};c.prototype.moveToNextPage=function(a){var b=this.page+1,c=this.page,d=this.y,e=b>=this.pages.length;return e?this.addPage(g(this.getCurrentPage(),a)):(this.page=b,this.initializePage()),{newPageCreated:e,prevPage:c,prevY:d,y:this.y}},c.prototype.addPage=function(a){var b={items:[],pageSize:a};return this.pages.push(b),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),b},c.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},c.prototype.getCurrentPosition=function(){var a=this.getCurrentPage().pageSize,b=a.height-this.pageMargins.top-this.pageMargins.bottom,c=a.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:a.orientation,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/b,horizontalRatio:(this.x-this.pageMargins.left)/c}},b.exports=c},{"./traversalTracker":99}],86:[function(a,b){"use strict";function c(a,b){this.context=a,this.contextStack=[],this.tracker=b}function d(a,b,c){null===c||void 0===c||0>c||c>a.items.length?a.items.push(b):a.items.splice(c,0,b)}function e(a){var b=new f(a.maxWidth);for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var f=a("./line"),g=a("./helpers").pack,h=a("./helpers").offsetVector,i=a("./documentContext");c.prototype.addLine=function(a,b,c){var e=a.getHeight(),f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return f.availableHeight0&&a.inlines[0].alignment,e=0;switch(d){case"right":e=b-c;break;case"center":e=(b-c)/2}if(e&&(a.x=(a.x||0)+e),"justify"===d&&!a.newLineForced&&!a.lastLineInParagraph&&a.inlines.length>1)for(var f=(b-c)/(a.inlines.length-1),g=1,h=a.inlines.length;h>g;g++)e=g*f,a.inlines[g].x+=e},c.prototype.addImage=function(a,b){var c=this.context,e=c.getCurrentPage(),f=this.getCurrentPositionOnPage();return c.availableHeightf;f++){var h=a._canvas[f];h.x+=a.x,h.y+=a.y,this.addVector(h,!0,!0,b)}return c.moveDown(a._height),e},c.prototype.alignImage=function(a){var b=this.context.availableWidth,c=a._minWidth,d=0;switch(a._alignment){case"right":d=b-c;break;case"center":d=(b-c)/2}d&&(a.x=(a.x||0)+d)},c.prototype.addVector=function(a,b,c,e){var f=this.context,g=f.getCurrentPage(),i=this.getCurrentPositionOnPage();return g?(h(a,b?0:f.x,c?0:f.y),d(g,{type:"vector",item:a},e),i):void 0},c.prototype.addFragment=function(a,b,c,d){var f=this.context,i=f.getCurrentPage();return!b&&a.height>f.availableHeight?!1:(a.items.forEach(function(d){switch(d.type){case"line":var j=e(d.item);j.x=(j.x||0)+(b?a.xOffset||0:f.x),j.y=(j.y||0)+(c?a.yOffset||0:f.y),i.items.push({type:"line",item:j});break;case"vector":var k=g(d.item);h(k,b?a.xOffset||0:f.x,c?a.yOffset||0:f.y),i.items.push({type:"vector",item:k});break;case"image":var l=g(d.item);l.x=(l.x||0)+(b?a.xOffset||0:f.x),l.y=(l.y||0)+(c?a.yOffset||0:f.y),i.items.push({type:"image",item:l})}}),d||f.moveDown(a.height),!0)},c.prototype.pushContext=function(a,b){void 0===a&&(b=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,a=this.context.availableWidth),("number"==typeof a||a instanceof Number)&&(a=new i({width:a,height:b},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=a},c.prototype.popContext=function(){this.context=this.contextStack.pop()},c.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},b.exports=c},{"./documentContext":85,"./helpers":87,"./line":90}],87:[function(a,b){"use strict";function c(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])}return a}function d(a,b,c){switch(a.type){case"ellipse":case"rect":a.x+=b,a.y+=c;break;case"line":a.x1+=b,a.x2+=b,a.y1+=c,a.y2+=c;break;case"polyline":for(var d=0,e=a.points.length;e>d;d++)a.points[d].x+=b,a.points[d].y+=c}}function e(a,b){return"font"===a?"font":b}function f(a){var b={};return a&&"[object Function]"===b.toString.call(a)}b.exports={pack:c,fontStringify:e,offsetVector:d,isFunction:f}},{}],88:[function(a,b){(function(c){function d(a,b){this.pdfDoc=a,this.imageDictionary=b||{}}var e=(a("pdfkit"),a("pdfkit/js/image"));d.prototype.measureImage=function(a){function b(a){var b=g.imageDictionary[a];if(!b)return a;var d=b.indexOf("base64,");if(0>d)throw"invalid image format, images dictionary should contain dataURL entries";return new c(b.substring(d+7),"base64")}var d,f,g=this;return this.pdfDoc._imageRegistry[a]?d=this.pdfDoc._imageRegistry[a]:(f="I"+ ++this.pdfDoc._imageCount,d=e.open(b(a),f),d.embed(this.pdfDoc),this.pdfDoc._imageRegistry[a]=d),{width:d.width,height:d.height}},b.exports=d}).call(this,a("buffer").Buffer)},{buffer:17,pdfkit:42,"pdfkit/js/image":62}],89:[function(a,b){"use strict";function c(a,b){f.each(b,function(b){a.push(b)})}function d(a,b,c){this.pageSize=a,this.pageMargins=b,this.tracker=new g,this.imageMeasure=c,this.tableLayouts={}}function e(a){var b=a.x,c=a.y;a.positions=[],a.resetXY=function(){a.x=b,a.y=c}}var f=a("lodash"),g=a("./traversalTracker"),h=a("./docMeasure"),i=a("./documentContext"),j=a("./pageElementWriter"),k=a("./columnCalculator"),l=a("./tableProcessor"),m=a("./line"),n=a("./helpers").pack,o=a("./helpers").offsetVector,p=a("./helpers").fontStringify,q=a("./helpers").isFunction,r=a("./textTools"),s=a("./styleContextStack");d.prototype.registerTableLayouts=function(a){this.tableLayouts=n(this.tableLayouts,a)},d.prototype.layoutDocument=function(a,b,c,d,e,g,i,j,k,l){function m(a,b){return a=f.reject(a,function(a){return f.isEmpty(a.positions)}),f.each(a,function(a){var c=f.pick(a,["id","headlineLevel","text","ul","ol","table","image","qr","canvas","columns","style","pageOrientation"]);c.startPosition=f.first(a.positions),c.pageNumbers=f.chain(a.positions).map("pageNumber").uniq().value(),c.pages=b.length,c.stack=f.isArray(a.stack),a.nodeInfo=c}),f.any(a,function(a,b,c){if("before"!==a.pageBreak){var d=f.first(a.nodeInfo.pageNumbers),e=f.chain(c).drop(b+1).filter(function(a){return f.contains(a.nodeInfo.pageNumbers,d)}).value(),g=f.chain(c).drop(b+1).filter(function(a){return f.contains(a.nodeInfo.pageNumbers,d+1)}).value(),h=f.chain(c).take(b).filter(function(a){return f.contains(a.nodeInfo.pageNumbers,d)}).value();if(l(a.nodeInfo,f.map(e,"nodeInfo"),f.map(g,"nodeInfo"),f.map(h,"nodeInfo")))return a.pageBreak="before",!0}})}function n(a){f.each(a.linearNodeList,function(a){a.resetXY()})}q(l)||(l=function(){return!1}),this.docMeasure=new h(b,c,d,this.imageMeasure,this.tableLayouts,j);for(var o=this.tryLayoutDocument(a,b,c,d,e,g,i,j,k);m(o.linearNodeList,o.pages);)n(o),o=this.tryLayoutDocument(a,b,c,d,e,g,i,j,k);return o.pages},d.prototype.tryLayoutDocument=function(a,b,c,d,e,f,g,h,k){this.linearNodeList=[],a=this.docMeasure.measureDocument(a),this.writer=new j(new i(this.pageSize,this.pageMargins),this.tracker);var l=this;return this.writer.context().tracker.startTracking("pageAdded",function(){l.addBackground(e)}),this.addBackground(e),this.processNode(a),this.addHeadersAndFooters(f,g),null!=k&&this.addWatermark(k,b),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},d.prototype.addBackground=function(a){var b=q(a)?a:function(){return a},c=b(this.writer.context().page+1);if(c){var d=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(d.width,d.height),this.processNode(this.docMeasure.measureDocument(c)),this.writer.commitUnbreakableBlock(0,0)}},d.prototype.addStaticRepeatable=function(a,b,c,d,e){var f=this.writer.context().pages;this.writer.context().page=0,this.writer.beginUnbreakableBlock(d,e),this.processNode(this.docMeasure.measureDocument(a));var g=this.writer.currentBlockToRepeatable();g.xOffset=b,g.yOffset=c,this.writer.commitUnbreakableBlock(b,c);for(var h=1,i=f.length;i>h;h++)this.writer.context().page=h,this.writer.addFragment(g,!0,!0,!0)},d.prototype.addDynamicRepeatable=function(a,b){for(var c=this.writer.context().pages,d=0,e=c.length;e>d;d++){this.writer.context().page=d;var f=a(d+1,e);if(f){var g=b(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(g.width,g.height),this.processNode(this.docMeasure.measureDocument(f)),this.writer.commitUnbreakableBlock(g.x,g.y)}}},d.prototype.addHeadersAndFooters=function(a,b){var c=function(a,b){return{x:0,y:0,width:a.width,height:b.top}},d=function(a,b){return{x:0,y:a.height-b.bottom,width:a.width,height:b.bottom}};q(a)?this.addDynamicRepeatable(a,c):a&&this.addStaticRepeatable(a,c),q(b)?this.addDynamicRepeatable(b,d):b&&this.addStaticRepeatable(b,c)},d.prototype.addWatermark=function(a,b){function c(a,b,c){for(var d,e=a.width,f=a.height,g=.8*Math.sqrt(e*e+f*f),h=new r(c),i=new s,j=0,k=1e3,l=(j+k)/2;Math.abs(j-k)>1;)i.push({fontSize:l}),d=h.sizeOfString(b,i),d.width>g?(k=l,l=(j+k)/2):d.widthg;g++)f[g].watermark=e},d.prototype.processNode=function(a){function b(b){var d=a._margin;"before"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation),d&&(c.writer.context().moveDown(d[1]),c.writer.context().addMargin(d[0],d[2])),b(),d&&(c.writer.context().addMargin(-d[0],-d[2]),c.writer.context().moveDown(d[3])),"after"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation)}var c=this;this.linearNodeList.push(a),e(a),b(function(){if(a.stack)c.processVerticalContainer(a);else if(a.columns)c.processColumns(a);else if(a.ul)c.processList(!1,a);else if(a.ol)c.processList(!0,a);else if(a.table)c.processTable(a);else if(void 0!==a.text)c.processLeaf(a);else if(a.image)c.processImage(a);else if(a.canvas)c.processCanvas(a);else if(a.qr)c.processQr(a);else if(!a._span)throw"Unrecognized document structure: "+JSON.stringify(a,p)})},d.prototype.processVerticalContainer=function(a){var b=this;a.stack.forEach(function(d){b.processNode(d),c(a.positions,d.positions)})},d.prototype.processColumns=function(a){function b(a){if(!a)return null;var b=[];b.push(0);for(var c=d.length-1;c>0;c--)b.push(a);return b}var d=a.columns,e=this.writer.context().availableWidth,f=b(a._gap);f&&(e-=(f.length-1)*a._gap),k.buildColumnWidths(d,e);var g=this.processRow(d,d,f);c(a.positions,g.positions)},d.prototype.processRow=function(a,b,d,e,f){function g(a){for(var b,c=0,d=k.length;d>c;c++){var e=k[c];if(e.prevPage===a.prevPage){b=e;break}}b||(b=a,k.push(b)),b.prevY=Math.max(b.prevY,a.prevY),b.y=Math.min(b.y,a.y)}function h(a){return d&&d.length>a?d[a]:0}function i(a,b){if(a.rowSpan&&a.rowSpan>1){var c=f+a.rowSpan-1;if(c>=e.length)throw"Row span for column "+b+" (with indexes starting from 0) exceeded row count";return e[c][b]}return null}var j=this,k=[],l=[];return this.tracker.auto("pageChanged",g,function(){b=b||a,j.writer.context().beginColumnGroup();for(var e=0,f=a.length;f>e;e++){var g=a[e],k=b[e]._calcWidth,m=h(e);if(g.colSpan&&g.colSpan>1)for(var n=1;nd;d++){b.beginRow(d,this.writer);var f=this.processRow(a.table.body[d],a.table.widths,a._offsets.offsets,a.table.body,d);c(a.positions,f.positions),b.endRow(d,this.writer,f.pageBreaks)}b.endTable(this.writer)},d.prototype.processLeaf=function(a){for(var b=this.buildNextLine(a);b;){var c=this.writer.addLine(b);a.positions.push(c),b=this.buildNextLine(a)}},d.prototype.buildNextLine=function(a){if(!a._inlines||0===a._inlines.length)return null;for(var b=new m(this.writer.context().availableWidth);a._inlines&&a._inlines.length>0&&b.hasEnoughSpaceForInline(a._inlines[0]);)b.addInline(a._inlines.shift());return b.lastLineInParagraph=0===a._inlines.length,b},d.prototype.processImage=function(a){var b=this.writer.addImage(a);a.positions.push(b)},d.prototype.processCanvas=function(a){var b=a._minHeight;this.writer.context().availableHeight0){var e=c.pages[0];if(e.xOffset=a,e.yOffset=b,d>1)if(void 0!==a||void 0!==b)e.height=c.getCurrentPage().pageSize.height-c.pageMargins.top-c.pageMargins.bottom;else{e.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var f=0,g=this.repeatables.length;g>f;f++)e.height-=this.repeatables[f].height}else e.height=c.y;void 0!==a||void 0!==b?this.writer.addFragment(e,!0,!0,!0):this.addFragment(e)}}},c.prototype.currentBlockToRepeatable=function(){var a=this.writer.context,b={items:[]};return a.pages[0].items.forEach(function(a){b.items.push(a)}),b.xOffset=this.originalX,b.height=a.y,b},c.prototype.pushToRepeatables=function(a){this.repeatables.push(a)},c.prototype.popFromRepeatables=function(){this.repeatables.pop()},c.prototype.context=function(){return this.writer.context},b.exports=c},{"./elementWriter":86}],92:[function(a,b){"use strict";function c(a){this.fontDescriptors=a}function d(a){if(!a)return null;if("number"==typeof a||a instanceof Number)a={left:a,right:a,top:a,bottom:a};else if(a instanceof Array)if(2===a.length)a={left:a[0],top:a[1],right:a[0],bottom:a[1]};else{if(4!==a.length)throw"Invalid pageMargins definition";a={left:a[0],top:a[1],right:a[2],bottom:a[3]}}return a}function e(a){a.registerTableLayouts({noBorders:{hLineWidth:function(){return 0},vLineWidth:function(){return 0},paddingLeft:function(a){return a&&4||0},paddingRight:function(a,b){return ab.options.size[1]?"landscape":"portrait";if(a.pageSize.orientation!==c){var d=b.options.size[0],e=b.options.size[1];b.options.size=[e,d]}}function i(a,b,c){c._pdfMakePages=a;for(var d=0;d0&&(h(a[d],c),c.addPage(c.options)),j(b,c);for(var e=a[d],f=0,g=e.items.length;g>f;f++){var i=e.items[f];switch(i.type){case"vector":n(i.item,c);break;case"line":k(i.item,i.item.x,i.item.y,c);break;case"image":o(i.item,i.item.x,i.item.y,c)}}e.watermark&&l(e,c,b)}}function j(a,b){for(var c in a.cache){var d=a.cache[c];for(var e in d){var f,g,h,i=d[e];(f=(g=b.page.fonts)[h=i.id])||(g[h]=i.ref())}}}function k(a,b,c,d){b=b||0,c=c||0;{var e=a.getAscenderHeight();a.getHeight()}v.drawBackground(a,b,c,d);for(var f=0,g=a.inlines.length;g>f;f++){var h=a.inlines[f];d.fill(h.color||"black"),d.save(),d.transform(1,0,0,-1,0,d.page.height),d.addContent("BT");{h.font.ascender/1e3*h.fontSize}d.addContent(""+(b+h.x)+" "+(d.page.height-c-e)+" Td"),d.addContent("/"+h.font.id+" "+h.fontSize+" Tf"),d.addContent("<"+m(h.font,h.text)+"> Tj"),d.addContent("ET"),d.restore()}v.drawDecorations(a,b,c,d)}function l(a,b){var c=a.watermark;b.fill("black"),b.opacity(.6),b.save(),b.transform(1,0,0,-1,0,b.page.height);var d=180*Math.atan2(b.page.height,b.page.width)/Math.PI;b.rotate(d,{origin:[b.page.width/2,b.page.height/2]}),b.addContent("BT"),b.addContent(""+(b.page.width/2-c.size.size.width/2)+" "+(b.page.height/2-c.size.size.height/4)+" Td"),b.addContent("/"+c.font.id+" "+c.size.fontSize+" Tf"),b.addContent("<"+m(c.font,c.text)+"> Tj"),b.addContent("ET"),b.restore()}function m(a,b){return a.use(b),b=a.encode(b),b=function(){for(var a=[],c=0,d=b.length;d>=0?d>c:c>d;d>=0?c++:c--)a.push(b.charCodeAt(c).toString(16));return a}().join("")}function n(a,b){switch(b.lineWidth(a.lineWidth||1),a.dash?b.dash(a.dash.length,{space:a.dash.space||a.dash.length}):b.undash(),b.fillOpacity(a.fillOpacity||1),b.strokeOpacity(a.strokeOpacity||1),b.lineJoin(a.lineJoin||"miter"),a.type){case"ellipse":b.ellipse(a.x,a.y,a.r1,a.r2);break;case"rect":a.r?b.roundedRect(a.x,a.y,a.w,a.h,a.r):b.rect(a.x,a.y,a.w,a.h);break;case"line":b.moveTo(a.x1,a.y1),b.lineTo(a.x2,a.y2);break;case"polyline":if(0===a.points.length)break;b.moveTo(a.points[0].x,a.points[0].y);for(var c=1,d=a.points.length;d>c;c++)b.lineTo(a.points[c].x,a.points[c].y);if(a.points.length>1){var e=a.points[0],f=a.points[a.points.length-1];(a.closePath||e.x===f.x&&e.y===f.y)&&b.closePath()}}a.color&&a.lineColor?b.fillAndStroke(a.color,a.lineColor):a.color?b.fill(a.color):b.stroke(a.lineColor||"black")}function o(a,b,c,d){d.image(a.image,a.x,a.y,{width:a._width,height:a._height})}function p(a,b){this.fonts={},this.pdfDoc=b,this.cache={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];this.fonts[c]={normal:d.normal,bold:d.bold,italics:d.italics,bolditalics:d.bolditalics}}}var q=a("./layoutBuilder"),r=a("pdfkit"),s=a("pdfkit/js/reference"),t=a("./standardPageSizes"),u=a("./imageMeasure"),v=a("./textDecorator");c.prototype.createPdfKitDocument=function(a,b){b=b||{};var c=f(a.pageSize||"a4");"landscape"===a.pageOrientation&&(c={width:c.height,height:c.width}),c.orientation="landscape"===a.pageOrientation?a.pageOrientation:"portrait",this.pdfKitDoc=new r({size:[c.width,c.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",this.fontProvider=new p(this.fontDescriptors,this.pdfKitDoc),a.images=a.images||{};var h=new q(c,d(a.pageMargins||40),new u(this.pdfKitDoc,a.images));e(h),b.tableLayouts&&h.registerTableLayouts(b.tableLayouts);var j=h.layoutDocument(a.content,this.fontProvider,a.styles||{},a.defaultStyle||{fontSize:12,font:"Roboto"},a.background,a.header,a.footer,a.images,a.watermark,a.pageBreakBefore);if(i(j,this.fontProvider,this.pdfKitDoc),b.autoPrint){var k=this.pdfKitDoc.ref({S:"JavaScript",JS:new g("this.print\\(true\\);")}),l=this.pdfKitDoc.ref({Names:[new g("EmbeddedJS"),new s(this.pdfKitDoc,k.id)]});k.end(),l.end(),this.pdfKitDoc._root.data.Names={JavaScript:new s(this.pdfKitDoc,l.id)}}return this.pdfKitDoc};p.prototype.provideFont=function(a,b,c){if(!this.fonts[a])return this.pdfDoc._font;var d="normal";b&&c?d="bolditalics":b?d="bold":c&&(d="italics"),this.cache[a]||(this.cache[a]={});var e=this.cache[a]&&this.cache[a][d];if(e)return e;var f=this.cache[a]=this.cache[a]||{};return f[d]=this.pdfDoc.font(this.fonts[a][d],a+" ("+d+")")._font,f[d]},b.exports=c,c.prototype.fs=a("fs")},{"./imageMeasure":88,"./layoutBuilder":89,"./standardPageSizes":94,"./textDecorator":97,fs:"fs",pdfkit:42,"pdfkit/js/reference":75}],93:[function(a,b){"use strict";function c(a,b){var c={numeric:h,alphanumeric:i,octet:j},d={L:o,M:p,Q:q,H:r};b=b||{};var e=b.version||-1,f=d[(b.eccLevel||"L").toUpperCase()],g=b.mode?c[b.mode.toLowerCase()]:-1,k="mask"in b?b.mask:-1;if(0>g)g="string"==typeof a?a.match(l)?h:a.match(n)?i:j:j;else if(g!=h&&g!=i&&g!=j)throw"invalid or unsupported mode";if(a=K(g,a),null===a)throw"invalid data format";if(0>f||f>3)throw"invalid ECC level";if(0>e){for(e=1;40>=e&&!(a.length<=J(e,g,f));++e);if(e>40)throw"too large data for the Qr format"}else if(1>e||e>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=k&&(0>k||k>8))throw"invalid mask";return U(a,e,g,f,k)}function d(a,b){var d=[],e=a.background||"#fff",f=a.foreground||"#000",g=c(a,b),h=g.length,i=Math.floor(b.fit?b.fit/h:5),j=h*i;d.push({type:"rect",x:0,y:0,w:j,h:j,lineWidth:0,color:e});for(var k=0;h>k;++k)for(var l=0;h>l;++l)g[k][l]&&d.push({type:"rect",x:i*k,y:i*l,w:i,h:i,lineWidth:0,color:f});return{canvas:d,size:j}}function e(a){var b=d(a.qr,a);return a._canvas=b.canvas,a._width=a._height=a._minWidth=a._maxWidth=a._minHeight=a._maxHeight=b.size,a}for(var f=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],g=0,h=1,i=2,j=4,k=8,l=/^\d*$/,m=/^[A-Za-z0-9 $%*+\-./:]*$/,n=/^[A-Z0-9 $%*+\-./:]*$/,o=1,p=0,q=3,r=2,s=[],t=[-1],u=0,v=1;255>u;++u)s.push(v),t[v]=u,v=2*v^(v>=128?285:0);for(var w=[[]],u=0;30>u;++u){for(var x=w[u],y=[],z=0;u>=z;++z){var A=u>z?s[x[z]]:0,B=s[(u+(x[z-1]||0))%255];y.push(t[A^B])}w.push(y)}for(var C={},u=0;45>u;++u)C["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(u)]=u;var D=[function(a,b){return(a+b)%2===0},function(a){return a%2===0},function(a,b){return b%3===0},function(a,b){return(a+b)%3===0},function(a,b){return((a/2|0)+(b/3|0))%2===0},function(a,b){return a*b%2+a*b%3===0},function(a,b){return(a*b%2+a*b%3)%2===0},function(a,b){return((a+b)%2+a*b%3)%2===0}],E=function(a){return a>6},F=function(a){return 4*a+17},G=function(a){var b=f[a],c=16*a*a+128*a+64;return E(a)&&(c-=36),b[2].length&&(c-=25*b[2].length*b[2].length-10*b[2].length-55),c},H=function(a,b){var c=-8&G(a),d=f[a];return c-=8*d[0][b]*d[1][b]},I=function(a,b){switch(b){case h:return 10>a?10:27>a?12:14;case i:return 10>a?9:27>a?11:13;case j:return 10>a?8:16;case k:return 10>a?8:27>a?10:12}},J=function(a,b,c){var d=H(a,c)-4-I(a,b);switch(b){case h:return 3*(d/10|0)+(4>d%10?0:7>d%10?1:2);case i:return 2*(d/11|0)+(6>d%11?0:1);case j:return d/8|0;case k:return d/13|0}},K=function(a,b){switch(a){case h:return b.match(l)?b:null;case i:return b.match(m)?b.toUpperCase():null;case j:if("string"==typeof b){for(var c=[],d=0;de?c.push(e):2048>e?c.push(192|e>>6,128|63&e):65536>e?c.push(224|e>>12,128|e>>6&63,128|63&e):c.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)}return c}return b}},L=function(a,b,c,d){var e=[],f=0,k=8,l=c.length,m=function(a,b){if(b>=k){for(e.push(f|a>>(b-=k));b>=8;)e.push(a>>(b-=8)&255);f=0,k=8}b>0&&(f|=(a&(1<o;o+=3)m(parseInt(c.substring(o-2,o+1),10),10);m(parseInt(c.substring(o-2),10),[0,4,7][l%3]);break;case i:for(var o=1;l>o;o+=2)m(45*C[c.charAt(o-1)]+C[c.charAt(o)],11);l%2==1&&m(C[c.charAt(o-1)],6);break;case j:for(var o=0;l>o;++o)m(c[o],8)}for(m(g,4),8>k&&e.push(f);e.length+1f;++f)c.push(0);for(var f=0;d>f;){var g=t[c[f++]];if(g>=0)for(var h=0;e>h;++h)c[f+h]^=s[(g+b[h])%255]}return c.slice(d)},N=function(a,b,c){for(var d=[],e=a.length/b|0,f=0,g=b-a.length%b,h=0;g>h;++h)d.push(f),f+=e;for(var h=g;b>h;++h)d.push(f),f+=e+1;d.push(f);for(var i=[],h=0;b>h;++h)i.push(M(a.slice(d[h],d[h+1]),c));for(var j=[],k=a.length/b|0,h=0;k>h;++h)for(var l=0;b>l;++l)j.push(a[d[l]+h]);for(var l=g;b>l;++l)j.push(a[d[l+1]-1]);for(var h=0;hl;++l)j.push(i[l][h]);return j},O=function(a,b,c,d){for(var e=a<=0;--f)e>>d+f&1&&(e^=c<g;++g)d.push([]),e.push([]);var h=function(a,b,c,f,g){for(var h=0;c>h;++h)for(var i=0;f>i;++i)d[a+h][b+i]=g[h]>>i&1,e[a+h][b+i]=1};h(0,0,9,9,[127,65,93,93,93,65,383,0,64]),h(c-8,0,8,9,[256,127,65,93,93,93,65,127]),h(0,c-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var g=9;c-8>g;++g)d[6][g]=d[g][6]=1&~g,e[6][g]=e[g][6]=1;for(var i=b[2],j=i.length,g=0;j>g;++g)for(var k=0===g||g===j-1?1:0,l=0===g?j-1:j,m=k;l>m;++m)h(i[g],i[m],5,5,[31,17,21,17,31]);if(E(a))for(var n=O(a,6,7973,12),o=0,g=0;6>g;++g)for(var m=0;3>m;++m)d[g][c-11+m]=d[c-11+m][g]=n>>o++&1,e[g][c-11+m]=e[c-11+m][g]=1;return{matrix:d,reserved:e}},Q=function(a,b,c){for(var d=a.length,e=0,f=-1,g=d-1;g>=0;g-=2){6==g&&--g;for(var h=0>f?d-1:0,i=0;d>i;++i){for(var j=g;j>g-2;--j)b[h][j]||(a[h][j]=c[e>>3]>>(7&~e)&1,++e);h+=f}f=-f}return a},R=function(a,b,c){for(var d=D[c],e=a.length,f=0;e>f;++f)for(var g=0;e>g;++g)b[f][g]||(a[f][g]^=d(f,g));return a},S=function(a,b,c,d){for(var e=a.length,f=21522^O(c<<3|d,5,1335,10),g=0;15>g;++g){var h=[0,1,2,3,4,5,7,8,e-7,e-6,e-5,e-4,e-3,e-2,e-1][g],i=[e-1,e-2,e-3,e-4,e-5,e-6,e-7,e-8,7,5,4,3,2,1,0][g];a[h][8]=a[8][i]=f>>g&1}return a},T=function(a){for(var b=3,c=3,d=40,e=10,f=function(a){for(var c=0,e=0;e=5&&(c+=b+(a[e]-5));for(var e=5;e=4*f||a[e+1]>=4*f)&&(c+=d)}return c},g=a.length,h=0,i=0,j=0;g>j;++j){var k,l=a[j];k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&l[m];++n)++m;for(k.push(n),n=0;g>m&&!l[m];++n)++m;k.push(n)}h+=f(k),k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&a[m][j];++n)++m;for(k.push(n),n=0;g>m&&!a[m][j];++n)++m;k.push(n)}h+=f(k);var o=a[j+1]||[];i+=l[0];for(var m=1;g>m;++m){var p=l[m];i+=p,l[m-1]==p&&o[m]===p&&o[m-1]===p&&(h+=c)}}return h+=e*(Math.abs(i/g/g-.5)/.05|0)},U=function(a,b,c,d,e){var g=f[b],h=L(b,c,a,H(b,d)>>3);h=N(h,g[1][d],w[g[0][d]]);var i=P(b),j=i.matrix,k=i.reserved;if(Q(j,k,h),0>e){R(j,k,0),S(j,k,d,0);var l=0,m=T(j);for(R(j,k,0),e=1;8>e;++e){R(j,k,e),S(j,k,d,e);var n=T(j);m>n&&(m=n,l=e),R(j,k,e)}e=l}return R(j,k,e),S(j,k,d,e),j};b.exports={measure:e}},{}],94:[function(a,b){b.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},{}],95:[function(a,b){"use strict";function c(a,b){this.defaultStyle=b||{},this.styleDictionary=a,this.styleOverrides=[]}c.prototype.clone=function(){var a=new c(this.styleDictionary,this.defaultStyle);return this.styleOverrides.forEach(function(b){a.styleOverrides.push(b)}),a},c.prototype.push=function(a){this.styleOverrides.push(a)},c.prototype.pop=function(a){for(a=a||1;a-->0;)this.styleOverrides.pop()},c.prototype.autopush=function(a){if("string"==typeof a||a instanceof String)return 0;var b=[];a.style&&(b=a.style instanceof Array?a.style:[a.style]);for(var c=0,d=b.length;d>c;c++)this.push(b[c]);var e={},f=!1;return["font","fontSize","bold","italics","alignment","color","columnGap","fillColor","decoration","decorationStyle","decorationColor","background","lineHeight"].forEach(function(b){void 0!==a[b]&&null!==a[b]&&(e[b]=a[b],f=!0)}),f&&this.push(e),b.length+(f?1:0)},c.prototype.auto=function(a,b){var c=this.autopush(a),d=b();return c>0&&this.pop(c),d},c.prototype.getProperty=function(a){if(this.styleOverrides)for(var b=this.styleOverrides.length-1;b>=0;b--){var c=this.styleOverrides[b];if("string"==typeof c||c instanceof String){var d=this.styleDictionary[c];if(d&&null!==d[a]&&void 0!==d[a])return d[a]}else if(void 0!==c[a]&&null!==c[a])return c[a]}return this.defaultStyle&&this.defaultStyle[a]},b.exports=c},{}],96:[function(a,b){function c(a){this.tableNode=a}var d=a("./columnCalculator");c.prototype.beginTable=function(a){function b(){var a=0;return e.table.widths.forEach(function(b){a+=b._calcWidth}),a}function c(){var a=[],b=0,c=0;a.push({left:0,rowSpan:0});for(var d=0,e=g.tableNode.table.body[0].length;e>d;d++){var f=g.layout.paddingLeft(d,g.tableNode)+g.layout.paddingRight(d,g.tableNode),h=g.layout.vLineWidth(d,g.tableNode);c=f+h+g.tableNode.table.widths[d]._calcWidth,a[a.length-1].width=c,b+=c,a.push({left:b,rowSpan:0,width:0})}return a}var e,f,g=this;e=this.tableNode,this.offsets=e._offsets,this.layout=e._layout,f=a.context().availableWidth-this.offsets.total,d.buildColumnWidths(e.table.widths,f),this.tableWidth=e._offsets.total+b(),this.rowSpanData=c(),this.cleanUpRepeatables=!1,this.headerRows=e.table.headerRows||0,this.rowsWithoutPageBreak=this.headerRows+(e.table.keepWithHeaderRows||0),this.dontBreakRows=e.table.dontBreakRows||!1,this.rowsWithoutPageBreak&&a.beginUnbreakableBlock(),this.drawHorizontalLine(0,a)},c.prototype.onRowBreak=function(a,b){var c=this;return function(){var a=c.rowPaddingTop+(c.headerRows?0:c.topLineWidth);b.context().moveDown(a)}},c.prototype.beginRow=function(a,b){this.topLineWidth=this.layout.hLineWidth(a,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(a,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(a+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(a,this.tableNode),this.rowCallback=this.onRowBreak(a,b),b.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&b.beginUnbreakableBlock(),this.rowTopY=b.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,b.context().availableHeight-=this.reservedAtBottom,b.context().moveDown(this.rowPaddingTop)},c.prototype.drawHorizontalLine=function(a,b,c){var d=this.layout.hLineWidth(a,this.tableNode);if(d){for(var e=d/2,f=null,g=0,h=this.rowSpanData.length;h>g;g++){var i=this.rowSpanData[g],j=!i.rowSpan;!f&&j&&(f={left:i.left,width:0}),j&&(f.width+=i.width||0);var k=(c||0)+e;j&&g!==h-1||f&&(b.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:k,y2:k,lineWidth:d,lineColor:"function"==typeof this.layout.hLineColor?this.layout.hLineColor(a,this.tableNode):this.layout.hLineColor},!1,c),f=null)}b.context().moveDown(d)}},c.prototype.drawVerticalLine=function(a,b,c,d,e){var f=this.layout.vLineWidth(d,this.tableNode);0!==f&&e.addVector({type:"line",x1:a+f/2,x2:a+f/2,y1:b,y2:c,lineWidth:f,lineColor:"function"==typeof this.layout.vLineColor?this.layout.vLineColor(d,this.tableNode):this.layout.vLineColor},!1,!0)},c.prototype.endTable=function(a){this.cleanUpRepeatables&&a.popFromRepeatables()},c.prototype.endRow=function(a,b,c){function d(){for(var b=[],c=0,d=0,e=g.tableNode.table.body[a].length;e>d;d++){if(!c){b.push({x:g.rowSpanData[d].left,index:d});var f=g.tableNode.table.body[a][d];c=f._colSpan||f.colSpan||0}c>0&&c--}return b.push({x:g.rowSpanData[g.rowSpanData.length-1].left,index:g.rowSpanData.length-1}),b}var e,f,g=this;b.tracker.stopTracking("pageChanged",this.rowCallback),b.context().moveDown(this.layout.paddingBottom(a,this.tableNode)),b.context().availableHeight+=this.reservedAtBottom;var h=b.context().page,i=b.context().y,j=d(),k=[],l=c&&c.length>0;if(k.push({y0:this.rowTopY,page:l?c[0].prevPage:h}),l)for(f=0,e=c.length;e>f;f++){var m=c[f];k[k.length-1].y1=m.prevY,k.push({y0:m.y,page:m.prevPage+1})}k[k.length-1].y1=i;for(var n=k[0].y1-k[0].y0===this.rowPaddingTop,o=n?1:0,p=k.length;p>o;o++){var q=o0&&!this.headerRows,s=r?0:this.topLineWidth,t=k[o].y0,u=k[o].y1;for(b.context().page!=k[o].page&&(b.context().page=k[o].page,this.reservedAtBottom=0),f=0,e=j.length;e>f;f++)if(this.drawVerticalLine(j[f].x,t-s,u+this.bottomLineWidth,j[f].index,b),e-1>f){var v=j[f].index,w=this.tableNode.table.body[a][v].fillColor;if(w){var x=this.layout.vLineWidth(v,this.tableNode),y=j[f].x+x,z=t-s;b.addVector({type:"rect",x:y,y:z,w:j[f+1].x-y,h:u+this.bottomLineWidth-z,lineWidth:0,color:w},!1,!0,0)}}q&&this.drawHorizontalLine(a+1,b,u),r&&this.drawHorizontalLine(a,b,t)}b.context().page=h,b.context().y=i;var A=this.tableNode.table.body[a];for(f=0,e=A.length;e>f;f++){if(A[f].rowSpan&&(this.rowSpanData[f].rowSpan=A[f].rowSpan,A[f].colSpan&&A[f].colSpan>1))for(var B=1;B0&&this.rowSpanData[f].rowSpan--}this.drawHorizontalLine(a+1,b),this.headerRows&&a===this.headerRows-1&&(this.headerRepeatable=b.currentBlockToRepeatable()),this.dontBreakRows&&b.tracker.auto("pageChanged",function(){g.drawHorizontalLine(a,b)},function(){b.commitUnbreakableBlock()}),!this.headerRepeatable||a!==this.rowsWithoutPageBreak-1&&a!==this.tableNode.table.body.length-1||(b.commitUnbreakableBlock(),b.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},b.exports=c},{"./columnCalculator":83}],97:[function(a,b){"use strict";function c(a){for(var b=[],c=null,d=0,e=a.inlines.length;e>d;d++){var f=a.inlines[d],g=f.decoration;if(g){var h=f.decorationColor||f.color||"black",i=f.decorationStyle||"solid";g=Array.isArray(g)?g:[g];for(var j=0,k=g.length;k>j;j++){var l=g[j];c&&l===c.decoration&&i===c.decorationStyle&&h===c.decorationColor&&"lineThrough"!==l?c.inlines.push(f):(c={line:a,decoration:l,decorationColor:h,decorationStyle:i,inlines:[f]},b.push(c))}}else c=null}return b}function d(a,b,c,d){function e(){for(var b=0,c=0,d=a.inlines.length;d>c;c++){var e=a.inlines[c];b=e.fontSize>b?c:b}return a.inlines[b]}function f(){for(var b=0,c=0,d=a.inlines.length;d>c;c++)b+=a.inlines[c].width;return b}var g=a.inlines[0],h=e(),i=f(),j=a.line.getAscenderHeight(),k=h.font.ascender/1e3*h.fontSize,l=h.height,m=l-k,n=.5+.12*Math.floor(Math.max(h.fontSize-8,0)/2);switch(a.decoration){case"underline":c+=j+.45*m;break;case"overline":c+=j-.85*k;break;case"lineThrough":c+=j-.25*k;break;default:throw"Unkown decoration : "+a.decoration}if(d.save(),"double"===a.decorationStyle){var o=Math.max(.5,2*n);d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n/2).fill().rect(b+g.x,c+o-n/2,i,n/2).fill()}else if("dashed"===a.decorationStyle){var p=Math.ceil(i/6.8),q=b+g.x;d.rect(q,c,i,n).clip(),d.fillColor(a.decorationColor);for(var r=0;p>r;r++)d.rect(q,c-n/2,3.96,n).fill(),q+=6.8}else if("dotted"===a.decorationStyle){var s=Math.ceil(i/(3*n)),t=b+g.x;d.rect(t,c,i,n).clip(),d.fillColor(a.decorationColor);for(var u=0;s>u;u++)d.rect(t,c-n/2,n,n).fill(),t+=3*n}else if("wavy"===a.decorationStyle){var v=.7,w=1,x=Math.ceil(i/(2*v))+1,y=b+g.x-1;d.rect(b+g.x,c-w,i,c+w).clip(),d.lineWidth(.24),d.moveTo(y,c);for(var z=0;x>z;z++)d.bezierCurveTo(y+v,c-w,y+2*v,c-w,y+3*v,c).bezierCurveTo(y+4*v,c+w,y+5*v,c+w,y+6*v,c),y+=6*v;d.stroke(a.decorationColor)}else d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n).fill();d.restore()}function e(a,b,e,f){for(var g=c(a),h=0,i=g.length;i>h;h++)d(g[h],b,e,f)}function f(a,b,c,d){for(var e=a.getHeight(),f=0,g=a.inlines.length;g>f;f++){var h=a.inlines[f];h.background&&d.fillColor(h.background).rect(b+h.x,c,h.width,e).fill()}}b.exports={drawBackground:f,drawDecorations:e}},{}],98:[function(a,b){"use strict";function c(a){this.fontProvider=a}function d(a){var b=[];a=a.replace(" "," ");for(var c=a.match(j),d=0,e=c.length;e-1>d;d++){var f=c[d],g=0===f.length;if(g){var h=0===b.length||b[b.length-1].lineEnd;h?b.push({text:"",lineEnd:!0}):b[b.length-1].lineEnd=!0}else b.push({text:f})}return b}function e(a,b){b=b||{},a=a||{};for(var c in a)"text"!=c&&a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function f(a){var b=[];("string"==typeof a||a instanceof String)&&(a=[a]);for(var c=0,f=a.length;f>c;c++){var g,h=a[c],i=null;"string"==typeof h||h instanceof String?g=d(h):(g=d(h.text),i=e(h));for(var j=0,k=g.length;k>j;j++){var l={text:g[j].text};g[j].lineEnd&&(l.lineEnd=!0),e(i,l),b.push(l)}}return b}function g(a){return a.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return m[a]||a})}function h(a,b,c,d){var e;return void 0!==a[c]&&null!==a[c]?a[c]:b?(b.auto(a,function(){e=b.getProperty(c)}),null!==e&&void 0!==e?e:d):d}function i(a,b,c){var d=f(b);return d.forEach(function(b){var d=h(b,c,"font","Roboto"),e=h(b,c,"fontSize",12),f=h(b,c,"bold",!1),i=h(b,c,"italics",!1),j=h(b,c,"color","black"),m=h(b,c,"decoration",null),n=h(b,c,"decorationColor",null),o=h(b,c,"decorationStyle",null),p=h(b,c,"background",null),q=h(b,c,"lineHeight",1),r=a.provideFont(d,f,i); -b.width=r.widthOfString(g(b.text),e),b.height=r.lineHeight(e)*q;var s=b.text.match(k),t=b.text.match(l);b.leadingCut=s?r.widthOfString(s[0],e):0,b.trailingCut=t?r.widthOfString(t[0],e):0,b.alignment=h(b,c,"alignment","left"),b.font=r,b.fontSize=e,b.color=j,b.decoration=m,b.decorationColor=n,b.decorationStyle=o,b.background=p}),d}var j=/([^ ,\/!.?:;\-\n]*[ ,\/!.?:;\-]*)|\n/g,k=/^(\s)+/g,l=/(\s)+$/g;c.prototype.buildInlines=function(a,b){function c(a){return Math.max(0,a.width-a.leadingCut-a.trailingCut)}var d,e=i(this.fontProvider,a,b),f=0,g=0;return e.forEach(function(a){f=Math.max(f,a.width-a.leadingCut-a.trailingCut),d||(d={width:0,leadingCut:a.leadingCut,trailingCut:0}),d.width+=a.width,d.trailingCut=a.trailingCut,g=Math.max(g,c(d)),a.lineEnd&&(d=null)}),{items:e,minWidth:f,maxWidth:g}},c.prototype.sizeOfString=function(a,b){a=a.replace(" "," ");var c=h({},b,"font","Roboto"),d=h({},b,"fontSize",12),e=h({},b,"bold",!1),f=h({},b,"italics",!1),i=h({},b,"lineHeight",1),j=this.fontProvider.provideFont(c,e,f);return{width:j.widthOfString(g(a),d),height:j.lineHeight(d)*i,fontSize:d,lineHeight:i,ascender:j.ascender/1e3*d,decender:j.decender/1e3*d}};var m={"Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z"};b.exports=c},{}],99:[function(a,b){"use strict";function c(){this.events={}}c.prototype.startTracking=function(a,b){var c=this.events[a]||(this.events[a]=[]);c.indexOf(b)<0&&c.push(b)},c.prototype.stopTracking=function(a,b){var c=this.events[a];if(c){var d=c.indexOf(b);d>=0&&c.splice(d,1)}},c.prototype.emit=function(a){var b=Array.prototype.slice.call(arguments,1),c=this.events[a];c&&c.forEach(function(a){a.apply(this,b)})},c.prototype.auto=function(a,b,c){this.startTracking(a,b),c(),this.stopTracking(a,b)},b.exports=c},{}],fs:[function(a,b){(function(a,c){"use strict";function d(){this.fileSystem={},this.baseSystem={}}function e(a){return 0===a.indexOf(c)&&(a=a.substring(c.length)),0===a.indexOf("/")&&(a=a.substring(1)),a}d.prototype.readFileSync=function(b){b=e(b);var c=this.baseSystem[b];return c?new a(c,"base64"):this.fileSystem[b]},d.prototype.writeFileSync=function(a,b){this.fileSystem[e(a)]=b},d.prototype.bindFS=function(a){this.baseSystem=a},b.exports=new d}).call(this,a("buffer").Buffer,"/src/browser-extensions")},{buffer:17}],pdfMake:[function(a,b,c){arguments[4][82][0].apply(c,arguments)},{"../../libs/fileSaver":1,"../printer":92,buffer:17,dup:82}]},{},[82])("pdfMake")}); +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(e){t.exports=e.pdfMake=n(1)}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t,e,n){this.docDefinition=t,this.fonts=e||a,this.vfs=n}var i=n(2),o=n(3),a={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};r.prototype._createDoc=function(t,n){var r=new i(this.fonts);r.fs.bindFS(this.vfs);var o,a=r.createPdfKitDocument(this.docDefinition,t),s=[];a.on("data",function(t){s.push(t)}),a.on("end",function(){o=e.concat(s),n(o,a._pdfMakePages)}),a.end()},r.prototype._getPages=function(t,e){if(!e)throw"getBuffer is an async method and needs a callback argument";this._createDoc(t,function(t,n){e(n)})},r.prototype.open=function(t){var e=window.open("","_blank");try{this.getDataUrl(function(t){e.location.href=t})}catch(n){throw e.close(),n}},r.prototype.print=function(){this.getDataUrl(function(t){var e=document.createElement("iframe");e.style.position="absolute",e.style.left="-99999px",e.src=t,e.onload=function(){function t(){document.body.removeChild(e),document.removeEventListener("click",t)}document.addEventListener("click",t,!1)},document.body.appendChild(e)},{autoPrint:!0})},r.prototype.download=function(t,e){"function"==typeof t&&(e=t,t=null),t=t||"file.pdf",this.getBuffer(function(n){o(new Blob([n],{type:"application/pdf"}),t),"function"==typeof e&&e()})},r.prototype.getBase64=function(t,e){if(!t)throw"getBase64 is an async method and needs a callback argument";this._createDoc(e,function(e){t(e.toString("base64"))})},r.prototype.getDataUrl=function(t,e){if(!t)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(e,function(e){t("data:application/pdf;base64,"+e.toString("base64"))})},r.prototype.getBuffer=function(t,e){if(!t)throw"getBuffer is an async method and needs a callback argument";this._createDoc(e,function(e){t(e)})},t.exports={createPdf:function(t){return new r(t,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(t){this.fontDescriptors=t}function i(t){if(!t)return null;if("number"==typeof t||t instanceof Number)t={left:t,right:t,top:t,bottom:t};else if(t instanceof Array)if(2===t.length)t={left:t[0],top:t[1],right:t[0],bottom:t[1]};else{if(4!==t.length)throw"Invalid pageMargins definition";t={left:t[0],top:t[1],right:t[2],bottom:t[3]}}return t}function o(t){t.registerTableLayouts({noBorders:{hLineWidth:function(t){return 0},vLineWidth:function(t){return 0},paddingLeft:function(t){return t&&4||0},paddingRight:function(t,e){return te.options.size[1]?"landscape":"portrait";if(t.pageSize.orientation!==n){var r=e.options.size[0],i=e.options.size[1];e.options.size=[i,r]}}function u(t,e,n){n._pdfMakePages=t;for(var r=0;r0&&(h(t[r],n),n.addPage(n.options));for(var i=t[r],o=0,a=i.items.length;a>o;o++){var s=i.items[o];switch(s.type){case"vector":f(s.item,n);break;case"line":l(s.item,s.item.x,s.item.y,n);break;case"image":d(s.item,s.item.x,s.item.y,n)}}i.watermark&&c(i,n),e.setFontRefsToPdfDoc()}}function l(t,e,n,r){e=e||0,n=n||0;var i=t.getAscenderHeight();_.drawBackground(t,e,n,r);for(var o=0,a=t.inlines.length;a>o;o++){var s=t.inlines[o];r.fill(s.color||"black"),r.save(),r.transform(1,0,0,-1,0,r.page.height);var h=s.font.encode(s.text);r.addContent("BT"),r.addContent(""+(e+s.x)+" "+(r.page.height-n-i)+" Td"),r.addContent("/"+h.fontId+" "+s.fontSize+" Tf"),r.addContent("<"+h.encodedText+"> Tj"),r.addContent("ET"),r.restore()}_.drawDecorations(t,e,n,r)}function c(t,e){var n=t.watermark;e.fill("black"),e.opacity(.6),e.save(),e.transform(1,0,0,-1,0,e.page.height);var r=180*Math.atan2(e.page.height,e.page.width)/Math.PI;e.rotate(r,{origin:[e.page.width/2,e.page.height/2]});var i=n.font.encode(n.text);e.addContent("BT"),e.addContent(""+(e.page.width/2-n.size.size.width/2)+" "+(e.page.height/2-n.size.size.height/4)+" Td"),e.addContent("/"+i.fontId+" "+n.size.fontSize+" Tf"),e.addContent("<"+i.encodedText+"> Tj"),e.addContent("ET"),e.restore()}function f(t,e){switch(e.lineWidth(t.lineWidth||1),t.dash?e.dash(t.dash.length,{space:t.dash.space||t.dash.length}):e.undash(),e.fillOpacity(t.fillOpacity||1),e.strokeOpacity(t.strokeOpacity||1),e.lineJoin(t.lineJoin||"miter"),t.type){case"ellipse":e.ellipse(t.x,t.y,t.r1,t.r2);break;case"rect":t.r?e.roundedRect(t.x,t.y,t.w,t.h,t.r):e.rect(t.x,t.y,t.w,t.h);break;case"line":e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2);break;case"polyline":if(0===t.points.length)break;e.moveTo(t.points[0].x,t.points[0].y);for(var n=1,r=t.points.length;r>n;n++)e.lineTo(t.points[n].x,t.points[n].y);if(t.points.length>1){var i=t.points[0],o=t.points[t.points.length-1];(t.closePath||i.x===o.x&&i.y===o.y)&&e.closePath()}}t.color&&t.lineColor?e.fillAndStroke(t.color,t.lineColor):t.color?e.fill(t.color):e.stroke(t.lineColor||"black")}function d(t,e,n,r){r.image(t.image,t.x,t.y,{width:t._width,height:t._height})}var p=(n(11),n(5)),g=n(6),v=n(28),m=n(12),y=n(7),w=n(8),_=n(9),p=n(5);r.prototype.createPdfKitDocument=function(t,e){e=e||{};var n=a(t.pageSize||"a4");"landscape"===t.pageOrientation&&(n={width:n.height,height:n.width}),n.orientation="landscape"===t.pageOrientation?t.pageOrientation:"portrait",this.pdfKitDoc=new v({size:[n.width,n.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",this.fontProvider=new p(this.fontDescriptors,this.pdfKitDoc),t.images=t.images||{};var r=new g(n,i(t.pageMargins||40),new w(this.pdfKitDoc,t.images));o(r),e.tableLayouts&&r.registerTableLayouts(e.tableLayouts);var h=r.layoutDocument(t.content,this.fontProvider,t.styles||{},t.defaultStyle||{fontSize:12,font:"Roboto"},t.background,t.header,t.footer,t.images,t.watermark,t.pageBreakBefore);if(u(h,this.fontProvider,this.pdfKitDoc),e.autoPrint){var l=this.pdfKitDoc.ref({S:"JavaScript",JS:new s("this.print\\(true\\);")}),c=this.pdfKitDoc.ref({Names:[new s("EmbeddedJS"),new m(this.pdfKitDoc,l.id)]});l.end(),c.end(),this.pdfKitDoc._root.data.Names={JavaScript:new m(this.pdfKitDoc,c.id)}}return this.pdfKitDoc};t.exports=r,r.prototype.fs=n(10)},function(t,e,n){var r,i;(function(t){/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ +var o=o||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,o=function(n){var r=e.createEvent("MouseEvents");r.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)},a=t.webkitRequestFileSystem,s=t.requestFileSystem||a||t.mozRequestFileSystem,h=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},u="application/octet-stream",l=0,c=10,f=function(e){var r=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};t.chrome?r():setTimeout(r,c)},d=function(t,e,n){e=[].concat(e);for(var r=e.length;r--;){var i=t["on"+e[r]];if("function"==typeof i)try{i.call(t,n||t)}catch(o){h(o)}}},p=function(e,h){var c,p,g,v=this,m=e.type,y=!1,w=function(){d(v,"writestart progress write writeend".split(" "))},_=function(){if((y||!c)&&(c=n().createObjectURL(e)),p)p.location.href=c;else{var r=t.open(c,"_blank");void 0==r&&"undefined"!=typeof safari&&(t.location.href=c)}v.readyState=v.DONE,w(),f(c)},b=function(t){return function(){return v.readyState!==v.DONE?t.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return v.readyState=v.INIT,h||(h="download"),i?(c=n().createObjectURL(e),r.href=c,r.download=h,o(r),v.readyState=v.DONE,w(),void f(c)):(t.chrome&&m&&m!==u&&(g=e.slice||e.webkitSlice,e=g.call(e,0,e.size,u),y=!0),a&&"download"!==h&&(h+=".download"),(m===u||a)&&(p=t),s?(l+=e.size,void s(t.TEMPORARY,l,b(function(t){t.root.getDirectory("saved",x,b(function(t){var n=function(){t.getFile(h,x,b(function(t){t.createWriter(b(function(n){n.onwriteend=function(e){p.location.href=t.toURL(),v.readyState=v.DONE,d(v,"writeend",e),f(t)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&_()},"writestart progress write abort".split(" ").forEach(function(t){n["on"+t]=v["on"+t]}),n.write(e),v.abort=function(){n.abort(),v.readyState=v.DONE},v.readyState=v.WRITING}),_)}),_)};t.getFile(h,{create:!1},b(function(t){t.remove(),n()}),b(function(t){t.code===t.NOT_FOUND_ERR?n():_()}))}),_)}),_)):void _())},g=p.prototype,v=function(t,e){return new p(t,e)};return g.abort=function(){var t=this;t.readyState=t.DONE,d(t,"abort")},g.readyState=g.INIT=0,g.WRITING=1,g.DONE=2,g.error=g.onwritestart=g.onprogress=g.onwrite=g.onabort=g.onerror=g.onwriteend=null,v}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof t&&null!==t?t.exports=o:null!==n(13)&&null!=n(14)&&(r=[],i=function(){return o}.apply(e,r),!(void 0!==i&&(t.exports=i)))}).call(e,n(15)(t))},function(t,e,n){(function(t){function t(e){return this instanceof t?(this.length=0,this.parent=void 0,"number"==typeof e?r(this,e):"string"==typeof e?i(this,e,arguments.length>1?arguments[1]:"utf8"):o(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function r(e,n){if(e=c(e,0>n?0:0|f(n)),!t.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)e[r]=0;return e}function i(t,e,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|p(e,n);return t=c(t,r),t.write(e,n),t}function o(e,n){if(t.isBuffer(n))return a(e,n);if(G(n))return s(e,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer?h(e,n):n.length?u(e,n):l(e,n)}function a(t,e){var n=0|f(e.length);return t=c(t,n),e.copy(t,0,0,n),t}function s(t,e){var n=0|f(e.length);t=c(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function h(t,e){var n=0|f(e.length);t=c(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function u(t,e){var n=0|f(e.length);t=c(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function l(t,e){var n,r=0;"Buffer"===e.type&&G(e.data)&&(n=e.data,r=0|f(n.length)),t=c(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function c(e,n){t.TYPED_ARRAY_SUPPORT?e=t._augment(new Uint8Array(n)):(e.length=n,e._isBuffer=!0);var r=0!==n&&n<=t.poolSize>>>1;return r&&(e.parent=Y),e}function f(t){if(t>=q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+q.toString(16)+" bytes");return 0|t}function d(e,n){if(!(this instanceof d))return new d(e,n);var r=new t(e,n);return delete r.parent,r}function p(t,e){if("string"!=typeof t&&(t=String(t)),0===t.length)return 0;switch(e||"utf8"){case"ascii":case"binary":case"raw":return t.length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t.length;case"hex":return t.length>>>1;case"utf8":case"utf-8":return P(t).length;case"base64":return W(t).length;default:return t.length}}function g(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[n+a]=s}return a}function v(t,e,n,r){return N(P(e,t.length-n),t,n,r)}function m(t,e,n,r){return N(F(e),t,n,r)}function y(t,e,n,r){return m(t,e,n,r)}function w(t,e,n,r){return N(W(e),t,n,r)}function _(t,e,n,r){return N(z(e,t.length-n),t,n,r)}function b(t,e,n){return H.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function x(t,e,n){var r="",i="";n=Math.min(t.length,n);for(var o=e;n>o;o++)t[o]<=127?(r+=j(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return r+j(i)}function S(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function E(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=e;n>o;o++)i+=U(t[o]);return i}function C(t,e,n){for(var r=t.slice(e,n),i="",o=0;ot)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,n,r,i,o,a){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(n>o||a>n)throw new RangeError("value is out of bounds");if(r+i>e.length)throw new RangeError("index out of range")}function L(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);o>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function R(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);o>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function T(t,e,n,r,i){return i||B(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,i){return i||B(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,n,r,52,8),n+8}function O(t){if(t=D(t).replace(X,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function D(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function U(t){return 16>t?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;r>a;a++){if(n=t.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&((e-=3)>-1&&o.push(239,191,189),i=null);if(128>n){if((e-=1)<0)break;o.push(n)}else if(2048>n){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(2097152>n))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function W(t){return H.toByteArray(O(t))}function N(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}function j(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +var H=n(31),Z=n(29),G=n(30);e.Buffer=t,e.SlowBuffer=d,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var q=1073741823,Y={};t.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}(),t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,o=0,a=Math.min(r,i);a>o&&e[o]===n[o];)++o;return o!==a&&(r=e[o],i=n[o]),i>r?-1:r>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,n){if(!G(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);if(1===e.length)return e[0];var r;if(void 0===n)for(n=0,r=0;re&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return E(this,e,n);case"utf8":case"utf-8":return x(this,e,n);case"ascii":return S(this,e,n);case"binary":return k(this,e,n);case"base64":return b(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,n){function r(t,e,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,n);if(t.isBuffer(e))return r(this,e,n);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,n):r(this,[e],n);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return this.readUInt8(t)},t.prototype.set=function(t,e){return this.writeUInt8(t,e)},t.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return g(this,t,e,n);case"utf8":case"utf-8":return v(this,t,e,n);case"ascii":return m(this,t,e,n);case"binary":return y(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),e>n&&(n=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,n));else{var o=n-e;i=new t(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||I(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),Z.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),Z.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),Z.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),Z.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||A(this,t,e,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e,this[n+1]=e>>>8):L(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=e):L(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=e):R(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e):R(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);A(this,t,e,n,i-1,-i)}var o=0,a=1,s=0>t?1:0;for(this[e]=255&t;++o>0)-s&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);A(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=(t/a>>0)-s&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[n]=e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e,this[n+1]=e>>>8):L(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=e):L(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):R(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n=0|n,r||A(this,e,n,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e):R(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return T(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return T(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-no||!t.TYPED_ARRAY_SUPPORT)for(var a=0;o>a;a++)e[a+n]=this[a+r];else e._set(this.subarray(r,r+o),n);return o},t.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=P(t.toString()),o=i.length;for(r=e;n>r;r++)this[r]=i[r%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),n=0,r=e.length;r>n;n+=1)e[n]=this[n];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var K=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=K.get,e.set=K.set,e.write=K.write,e.toString=K.toString,e.toLocaleString=K.toString,e.toJSON=K.toJSON,e.equals=K.equals,e.compare=K.compare,e.indexOf=K.indexOf,e.copy=K.copy,e.slice=K.slice,e.readUIntLE=K.readUIntLE,e.readUIntBE=K.readUIntBE,e.readUInt8=K.readUInt8,e.readUInt16LE=K.readUInt16LE,e.readUInt16BE=K.readUInt16BE,e.readUInt32LE=K.readUInt32LE,e.readUInt32BE=K.readUInt32BE,e.readIntLE=K.readIntLE,e.readIntBE=K.readIntBE,e.readInt8=K.readInt8,e.readInt16LE=K.readInt16LE,e.readInt16BE=K.readInt16BE,e.readInt32LE=K.readInt32LE,e.readInt32BE=K.readInt32BE,e.readFloatLE=K.readFloatLE,e.readFloatBE=K.readFloatBE,e.readDoubleLE=K.readDoubleLE,e.readDoubleBE=K.readDoubleBE,e.writeUInt8=K.writeUInt8,e.writeUIntLE=K.writeUIntLE,e.writeUIntBE=K.writeUIntBE,e.writeUInt16LE=K.writeUInt16LE,e.writeUInt16BE=K.writeUInt16BE,e.writeUInt32LE=K.writeUInt32LE,e.writeUInt32BE=K.writeUInt32BE,e.writeIntLE=K.writeIntLE,e.writeIntBE=K.writeIntBE,e.writeInt8=K.writeInt8,e.writeInt16LE=K.writeInt16LE,e.writeInt16BE=K.writeInt16BE,e.writeInt32LE=K.writeInt32LE,e.writeInt32BE=K.writeInt32BE,e.writeFloatLE=K.writeFloatLE,e.writeFloatBE=K.writeFloatBE,e.writeDoubleLE=K.writeDoubleLE,e.writeDoubleBE=K.writeDoubleBE,e.fill=K.fill,e.inspect=K.inspect,e.toArrayBuffer=K.toArrayBuffer,e};var X=/[^+\/0-9A-z\-]/g}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(t,e){var n="normal";return t&&e?n="bolditalics":t?n="bold":e&&(n="italics"),n}function i(t,e){this.fonts={},this.pdfDoc=e,this.fontWrappers={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];this.fonts[n]={normal:r.normal,bold:r.bold,italics:r.italics,bolditalics:r.bolditalics}}}var o=n(11),a=n(16);i.prototype.provideFont=function(t,e,n){if(!this.fonts[t])return this.pdfDoc._font;var i=r(e,n);return this.fontWrappers[t]=this.fontWrappers[t]||{},this.fontWrappers[t][i]||(this.fontWrappers[t][i]=new a(this.pdfDoc,this.fonts[t][i],t+"("+i+")")),this.fontWrappers[t][i]},i.prototype.setFontRefsToPdfDoc=function(){var t=this;o.each(t.fontWrappers,function(e){o.each(e,function(e){o.each(e.pdfFonts,function(e){t.pdfDoc.page.fonts[e.id]||(t.pdfDoc.page.fonts[e.id]=e.ref())})})})},t.exports=i},function(t,e,n){"use strict";function r(t,e){a.each(e,function(e){t.push(e)})}function i(t,e,n){this.pageSize=t,this.pageMargins=e,this.tracker=new s,this.imageMeasure=n,this.tableLayouts={}}function o(t){var e=t.x,n=t.y;t.positions=[],a.each(t.canvas,function(t){var e=t.x,n=t.y;t.resetXY=function(){t.x=e,t.y=n}}),t.resetXY=function(){t.x=e,t.y=n,a.each(t.canvas,function(t){t.resetXY()})}}var a=n(11),s=n(18),h=n(19),u=n(20),l=n(21),c=n(22),f=n(23),d=n(24),p=n(25).pack,g=n(25).offsetVector,v=n(25).fontStringify,m=n(25).isFunction,y=n(26),w=n(27);i.prototype.registerTableLayouts=function(t){this.tableLayouts=p(this.tableLayouts,t)},i.prototype.layoutDocument=function(t,e,n,r,i,o,s,u,l,c){function f(t,e){return t=a.reject(t,function(t){return a.isEmpty(t.positions)}),a.each(t,function(t){var n=a.pick(t,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);n.startPosition=a.first(t.positions),n.pageNumbers=a.chain(t.positions).map("pageNumber").uniq().value(),n.pages=e.length,n.stack=a.isArray(t.stack),t.nodeInfo=n}),a.any(t,function(t,e,n){if("before"!==t.pageBreak&&!t.pageBreakCalculated){t.pageBreakCalculated=!0;var r=a.first(t.nodeInfo.pageNumbers),i=a.chain(n).drop(e+1).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r)}).value(),o=a.chain(n).drop(e+1).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r+1)}).value(),s=a.chain(n).take(e).filter(function(t){return a.contains(t.nodeInfo.pageNumbers,r)}).value();if(c(t.nodeInfo,a.map(i,"nodeInfo"),a.map(o,"nodeInfo"),a.map(s,"nodeInfo")))return t.pageBreak="before",!0}})}function d(t){a.each(t.linearNodeList,function(t){t.resetXY()})}m(c)||(c=function(){return!1}),this.docMeasure=new h(e,n,r,this.imageMeasure,this.tableLayouts,u);for(var p=this.tryLayoutDocument(t,e,n,r,i,o,s,u,l);f(p.linearNodeList,p.pages);)d(p),p=this.tryLayoutDocument(t,e,n,r,i,o,s,u,l);return p.pages},i.prototype.tryLayoutDocument=function(t,e,n,r,i,o,a,s,h,c){this.linearNodeList=[],t=this.docMeasure.measureDocument(t),this.writer=new l(new u(this.pageSize,this.pageMargins),this.tracker);var f=this;return this.writer.context().tracker.startTracking("pageAdded",function(){f.addBackground(i)}),this.addBackground(i),this.processNode(t),this.addHeadersAndFooters(o,a),null!=h&&this.addWatermark(h,e),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},i.prototype.addBackground=function(t){var e=m(t)?t:function(){return t},n=e(this.writer.context().page+1);if(n){var r=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(r.width,r.height),this.processNode(this.docMeasure.measureDocument(n)),this.writer.commitUnbreakableBlock(0,0)}},i.prototype.addStaticRepeatable=function(t,e){this.addDynamicRepeatable(function(){return t},e)},i.prototype.addDynamicRepeatable=function(t,e){for(var n=this.writer.context().pages,r=0,i=n.length;i>r;r++){this.writer.context().page=r;var o=t(r+1,i);if(o){var a=e(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(a.width,a.height),this.processNode(this.docMeasure.measureDocument(o)),this.writer.commitUnbreakableBlock(a.x,a.y)}}},i.prototype.addHeadersAndFooters=function(t,e){var n=function(t,e){return{x:0,y:0,width:t.width,height:e.top}},r=function(t,e){return{x:0,y:t.height-e.bottom,width:t.width,height:e.bottom}};m(t)?this.addDynamicRepeatable(t,n):t&&this.addStaticRepeatable(t,n),m(e)?this.addDynamicRepeatable(e,r):e&&this.addStaticRepeatable(e,r)},i.prototype.addWatermark=function(t,e){function n(t,e,n){for(var r,i=t.width,o=t.height,a=.8*Math.sqrt(i*i+o*o),s=new y(n),h=new w,u=0,l=1e3,c=(u+l)/2;Math.abs(u-l)>1;)h.push({fontSize:c}),r=s.sizeOfString(e,h),r.width>a?(l=c,c=(u+l)/2):r.widtha;a++)o[a].watermark=i},i.prototype.processNode=function(t){function e(e){var r=t._margin;"before"===t.pageBreak&&n.writer.moveToNextPage(t.pageOrientation),r&&(n.writer.context().moveDown(r[1]),n.writer.context().addMargin(r[0],r[2])),e(),r&&(n.writer.context().addMargin(-r[0],-r[2]),n.writer.context().moveDown(r[3])),"after"===t.pageBreak&&n.writer.moveToNextPage(t.pageOrientation)}var n=this;this.linearNodeList.push(t),o(t),e(function(){var e=t.absolutePosition;if(e&&(n.writer.context().beginDetachedBlock(),n.writer.context().moveTo(e.x||0,e.y||0)),t.stack)n.processVerticalContainer(t);else if(t.columns)n.processColumns(t);else if(t.ul)n.processList(!1,t);else if(t.ol)n.processList(!0,t);else if(t.table)n.processTable(t);else if(void 0!==t.text)n.processLeaf(t);else if(t.image)n.processImage(t);else if(t.canvas)n.processCanvas(t);else if(t.qr)n.processQr(t);else if(!t._span)throw"Unrecognized document structure: "+JSON.stringify(t,v);e&&n.writer.context().endDetachedBlock()})},i.prototype.processVerticalContainer=function(t){var e=this;t.stack.forEach(function(n){e.processNode(n),r(t.positions,n.positions)})},i.prototype.processColumns=function(t){function e(t){if(!t)return null;var e=[];e.push(0);for(var r=n.length-1;r>0;r--)e.push(t);return e}var n=t.columns,i=this.writer.context().availableWidth,o=e(t._gap);o&&(i-=(o.length-1)*t._gap),c.buildColumnWidths(n,i);var a=this.processRow(n,n,o);r(t.positions,a.positions)},i.prototype.processRow=function(t,e,n,i,o){function a(t){for(var e,n=0,r=l.length;r>n;n++){var i=l[n];if(i.prevPage===t.prevPage){e=i;break}}e||(e=t,l.push(e)),e.prevY=Math.max(e.prevY,t.prevY),e.y=Math.min(e.y,t.y)}function s(t){return n&&n.length>t?n[t]:0}function h(t,e){if(t.rowSpan&&t.rowSpan>1){var n=o+t.rowSpan-1;if(n>=i.length)throw"Row span for column "+e+" (with indexes starting from 0) exceeded row count";return i[n][e]}return null}var u=this,l=[],c=[];return this.tracker.auto("pageChanged",a,function(){e=e||t,u.writer.context().beginColumnGroup();for(var i=0,o=t.length;o>i;i++){var a=t[i],l=e[i]._calcWidth,f=s(i);if(a.colSpan&&a.colSpan>1)for(var d=1;dn;n++){e.beginRow(n,this.writer);var o=this.processRow(t.table.body[n],t.table.widths,t._offsets.offsets,t.table.body,n);r(t.positions,o.positions),e.endRow(n,this.writer,o.pageBreaks)}e.endTable(this.writer)},i.prototype.processLeaf=function(t){for(var e=this.buildNextLine(t);e;){var n=this.writer.addLine(e);t.positions.push(n),e=this.buildNextLine(t)}},i.prototype.buildNextLine=function(t){if(!t._inlines||0===t._inlines.length)return null;for(var e=new d(this.writer.context().availableWidth);t._inlines&&t._inlines.length>0&&e.hasEnoughSpaceForInline(t._inlines[0]);)e.addInline(t._inlines.shift());return e.lastLineInParagraph=0===t._inlines.length,e},i.prototype.processImage=function(t){var e=this.writer.addImage(t);t.positions.push(e)},i.prototype.processCanvas=function(t){var e=t._minHeight;this.writer.context().availableHeightr)throw"invalid image format, images dictionary should contain dataURL entries";return new e(n.substring(r+7),"base64")}var r,o,a=this;return this.pdfDoc._imageRegistry[t]?r=this.pdfDoc._imageRegistry[t]:(o="I"+ ++this.pdfDoc._imageCount,r=i.open(n(t),o),r.embed(this.pdfDoc),this.pdfDoc._imageRegistry[t]=r),{width:r.width,height:r.height}},t.exports=r}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(t){for(var e=[],n=null,r=0,i=t.inlines.length;i>r;r++){var o=t.inlines[r],a=o.decoration;if(a){var s=o.decorationColor||o.color||"black",h=o.decorationStyle||"solid";a=Array.isArray(a)?a:[a];for(var u=0,l=a.length;l>u;u++){var c=a[u];n&&c===n.decoration&&h===n.decorationStyle&&s===n.decorationColor&&"lineThrough"!==c?n.inlines.push(o):(n={line:t,decoration:c,decorationColor:s,decorationStyle:h,inlines:[o]},e.push(n))}}else n=null}return e}function i(t,e,n,r){function i(){for(var e=0,n=0,r=t.inlines.length;r>n;n++){var i=t.inlines[n];e=i.fontSize>e?n:e}return t.inlines[e]}function o(){for(var e=0,n=0,r=t.inlines.length;r>n;n++)e+=t.inlines[n].width;return e}var a=t.inlines[0],s=i(),h=o(),u=t.line.getAscenderHeight(),l=s.font.ascender/1e3*s.fontSize,c=s.height,f=c-l,d=.5+.12*Math.floor(Math.max(s.fontSize-8,0)/2);switch(t.decoration){case"underline":n+=u+.45*f;break;case"overline":n+=u-.85*l;break;case"lineThrough":n+=u-.25*l;break;default:throw"Unkown decoration : "+t.decoration}if(r.save(),"double"===t.decorationStyle){var p=Math.max(.5,2*d);r.fillColor(t.decorationColor).rect(e+a.x,n-d/2,h,d/2).fill().rect(e+a.x,n+p-d/2,h,d/2).fill()}else if("dashed"===t.decorationStyle){var g=Math.ceil(h/6.8),v=e+a.x;r.rect(v,n,h,d).clip(),r.fillColor(t.decorationColor);for(var m=0;g>m;m++)r.rect(v,n-d/2,3.96,d).fill(),v+=6.8}else if("dotted"===t.decorationStyle){var y=Math.ceil(h/(3*d)),w=e+a.x;r.rect(w,n,h,d).clip(),r.fillColor(t.decorationColor);for(var _=0;y>_;_++)r.rect(w,n-d/2,d,d).fill(),w+=3*d}else if("wavy"===t.decorationStyle){var b=.7,x=1,S=Math.ceil(h/(2*b))+1,k=e+a.x-1;r.rect(e+a.x,n-x,h,n+x).clip(),r.lineWidth(.24),r.moveTo(k,n);for(var E=0;S>E;E++)r.bezierCurveTo(k+b,n-x,k+2*b,n-x,k+3*b,n).bezierCurveTo(k+4*b,n+x,k+5*b,n+x,k+6*b,n),k+=6*b;r.stroke(t.decorationColor)}else r.fillColor(t.decorationColor).rect(e+a.x,n-d/2,h,d).fill();r.restore()}function o(t,e,n,o){for(var a=r(t),s=0,h=a.length;h>s;s++)i(a[s],e,n,o)}function a(t,e,n,r){for(var i=t.getHeight(),o=0,a=t.inlines.length;a>o;o++){var s=t.inlines[o];s.background&&r.fillColor(s.background).rect(e+s.x,n,s.width,i).fill()}}t.exports={drawBackground:a,drawDecorations:o}},function(t,e,n){(function(e,n){"use strict";function r(){this.fileSystem={},this.baseSystem={}}function i(t){return 0===t.indexOf(n)&&(t=t.substring(n.length)),0===t.indexOf("/")&&(t=t.substring(1)),t}r.prototype.readFileSync=function(t){t=i(t);var n=this.baseSystem[t];return n?new e(n,"base64"):this.fileSystem[t]},r.prototype.writeFileSync=function(t,e){this.fileSystem[i(t)]=e},r.prototype.bindFS=function(t){this.baseSystem=t},t.exports=new r}).call(e,n(4).Buffer,"/")},function(t,e,n){var r;(function(t,i){(function(){function o(t,e){if(t!==e){var n=t===t,r=e===e;if(t>e||!n||"undefined"==typeof t&&r)return 1;if(e>t||!r||"undefined"==typeof e&&n)return-1}return 0}function a(t,e,n){if(e!==e)return m(t,n);for(var r=(n||0)-1,i=t.length;++r-1;);return n}function c(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function f(t,e){return o(t.criteria,e.criteria)||t.index-e.index}function d(t,e){for(var n=-1,r=t.criteria,i=e.criteria,a=r.length;++n=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function _(t,e){for(var n=-1,r=t.length,i=-1,o=[];++ne,r=vn(0,t.length,this.views),i=r.start,o=r.end,a=o-i,s=this.dropCount,h=va(a,this.takeCount-s),u=n?o:i-1,l=this.iteratees,c=l?l.length:0,f=0,d=[];t:for(;a--&&h>f;){u+=e;for(var p=-1,g=t[u];++pr&&(r=i)}return r}function ie(t){for(var e=-1,n=t.length,r=xa;++ei&&(r=i)}return r}function oe(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i=200&&Ta(e),u=e.length;h&&(o=Yt,s=!1,e=h);t:for(;++ie&&(e=-e>i?0:i+e),n="undefined"==typeof n||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Bo(i);++r=200,h=s&&Ta(),u=[];h?(r=Yt,o=!1):(s=!1,h=e?[]:u);t:for(;++n=i){for(;i>r;){var o=r+i>>>1,a=t[o];(n?e>=a:e>a)?r=o+1:i=o}return i}return Ke(t,e,bo,n)}function Ke(t,e,n,r){e=n(e);for(var i=0,o=t?t.length:0,a=e!==e,s="undefined"==typeof e;o>i;){var h=ea((i+o)/2),u=n(t[h]),l=u===u;if(a)var c=l||r;else c=s?l&&(r||"undefined"!=typeof u):r?e>=u:e>u;c?i=h+1:o=h}return va(o,ka)}function Xe(t,e,n){if("function"!=typeof t)return bo;if("undefined"==typeof e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,a){return t.call(e,n,r,i,o,a)}}return function(){return t.apply(e,arguments)}}function Ve(t){return Jo.call(t,0)}function $e(t,e,n){for(var r=n.length,i=-1,o=ga(t.length-r,0),a=-1,s=e.length,h=Bo(o+s);++ae||null==n)return n;if(e>3&&xn(arguments[1],arguments[2],arguments[3])&&(e=2),e>3&&"function"==typeof arguments[e-2])var r=Xe(arguments[--e-1],arguments[e--],5);else e>2&&"function"==typeof arguments[e-1]&&(r=arguments[--e]);for(var i=0;++iw){var E=s?Vt(s):null,C=ga(u-w,0),I=p?k:null,R=p?null:k,B=p?x:null,T=p?null:x;e|=p?M:O,e&=~(p?O:M),g||(e&=~(A|L));var D=an(t,e,n,B,I,T,R,E,h,C);return D.placeholder=S,D}}var U=f?n:this;return d&&(t=U[y]),s&&(x=An(x,s)),c&&h=e||!da(e))return"";var i=e-r;return n=null==n?" ":n+"",ho(n,Qo(i/n.length)).slice(0,i)}function hn(t,e,n,r){function i(){for(var e=-1,s=arguments.length,h=-1,u=r.length,l=Bo(s+u);++hh))return!1;for(;l&&++sh:h>i)||h===r&&h===o)&&(i=h,o=t)}),o}function pn(t,n,r){var i=e.callback||wo;return i=i===wo?pe:i,r?i(t,n,r):i}function gn(t,n,r){var i=e.indexOf||Gn;return i=i===Gn?a:i,t?i(t,n,r):i}function vn(t,e,n){for(var r=-1,i=n?n.length:0;++r-1&&t%1==0&&e>t}function xn(t,e,n){if(!_i(n))return!1;var r=typeof e;if("number"==r)var i=n.length,o=Sn(i)&&bn(e,i);else o="string"==r&&e in n;return o&&n[e]===t}function Sn(t){return"number"==typeof t&&t>-1&&t%1==0&&Ia>=t}function kn(t){return t===t&&(0===t?1/t>0:!_i(t))}function En(t,e){var n=t[1],r=e[1],i=n|r,o=U|D,a=A|L,s=o|a|R|T,h=n&U&&!(r&U),u=n&D&&!(r&D),l=(u?t:e)[7],c=(h?t:e)[8],f=!(n>=D&&r>a||n>a&&r>=D),d=i>=o&&s>=i&&(D>n||(u||h)&&l.length<=c);if(!f&&!d)return t;r&A&&(t[2]=e[2],i|=n&A?0:R);var p=e[3];if(p){var g=t[3];t[3]=g?$e(g,p,e[4]):Vt(p),t[4]=g?_(t[3],G):Vt(e[4])}return p=e[5],p&&(g=t[5],t[5]=g?Je(g,p,e[6]):Vt(p),t[6]=g?_(t[5],G):Vt(e[6])),p=e[7],p&&(t[7]=Vt(p)),r&U&&(t[8]=null==t[8]?e[8]:va(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function Cn(t,e){t=Tn(t);for(var n=-1,r=e.length,i={};++nr;)a[++o]=je(t,r,r+=e);return a}function On(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++ee?0:e)):[]}function Pn(t,e,n){var r=t?t.length:0;return r?((n?xn(t,e,n):null==e)&&(e=1),e=r-(+e||0),je(t,0,0>e?0:e)):[]}function Fn(t,e,n){var r=t?t.length:0;if(!r)return[];for(e=pn(e,n,3);r--&&e(t[r],r,t););return je(t,0,r+1)}function zn(t,e,n){var r=t?t.length:0;if(!r)return[];var i=-1;for(e=pn(e,n,3);++in?ga(r+n,0):n||0;else if(n){var i=Ye(t,e),o=t[i];return(e===e?e===o:o!==o)?i:-1}return a(t,e,n)}function qn(t){return Pn(t,1)}function Yn(){for(var t=[],e=-1,n=arguments.length,r=[],i=gn(),o=i==a;++e=120&&Ta(e&&s)))}n=t.length;var h=t[0],u=-1,l=h?h.length:0,c=[],f=r[0];t:for(;++un?ga(r+n,0):va(n||0,r-1))+1;else if(n){i=Ye(t,e,!0)-1;var o=t[i];return(e===e?e===o:o!==o)?i:-1}if(e!==e)return m(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Vn(){var t=arguments[0];if(!t||!t.length)return t;for(var e=0,n=gn(),r=arguments.length;++e-1;)sa.call(t,i,1);return t}function $n(t){return ze(t||[],Se(arguments,!1,!1,1))}function Jn(t,e,n){var r=-1,i=t?t.length:0,o=[];for(e=pn(e,n,3);++re?0:e)):[]}function ir(t,e,n){var r=t?t.length:0;return r?((n?xn(t,e,n):null==e)&&(e=1),e=r-(+e||0),je(t,0>e?0:e)):[]}function or(t,e,n){var r=t?t.length:0;if(!r)return[];for(e=pn(e,n,3);r--&&e(t[r],r,t););return je(t,r+1)}function ar(t,e,n){var r=t?t.length:0;if(!r)return[];var i=-1;for(e=pn(e,n,3);++i>>0,r=Bo(n);++en?ga(r+n,0):n||0:0,"string"==typeof t||!ja(t)&&Ii(t)?r>n&&t.indexOf(e,n)>-1:gn(t,e,n)>-1):!1}function Sr(t,e,n){var r=ja(t)?te:_e;return("function"!=typeof e||"undefined"!=typeof n)&&(e=pn(e,n,3)),r(t,e)}function kr(t,e,n){var r=ja(t)?ee:be;return e=pn(e,n,3),r(t,e)}function Er(t,e,n){if(ja(t)){var r=Wn(t,e,n);return r>-1?t[r]:C}return e=pn(e,n,3),xe(t,e,ye)}function Cr(t,e,n){return e=pn(e,n,3),xe(t,e,we)}function Ir(t,e){return Er(t,De(e))}function Ar(t,e,n){return"function"==typeof e&&"undefined"==typeof n&&ja(t)?$t(t,e):ye(t,Xe(e,n,3))}function Lr(t,e,n){return"function"==typeof e&&"undefined"==typeof n&&ja(t)?Qt(t,e):we(t,Xe(e,n,3))}function Rr(t,e){return Re(t,e,je(arguments,2))}function Br(t,e,n){var r=ja(t)?ne:Oe;return e=pn(e,n,3),r(t,e)}function Tr(t,e){return Br(t,Fe(e+""))}function Mr(t,e,n,r){var i=ja(t)?oe:Ne;return i(t,pn(e,r,4),n,arguments.length<3,ye)}function Or(t,e,n,r){var i=ja(t)?ae:Ne;return i(t,pn(e,r,4),n,arguments.length<3,we)}function Dr(t,e,n){var r=ja(t)?ee:be;return e=pn(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function Ur(t,e,n){if(n?xn(t,e,n):null==e){t=Bn(t);var r=t.length;return r>0?t[We(0,r-1)]:C}var i=Pr(t);return i.length=va(0>e?0:+e||0,i.length),i}function Pr(t){t=Bn(t);for(var e=-1,n=t.length,r=Bo(n);++e3&&xn(e[1],e[2],e[3])&&(e=[t,e[1]]);var n=-1,r=t?t.length:0,i=Se(e,!1,!1,1),o=Sn(r)?Bo(r):[];return ye(t,function(t,e,r){for(var a=i.length,s=Bo(a);a--;)s[a]=null==t?C:t[i[a]];o[++n]={criteria:s,index:n,value:t}}),s(o,d)}function jr(t,e){return kr(t,De(e))}function Hr(t,e){if(!wi(e)){if(!wi(t))throw new Wo(Z);var n=t;t=e,e=n}return t=da(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function Zr(t,e,n){return n&&xn(t,e,n)&&(e=null),e=t&&null==e?t.length:ga(+e||0,0),un(t,U,null,null,null,null,e)}function Gr(t,e){var n;if(!wi(e)){if(!wi(t))throw new Wo(Z);var r=t;t=e,e=r}return function(){return--t>0?n=e.apply(this,arguments):e=null,n}}function qr(t,e){var n=A;if(arguments.length>2){var r=je(arguments,2),i=_(r,qr.placeholder);n|=M}return un(t,n,e,r,i)}function Yr(t){return de(t,arguments.length>1?Se(arguments,!1,!1,1):Wi(t))}function Kr(t,e){var n=A|L;if(arguments.length>2){var r=je(arguments,2),i=_(r,Kr.placeholder);n|=M}return un(e,n,t,r,i)}function Xr(t,e,n){n&&xn(t,e,n)&&(e=null);var r=un(t,B,null,null,null,null,null,e);return r.placeholder=Xr.placeholder,r}function Vr(t,e,n){n&&xn(t,e,n)&&(e=null);var r=un(t,T,null,null,null,null,null,e);return r.placeholder=Vr.placeholder,r}function $r(t,e,n){function r(){f&&ta(f),h&&ta(h),h=f=d=C}function i(){var n=e-(Na()-l);if(0>=n||n>e){h&&ta(h);var r=d;h=f=d=C,r&&(p=Na(),u=t.apply(c,s),f||h||(s=c=null))}else f=aa(i,n)}function o(){f&&ta(f),h=f=d=C,(v||g!==e)&&(p=Na(),u=t.apply(c,s),f||h||(s=c=null))}function a(){if(s=arguments,l=Na(),c=this,d=v&&(f||!m),g===!1)var n=m&&!f;else{h||m||(p=l);var r=g-(l-p),a=0>=r||r>g;a?(h&&(h=ta(h)),p=l,u=t.apply(c,s)):h||(h=aa(o,r))}return a&&f?f=ta(f):f||e===g||(f=aa(i,e)),n&&(a=!0,u=t.apply(c,s)),!a||f||h||(s=c=null),u}var s,h,u,l,c,f,d,p=0,g=!1,v=!0;if(!wi(t))throw new Wo(Z);if(e=0>e?0:e,n===!0){var m=!0;v=!1}else _i(n)&&(m=n.leading,g="maxWait"in n&&ga(+n.maxWait||0,e),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function Jr(t){return ve(t,1,arguments,1)}function Qr(t,e){return ve(t,e,arguments,2)}function ti(){var t=arguments,e=t.length;if(!e)return function(){};if(!te(t,wi))throw new Wo(Z);return function(){for(var n=0,r=t[n].apply(this,arguments);++ne)return function(){};if(!te(t,wi))throw new Wo(Z);return function(){for(var n=e,r=t[n].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function ni(t,e){if(!wi(t)||e&&!wi(e))throw new Wo(Z);var n=function(){var r=n.cache,i=e?e.apply(this,arguments):arguments[0];if(r.has(i))return r.get(i);var o=t.apply(this,arguments);return r.set(i,o),o};return n.cache=new ni.Cache,n}function ri(t){if(!wi(t))throw new Wo(Z);return function(){return!t.apply(this,arguments)}}function ii(t){return Gr(t,2)}function oi(t){var e=je(arguments,1),n=_(e,oi.placeholder);return un(t,M,null,e,n)}function ai(t){var e=je(arguments,1),n=_(e,ai.placeholder);return un(t,O,null,e,n)}function si(t){var e=Se(arguments,!1,!1,1);return un(t,D,null,null,null,e)}function hi(t,e,n){var r=!0,i=!0;if(!wi(t))throw new Wo(Z);return n===!1?r=!1:_i(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jt.leading=r,jt.maxWait=+e,jt.trailing=i,$r(t,e,jt)}function ui(t,e){return e=null==e?bo:e,un(e,M,null,[t],[])}function li(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n=xn(t,e,r)?null:e,e=!1),n="function"==typeof n&&Xe(n,r,1),ge(t,e,n)}function ci(t,e,n){return e="function"==typeof e&&Xe(e,n,1),ge(t,!0,e)}function fi(t){var e=y(t)?t.length:C;return Sn(e)&&Ko.call(t)==q||!1}function di(t){return t===!0||t===!1||y(t)&&Ko.call(t)==K||!1}function pi(t){return y(t)&&Ko.call(t)==X||!1}function gi(t){return t&&1===t.nodeType&&y(t)&&Ko.call(t).indexOf("Element")>-1||!1}function vi(t){if(null==t)return!0;var e=t.length;return Sn(e)&&(ja(t)||Ii(t)||fi(t)||y(t)&&wi(t.splice))?!e:!qa(t).length}function mi(t,e,n,r){if(n="function"==typeof n&&Xe(n,r,3),!n&&kn(t)&&kn(e))return t===e;var i=n?n(t,e):C;return"undefined"==typeof i?Be(t,e,n):!!i}function yi(t){return y(t)&&"string"==typeof t.message&&Ko.call(t)==V||!1}function wi(t){return"function"==typeof t||!1}function _i(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}function bi(t,e,n,r){var i=qa(e),o=i.length;if(n="function"==typeof n&&Xe(n,r,3),!n&&1==o){var a=i[0],s=e[a];if(kn(s))return null!=t&&s===t[a]&&qo.call(t,a)}for(var h=Bo(o),u=Bo(o);o--;)s=h[o]=e[i[o]],u[o]=kn(s);return Me(t,i,h,u,n)}function xi(t){return Ei(t)&&t!=+t}function Si(t){return null==t?!1:Ko.call(t)==$?Vo.test(Zo.call(t)):y(t)&&Lt.test(t)||!1}function ki(t){return null===t}function Ei(t){return"number"==typeof t||y(t)&&Ko.call(t)==Q||!1}function Ci(t){return y(t)&&Ko.call(t)==et||!1}function Ii(t){return"string"==typeof t||y(t)&&Ko.call(t)==rt||!1}function Ai(t){return y(t)&&Sn(t.length)&&Wt[Ko.call(t)]||!1}function Li(t){return"undefined"==typeof t}function Ri(t){var e=t?t.length:0;return Sn(e)?e?Vt(t):[]:Vi(t)}function Bi(t){return fe(t,Hi(t))}function Ti(t,e,n){var r=Ra(t);return n&&xn(t,e,n)&&(e=null),e?fe(e,r,qa(e)):r}function Mi(t){if(null==t)return t;var e=Vt(arguments);return e.push(he),Ga.apply(C,e)}function Oi(t,e,n){return e=pn(e,n,3),xe(t,e,Ie,!0)}function Di(t,e,n){return e=pn(e,n,3),xe(t,e,Ae,!0)}function Ui(t,e,n){return("function"!=typeof e||"undefined"!=typeof n)&&(e=Xe(e,n,3)),ke(t,e,Hi)}function Pi(t,e,n){return e=Xe(e,n,3),Ee(t,e,Hi)}function Fi(t,e,n){return("function"!=typeof e||"undefined"!=typeof n)&&(e=Xe(e,n,3)),Ie(t,e)}function zi(t,e,n){return e=Xe(e,n,3),Ee(t,e,qa)}function Wi(t){return Le(t,Hi(t))}function Ni(t,e){return t?qo.call(t,e):!1}function ji(t,e,n){n&&xn(t,e,n)&&(e=null);for(var r=-1,i=qa(t),o=i.length,a={};++r0;++rn?0:+n||0,r))-e.length,n>=0&&t.indexOf(e,n)==n}function no(t){return t=h(t),t&&bt.test(t)?t.replace(wt,g):t}function ro(t){return t=h(t),t&&Mt.test(t)?t.replace(Tt,"\\$&"):t}function io(t,e,n){t=h(t),e=+e;var r=t.length;if(r>=e||!da(e))return t;var i=(e-r)/2,o=ea(i),a=Qo(i);return n=sn("",a,n),n.slice(0,o)+t+n}function oo(t,e,n){return t=h(t),t&&sn(t,e,n)+t}function ao(t,e,n){return t=h(t),t&&t+sn(t,e,n)}function so(t,e,n){return n&&xn(t,e,n)&&(e=0),wa(t,e)}function ho(t,e){var n="";if(t=h(t),e=+e,1>e||!t||!da(e))return n;do e%2&&(n+=t),e=ea(e/2),t+=t;while(e);return n}function uo(t,e,n){return t=h(t),n=null==n?0:va(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function lo(t,n,r){var i=e.templateSettings;r&&xn(t,n,r)&&(n=r=null),t=h(t),n=le(le({},r||n),i,ue);var o,a,s=le(le({},n.imports),i.imports,ue),u=qa(s),l=Ge(s,u),c=0,f=n.interpolate||Bt,d="__p += '",p=Fo((n.escape||Bt).source+"|"+f.source+"|"+(f===kt?Et:Bt).source+"|"+(n.evaluate||Bt).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++zt+"]")+"\n";t.replace(p,function(e,n,r,i,s,h){return r||(r=i),d+=t.slice(c,h).replace(Dt,v),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=h+e.length,e}),d+="';\n";var m=n.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(gt,""):d).replace(vt,"$1").replace(mt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=yo(function(){return Oo(u,g+"return "+d).apply(C,l)});if(y.source=d,yi(y))throw y;return y}function co(t,e,n){var r=t;return(t=h(t))?(n?xn(r,e,n):null==e)?t.slice(x(t),S(t)+1):(e+="",t.slice(l(t,e),c(t,e)+1)):t}function fo(t,e,n){var r=t;return t=h(t),t?t.slice((n?xn(r,e,n):null==e)?x(t):l(t,e+"")):t}function po(t,e,n){var r=t;return t=h(t),t?(n?xn(r,e,n):null==e)?t.slice(0,S(t)+1):t.slice(0,c(t,e+"")+1):t}function go(t,e,n){n&&xn(t,e,n)&&(e=null);var r=P,i=F;if(null!=e)if(_i(e)){var o="separator"in e?e.separator:o;r="length"in e?+e.length||0:r,i="omission"in e?h(e.omission):i}else r=+e||0;if(t=h(t),r>=t.length)return t;var a=r-i.length;if(1>a)return i;var s=t.slice(0,a);if(null==o)return s+i;if(Ci(o)){if(t.slice(a).search(o)){var u,l,c=t.slice(0,a);for(o.global||(o=Fo(o.source,(Ct.exec(o)||"")+"g")),o.lastIndex=0;u=o.exec(c);)l=u.index;s=s.slice(0,null==l?a:l)}}else if(t.indexOf(o,a)!=a){var f=s.lastIndexOf(o);f>-1&&(s=s.slice(0,f))}return s+i}function vo(t){return t=h(t),t&&_t.test(t)?t.replace(yt,k):t}function mo(t,e,n){return n&&xn(t,e,n)&&(e=null),t=h(t),t.match(e||Ut)||[]}function yo(t){try{return t()}catch(e){return yi(e)?e:Mo(e)}}function wo(t,e,n){return n&&xn(t,e,n)&&(e=null),y(t)?xo(t):pe(t,e)}function _o(t){return function(){return t}}function bo(t){return t}function xo(t){return De(ge(t,!0))}function So(t,e,n){if(null==n){var r=_i(e),i=r&&qa(e),o=i&&i.length&&Le(e,i);(o?o.length:r)||(o=!1,n=e,e=t,t=this)}o||(o=Le(e,qa(e)));var a=!0,s=-1,h=wi(t),u=o.length;n===!1?a=!1:_i(n)&&"chain"in n&&(a=n.chain);for(;++st||!da(t))return[];var r=-1,i=Bo(va(t,Sa));for(e=Xe(e,n,1);++rr?i[r]=e(r):e(r);return i}function Ro(t){var e=++Yo;return h(t)+e}t=t?Jt.defaults(Kt.Object(),t,Jt.pick(Kt,Ft)):Kt;var Bo=t.Array,To=t.Date,Mo=t.Error,Oo=t.Function,Do=t.Math,Uo=t.Number,Po=t.Object,Fo=t.RegExp,zo=t.String,Wo=t.TypeError,No=Bo.prototype,jo=Po.prototype,Ho=(Ho=t.window)&&Ho.document,Zo=Oo.prototype.toString,Go=Fe("length"),qo=jo.hasOwnProperty,Yo=0,Ko=jo.toString,Xo=t._,Vo=Fo("^"+ro(Ko).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$o=Si($o=t.ArrayBuffer)&&$o,Jo=Si(Jo=$o&&new $o(0).slice)&&Jo,Qo=Do.ceil,ta=t.clearTimeout,ea=Do.floor,na=Si(na=Po.getPrototypeOf)&&na,ra=No.push,ia=jo.propertyIsEnumerable,oa=Si(oa=t.Set)&&oa,aa=t.setTimeout,sa=No.splice,ha=Si(ha=t.Uint8Array)&&ha,ua=(No.unshift,Si(ua=t.WeakMap)&&ua),la=function(){try{var e=Si(e=t.Float64Array)&&e,n=new e(new $o(10),0,1)&&e}catch(r){}return n}(),ca=Si(ca=Bo.isArray)&&ca,fa=Si(fa=Po.create)&&fa,da=t.isFinite,pa=Si(pa=Po.keys)&&pa,ga=Do.max,va=Do.min,ma=Si(ma=To.now)&&ma,ya=Si(ya=Uo.isFinite)&&ya,wa=t.parseInt,_a=Do.random,ba=Uo.NEGATIVE_INFINITY,xa=Uo.POSITIVE_INFINITY,Sa=Do.pow(2,32)-1,ka=Sa-1,Ea=Sa>>>1,Ca=la?la.BYTES_PER_ELEMENT:0,Ia=Do.pow(2,53)-1,Aa=ua&&new ua,La=e.support={};!function(e){La.funcDecomp=!Si(t.WinRTError)&&Ot.test(E),La.funcNames="string"==typeof Oo.name;try{La.dom=11===Ho.createDocumentFragment().nodeType}catch(n){La.dom=!1}try{La.nonEnumArgs=!ia.call(arguments,1)}catch(n){La.nonEnumArgs=!0}}(0,0),e.templateSettings={escape:xt,evaluate:St,interpolate:kt,variable:"",imports:{_:e}};var Ra=function(){function e(){}return function(n){if(_i(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}(),Ba=Aa?function(t,e){return Aa.set(t,e),t}:bo;Jo||(Ve=$o&&ha?function(t){var e=t.byteLength,n=la?ea(e/Ca):0,r=n*Ca,i=new $o(e);if(n){var o=new la(i,0,n);o.set(new la(t,0,n))}return e!=r&&(o=new ha(i,r),o.set(new ha(t,r))),i}:_o(null));var Ta=fa&&oa?function(t){return new qt(t)}:_o(null),Ma=Aa?function(t){return Aa.get(t)}:Eo,Oa=function(){var t=0,e=0;return function(n,r){var i=Na(),o=W-(i-e);if(e=i,o>0){if(++t>=z)return n}else t=0;return Ba(n,r)}}(),Da=Qe(function(t,e,n){qo.call(t,n)?++t[n]:t[n]=1}),Ua=Qe(function(t,e,n){qo.call(t,n)?t[n].push(e):t[n]=[e]}),Pa=Qe(function(t,e,n){t[n]=e}),Fa=on(re),za=on(ie,!0),Wa=Qe(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Na=ma||function(){return(new To).getTime()},ja=ca||function(t){return y(t)&&Sn(t.length)&&Ko.call(t)==Y||!1};La.dom||(gi=function(t){return t&&1===t.nodeType&&y(t)&&!Za(t)||!1});var Ha=ya||function(t){return"number"==typeof t&&da(t)};(wi(/x/)||ha&&!wi(ha))&&(wi=function(t){return Ko.call(t)==$});var Za=na?function(t){if(!t||Ko.call(t)!=tt)return!1;var e=t.valueOf,n=Si(e)&&(n=na(e))&&na(n);return n?t==n||na(t)==n:Ln(t)}:Ln,Ga=tn(le),qa=pa?function(t){if(t)var e=t.constructor,n=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&n&&Sn(n)?Rn(t):_i(t)?pa(t):[]}:Rn,Ya=tn(Ue),Ka=nn(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),Xa=nn(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});8!=wa(Pt+"08")&&(so=function(t,e,n){return(n?xn(t,e,n):null==e)?e=0:e&&(e=+e),t=co(t),wa(t,e||(At.test(t)?16:10))});var Va=nn(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),$a=nn(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))});return n.prototype=e.prototype,nt.prototype["delete"]=it,nt.prototype.get=Ht,nt.prototype.has=Zt,nt.prototype.set=Gt,qt.prototype.push=Xt,ni.Cache=nt,e.after=Hr,e.ary=Zr,e.assign=Ga,e.at=br,e.before=Gr,e.bind=qr,e.bindAll=Yr,e.bindKey=Kr,e.callback=wo,e.chain=pr,e.chunk=Mn,e.compact=On,e.constant=_o,e.countBy=Da,e.create=Ti,e.curry=Xr,e.curryRight=Vr,e.debounce=$r,e.defaults=Mi,e.defer=Jr,e.delay=Qr,e.difference=Dn,e.drop=Un,e.dropRight=Pn,e.dropRightWhile=Fn,e.dropWhile=zn,e.filter=kr,e.flatten=Hn,e.flattenDeep=Zn,e.flow=ti,e.flowRight=ei,e.forEach=Ar,e.forEachRight=Lr,e.forIn=Ui,e.forInRight=Pi,e.forOwn=Fi,e.forOwnRight=zi,e.functions=Wi,e.groupBy=Ua,e.indexBy=Pa,e.initial=qn,e.intersection=Yn,e.invert=ji,e.invoke=Rr,e.keys=qa,e.keysIn=Hi,e.map=Br,e.mapValues=Zi,e.matches=xo,e.memoize=ni,e.merge=Ya,e.mixin=So,e.negate=ri,e.omit=Gi,e.once=ii,e.pairs=qi,e.partial=oi,e.partialRight=ai,e.partition=Wa,e.pick=Yi, +e.pluck=Tr,e.property=Co,e.propertyOf=Io,e.pull=Vn,e.pullAt=$n,e.range=Ao,e.rearg=si,e.reject=Dr,e.remove=Jn,e.rest=Qn,e.shuffle=Pr,e.slice=tr,e.sortBy=Wr,e.sortByAll=Nr,e.take=rr,e.takeRight=ir,e.takeRightWhile=or,e.takeWhile=ar,e.tap=gr,e.throttle=hi,e.thru=vr,e.times=Lo,e.toArray=Ri,e.toPlainObject=Bi,e.transform=Xi,e.union=sr,e.uniq=hr,e.unzip=ur,e.values=Vi,e.valuesIn=$i,e.where=jr,e.without=lr,e.wrap=ui,e.xor=cr,e.zip=fr,e.zipObject=dr,e.backflow=ei,e.collect=Br,e.compose=ei,e.each=Ar,e.eachRight=Lr,e.extend=Ga,e.iteratee=wo,e.methods=Wi,e.object=dr,e.select=kr,e.tail=Qn,e.unique=hr,So(e,e),e.attempt=yo,e.camelCase=Ka,e.capitalize=Qi,e.clone=li,e.cloneDeep=ci,e.deburr=to,e.endsWith=eo,e.escape=no,e.escapeRegExp=ro,e.every=Sr,e.find=Er,e.findIndex=Wn,e.findKey=Oi,e.findLast=Cr,e.findLastIndex=Nn,e.findLastKey=Di,e.findWhere=Ir,e.first=jn,e.has=Ni,e.identity=bo,e.includes=xr,e.indexOf=Gn,e.isArguments=fi,e.isArray=ja,e.isBoolean=di,e.isDate=pi,e.isElement=gi,e.isEmpty=vi,e.isEqual=mi,e.isError=yi,e.isFinite=Ha,e.isFunction=wi,e.isMatch=bi,e.isNaN=xi,e.isNative=Si,e.isNull=ki,e.isNumber=Ei,e.isObject=_i,e.isPlainObject=Za,e.isRegExp=Ci,e.isString=Ii,e.isTypedArray=Ai,e.isUndefined=Li,e.kebabCase=Xa,e.last=Kn,e.lastIndexOf=Xn,e.max=Fa,e.min=za,e.noConflict=ko,e.noop=Eo,e.now=Na,e.pad=io,e.padLeft=oo,e.padRight=ao,e.parseInt=so,e.random=Ji,e.reduce=Mr,e.reduceRight=Or,e.repeat=ho,e.result=Ki,e.runInContext=E,e.size=Fr,e.snakeCase=Va,e.some=zr,e.sortedIndex=er,e.sortedLastIndex=nr,e.startCase=$a,e.startsWith=uo,e.template=lo,e.trim=co,e.trimLeft=fo,e.trimRight=po,e.trunc=go,e.unescape=vo,e.uniqueId=Ro,e.words=mo,e.all=Sr,e.any=zr,e.contains=xr,e.detect=Er,e.foldl=Mr,e.foldr=Or,e.head=jn,e.include=xr,e.inject=Mr,So(e,function(){var t={};return Ie(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.sample=Ur,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return Ur(e,t)}):Ur(this.value())},e.VERSION=I,$t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),$t(["filter","map","takeWhile"],function(t,e){var n=e==N;r.prototype[t]=function(t,r){var i=this.clone(),o=i.filtered,a=i.iteratees||(i.iteratees=[]);return i.filtered=o||n||e==H&&i.dir<0,a.push({iteratee:pn(t,r,3),type:e}),i}}),$t(["drop","take"],function(t,e){var n=t+"Count",i=t+"While";r.prototype[t]=function(r){r=null==r?1:ga(+r||0,0);var i=this.clone();if(i.filtered){var o=i[n];i[n]=e?va(o,r):o+r}else{var a=i.views||(i.views=[]);a.push({size:r,type:t+(i.dir<0?"Right":"")})}return i},r.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()},r.prototype[t+"RightWhile"]=function(t,e){return this.reverse()[i](t,e).reverse()}}),$t(["first","last"],function(t,e){var n="take"+(e?"Right":"");r.prototype[t]=function(){return this[n](1).value()[0]}}),$t(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");r.prototype[t]=function(){return this[n](1)}}),$t(["pluck","where"],function(t,e){var n=e?"filter":"map",i=e?De:Fe;r.prototype[t]=function(t){return this[n](i(e?t:t+""))}}),r.prototype.dropWhile=function(t,e){var n,r,i=this.dir<0;return t=pn(t,e,3),this.filter(function(e,o,a){return n=n&&(i?r>o:o>r),r=o,n||(n=!t(e,o,a))})},r.prototype.reject=function(t,e){return t=pn(t,e,3),this.filter(function(e,n,r){return!t(e,n,r)})},r.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=0>t?this.takeRight(-t):this.drop(t);return"undefined"!=typeof e&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},Ie(r.prototype,function(t,i){var o=e[i],a=/^(?:first|last)$/.test(i);e.prototype[i]=function(){var i=this.__wrapped__,s=arguments,h=this.__chain__,u=!!this.__actions__.length,l=i instanceof r,c=l&&!u;if(a&&!h)return c?t.call(i):o.call(e,this.value());var f=function(t){var n=[t];return ra.apply(n,s),o.apply(e,n)};if(l||ja(i)){var d=c?i:new r(this),p=t.apply(d,s);if(!a&&(u||p.actions)){var g=p.actions||(p.actions=[]);g.push({func:vr,args:[f],thisArg:e})}return new n(p,h)}return this.thru(f)}}),$t(["concat","join","pop","push","shift","sort","splice","unshift"],function(t){var n=No[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),r.prototype.clone=i,r.prototype.reverse=w,r.prototype.value=J,e.prototype.chain=mr,e.prototype.reverse=yr,e.prototype.toString=wr,e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=_r,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var C,I="3.1.0",A=1,L=2,R=4,B=8,T=16,M=32,O=64,D=128,U=256,P=30,F="...",z=150,W=16,N=0,j=1,H=2,Z="Expected a function",G="__lodash_placeholder__",q="[object Arguments]",Y="[object Array]",K="[object Boolean]",X="[object Date]",V="[object Error]",$="[object Function]",J="[object Map]",Q="[object Number]",tt="[object Object]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object WeakMap]",ot="[object ArrayBuffer]",at="[object Float32Array]",st="[object Float64Array]",ht="[object Int8Array]",ut="[object Int16Array]",lt="[object Int32Array]",ct="[object Uint8Array]",ft="[object Uint8ClampedArray]",dt="[object Uint16Array]",pt="[object Uint32Array]",gt=/\b__p \+= '';/g,vt=/\b(__p \+=) '' \+/g,mt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yt=/&(?:amp|lt|gt|quot|#39|#96);/g,wt=/[&<>"'`]/g,_t=RegExp(yt.source),bt=RegExp(wt.source),xt=/<%-([\s\S]+?)%>/g,St=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,Et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ct=/\w*$/,It=/^\s*function[ \n\r\t]+\w/,At=/^0[xX]/,Lt=/^\[object .+?Constructor\]$/,Rt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Bt=/($^)/,Tt=/[.*+?^${}()|[\]\/\\]/g,Mt=RegExp(Tt.source),Ot=/\bthis\b/,Dt=/['\n\r\u2028\u2029\\]/g,Ut=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"{2,}(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),Pt=" \f \ufeff\n\r\u2028\u2029 ᠎              ",Ft=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window","WinRTError"],zt=-1,Wt={};Wt[at]=Wt[st]=Wt[ht]=Wt[ut]=Wt[lt]=Wt[ct]=Wt[ft]=Wt[dt]=Wt[pt]=!0,Wt[q]=Wt[Y]=Wt[ot]=Wt[K]=Wt[X]=Wt[V]=Wt[$]=Wt[J]=Wt[Q]=Wt[tt]=Wt[et]=Wt[nt]=Wt[rt]=Wt[it]=!1;var Nt={};Nt[q]=Nt[Y]=Nt[ot]=Nt[K]=Nt[X]=Nt[at]=Nt[st]=Nt[ht]=Nt[ut]=Nt[lt]=Nt[Q]=Nt[tt]=Nt[et]=Nt[rt]=Nt[ct]=Nt[ft]=Nt[dt]=Nt[pt]=!0,Nt[V]=Nt[$]=Nt[J]=Nt[nt]=Nt[it]=!1;var jt={leading:!1,maxWait:0,trailing:!1},Ht={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Zt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Gt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},qt={"function":!0,object:!0},Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kt=qt[typeof window]&&window!==(this&&this.window)?window:this,Xt=qt[typeof e]&&e&&!e.nodeType&&e,Vt=qt[typeof t]&&t&&!t.nodeType&&t,$t=Xt&&Vt&&"object"==typeof i&&i;!$t||$t.global!==$t&&$t.window!==$t&&$t.self!==$t||(Kt=$t);var Jt=(Vt&&Vt.exports===Xt&&Xt,E());Kt._=Jt,r=function(){return Jt}.call(e,n,e,t),!(r!==C&&(t.exports=r))}).call(this)}).call(e,n(15)(t),function(){return this}())},function(t,e,n){(function(e){(function(){var r,i,o,a=function(t,e){return function(){return t.apply(e,arguments)}};o=n(45),i=function(){function t(t,e,n){this.document=t,this.id=e,this.data=null!=n?n:{},this.finalize=a(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return t.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=o.createDeflate(),this.deflate.on("data",function(t){return function(e){return t.chunks.push(e),t.data.Length+=e.length}}(this)),this.deflate.on("end",this.finalize)},t.prototype.write=function(t){var n;return e.isBuffer(t)||(t=new e(t+"\n","binary")),this.uncompressedLength+=t.length,null==(n=this.data).Length&&(n.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(t)):(this.chunks.push(t),this.data.Length+=t.length)},t.prototype.end=function(t){return("string"==typeof t||e.isBuffer(t))&&this.write(t),this.deflate?this.deflate.end():this.finalize()},t.prototype.finalize=function(){var t,e,n,i;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(r.convert(this.data)),this.chunks.length){for(this.document._write("stream"),i=this.chunks,e=0,n=i.length;n>e;e++)t=i[e],this.document._write(t);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},t.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},t}(),t.exports=i,r=n(32)}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,n){(function(e){t.exports=e}).call(e,{})},function(t,e,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t,e,n){this.MAX_CHAR_TYPES=92,this.pdfkitDoc=t,this.path=e,this.pdfFonts=[],this.charCatalogue=[],this.name=n,this.__defineGetter__("ascender",function(){var t=this.getFont(0);return t.ascender}),this.__defineGetter__("decender",function(){var t=this.getFont(0);return t.decender})}var i=n(11);r.prototype.getFont=function(t){if(!this.pdfFonts[t]){var e=this.name+t;this.postscriptName&&delete this.pdfkitDoc._fontFamilies[this.postscriptName],this.pdfFonts[t]=this.pdfkitDoc.font(this.path,e)._font,this.postscriptName||(this.postscriptName=this.pdfFonts[t].name)}return this.pdfFonts[t]},r.prototype.widthOfString=function(){var t=this.getFont(0);return t.widthOfString.apply(t,arguments)},r.prototype.lineHeight=function(){var t=this.getFont(0);return t.lineHeight.apply(t,arguments)},r.prototype.ref=function(){var t=this.getFont(0);return t.ref.apply(t,arguments)};var o=function(t){return t.charCodeAt(0)};r.prototype.encode=function(t){var e=this,n=i.chain(t.split("")).map(o).uniq().value();if(n.length>e.MAX_CHAR_TYPES)throw new Error("Inline has more than "+e.MAX_CHAR_TYPES+": "+t+" different character types and therefore cannot be properly embedded into pdf.");var r=function(t){return i.uniq(t.concat(n)).length<=e.MAX_CHAR_TYPES},a=i.findIndex(e.charCatalogue,r);0>a&&(a=e.charCatalogue.length,e.charCatalogue[a]=[]);var s=this.getFont(a);s.use(t),i.each(n,function(t){i.includes(e.charCatalogue[a],t)||e.charCatalogue[a].push(t)});var h=i.map(s.encode(t),function(t){return t.charCodeAt(0).toString(16)}).join("");return{encodedText:h,fontId:s.id}},t.exports=r},function(t,e,n){(function(e){(function(){var r,i,o,a,s;s=n(10),r=n(34),i=n(35),a=n(36),o=function(){function t(){}return t.open=function(t,n){var r,o;if(e.isBuffer(t))r=t;else if(o=/^data:.+;base64,(.*)$/.exec(t))r=new e(o[1],"base64");else if(r=s.readFileSync(t),!r)return;if(255===r[0]&&216===r[1])return new i(r,n);if(137===r[0]&&"PNG"===r.toString("ascii",1,4))return new a(r,n);throw new Error("Unknown image format.")},t}(),t.exports=o}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(){this.events={}}r.prototype.startTracking=function(t,e){var n=this.events[t]||(this.events[t]=[]);n.indexOf(e)<0&&n.push(e)},r.prototype.stopTracking=function(t,e){var n=this.events[t];if(n){var r=n.indexOf(e);r>=0&&n.splice(r,1)}},r.prototype.emit=function(t){var e=Array.prototype.slice.call(arguments,1),n=this.events[t];n&&n.forEach(function(t){t.apply(this,e)})},r.prototype.auto=function(t,e,n){this.startTracking(t,e),n(),this.stopTracking(t,e)},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,a,s){this.textTools=new i(t),this.styleStack=new o(e,n),this.imageMeasure=r,this.tableLayouts=a,this.images=s,this.autoImageIndex=1}var i=n(26),o=n(27),a=n(22),s=n(25).fontStringify,h=n(25).pack,u=n(33);r.prototype.measureDocument=function(t){return this.measureNode(t)},r.prototype.measureNode=function(t){function e(t){var e=t._margin;return e&&(t._minWidth+=e[0]+e[2],t._maxWidth+=e[0]+e[2]),t}function n(){function e(t,e){return t.marginLeft||t.marginTop||t.marginRight||t.marginBottom?[t.marginLeft||e[0]||0,t.marginTop||e[1]||0,t.marginRight||e[2]||0,t.marginBottom||e[3]||0]:e}function n(t){for(var e={},n=t.length-1;n>=0;n--){var i=t[n],o=r.styleStack.styleDictionary[i];for(var a in o)o.hasOwnProperty(a)&&(e[a]=o[a])}return e}function i(t){return"number"==typeof t||t instanceof Number?t=[t,t,t,t]:t instanceof Array&&2===t.length&&(t=[t[0],t[1],t[0],t[1]]),t}var o=[void 0,void 0,void 0,void 0];if(t.style){var a=t.style instanceof Array?t.style:[t.style],s=n(a);s&&(o=e(s,o)),s.margin&&(o=i(s.margin))}return o=e(t,o),t.margin&&(o=i(t.margin)),void 0===o[0]&&void 0===o[1]&&void 0===o[2]&&void 0===o[3]?null:o}t instanceof Array?t={stack:t}:("string"==typeof t||t instanceof String)&&(t={text:t});var r=this;return this.styleStack.auto(t,function(){if(t._margin=n(t),t.columns)return e(r.measureColumns(t));if(t.stack)return e(r.measureVerticalContainer(t));if(t.ul)return e(r.measureList(!1,t));if(t.ol)return e(r.measureList(!0,t));if(t.table)return e(r.measureTable(t));if(void 0!==t.text)return e(r.measureLeaf(t));if(t.image)return e(r.measureImage(t));if(t.canvas)return e(r.measureCanvas(t));if(t.qr)return e(r.measureQr(t));throw"Unrecognized document structure: "+JSON.stringify(t,s)})},r.prototype.convertIfBase64Image=function(t){if(/^data:image\/(jpeg|jpg|png);base64,/.test(t.image)){var e="$$pdfmake$$"+this.autoImageIndex++;this.images[e]=t.image,t.image=e}},r.prototype.measureImage=function(t){this.images&&this.convertIfBase64Image(t);var e=this.imageMeasure.measureImage(t.image);if(t.fit){var n=e.width/e.height>t.fit[0]/t.fit[1]?t.fit[0]/e.width:t.fit[1]/e.height;t._width=t._minWidth=t._maxWidth=e.width*n,t._height=e.height*n}else t._width=t._minWidth=t._maxWidth=t.width||e.width,t._height=t.height||e.height*t._width/e.width;return t._alignment=this.styleStack.getProperty("alignment"),t},r.prototype.measureLeaf=function(t){var e=this.textTools.buildInlines(t.text,this.styleStack);return t._inlines=e.items,t._minWidth=e.minWidth,t._maxWidth=e.maxWidth,t},r.prototype.measureVerticalContainer=function(t){var e=t.stack;t._minWidth=0,t._maxWidth=0;for(var n=0,r=e.length;r>n;n++)e[n]=this.measureNode(e[n]),t._minWidth=Math.max(t._minWidth,e[n]._minWidth),t._maxWidth=Math.max(t._maxWidth,e[n]._maxWidth);return t},r.prototype.gapSizeForList=function(t,e){if(t){var n=e.length.toString().replace(/./g,"9");return this.textTools.sizeOfString(n+". ",this.styleStack)}return this.textTools.sizeOfString("9. ",this.styleStack)},r.prototype.buildMarker=function(t,e,n,r){var i;if(t)i={_inlines:this.textTools.buildInlines(e,n).items};else{var o=r.fontSize/6;i={canvas:[{x:o,y:r.height/r.lineHeight+r.decender-r.fontSize/3,r1:o,r2:o,type:"ellipse",color:"black"}]}}return i._minWidth=i._maxWidth=r.width,i._minHeight=i._maxHeight=r.height,i},r.prototype.measureList=function(t,e){var n=this.styleStack.clone(),r=t?e.ol:e.ul;e._gapSize=this.gapSizeForList(t,r),e._minWidth=0,e._maxWidth=0;for(var i=1,o=0,a=r.length;a>o;o++){var s=r[o]=this.measureNode(r[o]),h=i++ +". ";s.ol||s.ul||(s.listMarker=this.buildMarker(t,s.counter||h,n,e._gapSize)),e._minWidth=Math.max(e._minWidth,r[o]._minWidth+e._gapSize.width),e._maxWidth=Math.max(e._maxWidth,r[o]._maxWidth+e._gapSize.width)}return e},r.prototype.measureColumns=function(t){var e=t.columns;t._gap=this.styleStack.getProperty("columnGap")||0;for(var n=0,r=e.length;r>n;n++)e[n]=this.measureNode(e[n]);var i=a.measureMinMax(e);return t._minWidth=i.min+t._gap*(e.length-1),t._maxWidth=i.max+t._gap*(e.length-1),t},r.prototype.measureTable=function(t){function e(t,e){return function(){return null!==e&&"object"==typeof e&&(e.fillColor=t.styleStack.getProperty("fillColor")),t.measureNode(e)}}function n(e){var n=t.layout;("string"==typeof t.layout||t instanceof String)&&(n=e[n]);var r={hLineWidth:function(t,e){return 1},vLineWidth:function(t,e){return 1},hLineColor:function(t,e){return"black"},vLineColor:function(t,e){return"black"},paddingLeft:function(t,e){return 4},paddingRight:function(t,e){return 4},paddingTop:function(t,e){return 2},paddingBottom:function(t,e){return 2}};return h(r,n)}function r(e){for(var n=[],r=0,i=0,o=0,a=t.table.widths.length;a>o;o++){var s=i+e.vLineWidth(o,t)+e.paddingLeft(o,t);n.push(s),r+=s,i=e.paddingRight(o,t)}return r+=i+e.vLineWidth(t.table.widths.length,t),{total:r,offsets:n}}function i(){for(var e,n,r=0,i=g.length;i>r;r++){var a=g[r],s=o(a.col,a.span,t._offsets),h=a.minWidth-s.minWidth,u=a.maxWidth-s.maxWidth;if(h>0)for(e=h/a.span,n=0;n0)for(e=u/a.span,n=0;no;o++)i.minWidth+=t.table.widths[e+o]._minWidth+(o?r.offsets[e+o]:0),i.maxWidth+=t.table.widths[e+o]._maxWidth+(o?r.offsets[e+o]:0);return i}function s(t,e,n){for(var r=1;n>r;r++)t[e+r]={_span:!0,_minWidth:0,_maxWidth:0,rowSpan:t[e].rowSpan}}function u(t,e,n,r){for(var i=1;r>i;i++)t.body[e+i][n]={_span:!0,_minWidth:0,_maxWidth:0,fillColor:t.body[e][n].fillColor}}function l(t){if(t.table.widths||(t.table.widths="auto"),"string"==typeof t.table.widths||t.table.widths instanceof String)for(t.table.widths=[t.table.widths];t.table.widths.lengthe;e++){var r=t.table.widths[e];("number"==typeof r||r instanceof Number||"string"==typeof r||r instanceof String)&&(t.table.widths[e]={width:r})}}l(t),t._layout=n(this.tableLayouts),t._offsets=r(t._layout);var c,f,d,p,g=[];for(c=0,d=t.table.body[0].length;d>c;c++){var v=t.table.widths[c];for(v._minWidth=0,v._maxWidth=0,f=0,p=t.table.body.length;p>f;f++){var m=t.table.body[f],y=m[c];if(!y._span){y=m[c]=this.styleStack.auto(y,e(this,y)),y.colSpan&&y.colSpan>1?(s(m,c,y.colSpan),g.push({col:c,span:y.colSpan,minWidth:y._minWidth,maxWidth:y._maxWidth})):(v._minWidth=Math.max(v._minWidth,y._minWidth),v._maxWidth=Math.max(v._maxWidth,y._maxWidth))}y.rowSpan&&y.rowSpan>1&&u(t.table,f,c,y.rowSpan)}}i();var w=a.measureMinMax(t.table.widths);return t._minWidth=w.min+t._offsets.total,t._maxWidth=w.max+t._offsets.total,t},r.prototype.measureCanvas=function(t){for(var e=0,n=0,r=0,i=t.canvas.length;i>r;r++){var o=t.canvas[r];switch(o.type){case"ellipse":e=Math.max(e,o.x+o.r1),n=Math.max(n,o.y+o.r2);break;case"rect":e=Math.max(e,o.x+o.w),n=Math.max(n,o.y+o.h);break;case"line":e=Math.max(e,o.x1,o.x2),n=Math.max(n,o.y1,o.y2);break;case"polyline":for(var a=0,s=o.points.length;s>a;a++)e=Math.max(e,o.points[a].x),n=Math.max(n,o.points[a].y)}}return t._minWidth=t._maxWidth=e,t._minHeight=t._maxHeight=n,t},r.prototype.measureQr=function(t){return t=u.measure(t),t._alignment=this.styleStack.getProperty("alignment"),t},t.exports=r},function(t,e,n){"use strict";function r(t,e){this.pages=[],this.pageMargins=e,this.x=e.left,this.availableWidth=t.width-e.left-e.right,this.availableHeight=0,this.page=-1,this.snapshots=[],this.endingCell=null,this.tracker=new a,this.addPage(t)}function i(t,e){return void 0===t?e:"landscape"===t?"landscape":"portrait"}function o(t,e){var n;return n=t.page>e.page?t:e.page>t.page?e:t.y>e.y?t:e,{page:n.page,x:n.x,y:n.y,availableHeight:n.availableHeight,availableWidth:n.availableWidth}}var a=n(18);r.prototype.beginColumnGroup=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,bottomMost:{y:this.y,page:this.page},endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth}),this.lastColumnWidth=0},r.prototype.beginColumn=function(t,e,n){var r=this.snapshots[this.snapshots.length-1];this.calculateBottomMost(r),this.endingCell=n,this.page=r.page,this.x=this.x+this.lastColumnWidth+(e||0),this.y=r.y,this.availableWidth=t,this.availableHeight=r.availableHeight,this.lastColumnWidth=t},r.prototype.calculateBottomMost=function(t){this.endingCell?(this.saveContextInEndingCell(this.endingCell),this.endingCell=null):t.bottomMost=o(this,t.bottomMost)},r.prototype.markEnding=function(t){this.page=t._columnEndingContext.page,this.x=t._columnEndingContext.x,this.y=t._columnEndingContext.y,this.availableWidth=t._columnEndingContext.availableWidth,this.availableHeight=t._columnEndingContext.availableHeight,this.lastColumnWidth=t._columnEndingContext.lastColumnWidth},r.prototype.saveContextInEndingCell=function(t){t._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},r.prototype.completeColumnGroup=function(){var t=this.snapshots.pop();this.calculateBottomMost(t),this.endingCell=null,this.x=t.x,this.y=t.bottomMost.y,this.page=t.bottomMost.page,this.availableWidth=t.availableWidth,this.availableHeight=t.bottomMost.availableHeight,this.lastColumnWidth=t.lastColumnWidth},r.prototype.addMargin=function(t,e){this.x+=t,this.availableWidth-=t+(e||0)},r.prototype.moveDown=function(t){return this.y+=t,this.availableHeight-=t,this.availableHeight>0},r.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},r.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},r.prototype.moveTo=function(t,e){void 0!==t&&null!==t&&(this.x=t,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),void 0!==e&&null!==e&&(this.y=e,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},r.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},r.prototype.endDetachedBlock=function(){var t=this.snapshots.pop();this.x=t.x,this.y=t.y,this.availableWidth=t.availableWidth,this.availableHeight=t.availableHeight,this.page=t.page,this.endingCell=t.endingCell,this.lastColumnWidth=t.lastColumnWidth};var s=function(t,e){return e=i(e,t.pageSize.orientation),e!==t.pageSize.orientation?{orientation:e,width:t.pageSize.height,height:t.pageSize.width}:{orientation:t.pageSize.orientation,width:t.pageSize.width,height:t.pageSize.height}};r.prototype.moveToNextPage=function(t){var e=this.page+1,n=this.page,r=this.y,i=e>=this.pages.length;return i?this.addPage(s(this.getCurrentPage(),t)):(this.page=e,this.initializePage()),{newPageCreated:i,prevPage:n,prevY:r,y:this.y}},r.prototype.addPage=function(t){var e={items:[],pageSize:t};return this.pages.push(e),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),e},r.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},r.prototype.getCurrentPosition=function(){var t=this.getCurrentPage().pageSize,e=t.height-this.pageMargins.top-this.pageMargins.bottom,n=t.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:t.orientation,pageInnerHeight:e,pageInnerWidth:n,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/e,horizontalRatio:(this.x-this.pageMargins.left)/n}},t.exports=r},function(t,e,n){"use strict";function r(t,e){this.transactionLevel=0,this.repeatables=[],this.tracker=e,this.writer=new o(t,e)}function i(t,e){var n=e(t);return n||(t.moveToNextPage(),n=e(t)),n}var o=n(37);r.prototype.addLine=function(t,e,n){return i(this,function(r){return r.writer.addLine(t,e,n)})},r.prototype.addImage=function(t,e){return i(this,function(n){return n.writer.addImage(t,e)})},r.prototype.addQr=function(t,e){return i(this,function(n){return n.writer.addQr(t,e)})},r.prototype.addVector=function(t,e,n,r){return this.writer.addVector(t,e,n,r)},r.prototype.addFragment=function(t,e,n,r){this.writer.addFragment(t,e,n,r)||(this.moveToNextPage(),this.writer.addFragment(t,e,n,r))},r.prototype.moveToNextPage=function(t){var e=this.writer.context.moveToNextPage(t);e.newPageCreated?this.repeatables.forEach(function(t){this.writer.addFragment(t,!0)},this):this.repeatables.forEach(function(t){this.writer.context.moveDown(t.height)},this),this.writer.tracker.emit("pageChanged",{prevPage:e.prevPage,prevY:e.prevY,y:e.y})},r.prototype.beginUnbreakableBlock=function(t,e){0===this.transactionLevel++&&(this.originalX=this.writer.context.x,this.writer.pushContext(t,e))},r.prototype.commitUnbreakableBlock=function(t,e){if(0===--this.transactionLevel){var n=this.writer.context;this.writer.popContext();var r=n.pages.length;if(r>0){var i=n.pages[0];if(i.xOffset=t,i.yOffset=e,r>1)if(void 0!==t||void 0!==e)i.height=n.getCurrentPage().pageSize.height-n.pageMargins.top-n.pageMargins.bottom;else{i.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var o=0,a=this.repeatables.length;a>o;o++)i.height-=this.repeatables[o].height}else i.height=n.y;void 0!==t||void 0!==e?this.writer.addFragment(i,!0,!0,!0):this.addFragment(i)}}},r.prototype.currentBlockToRepeatable=function(){var t=this.writer.context,e={items:[]};return t.pages[0].items.forEach(function(t){e.items.push(t)}),e.xOffset=this.originalX,e.height=t.y,e},r.prototype.pushToRepeatables=function(t){this.repeatables.push(t)},r.prototype.popFromRepeatables=function(){this.repeatables.pop()},r.prototype.context=function(){return this.writer.context},t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=[],r=0,a=0,s=[],h=0,u=0,l=[],c=e;t.forEach(function(t){i(t)?(n.push(t),r+=t._minWidth,a+=t._maxWidth):o(t)?(s.push(t),h=Math.max(h,t._minWidth),u=Math.max(u,t._maxWidth)):l.push(t)}),l.forEach(function(t){"string"==typeof t.width&&/\d+%/.test(t.width)&&(t.width=parseFloat(t.width)*c/100),t._calcWidth=t.width=e)n.forEach(function(t){t._calcWidth=t._minWidth}),s.forEach(function(t){t._calcWidth=h});else{if(e>d)n.forEach(function(t){t._calcWidth=t._maxWidth,e-=t._calcWidth});else{var p=e-f,g=d-f;n.forEach(function(t){var n=t._maxWidth-t._minWidth;t._calcWidth=t._minWidth+n*p/g,e-=t._calcWidth})}if(s.length>0){var v=e/s.length;s.forEach(function(t){t._calcWidth=v})}}}function i(t){return"auto"===t.width}function o(t){return null===t.width||void 0===t.width||"*"===t.width||"star"===t.width}function a(t){for(var e={min:0,max:0},n={min:0,max:0},r=0,a=0,s=t.length;s>a;a++){var h=t[a];o(h)?(n.min=Math.max(n.min,h._minWidth),n.max=Math.max(n.max,h._maxWidth),r++):i(h)?(e.min+=h._minWidth,e.max+=h._maxWidth):(e.min+=void 0!==h.width&&h.width||h._minWidth,e.max+=void 0!==h.width&&h.width||h._maxWidth)}return r&&(e.min+=r*n.min,e.max+=r*n.max),e}t.exports={buildColumnWidths:r,measureMinMax:a,isAutoColumn:i,isStarColumn:o}},function(t,e,n){"use strict";function r(t){this.tableNode=t}var i=n(22);r.prototype.beginTable=function(t){function e(){var t=0;return r.table.widths.forEach(function(e){t+=e._calcWidth}),t}function n(){var t=[],e=0,n=0;t.push({left:0,rowSpan:0});for(var r=0,i=a.tableNode.table.body[0].length;i>r;r++){var o=a.layout.paddingLeft(r,a.tableNode)+a.layout.paddingRight(r,a.tableNode),s=a.layout.vLineWidth(r,a.tableNode);n=o+s+a.tableNode.table.widths[r]._calcWidth,t[t.length-1].width=n,e+=n,t.push({left:e,rowSpan:0,width:0})}return t}var r,o,a=this;r=this.tableNode,this.offsets=r._offsets,this.layout=r._layout,o=t.context().availableWidth-this.offsets.total,i.buildColumnWidths(r.table.widths,o),this.tableWidth=r._offsets.total+e(),this.rowSpanData=n(),this.cleanUpRepeatables=!1,this.headerRows=r.table.headerRows||0,this.rowsWithoutPageBreak=this.headerRows+(r.table.keepWithHeaderRows||0),this.dontBreakRows=r.table.dontBreakRows||!1,this.rowsWithoutPageBreak&&t.beginUnbreakableBlock(),this.drawHorizontalLine(0,t)},r.prototype.onRowBreak=function(t,e){var n=this;return function(){var t=n.rowPaddingTop+(n.headerRows?0:n.topLineWidth);e.context().moveDown(t)}},r.prototype.beginRow=function(t,e){this.topLineWidth=this.layout.hLineWidth(t,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(t,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(t+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(t,this.tableNode),this.rowCallback=this.onRowBreak(t,e),e.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&e.beginUnbreakableBlock(),this.rowTopY=e.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,e.context().availableHeight-=this.reservedAtBottom,e.context().moveDown(this.rowPaddingTop)},r.prototype.drawHorizontalLine=function(t,e,n){var r=this.layout.hLineWidth(t,this.tableNode);if(r){for(var i=r/2,o=null,a=0,s=this.rowSpanData.length;s>a;a++){var h=this.rowSpanData[a],u=!h.rowSpan;!o&&u&&(o={left:h.left,width:0}),u&&(o.width+=h.width||0);var l=(n||0)+i;u&&a!==s-1||o&&(e.addVector({type:"line",x1:o.left,x2:o.left+o.width,y1:l,y2:l,lineWidth:r,lineColor:"function"==typeof this.layout.hLineColor?this.layout.hLineColor(t,this.tableNode):this.layout.hLineColor},!1,n),o=null)}e.context().moveDown(r)}},r.prototype.drawVerticalLine=function(t,e,n,r,i){var o=this.layout.vLineWidth(r,this.tableNode);0!==o&&i.addVector({type:"line",x1:t+o/2,x2:t+o/2,y1:e,y2:n,lineWidth:o,lineColor:"function"==typeof this.layout.vLineColor?this.layout.vLineColor(r,this.tableNode):this.layout.vLineColor},!1,!0)},r.prototype.endTable=function(t){this.cleanUpRepeatables&&t.popFromRepeatables()},r.prototype.endRow=function(t,e,n){function r(){for(var e=[],n=0,r=0,i=a.tableNode.table.body[t].length;i>r;r++){if(!n){e.push({x:a.rowSpanData[r].left,index:r});var o=a.tableNode.table.body[t][r];n=o._colSpan||o.colSpan||0}n>0&&n--}return e.push({x:a.rowSpanData[a.rowSpanData.length-1].left,index:a.rowSpanData.length-1}),e}var i,o,a=this;e.tracker.stopTracking("pageChanged",this.rowCallback),e.context().moveDown(this.layout.paddingBottom(t,this.tableNode)),e.context().availableHeight+=this.reservedAtBottom;var s=e.context().page,h=e.context().y,u=r(),l=[],c=n&&n.length>0;if(l.push({y0:this.rowTopY,page:c?n[0].prevPage:s}),c)for(o=0,i=n.length;i>o;o++){var f=n[o];l[l.length-1].y1=f.prevY,l.push({y0:f.y,page:f.prevPage+1})}l[l.length-1].y1=h;for(var d=l[0].y1-l[0].y0===this.rowPaddingTop,p=d?1:0,g=l.length;g>p;p++){var v=p0&&!this.headerRows,y=m?0:this.topLineWidth,w=l[p].y0,_=l[p].y1;for(v&&(_+=this.rowPaddingBottom),e.context().page!=l[p].page&&(e.context().page=l[p].page,this.reservedAtBottom=0),o=0,i=u.length;i>o;o++)if(this.drawVerticalLine(u[o].x,w-y,_+this.bottomLineWidth,u[o].index,e),i-1>o){var b=u[o].index,x=this.tableNode.table.body[t][b].fillColor;if(x){var S=this.layout.vLineWidth(b,this.tableNode),k=u[o].x+S,E=w-y;e.addVector({type:"rect",x:k,y:E,w:u[o+1].x-k,h:_+this.bottomLineWidth-E,lineWidth:0,color:x},!1,!0,0)}}v&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(t+1,e,_),m&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(t,e,w); + +}e.context().page=s,e.context().y=h;var C=this.tableNode.table.body[t];for(o=0,i=C.length;i>o;o++){if(C[o].rowSpan&&(this.rowSpanData[o].rowSpan=C[o].rowSpan,C[o].colSpan&&C[o].colSpan>1))for(var I=1;I0&&this.rowSpanData[o].rowSpan--}this.drawHorizontalLine(t+1,e),this.headerRows&&t===this.headerRows-1&&(this.headerRepeatable=e.currentBlockToRepeatable()),this.dontBreakRows&&e.tracker.auto("pageChanged",function(){a.drawHorizontalLine(t,e)},function(){e.commitUnbreakableBlock(),a.drawHorizontalLine(t,e)}),!this.headerRepeatable||t!==this.rowsWithoutPageBreak-1&&t!==this.tableNode.table.body.length-1||(e.commitUnbreakableBlock(),e.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},t.exports=r},function(t,e,n){"use strict";function r(t){this.maxWidth=t,this.leadingCut=0,this.trailingCut=0,this.inlineWidths=0,this.inlines=[]}r.prototype.getAscenderHeight=function(){var t=0;return this.inlines.forEach(function(e){t=Math.max(t,e.font.ascender/1e3*e.fontSize)}),t},r.prototype.hasEnoughSpaceForInline=function(t){return 0===this.inlines.length?!0:this.newLineForced?!1:this.inlineWidths+t.width-this.leadingCut-(t.trailingCut||0)<=this.maxWidth},r.prototype.addInline=function(t){0===this.inlines.length&&(this.leadingCut=t.leadingCut||0),this.trailingCut=t.trailingCut||0,t.x=this.inlineWidths-this.leadingCut,this.inlines.push(t),this.inlineWidths+=t.width,t.lineEnd&&(this.newLineForced=!0)},r.prototype.getWidth=function(){return this.inlineWidths-this.leadingCut-this.trailingCut},r.prototype.getHeight=function(){var t=0;return this.inlines.forEach(function(e){t=Math.max(t,e.height||0)}),t},t.exports=r},function(t,e,n){"use strict";function r(){for(var t={},e=0,n=arguments.length;n>e;e++){var r=arguments[e];if(r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}function i(t,e,n){switch(t.type){case"ellipse":case"rect":t.x+=e,t.y+=n;break;case"line":t.x1+=e,t.x2+=e,t.y1+=n,t.y2+=n;break;case"polyline":for(var r=0,i=t.points.length;i>r;r++)t.points[r].x+=e,t.points[r].y+=n}}function o(t,e){return"font"===t?"font":e}function a(t){var e={};return t&&"[object Function]"===e.toString.call(t)}t.exports={pack:r,fontStringify:o,offsetVector:i,isFunction:a}},function(t,e,n){"use strict";function r(t){this.fontProvider=t}function i(t){var e=[];t=t.replace(" "," ");for(var n=t.match(l),r=0,i=n.length;i-1>r;r++){var o=n[r],a=0===o.length;if(a){var s=0===e.length||e[e.length-1].lineEnd;s?e.push({text:"",lineEnd:!0}):e[e.length-1].lineEnd=!0}else e.push({text:o})}return e}function o(t,e){e=e||{},t=t||{};for(var n in t)"text"!=n&&t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function a(t){var e=[];("string"==typeof t||t instanceof String)&&(t=[t]);for(var n=0,r=t.length;r>n;n++){var a,s=t[n],h=null;"string"==typeof s||s instanceof String?a=i(s):(a=i(s.text),h=o(s));for(var u=0,l=a.length;l>u;u++){var c={text:a[u].text};a[u].lineEnd&&(c.lineEnd=!0),o(h,c),e.push(c)}}return e}function s(t){return t.replace(/[^A-Za-z0-9\[\] ]/g,function(t){return d[t]||t})}function h(t,e,n,r){var i;return void 0!==t[n]&&null!==t[n]?t[n]:e?(e.auto(t,function(){i=e.getProperty(n)}),null!==i&&void 0!==i?i:r):r}function u(t,e,n){var r=a(e);return r.forEach(function(e){var r=h(e,n,"font","Roboto"),i=h(e,n,"fontSize",12),o=h(e,n,"bold",!1),a=h(e,n,"italics",!1),u=h(e,n,"color","black"),l=h(e,n,"decoration",null),d=h(e,n,"decorationColor",null),p=h(e,n,"decorationStyle",null),g=h(e,n,"background",null),v=h(e,n,"lineHeight",1),m=t.provideFont(r,o,a);e.width=m.widthOfString(s(e.text),i),e.height=m.lineHeight(i)*v;var y=e.text.match(c),w=e.text.match(f);e.leadingCut=y?m.widthOfString(y[0],i):0,e.trailingCut=w?m.widthOfString(w[0],i):0,e.alignment=h(e,n,"alignment","left"),e.font=m,e.fontSize=i,e.color=u,e.decoration=l,e.decorationColor=d,e.decorationStyle=p,e.background=g}),r}var l=/([^ ,\/!.?:;\-\n]*[ ,\/!.?:;\-]*)|\n/g,c=/^(\s)+/g,f=/(\s)+$/g;r.prototype.buildInlines=function(t,e){function n(t){return Math.max(0,t.width-t.leadingCut-t.trailingCut)}var r,i=u(this.fontProvider,t,e),o=0,a=0;return i.forEach(function(t){o=Math.max(o,t.width-t.leadingCut-t.trailingCut),r||(r={width:0,leadingCut:t.leadingCut,trailingCut:0}),r.width+=t.width,r.trailingCut=t.trailingCut,a=Math.max(a,n(r)),t.lineEnd&&(r=null)}),{items:i,minWidth:o,maxWidth:a}},r.prototype.sizeOfString=function(t,e){t=t.replace(" "," ");var n=h({},e,"font","Roboto"),r=h({},e,"fontSize",12),i=h({},e,"bold",!1),o=h({},e,"italics",!1),a=h({},e,"lineHeight",1),u=this.fontProvider.provideFont(n,i,o);return{width:u.widthOfString(s(t),r),height:u.lineHeight(r)*a,fontSize:r,lineHeight:a,ascender:u.ascender/1e3*r,decender:u.decender/1e3*r}};var d={"Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z"};t.exports=r},function(t,e,n){"use strict";function r(t,e){this.defaultStyle=e||{},this.styleDictionary=t,this.styleOverrides=[]}r.prototype.clone=function(){var t=new r(this.styleDictionary,this.defaultStyle);return this.styleOverrides.forEach(function(e){t.styleOverrides.push(e)}),t},r.prototype.push=function(t){this.styleOverrides.push(t)},r.prototype.pop=function(t){for(t=t||1;t-->0;)this.styleOverrides.pop()},r.prototype.autopush=function(t){if("string"==typeof t||t instanceof String)return 0;var e=[];t.style&&(e=t.style instanceof Array?t.style:[t.style]);for(var n=0,r=e.length;r>n;n++)this.push(e[n]);var i={},o=!1;return["font","fontSize","bold","italics","alignment","color","columnGap","fillColor","decoration","decorationStyle","decorationColor","background","lineHeight"].forEach(function(e){void 0!==t[e]&&null!==t[e]&&(i[e]=t[e],o=!0)}),o&&this.push(i),e.length+(o?1:0)},r.prototype.auto=function(t,e){var n=this.autopush(t),r=e();return n>0&&this.pop(n),r},r.prototype.getProperty=function(t){if(this.styleOverrides)for(var e=this.styleOverrides.length-1;e>=0;e--){var n=this.styleOverrides[e];if("string"==typeof n||n instanceof String){var r=this.styleDictionary[n];if(r&&null!==r[t]&&void 0!==r[t])return r[t]}else if(void 0!==n[t]&&null!==n[t])return n[t]}return this.defaultStyle&&this.defaultStyle[t]},t.exports=r},function(t,e,n){(function(e){(function(){var r,i,o,a,s,h,u={}.hasOwnProperty,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};h=n(46),s=n(10),i=n(32),a=n(12),o=n(38),r=function(t){function r(t){var e,n,i,o;if(this.options=null!=t?t:{},r.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null!=(i=this.options.compress)?i:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){o=this.options.info;for(e in o)n=o[e],this.info[e]=n}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.addPage()}var h;return l(r,t),h=function(t){var e,n,i;i=[];for(n in t)e=t[n],i.push(r.prototype[n]=e);return i},h(n(41)),h(n(39)),h(n(44)),h(n(40)),h(n(42)),h(n(43)),r.prototype.addPage=function(t){var e;return null==t&&(t=this.options),this.options.bufferPages||this.flushPages(),this.page=new o(this,t),this._pageBuffer.push(this.page),e=this._root.data.Pages.data,e.Kids.push(this.page.dictionary),e.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this},r.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},r.prototype.switchToPage=function(t){var e;if(!(e=this._pageBuffer[t-this._pageBufferStart]))throw new Error("switchToPage("+t+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1));return this.page=e},r.prototype.flushPages=function(){var t,e,n,r;for(e=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=e.length,n=0,r=e.length;r>n;n++)t=e[n],t.end()},r.prototype.ref=function(t){var e;return e=new a(this,this._offsets.length+1,t),this._offsets.push(null),this._waiting++,e},r.prototype._read=function(){},r.prototype._write=function(t){return e.isBuffer(t)||(t=new e(t+"\n","binary")),this.push(t),this._offset+=t.length},r.prototype.addContent=function(t){return this.page.write(t),this},r.prototype._refEnd=function(t){return this._offsets[t.id-1]=t.offset,0===--this._waiting&&this._ended?(this._finalize(),this._ended=!1):void 0},r.prototype.write=function(t,e){var n;return n=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),this.pipe(s.createWriteStream(t)),this.end(),this.once("end",e)},r.prototype.output=function(t){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},r.prototype.end=function(){var t,e,n,r,i,o;this.flushPages(),this._info=this.ref(),i=this.info;for(e in i)r=i[e],"string"==typeof r&&(r=new String(r)),this._info.data[e]=r;this._info.end(),o=this._fontFamilies;for(n in o)t=o[n],t.embed();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},r.prototype._finalize=function(t){var e,n,r,o,a;for(n=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),a=this._offsets,r=0,o=a.length;o>r;r++)e=a[r],e=("0000000000"+e).slice(-10),this._write(e+" 00000 n ");return this._write("trailer"),this._write(i.convert({Size:this._offsets.length+1,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+n),this._write("%%EOF"),this.push(null)},r.prototype.toString=function(){return"[object PDFDocument]"},r}(h.Readable),t.exports=r}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,h=(1<>1,l=-7,c=n?i-1:0,f=n?-1:1,d=t[e+c];for(c+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+c],c+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+c],c+=f,l-=8);if(0===o)o=1-u;else{if(o===h)return a?0/0:(d?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,h,u=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),e+=a+c>=1?f/h:f*Math.pow(2,1-c),e*h>=2&&(a++,h/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(e*h-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[n+d]=255&a,d+=p,a/=256,u-=8);t[n+d-p]|=128*g}},function(t,e,n){var r=Array.isArray,i=Object.prototype.toString;t.exports=r||function(t){return!!t&&"[object Array]"==i.call(t)}},function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===a||e===c?62:e===s||e===f?63:h>e?-1:h+10>e?e-h+26+26:l+26>e?e-l:u+26>e?e-u+26:void 0}function n(t){function n(t){u[c++]=t}var r,i,a,s,h,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=t.length;h="="===t.charAt(l-2)?2:"="===t.charAt(l-1)?1:0,u=new o(3*t.length/4-h),a=h>0?t.length-4:t.length;var c=0;for(r=0,i=0;a>r;r+=4,i+=3)s=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===h?(s=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&s)):1===h&&(s=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function i(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,a,s=t.length%3,h="";for(i=0,a=t.length-s;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],h+=n(o);switch(s){case 1:o=t[t.length-1],h+=e(o>>2),h+=e(o<<4&63),h+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],h+=e(o>>10),h+=e(o>>4&63),h+=e(o<<2&63),h+="="}return h}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),h="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),c="-".charCodeAt(0),f="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}(e)},function(t,e,n){(function(e){(function(){var r,i;r=function(){function t(){}var n,r,o,a;return o=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},r=/[\n\r\t\b\f\(\)\\]/g,n={"\n":"\\n","\r":"\\r"," ":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},a=function(t){var e,n,r,i,o;if(r=t.length,1&r)throw new Error("Buffer length must be even");for(n=i=0,o=r-1;o>i;n=i+=2)e=t[n],t[n]=t[n+1],t[n+1]=e;return t},t.convert=function(s){var h,u,l,c,f,d,p,g,v,m;if("string"==typeof s)return"/"+s;if(s instanceof String){for(p=s.replace(r,function(t){return n[t]}),l=!1,u=v=0,m=p.length;m>v;u=v+=1)if(p.charCodeAt(u)>127){l=!0;break}return l&&(p=a(new e("\ufeff"+p,"utf16le")).toString("binary")),"("+p+")"}if(e.isBuffer(s))return"<"+s.toString("hex")+">";if(s instanceof i)return s.toString();if(s instanceof Date)return"(D:"+o(s.getUTCFullYear(),4)+o(s.getUTCMonth(),2)+o(s.getUTCDate(),2)+o(s.getUTCHours(),2)+o(s.getUTCMinutes(),2)+o(s.getUTCSeconds(),2)+"Z)";if(Array.isArray(s))return c=function(){var e,n,r;for(r=[],e=0,n=s.length;n>e;e++)h=s[e],r.push(t.convert(h));return r}().join(" "),"["+c+"]";if("[object Object]"==={}.toString.call(s)){d=["<<"];for(f in s)g=s[f],d.push("/"+f+" "+t.convert(g));return d.push(">>"),d.join("\n")}return""+s},t}(),t.exports=r,i=n(12)}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(t,e){var n={numeric:h,alphanumeric:u,octet:l},r={L:g,M:v,Q:m,H:y};e=e||{};var i=e.version||-1,o=r[(e.eccLevel||"L").toUpperCase()],a=e.mode?n[e.mode.toLowerCase()]:-1,s="mask"in e?e.mask:-1;if(0>a)a="string"==typeof t?t.match(f)?h:t.match(p)?u:l:l;else if(a!=h&&a!=u&&a!=l)throw"invalid or unsupported mode";if(t=P(a,t),null===t)throw"invalid data format";if(0>o||o>3)throw"invalid ECC level";if(0>i){for(i=1;40>=i&&!(t.length<=U(i,a,o));++i);if(i>40)throw"too large data for the Qr format"}else if(1>i||i>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=s&&(0>s||s>8))throw"invalid mask";return Y(t,i,a,o,s)}function i(t,e){var n=[],i=t.background||"#fff",o=t.foreground||"#000",a=r(t,e),s=a.length,h=Math.floor(e.fit?e.fit/s:5),u=s*h;n.push({type:"rect",x:0,y:0,w:u,h:u,lineWidth:0,color:i});for(var l=0;s>l;++l)for(var c=0;s>c;++c)a[l][c]&&n.push({type:"rect",x:h*l,y:h*c,w:h,h:h,lineWidth:0,color:o});return{canvas:n,size:u}}function o(t){var e=i(t.qr,t);return t._canvas=e.canvas,t._width=t._height=t._minWidth=t._maxWidth=t._minHeight=t._maxHeight=e.size,t}for(var a=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],s=0,h=1,u=2,l=4,c=8,f=/^\d*$/,d=/^[A-Za-z0-9 $%*+\-./:]*$/,p=/^[A-Z0-9 $%*+\-./:]*$/,g=1,v=0,m=3,y=2,w=[],_=[-1],b=0,x=1;255>b;++b)w.push(x),_[x]=b,x=2*x^(x>=128?285:0);for(var S=[[]],b=0;30>b;++b){for(var k=S[b],E=[],C=0;b>=C;++C){var I=b>C?w[k[C]]:0,A=w[(b+(k[C-1]||0))%255];E.push(_[I^A])}S.push(E)}for(var L={},b=0;45>b;++b)L["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(b)]=b;var R=[function(t,e){return(t+e)%2===0},function(t,e){return t%2===0},function(t,e){return e%3===0},function(t,e){return(t+e)%3===0},function(t,e){return((t/2|0)+(e/3|0))%2===0},function(t,e){return t*e%2+t*e%3===0},function(t,e){return(t*e%2+t*e%3)%2===0},function(t,e){return((t+e)%2+t*e%3)%2===0}],B=function(t){return t>6},T=function(t){return 4*t+17},M=function(t){var e=a[t],n=16*t*t+128*t+64;return B(t)&&(n-=36),e[2].length&&(n-=25*e[2].length*e[2].length-10*e[2].length-55),n},O=function(t,e){var n=-8&M(t),r=a[t];return n-=8*r[0][e]*r[1][e]},D=function(t,e){switch(e){case h:return 10>t?10:27>t?12:14;case u:return 10>t?9:27>t?11:13;case l:return 10>t?8:16;case c:return 10>t?8:27>t?10:12}},U=function(t,e,n){var r=O(t,n)-4-D(t,e);switch(e){case h:return 3*(r/10|0)+(4>r%10?0:7>r%10?1:2);case u:return 2*(r/11|0)+(6>r%11?0:1);case l:return r/8|0;case c:return r/13|0}},P=function(t,e){switch(t){case h:return e.match(f)?e:null;case u:return e.match(d)?e.toUpperCase():null;case l:if("string"==typeof e){for(var n=[],r=0;ri?n.push(i):2048>i?n.push(192|i>>6,128|63&i):65536>i?n.push(224|i>>12,128|i>>6&63,128|63&i):n.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i)}return n}return e}},F=function(t,e,n,r){var i=[],o=0,a=8,c=n.length,f=function(t,e){if(e>=a){for(i.push(o|t>>(e-=a));e>=8;)i.push(t>>(e-=8)&255);o=0,a=8}e>0&&(o|=(t&(1<p;p+=3)f(parseInt(n.substring(p-2,p+1),10),10);f(parseInt(n.substring(p-2),10),[0,4,7][c%3]);break;case u:for(var p=1;c>p;p+=2)f(45*L[n.charAt(p-1)]+L[n.charAt(p)],11);c%2==1&&f(L[n.charAt(p-1)],6);break;case l:for(var p=0;c>p;++p)f(n[p],8)}for(f(s,4),8>a&&i.push(o);i.length+1o;++o)n.push(0);for(var o=0;r>o;){var a=_[n[o++]];if(a>=0)for(var s=0;i>s;++s)n[o+s]^=w[(a+e[s])%255]}return n.slice(r)},W=function(t,e,n){for(var r=[],i=t.length/e|0,o=0,a=e-t.length%e,s=0;a>s;++s)r.push(o),o+=i;for(var s=a;e>s;++s)r.push(o),o+=i+1;r.push(o);for(var h=[],s=0;e>s;++s)h.push(z(t.slice(r[s],r[s+1]),n));for(var u=[],l=t.length/e|0,s=0;l>s;++s)for(var c=0;e>c;++c)u.push(t[r[c]+s]);for(var c=a;e>c;++c)u.push(t[r[c+1]-1]);for(var s=0;sc;++c)u.push(h[c][s]);return u},N=function(t,e,n,r){for(var i=t<=0;--o)i>>r+o&1&&(i^=n<o;++o)r.push([]),i.push([]);var s=function(t,e,n,o,a){for(var s=0;n>s;++s)for(var h=0;o>h;++h)r[t+s][e+h]=a[s]>>h&1,i[t+s][e+h]=1};s(0,0,9,9,[127,65,93,93,93,65,383,0,64]),s(n-8,0,8,9,[256,127,65,93,93,93,65,127]),s(0,n-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var o=9;n-8>o;++o)r[6][o]=r[o][6]=1&~o,i[6][o]=i[o][6]=1;for(var h=e[2],u=h.length,o=0;u>o;++o)for(var l=0===o||o===u-1?1:0,c=0===o?u-1:u,f=l;c>f;++f)s(h[o],h[f],5,5,[31,17,21,17,31]);if(B(t))for(var d=N(t,6,7973,12),p=0,o=0;6>o;++o)for(var f=0;3>f;++f)r[o][n-11+f]=r[n-11+f][o]=d>>p++&1,i[o][n-11+f]=i[n-11+f][o]=1;return{matrix:r,reserved:i}},H=function(t,e,n){for(var r=t.length,i=0,o=-1,a=r-1;a>=0;a-=2){6==a&&--a;for(var s=0>o?r-1:0,h=0;r>h;++h){for(var u=a;u>a-2;--u)e[s][u]||(t[s][u]=n[i>>3]>>(7&~i)&1,++i);s+=o}o=-o}return t},Z=function(t,e,n){for(var r=R[n],i=t.length,o=0;i>o;++o)for(var a=0;i>a;++a)e[o][a]||(t[o][a]^=r(o,a));return t},G=function(t,e,n,r){for(var i=t.length,o=21522^N(n<<3|r,5,1335,10),a=0;15>a;++a){var s=[0,1,2,3,4,5,7,8,i-7,i-6,i-5,i-4,i-3,i-2,i-1][a],h=[i-1,i-2,i-3,i-4,i-5,i-6,i-7,i-8,7,5,4,3,2,1,0][a];t[s][8]=t[8][h]=o>>a&1}return t},q=function(t){for(var e=3,n=3,r=40,i=10,o=function(t){for(var n=0,i=0;i=5&&(n+=e+(t[i]-5));for(var i=5;i=4*o||t[i+1]>=4*o)&&(n+=r)}return n},a=t.length,s=0,h=0,u=0;a>u;++u){var l,c=t[u];l=[0];for(var f=0;a>f;){var d;for(d=0;a>f&&c[f];++d)++f;for(l.push(d),d=0;a>f&&!c[f];++d)++f;l.push(d)}s+=o(l),l=[0];for(var f=0;a>f;){var d;for(d=0;a>f&&t[f][u];++d)++f;for(l.push(d),d=0;a>f&&!t[f][u];++d)++f;l.push(d)}s+=o(l);var p=t[u+1]||[];h+=c[0];for(var f=1;a>f;++f){var g=c[f];h+=g,c[f-1]==g&&p[f]===g&&p[f-1]===g&&(s+=n)}}return s+=i*(Math.abs(h/a/a-.5)/.05|0)},Y=function(t,e,n,r,i){var o=a[e],s=F(e,n,t,O(e,r)>>3);s=W(s,o[1][r],S[o[0][r]]);var h=j(e),u=h.matrix,l=h.reserved;if(H(u,l,s),0>i){Z(u,l,0),G(u,l,r,0);var c=0,f=q(u);for(Z(u,l,0),i=1;8>i;++i){Z(u,l,i),G(u,l,r,i);var d=q(u);f>d&&(f=d,c=i),Z(u,l,i)}i=c}return Z(u,l,i),G(u,l,r,i),u};t.exports={measure:o}},function(t,e,n){(function(){var e;e=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.byteAt=function(t){return this.data[t]},t.prototype.readBool=function(){return!!this.readByte()},t.prototype.writeBool=function(t){return this.writeByte(t?1:0)},t.prototype.readUInt32=function(){var t,e,n,r;return t=16777216*this.readByte(),e=this.readByte()<<16,n=this.readByte()<<8,r=this.readByte(),t+e+n+r},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return t=this.readUInt32(),t>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return 0>t&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){var t,e;return t=this.readByte()<<8,e=this.readByte(),t|e},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return t=this.readUInt16(),t>=32768?t-65536:t},t.prototype.writeInt16=function(t){return 0>t&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,n,r;for(n=[],e=r=0;t>=0?t>r:r>t;e=t>=0?++r:--r)n[e]=String.fromCharCode(this.readByte());return n.join("")},t.prototype.writeString=function(t){var e,n,r,i;for(i=[],e=n=0,r=t.length;r>=0?r>n:n>r;e=r>=0?++n:--n)i.push(this.writeByte(t.charCodeAt(e)));return i},t.prototype.stringAt=function(t,e){return this.pos=t,this.readString(e)},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,n,r,i,o,a,s;return t=this.readByte(),e=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*n+4294967296*r+16777216*i+65536*o+256*a+s},t.prototype.writeLongLong=function(t){var e,n;return e=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.slice=function(t,e){return this.data.slice(t,e)},t.prototype.read=function(t){var e,n,r;for(e=[],n=r=0;t>=0?t>r:r>t;n=t>=0?++r:--r)e.push(this.readByte());return e},t.prototype.write=function(t){var e,n,r,i;for(i=[],n=0,r=t.length;r>n;n++)e=t[n],i.push(this.writeByte(e));return i},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};r=n(10),e=function(){function t(t,n){var r,o,a;if(this.data=t,this.label=n,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(a=2;a=0));)a+=this.data.readUInt16BE(a);if(i.call(e,o)<0)throw"Invalid JPEG.";a+=2,this.bits=this.data[a++],this.height=this.data.readUInt16BE(a),a+=2,this.width=this.data.readUInt16BE(a),a+=2,r=this.data[a++],this.colorSpace=function(){switch(r){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var e;return e=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],t.prototype.embed=function(t){return this.obj?void 0:(this.obj=t.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},t}(),t.exports=e}).call(this)},function(t,e,n){(function(e){(function(){var r,i,o;o=n(45),r=n(51),i=function(){function t(t,e){this.label=e,this.image=new r(t),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return t.prototype.embed=function(t){var n,r,i,o,a,s,h,u;if(this.document=t,!this.obj){if(this.obj=t.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(i=t.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=i,i.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(r=t.ref(),r.end(new e(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,r]),this.image.transparency.grayscale)return a=this.image.transparency.greyscale,this.obj.data.Mask=[a,a];if(this.image.transparency.rgb){for(o=this.image.transparency.rgb,n=[],h=0,u=o.length;u>h;h++)s=o[h],n.push(s,s);return this.obj.data.Mask=n}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},t.prototype.finalize=function(){var t;return this.alphaChannel&&(t=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),t.end(this.alphaChannel),this.obj.data.SMask=t),this.obj.end(this.imgData),this.image=null,this.imgData=null},t.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(t){return function(n){var r,i,a,s,h,u,l,c,f;for(a=t.image.colors*t.image.bits/8,f=t.width*t.height,u=new e(f*a),i=new e(f),h=c=r=0,l=n.length;l>h;)u[c++]=n[h++],u[c++]=n[h++],u[c++]=n[h++],i[r++]=n[h++];return s=0,o.deflate(u,function(e,n){if(t.imgData=n,e)throw e;return 2===++s?t.finalize():void 0}),o.deflate(i,function(e,n){if(t.alphaChannel=n,e)throw e;return 2===++s?t.finalize():void 0})}}(this))},t.prototype.loadIndexedAlphaChannel=function(t){var n;return n=this.image.transparency.indexed,this.image.decodePixels(function(t){return function(r){var i,a,s,h,u;for(i=new e(t.width*t.height),a=0,s=h=0,u=r.length;u>h;s=h+=1)i[a++]=n[r[s]];return o.deflate(i,function(e,n){if(t.alphaChannel=n,e)throw e;return t.finalize()})}}(this))},t}(),t.exports=i}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){"use strict";function r(t,e){this.context=t,this.contextStack=[],this.tracker=e}function i(t,e,n){null===n||void 0===n||0>n||n>t.items.length?t.items.push(e):t.items.splice(n,0,e)}function o(t){var e=new a(t.maxWidth);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var a=n(24),s=n(25).pack,h=n(25).offsetVector,u=n(20);r.prototype.addLine=function(t,e,n){var r=t.getHeight(),o=this.context,a=o.getCurrentPage(),s=this.getCurrentPositionOnPage();return o.availableHeight0&&t.inlines[0].alignment,i=0;switch(r){case"right":i=e-n;break;case"center":i=(e-n)/2}if(i&&(t.x=(t.x||0)+i),"justify"===r&&!t.newLineForced&&!t.lastLineInParagraph&&t.inlines.length>1)for(var o=(e-n)/(t.inlines.length-1),a=1,s=t.inlines.length;s>a;a++)i=a*o,t.inlines[a].x+=i},r.prototype.addImage=function(t,e){var n=this.context,r=n.getCurrentPage(),o=this.getCurrentPositionOnPage();return n.availableHeighto;o++){var s=t._canvas[o];s.x+=t.x,s.y+=t.y,this.addVector(s,!0,!0,e)}return n.moveDown(t._height),i},r.prototype.alignImage=function(t){var e=this.context.availableWidth,n=t._minWidth,r=0;switch(t._alignment){case"right":r=e-n;break;case"center":r=(e-n)/2}r&&(t.x=(t.x||0)+r)},r.prototype.addVector=function(t,e,n,r){var o=this.context,a=o.getCurrentPage(),s=this.getCurrentPositionOnPage();return a?(h(t,e?0:o.x,n?0:o.y),i(a,{type:"vector",item:t},r),s):void 0},r.prototype.addFragment=function(t,e,n,r){var i=this.context,a=i.getCurrentPage();return!e&&t.height>i.availableHeight?!1:(t.items.forEach(function(r){switch(r.type){case"line":var u=o(r.item);u.x=(u.x||0)+(e?t.xOffset||0:i.x),u.y=(u.y||0)+(n?t.yOffset||0:i.y),a.items.push({type:"line",item:u});break;case"vector":var l=s(r.item);h(l,e?t.xOffset||0:i.x,n?t.yOffset||0:i.y),a.items.push({type:"vector",item:l});break;case"image":var c=s(r.item);c.x=(c.x||0)+(e?t.xOffset||0:i.x),c.y=(c.y||0)+(n?t.yOffset||0:i.y),a.items.push({type:"image",item:c})}}),r||i.moveDown(t.height),!0)},r.prototype.pushContext=function(t,e){void 0===t&&(e=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,t=this.context.availableWidth),("number"==typeof t||t instanceof Number)&&(t=new u({width:t,height:e},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=t},r.prototype.popContext=function(){this.context=this.contextStack.pop()},r.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},t.exports=r},function(t,e,n){(function(){var e;e=function(){function t(t,r){var i;this.document=t,null==r&&(r={}),this.size=r.size||"letter",this.layout=r.layout||"portrait",this.margins="number"==typeof r.margin?{top:r.margin,left:r.margin,bottom:r.margin,right:r.margin}:r.margins||e,i=Array.isArray(this.size)?this.size:n[this.size.toUpperCase()],this.width=i["portrait"===this.layout?0:1],this.height=i["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(t){return function(){ +var e;return null!=(e=t.resources.data).Font?e.Font:e.Font={}}}(this)},xobjects:{get:function(t){return function(){var e;return null!=(e=t.resources.data).XObject?e.XObject:e.XObject={}}}(this)},ext_gstates:{get:function(t){return function(){var e;return null!=(e=t.resources.data).ExtGState?e.ExtGState:e.ExtGState={}}}(this)},patterns:{get:function(t){return function(){var e;return null!=(e=t.resources.data).Pattern?e.Pattern:e.Pattern={}}}(this)},annotations:{get:function(t){return function(){var e;return null!=(e=t.dictionary.data).Annots?e.Annots:e.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var e,n;return t.prototype.maxY=function(){return this.height-this.margins.bottom},t.prototype.write=function(t){return this.content.write(t)},t.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},e={top:72,left:72,bottom:72,right:72},n={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i=[].slice;r=n(47),e=4*((Math.sqrt(2)-1)/3),t.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(t){return this.addContent(""+t+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(t){return"string"==typeof t&&(t=this._CAP_STYLES[t.toUpperCase()]),this.addContent(""+t+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(t){return"string"==typeof t&&(t=this._JOIN_STYLES[t.toUpperCase()]),this.addContent(""+t+" j")},miterLimit:function(t){return this.addContent(""+t+" M")},dash:function(t,e){var n,r,i;return null==e&&(e={}),null==t?this:(r=null!=(i=e.space)?i:t,n=e.phase||0,this.addContent("["+t+" "+r+"] "+n+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(t,e){return this.addContent(""+t+" "+e+" m")},lineTo:function(t,e){return this.addContent(""+t+" "+e+" l")},bezierCurveTo:function(t,e,n,r,i,o){return this.addContent(""+t+" "+e+" "+n+" "+r+" "+i+" "+o+" c")},quadraticCurveTo:function(t,e,n,r){return this.addContent(""+t+" "+e+" "+n+" "+r+" v")},rect:function(t,e,n,r){return this.addContent(""+t+" "+e+" "+n+" "+r+" re")},roundedRect:function(t,e,n,r,i){return null==i&&(i=0),this.moveTo(t+i,e),this.lineTo(t+n-i,e),this.quadraticCurveTo(t+n,e,t+n,e+i),this.lineTo(t+n,e+r-i),this.quadraticCurveTo(t+n,e+r,t+n-i,e+r),this.lineTo(t+i,e+r),this.quadraticCurveTo(t,e+r,t,e+r-i),this.lineTo(t,e+i),this.quadraticCurveTo(t,e,t+i,e)},ellipse:function(t,n,r,i){var o,a,s,h,u,l;return null==i&&(i=r),t-=r,n-=i,o=r*e,a=i*e,s=t+2*r,u=n+2*i,h=t+r,l=n+i,this.moveTo(t,l),this.bezierCurveTo(t,l-a,h-o,n,h,n),this.bezierCurveTo(h+o,n,s,l-a,s,l),this.bezierCurveTo(s,l+a,h+o,u,h,u),this.bezierCurveTo(h-o,u,t,l+a,t,l),this.closePath()},circle:function(t,e,n){return this.ellipse(t,e,n)},polygon:function(){var t,e,n,r;for(e=1<=arguments.length?i.call(arguments,0):[],this.moveTo.apply(this,e.shift()),n=0,r=e.length;r>n;n++)t=e[n],this.lineTo.apply(this,t);return this.closePath()},path:function(t){return r.apply(this,t),this},_windingRule:function(t){return/even-?odd/.test(t)?"*":""},fill:function(t,e){return/(even-?odd)|(non-?zero)/.test(t)&&(e=t,t=null),t&&this.fillColor(t),this.addContent("f"+this._windingRule(e))},stroke:function(t){return t&&this.strokeColor(t),this.addContent("S")},fillAndStroke:function(t,e,n){var r;return null==e&&(e=t),r=/(even-?odd)|(non-?zero)/,r.test(t)&&(n=t,t=null),r.test(e)&&(n=e,e=t),t&&(this.fillColor(t),this.strokeColor(e)),this.addContent("B"+this._windingRule(n))},clip:function(t){return this.addContent("W"+this._windingRule(t)+" n")},transform:function(t,e,n,r,i,o){var a,s,h,u,l,c,f,d,p;return a=this._ctm,s=a[0],h=a[1],u=a[2],l=a[3],c=a[4],f=a[5],a[0]=s*t+u*e,a[1]=h*t+l*e,a[2]=s*n+u*r,a[3]=h*n+l*r,a[4]=s*i+u*o+c,a[5]=h*i+l*o+f,p=function(){var a,s,h,u;for(h=[t,e,n,r,i,o],u=[],a=0,s=h.length;s>a;a++)d=h[a],u.push(+d.toFixed(5));return u}().join(" "),this.addContent(""+p+" cm")},translate:function(t,e){return this.transform(1,0,0,1,t,e)},rotate:function(t,e){var n,r,i,o,a,s,h,u;return null==e&&(e={}),r=t*Math.PI/180,n=Math.cos(r),i=Math.sin(r),o=s=0,null!=e.origin&&(u=e.origin,o=u[0],s=u[1],a=o*n-s*i,h=o*i+s*n,o-=a,s-=h),this.transform(n,i,-i,n,o,s)},scale:function(t,e,n){var r,i,o;return null==e&&(e=t),null==n&&(n={}),2===arguments.length&&(e=t,n=e),r=i=0,null!=n.origin&&(o=n.origin,r=o[0],i=o[1],r-=t*r,i-=e*i),this.transform(t,0,0,e,r,i)}}}).call(this)},function(t,e,n){(function(){var e;e=n(48),t.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(t){return this._lineGap=t,this},moveDown:function(t){return null==t&&(t=1),this.y+=this.currentLineHeight(!0)*t+this._lineGap,this},moveUp:function(t){return null==t&&(t=1),this.y-=this.currentLineHeight(!0)*t+this._lineGap,this},_text:function(t,n,r,i,o){var a,s,h,u,l;if(i=this._initOptions(n,r,i),t=""+t,i.wordSpacing&&(t=t.replace(/\s{2,}/g," ")),i.width)s=this._wrapper,s||(s=new e(this,i),s.on("line",o)),this._wrapper=i.continued?s:null,this._textOptions=i.continued?i:null,s.wrap(t,i);else for(l=t.split("\n"),h=0,u=l.length;u>h;h++)a=l[h],o(a,i);return this},text:function(t,e,n,r){return this._text(t,e,n,r,this._line.bind(this))},widthOfString:function(t,e){return null==e&&(e={}),this._font.widthOfString(t,this._fontSize)+(e.characterSpacing||0)*(t.length-1)},heightOfString:function(t,e){var n,r,i,o;return null==e&&(e={}),i=this.x,o=this.y,e=this._initOptions(e),e.height=1/0,r=e.lineGap||this._lineGap||0,this._text(t,this.x,this.y,e,function(t){return function(e,n){return t.y+=t.currentLineHeight(!0)+r}}(this)),n=this.y-o,this.x=i,this.y=o,n},list:function(t,n,r,i,o){var a,s,h,u,l,c,f,d;return i=this._initOptions(n,r,i),d=Math.round(this._font.ascender/1e3*this._fontSize/3),h=i.textIndent||5*d,u=i.bulletIndent||8*d,c=1,l=[],f=[],a=function(t){var e,n,r,i,o;for(o=[],e=r=0,i=t.length;i>r;e=++r)n=t[e],Array.isArray(n)?(c++,a(n),o.push(c--)):(l.push(n),o.push(f.push(c)));return o},a(t),o=new e(this,i),o.on("line",this._line.bind(this)),c=1,s=0,o.on("firstLine",function(t){return function(){var e,n;return(n=f[s++])!==c&&(e=u*(n-c),t.x+=e,o.lineWidth-=e,c=n),t.circle(t.x-h+d,t.y+d+d/2,d),t.fill()}}(this)),o.on("sectionStart",function(t){return function(){var e;return e=h+u*(c-1),t.x+=e,o.lineWidth-=e}}(this)),o.on("sectionEnd",function(t){return function(){var e;return e=h+u*(c-1),t.x-=e,o.lineWidth+=e}}(this)),o.wrap(l.join("\n"),i),this},_initOptions:function(t,e,n){var r,i,o,a;if(null==t&&(t={}),null==n&&(n={}),"object"==typeof t&&(n=t,t=null),n=function(){var t,e,r;e={};for(t in n)r=n[t],e[t]=r;return e}(),this._textOptions){a=this._textOptions;for(r in a)o=a[r],"continued"!==r&&null==n[r]&&(n[r]=o)}return null!=t&&(this.x=t),null!=e&&(this.y=e),n.lineBreak!==!1&&(i=this.page.margins,null==n.width&&(n.width=this.page.width-this.x-i.right)),n.columns||(n.columns=0),null==n.columnGap&&(n.columnGap=18),n},_line:function(t,e,n){var r;return null==e&&(e={}),this._fragment(t,this.x,this.y,e),r=e.lineGap||this._lineGap||0,n?this.y+=this.currentLineHeight(!0)+r:this.x+=this.widthOfString(t)},_fragment:function(t,e,n,r){var i,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x;if(t=""+t,0!==t.length){if(i=r.align||"left",m=r.wordSpacing||0,o=r.characterSpacing||0,r.width)switch(i){case"right":g=this.widthOfString(t.replace(/\s+$/,""),r),e+=r.lineWidth-g;break;case"center":e+=r.lineWidth/2-r.textWidth/2;break;case"justify":y=t.trim().split(/\s+/),g=this.widthOfString(t.replace(/\s+/g,""),r),p=this.widthOfString(" ")+o,m=Math.max(0,(r.lineWidth-g)/Math.max(1,y.length-1)-p)}if(d=r.textWidth+m*(r.wordCount-1)+o*(t.length-1),r.link&&this.link(e,n,d,this.currentLineHeight(),r.link),(r.underline||r.strike)&&(this.save(),r.stroke||this.strokeColor.apply(this,this._fillColor),l=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(l),s=r.underline?1:2,c=n+this.currentLineHeight()/s,r.underline&&(c-=l),this.moveTo(e,c),this.lineTo(e+d,c),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),n=this.page.height-n-this._font.ascender/1e3*this._fontSize,null==(w=this.page.fonts)[x=this._font.id]&&(w[x]=this._font.ref()),this._font.use(t),this.addContent("BT"),this.addContent(""+e+" "+n+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),f=r.fill&&r.stroke?2:r.stroke?1:0,f&&this.addContent(""+f+" Tr"),o&&this.addContent(""+o+" Tc"),m){for(y=t.trim().split(/\s+/),m+=this.widthOfString(" ")+o,m*=1e3/this._fontSize,a=[],_=0,b=y.length;b>_;_++)v=y[_],h=this._font.encode(v),h=function(){var t,e,n;for(n=[],u=t=0,e=h.length;e>t;u=t+=1)n.push(h.charCodeAt(u).toString(16));return n}().join(""),a.push("<"+h+"> "+-m);this.addContent("["+a.join(" ")+"] TJ")}else h=this._font.encode(t),h=function(){var t,e,n;for(n=[],u=t=0,e=h.length;e>t;u=t+=1)n.push(h.charCodeAt(u).toString(16));return n}().join(""),this.addContent("<"+h+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},function(t,e,n){(function(){var e,r,i,o,a;a=n(49),e=a.PDFGradient,r=a.PDFLinearGradient,i=a.PDFRadialGradient,t.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(t){var n,r;return t instanceof e?t:("string"==typeof t&&("#"===t.charAt(0)?(4===t.length&&(t=t.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),n=parseInt(t.slice(1),16),t=[n>>16,n>>8&255,255&n]):o[t]&&(t=o[t])),Array.isArray(t)?(3===t.length?t=function(){var e,n,i;for(i=[],e=0,n=t.length;n>e;e++)r=t[e],i.push(r/255);return i}():4===t.length&&(t=function(){var e,n,i;for(i=[],e=0,n=t.length;n>e;e++)r=t[e],i.push(r/100);return i}()),t):null)},_setColor:function(t,n){var r,i,o,a;return(t=this._normalizeColor(t))?(this._sMasked&&(r=this.ref({Type:"ExtGState",SMask:"None"}),r.end(),i="Gs"+ ++this._opacityCount,this.page.ext_gstates[i]=r,this.addContent("/"+i+" gs"),this._sMasked=!1),o=n?"SCN":"scn",t instanceof e?(this._setColorSpace("Pattern",n),t.apply(o)):(a=4===t.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(a,n),t=t.join(" "),this.addContent(""+t+" "+o)),!0):!1},_setColorSpace:function(t,e){var n;return n=e?"CS":"cs",this.addContent("/"+t+" "+n)},fillColor:function(t,e){var n;return null==e&&(e=1),n=this._setColor(t,!1),n&&this.fillOpacity(e),this._fillColor=[t,e],this},strokeColor:function(t,e){var n;return null==e&&(e=1),n=this._setColor(t,!0),n&&this.strokeOpacity(e),this},opacity:function(t){return this._doOpacity(t,t),this},fillOpacity:function(t){return this._doOpacity(t,null),this},strokeOpacity:function(t){return this._doOpacity(null,t),this},_doOpacity:function(t,e){var n,r,i,o,a;if(null!=t||null!=e)return null!=t&&(t=Math.max(0,Math.min(1,t))),null!=e&&(e=Math.max(0,Math.min(1,e))),i=""+t+"_"+e,this._opacityRegistry[i]?(a=this._opacityRegistry[i],n=a[0],o=a[1]):(n={Type:"ExtGState"},null!=t&&(n.ca=t),null!=e&&(n.CA=e),n=this.ref(n),n.end(),r=++this._opacityCount,o="Gs"+r,this._opacityRegistry[i]=[n,o]),this.page.ext_gstates[o]=n,this.addContent("/"+o+" gs")},linearGradient:function(t,e,n,i){return new r(this,t,e,n,i)},radialGradient:function(t,e,n,r,o,a){return new i(this,t,e,n,r,o,a)}},o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},function(t,e,n){(function(e){(function(){var r;r=n(17),t.exports={initImages:function(){return this._imageRegistry={},this._imageCount=0},image:function(t,n,i,o){var a,s,h,u,l,c,f,d,p,g,v,m,y,w;return null==o&&(o={}),"object"==typeof n&&(o=n,n=null),n=null!=(m=null!=n?n:o.x)?m:this.x,i=null!=(y=null!=i?i:o.y)?y:this.y,e.isBuffer(t)||(c=this._imageRegistry[t]),c||(c=r.open(t,"I"+ ++this._imageCount),c.embed(this),e.isBuffer(t)||(this._imageRegistry[t]=c)),null==(g=this.page.xobjects)[v=c.label]&&(g[v]=c.obj),d=o.width||c.width,u=o.height||c.height,o.width&&!o.height?(p=d/c.width,d=c.width*p,u=c.height*p):o.height&&!o.width?(l=u/c.height,d=c.width*l,u=c.height*l):o.scale?(d=c.width*o.scale,u=c.height*o.scale):o.fit&&(w=o.fit,h=w[0],a=w[1],s=h/a,f=c.width/c.height,f>s?(d=h,u=h/f):(u=a,d=a*f),"center"===o.align?n=n+h/2-d/2:"right"===o.align&&(n=n+h-d),"center"===o.valign?i=i+a/2-u/2:"bottom"===o.valign&&(i=i+a-u)),this.y===i&&(this.y+=u),this.save(),this.transform(d,0,0,-u,n,i+u),this.addContent("/"+c.label+" Do"),this.restore(),this}}}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){(function(){t.exports={annotate:function(t,e,n,r,i){var o,a,s;i.Type="Annot",i.Rect=this._convertRect(t,e,n,r),i.Border=[0,0,0],"Link"!==i.Subtype&&null==i.C&&(i.C=this._normalizeColor(i.color||[0,0,0])),delete i.color,"string"==typeof i.Dest&&(i.Dest=new String(i.Dest));for(o in i)s=i[o],i[o[0].toUpperCase()+o.slice(1)]=s;return a=this.ref(i),this.page.annotations.push(a),a.end(),this},note:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="Text",o.Contents=new String(i),o.Name="Comment",null==o.color&&(o.color=[243,223,92]),this.annotate(t,e,n,r,o)},link:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="Link",o.A=this.ref({S:"URI",URI:new String(i)}),o.A.end(),this.annotate(t,e,n,r,o)},_markup:function(t,e,n,r,i){var o,a,s,h,u;return null==i&&(i={}),u=this._convertRect(t,e,n,r),o=u[0],s=u[1],a=u[2],h=u[3],i.QuadPoints=[o,h,a,h,o,s,a,s],i.Contents=new String,this.annotate(t,e,n,r,i)},highlight:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Highlight",null==i.color&&(i.color=[241,238,148]),this._markup(t,e,n,r,i)},underline:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Underline",this._markup(t,e,n,r,i)},strike:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="StrikeOut",this._markup(t,e,n,r,i)},lineAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Line",i.Contents=new String,i.L=[t,this.page.height-e,n,this.page.height-r],this.annotate(t,e,n,r,i)},rectAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Square",i.Contents=new String,this.annotate(t,e,n,r,i)},ellipseAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Circle",i.Contents=new String,this.annotate(t,e,n,r,i)},textAnnotation:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="FreeText",o.Contents=new String(i),o.DA=new String,this.annotate(t,e,n,r,o)},_convertRect:function(t,e,n,r){var i,o,a,s,h,u,l,c,f;return c=e,e+=r,l=t+n,f=this._ctm,i=f[0],o=f[1],a=f[2],s=f[3],h=f[4],u=f[5],t=i*t+a*e+h,e=o*t+s*e+u,l=i*l+a*c+h,c=o*l+s*c+u,[t,e,l,c]}}}).call(this)},function(t,e,n){(function(){var e;e=n(52),t.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(t,n,r){var i,o,a,s;return"number"==typeof n&&(r=n,n=null),"string"==typeof t&&this._registeredFonts[t]?(i=t,s=this._registeredFonts[t],t=s.src,n=s.family):(i=n||t,"string"!=typeof i&&(i=null)),null!=r&&this.fontSize(r),(o=this._fontFamilies[i])?(this._font=o,this):(a="F"+ ++this._fontCount,this._font=new e(this,t,n,a),(o=this._fontFamilies[this._font.name])?(this._font=o,this):(i&&(this._fontFamilies[i]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(t){return this._fontSize=t,this},currentLineHeight:function(t){return null==t&&(t=!1),this._font.lineHeight(this._fontSize,t)},registerFont:function(t,e,n){return this._registeredFonts[t]={src:e,family:n},this}}}).call(this)},function(t,e,n){(function(t,r){function i(e,n,r){function i(){for(var t;null!==(t=e.read());)s.push(t),h+=t.length;e.once("readable",i)}function o(t){e.removeListener("end",a),e.removeListener("readable",i),r(t)}function a(){var n=t.concat(s,h);s=[],r(null,n),e.close()}var s=[],h=0;e.on("error",o),e.on("end",a),e.end(n),i()}function o(e,n){if("string"==typeof n&&(n=new t(n)),!t.isBuffer(n))throw new TypeError("Not a string or buffer");var r=g.Z_FINISH;return e._processChunk(n,r)}function a(t){return this instanceof a?void d.call(this,t,g.DEFLATE):new a(t)}function s(t){return this instanceof s?void d.call(this,t,g.INFLATE):new s(t)}function h(t){return this instanceof h?void d.call(this,t,g.GZIP):new h(t)}function u(t){return this instanceof u?void d.call(this,t,g.GUNZIP):new u(t)}function l(t){return this instanceof l?void d.call(this,t,g.DEFLATERAW):new l(t)}function c(t){return this instanceof c?void d.call(this,t,g.INFLATERAW):new c(t)}function f(t){return this instanceof f?void d.call(this,t,g.UNZIP):new f(t)}function d(n,r){if(this._opts=n=n||{},this._chunkSize=n.chunkSize||e.Z_DEFAULT_CHUNK,p.call(this,n),n.flush&&n.flush!==g.Z_NO_FLUSH&&n.flush!==g.Z_PARTIAL_FLUSH&&n.flush!==g.Z_SYNC_FLUSH&&n.flush!==g.Z_FULL_FLUSH&&n.flush!==g.Z_FINISH&&n.flush!==g.Z_BLOCK)throw new Error("Invalid flush flag: "+n.flush);if(this._flushFlag=n.flush||g.Z_NO_FLUSH,n.chunkSize&&(n.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+n.chunkSize);if(n.windowBits&&(n.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+n.windowBits);if(n.level&&(n.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+n.level);if(n.memLevel&&(n.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+n.memLevel);if(n.strategy&&n.strategy!=e.Z_FILTERED&&n.strategy!=e.Z_HUFFMAN_ONLY&&n.strategy!=e.Z_RLE&&n.strategy!=e.Z_FIXED&&n.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+n.strategy);if(n.dictionary&&!t.isBuffer(n.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new g.Zlib(r);var i=this;this._hadError=!1,this._binding.onerror=function(t,n){i._binding=null,i._hadError=!0;var r=new Error(t);r.errno=n,r.code=e.codes[n],i.emit("error",r)};var o=e.Z_DEFAULT_COMPRESSION;"number"==typeof n.level&&(o=n.level);var a=e.Z_DEFAULT_STRATEGY;"number"==typeof n.strategy&&(a=n.strategy),this._binding.init(n.windowBits||e.Z_DEFAULT_WINDOWBITS,o,n.memLevel||e.Z_DEFAULT_MEMLEVEL,a,n.dictionary),this._buffer=new t(this._chunkSize),this._offset=0,this._closed=!1,this._level=o,this._strategy=a,this.once("end",this.close)}var p=n(55),g=n(50),v=n(60),m=n(53).ok;g.Z_MIN_WINDOWBITS=8,g.Z_MAX_WINDOWBITS=15,g.Z_DEFAULT_WINDOWBITS=15,g.Z_MIN_CHUNK=64,g.Z_MAX_CHUNK=1/0,g.Z_DEFAULT_CHUNK=16384,g.Z_MIN_MEMLEVEL=1,g.Z_MAX_MEMLEVEL=9,g.Z_DEFAULT_MEMLEVEL=8,g.Z_MIN_LEVEL=-1,g.Z_MAX_LEVEL=9,g.Z_DEFAULT_LEVEL=g.Z_DEFAULT_COMPRESSION,Object.keys(g).forEach(function(t){t.match(/^Z/)&&(e[t]=g[t])}),e.codes={Z_OK:g.Z_OK,Z_STREAM_END:g.Z_STREAM_END,Z_NEED_DICT:g.Z_NEED_DICT,Z_ERRNO:g.Z_ERRNO,Z_STREAM_ERROR:g.Z_STREAM_ERROR,Z_DATA_ERROR:g.Z_DATA_ERROR,Z_MEM_ERROR:g.Z_MEM_ERROR,Z_BUF_ERROR:g.Z_BUF_ERROR,Z_VERSION_ERROR:g.Z_VERSION_ERROR},Object.keys(e.codes).forEach(function(t){e.codes[e.codes[t]]=t}),e.Deflate=a,e.Inflate=s,e.Gzip=h,e.Gunzip=u,e.DeflateRaw=l,e.InflateRaw=c,e.Unzip=f,e.createDeflate=function(t){return new a(t)},e.createInflate=function(t){return new s(t)},e.createDeflateRaw=function(t){return new l(t)},e.createInflateRaw=function(t){return new c(t)},e.createGzip=function(t){return new h(t)},e.createGunzip=function(t){return new u(t)},e.createUnzip=function(t){return new f(t)},e.deflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new a(e),t,n)},e.deflateSync=function(t,e){return o(new a(e),t)},e.gzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new h(e),t,n)},e.gzipSync=function(t,e){return o(new h(e),t)},e.deflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new l(e),t,n)},e.deflateRawSync=function(t,e){return o(new l(e),t)},e.unzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new f(e),t,n)},e.unzipSync=function(t,e){return o(new f(e),t)},e.inflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new s(e),t,n)},e.inflateSync=function(t,e){return o(new s(e),t)},e.gunzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new u(e),t,n)},e.gunzipSync=function(t,e){return o(new u(e),t)},e.inflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new c(e),t,n)},e.inflateRawSync=function(t,e){return o(new c(e),t)},v.inherits(d,p),d.prototype.params=function(t,n,i){if(te.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==t||this._strategy!==n){var o=this;this.flush(g.Z_SYNC_FLUSH,function(){o._binding.params(t,n),o._hadError||(o._level=t,o._strategy=n,i&&i())})}else r.nextTick(i)},d.prototype.reset=function(){return this._binding.reset()},d.prototype._flush=function(e){this._transform(new t(0),"",e)},d.prototype.flush=function(e,n){var i=this._writableState;if(("function"==typeof e||void 0===e&&!n)&&(n=e,e=g.Z_FULL_FLUSH),i.ended)n&&r.nextTick(n);else if(i.ending)n&&this.once("end",n);else if(i.needDrain){var o=this;this.once("drain",function(){o.flush(n)})}else this._flushFlag=e,this.write(new t(0),"",n)},d.prototype.close=function(t){if(t&&r.nextTick(t),!this._closed){this._closed=!0,this._binding.close();var e=this;r.nextTick(function(){e.emit("close")})}},d.prototype._transform=function(e,n,r){var i,o=this._writableState,a=o.ending||o.ended,s=a&&(!e||o.length===e.length);if(null===!e&&!t.isBuffer(e))return r(new Error("invalid input"));s?i=g.Z_FINISH:(i=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||g.Z_NO_FLUSH));this._processChunk(e,i,r)},d.prototype._processChunk=function(e,n,r){function i(l,d){if(!h._hadError){var p=a-d;if(m(p>=0,"have should not go down"),p>0){var g=h._buffer.slice(h._offset,h._offset+p);h._offset+=p,u?h.push(g):(c.push(g),f+=g.length)}if((0===d||h._offset>=h._chunkSize)&&(a=h._chunkSize,h._offset=0,h._buffer=new t(h._chunkSize)),0===d){if(s+=o-l,o=l,!u)return!0;var v=h._binding.write(n,e,s,o,h._buffer,h._offset,h._chunkSize);return v.callback=i,void(v.buffer=e)}return u?void r():!1}}var o=e&&e.length,a=this._chunkSize-this._offset,s=0,h=this,u="function"==typeof r;if(!u){var l,c=[],f=0;this.on("error",function(t){l=t});do var d=this._binding.writeSync(n,e,s,o,this._buffer,this._offset,a);while(!this._hadError&&i(d[0],d[1]));if(this._hadError)throw l;var p=t.concat(c,f);return this.close(),p}var g=this._binding.write(n,e,s,o,this._buffer,this._offset,a);g.buffer=e,g.callback=i},v.inherits(a,d),v.inherits(s,d),v.inherits(h,d),v.inherits(u,d),v.inherits(l,d),v.inherits(c,d),v.inherits(f,d)}).call(e,n(4).Buffer,n(61))},function(t,e,n){function r(){i.call(this)}t.exports=r;var i=n(54).EventEmitter,o=n(62);o(r,i),r.Readable=n(56),r.Writable=n(57),r.Duplex=n(58),r.Transform=n(55),r.PassThrough=n(59),r.Stream=r,r.prototype.pipe=function(t,e){function n(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function r(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,t.end())}function a(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(h(),0===i.listenerCount(this,"error"))throw t}function h(){u.removeListener("data",n),t.removeListener("drain",r),u.removeListener("end",o),u.removeListener("close",a),u.removeListener("error",s),t.removeListener("error",s),u.removeListener("end",h),u.removeListener("close",h),t.removeListener("close",h)}var u=this;u.on("data",n),t.on("drain",r),t._isStdio||e&&e.end===!1||(u.on("end",o),u.on("close",a));var l=!1;return u.on("error",s),t.on("error",s),u.on("end",h),u.on("close",h),t.on("close",h),t.emit("pipe",u),t}},function(t,e,n){(function(){var e;e=function(){function t(){}var e,n,r,i,o,a,s,h,u,l,c,f,d;return t.apply=function(t,n){var r;return r=a(n),e(r,t)},o={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},a=function(t){var e,n,r,i,a,s,h,u,l;for(h=[],e=[],i="",a=!1,s=0,u=0,l=t.length;l>u;u++)if(n=t[u],null!=o[n])s=o[n],r&&(i.length>0&&(e[e.length]=+i),h[h.length]={cmd:r,args:e},e=[],i="",a=!1),r=n;else if(" "===n||","===n||"-"===n&&i.length>0&&"e"!==i[i.length-1]||"."===n&&a){if(0===i.length)continue;e.length===s?(h[h.length]={cmd:r,args:e},e=[+i],"M"===r&&(r="L"),"m"===r&&(r="l")):e[e.length]=+i,a="."===n,i="-"===n||"."===n?n:""}else i+=n,"."===n&&(a=!0);return i.length>0&&(e.length===s?(h[h.length]={cmd:r,args:e},e=[+i],"M"===r&&(r="L"),"m"===r&&(r="l")):e[e.length]=+i),h[h.length]={cmd:r,args:e},h},r=i=s=h=f=d=0,e=function(t,e){var n,o,a,l,c;for(r=i=s=h=f=d=0,o=a=0,l=t.length;l>a;o=++a)n=t[o],"function"==typeof u[c=n.cmd]&&u[c](e,n.args);return r=i=s=h=0},u={M:function(t,e){return r=e[0],i=e[1],s=h=null,f=r,d=i,t.moveTo(r,i)},m:function(t,e){return r+=e[0],i+=e[1],s=h=null,f=r,d=i,t.moveTo(r,i)},C:function(t,e){return r=e[4],i=e[5],s=e[2],h=e[3],t.bezierCurveTo.apply(t,e)},c:function(t,e){return t.bezierCurveTo(e[0]+r,e[1]+i,e[2]+r,e[3]+i,e[4]+r,e[5]+i),s=r+e[2],h=i+e[3],r+=e[4],i+=e[5]},S:function(t,e){return null===s&&(s=r,h=i),t.bezierCurveTo(r-(s-r),i-(h-i),e[0],e[1],e[2],e[3]),s=e[0],h=e[1],r=e[2],i=e[3]},s:function(t,e){return null===s&&(s=r,h=i),t.bezierCurveTo(r-(s-r),i-(h-i),r+e[0],i+e[1],r+e[2],i+e[3]),s=r+e[0],h=i+e[1],r+=e[2],i+=e[3]},Q:function(t,e){return s=e[0],h=e[1],r=e[2],i=e[3],t.quadraticCurveTo(e[0],e[1],r,i)},q:function(t,e){return t.quadraticCurveTo(e[0]+r,e[1]+i,e[2]+r,e[3]+i),s=r+e[0],h=i+e[1],r+=e[2],i+=e[3]},T:function(t,e){return null===s?(s=r,h=i):(s=r-(s-r),h=i-(h-i)),t.quadraticCurveTo(s,h,e[0],e[1]),s=r-(s-r),h=i-(h-i),r=e[0],i=e[1]},t:function(t,e){return null===s?(s=r,h=i):(s=r-(s-r),h=i-(h-i)),t.quadraticCurveTo(s,h,r+e[0],i+e[1]),r+=e[0],i+=e[1]},A:function(t,e){return c(t,r,i,e),r=e[5],i=e[6]},a:function(t,e){return e[5]+=r,e[6]+=i,c(t,r,i,e),r=e[5],i=e[6]},L:function(t,e){return r=e[0],i=e[1],s=h=null,t.lineTo(r,i)},l:function(t,e){return r+=e[0],i+=e[1],s=h=null,t.lineTo(r,i)},H:function(t,e){return r=e[0],s=h=null,t.lineTo(r,i)},h:function(t,e){return r+=e[0],s=h=null,t.lineTo(r,i)},V:function(t,e){return i=e[0],s=h=null,t.lineTo(r,i)},v:function(t,e){return i+=e[0],s=h=null,t.lineTo(r,i)},Z:function(t){return t.closePath(),r=f,i=d},z:function(t){return t.closePath(),r=f,i=d}},c=function(t,e,r,i){var o,a,s,h,u,c,f,d,p,g,v,m,y;for(c=i[0],f=i[1],u=i[2],h=i[3],g=i[4],a=i[5],s=i[6],p=n(a,s,c,f,h,g,u,e,r),y=[],v=0,m=p.length;m>v;v++)d=p[v],o=l.apply(null,d),y.push(t.bezierCurveTo.apply(t,o));return y},n=function(t,e,n,r,i,o,a,u,l){var c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I,A,L,R,B,T,M,O,D,U;for(k=a*(Math.PI/180),S=Math.sin(k),g=Math.cos(k),n=Math.abs(n),r=Math.abs(r),s=g*(u-t)*.5+S*(l-e)*.5,h=g*(l-e)*.5-S*(u-t)*.5,y=s*s/(n*n)+h*h/(r*r),y>1&&(y=Math.sqrt(y),n*=y,r*=y),c=g/n,f=S/n,d=-S/r,p=g/r,R=c*u+f*l,M=d*u+p*l,B=c*t+f*e,O=d*t+p*e,v=(B-R)*(B-R)+(O-M)*(O-M),x=1/v-.25,0>x&&(x=0),b=Math.sqrt(x),o===i&&(b=-b),T=.5*(R+B)-b*(O-M),D=.5*(M+O)+b*(B-R),E=Math.atan2(M-D,R-T),C=Math.atan2(O-D,B-T),L=C-E,0>L&&1===o?L+=2*Math.PI:L>0&&0===o&&(L-=2*Math.PI),_=Math.ceil(Math.abs(L/(.5*Math.PI+.001))),w=[],m=U=0;_>=0?_>U:U>_;m=_>=0?++U:--U)I=E+m*L/_,A=E+(m+1)*L/_,w[m]=[T,D,I,A,n,r,S,g];return w},l=function(t,e,n,r,i,o,a,s){var h,u,l,c,f,d,p,g,v,m,y,w;return h=s*i,u=-a*o,l=a*i,c=s*o,d=.5*(r-n),f=8/3*Math.sin(.5*d)*Math.sin(.5*d)/Math.sin(d),p=t+Math.cos(n)-f*Math.sin(n),m=e+Math.sin(n)+f*Math.cos(n),v=t+Math.cos(r),w=e+Math.sin(r),g=v+f*Math.sin(r),y=w-f*Math.cos(r),[h*p+u*m,l*p+c*m,h*g+u*y,l*g+c*y,h*v+u*w,l*v+c*w]},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype, +t};e=n(54).EventEmitter,r=n(66),i=function(t){function e(t,e){var n;this.document=t,this.indent=e.indent||0,this.characterSpacing=e.characterSpacing||0,this.wordSpacing=0===e.wordSpacing,this.columns=e.columns||1,this.columnGap=null!=(n=e.columnGap)?n:18,this.lineWidth=(e.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=e.ellipsis,this.continuedX=0,null!=e.height?(this.height=e.height,this.maxY=this.startY+e.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(t){return function(e){var n;return n=t.continuedX||t.indent,t.document.x+=n,t.lineWidth-=n,t.once("line",function(){return t.document.x-=n,t.lineWidth+=n,e.continued&&!t.continuedX&&(t.continuedX=t.indent),e.continued?void 0:t.continuedX=0})}}(this)),this.on("lastLine",function(t){return function(e){var n;return n=e.align,"justify"===n&&(e.align="left"),t.lastLine=!0,t.once("line",function(){return t.document.y+=e.paragraphGap||0,e.align=n,t.lastLine=!1})}}(this))}return a(e,t),e.prototype.wordWidth=function(t){return this.document.widthOfString(t,this)+this.characterSpacing+this.wordSpacing},e.prototype.eachWord=function(t,e){var n,i,o,a,s,h,u,l,c,f;for(i=new r(t),s=null,f={};n=i.nextBreak();){if(c=t.slice((null!=s?s.position:void 0)||0,n.position),l=null!=f[c]?f[c]:f[c]=this.wordWidth(c),l>this.lineWidth+this.continuedX)for(h=s,o={};c.length;){for(a=c.length;l>this.spaceLeft;)l=this.wordWidth(c.slice(0,--a));if(o.required=athis.maxY||o>this.maxY)&&this.nextSection(),n="",a=0,s=0,i=0,h=this.document.y,r=function(t){return function(){return e.textWidth=a+t.wordSpacing*(s-1),e.wordCount=s,e.lineWidth=t.lineWidth,h=t.document.y,t.emit("line",n,e,t),i++}}(this),this.emit("sectionStart",e,this),this.eachWord(t,function(t){return function(i,o,h,u){var l,c;if((null==u||u.required)&&(t.emit("firstLine",e,t),t.spaceLeft=t.lineWidth),o<=t.spaceLeft&&(n+=i,a+=o,s++),h.required||o>t.spaceLeft){if(h.required&&t.emit("lastLine",e,t),l=t.document.currentLineHeight(!0),null!=t.height&&t.ellipsis&&t.document.y+2*l>t.maxY&&t.column>=t.columns){for(t.ellipsis===!0&&(t.ellipsis="…"),n=n.replace(/\s+$/,""),a=t.wordWidth(n+t.ellipsis);a>t.lineWidth;)n=n.slice(0,-1).replace(/\s+$/,""),a=t.wordWidth(n+t.ellipsis);n+=t.ellipsis}return r(),t.document.y+l>t.maxY&&(c=t.nextSection(),!c)?(s=0,n="",!1):h.required?(o>t.spaceLeft&&(n=i,a=o,s=1,r()),t.spaceLeft=t.lineWidth,n="",a=0,s=0):(t.spaceLeft=t.lineWidth-o,n=i,a=o,s=1)}return t.spaceLeft-=o}}(this)),s>0&&(this.emit("lastLine",e,this),r()),this.emit("sectionEnd",e,this),e.continued===!0?(i>1&&(this.continuedX=0),this.continuedX+=e.textWidth,this.document.y=h):this.document.x=this.startX},e.prototype.nextSection=function(t){var e;if(this.emit("sectionEnd",t,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(e=this.document).fillColor.apply(e,this.document._fillColor),this.emit("pageBreak",t,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",t,this);return this.emit("sectionStart",t,this),!0},e}(e),t.exports=i}).call(this)},function(t,e,n){(function(){var e,n,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};e=function(){function t(t){this.doc=t,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return t.prototype.stop=function(t,e,n){return null==n&&(n=1),n=Math.max(0,Math.min(1,n)),this.stops.push([t,this.doc._normalizeColor(e),n]),this},t.prototype.embed=function(){var t,e,n,r,i,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I,A,L,R,B,T,M,O,D;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,l=this.stops[this.stops.length-1],l[0]<1&&this.stops.push([1,l[1],l[2]]),t=[],r=[],A=[],u=R=0,M=this.stops.length-1;M>=0?M>R:R>M;u=M>=0?++R:--R)r.push(0,1),u+2!==this.stops.length&&t.push(this.stops[u+1][0]),i=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[u+0][1],C1:this.stops[u+1][1],N:1}),A.push(i),i.end();if(1===A.length?i=A[0]:(i=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:A,Bounds:t,Encode:r}),i.end()),this.id="Sh"+ ++this.doc._gradCount,c=this.doc._ctm.slice(),f=c[0],d=c[1],v=c[2],w=c[3],_=c[4],b=c[5],O=this.transform,p=O[0],g=O[1],m=O[2],y=O[3],e=O[4],n=O[5],c[0]=f*p+v*g,c[1]=d*p+w*g,c[2]=f*m+v*y,c[3]=d*m+w*y,c[4]=f*e+v*n+_,c[5]=d*e+w*n+b,C=this.shader(i),C.end(),S=this.doc.ref({Type:"Pattern",PatternType:2,Shading:C,Matrix:function(){var t,e,n;for(n=[],t=0,e=c.length;e>t;t++)L=c[t],n.push(+L.toFixed(5));return n}()}),this.doc.page.patterns[this.id]=S,S.end(),this.stops.some(function(t){return t[2]<1})){for(a=this.opacityGradient(),a._colorSpace="DeviceGray",D=this.stops,B=0,T=D.length;T>B;B++)I=D[B],a.stop(I[0],[I[2]]);a=a.embed(),s=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),s.end(),k=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:a.data.Shading}}),k.end(),o=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:s,Resources:k}),o.end("/Sh1 sh"),E=this.doc.ref({Type:"Mask",S:"Luminosity",G:o}),E.end(),h=this.doc.ref({Type:"ExtGState",SMask:E}),this.opacity_id=++this.doc._opacityCount,x="Gs"+this.opacity_id,this.doc.page.ext_gstates[x]=h,h.end()}return S}},t.prototype.apply=function(t){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+t),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},t}(),n=function(t){function e(t,n,r,i,o){this.doc=t,this.x1=n,this.y1=r,this.x2=i,this.y2=o,e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.shader=function(t){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:t,Extend:[!0,!0]})},e.prototype.opacityGradient=function(){return new e(this.doc,this.x1,this.y1,this.x2,this.y2)},e}(e),r=function(t){function e(t,n,r,i,o,a,s){this.doc=t,this.x1=n,this.y1=r,this.r1=i,this.x2=o,this.y2=a,this.r2=s,e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.shader=function(t){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:t,Extend:[!0,!0]})},e.prototype.opacityGradient=function(){return new e(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},e}(e),t.exports={PDFGradient:e,PDFLinearGradient:n,PDFRadialGradient:r}}).call(this)},function(t,e,n){(function(t,r){function i(t){if(te.UNZIP)throw new TypeError("Bad argument");this.mode=t,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function o(t,e){for(var n=0;nt;i=++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(n);break;case"IDAT":for(i=l=0;n>l;i=l+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(n),h=255-this.transparency.indexed.length,h>0)for(i=c=0;h>=0?h>c:c>h;i=h>=0?++c:--c)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(n)[0];break;case 2:this.transparency.rgb=this.read(n)}break;case"tEXt":u=this.read(n),o=u.indexOf(0),a=String.fromCharCode.apply(String,u.slice(0,o)),this.text[a]=String.fromCharCode.apply(String,u.slice(o+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(f=this.colorType)||6===f,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new e(this.imgData));default:this.pos+=n}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return t.decode=function(e,n){return i.readFile(e,function(e,r){var i;return i=new t(r),i.decode(function(t){return n(t)})})},t.load=function(e){var n;return n=i.readFileSync(e),new t(n)},t.prototype.read=function(t){var e,n,r;for(r=[],e=n=0;t>=0?t>n:n>t;e=t>=0?++n:--n)r.push(this.data[this.pos++]);return r},t.prototype.readUInt32=function(){var t,e,n,r;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,n=this.data[this.pos++]<<8,r=this.data[this.pos++],t|e|n|r},t.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},t.prototype.decodePixels=function(t){var n=this;return o.inflate(this.imgData,function(r,i){var o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I;if(r)throw r;for(v=n.pixelBitlength/8,_=v*n.width,m=new e(_*n.height),l=i.length,w=0,y=0,a=0;l>y;){switch(i[y++]){case 0:for(h=S=0;_>S;h=S+=1)m[a++]=i[y++];break;case 1:for(h=k=0;_>k;h=k+=1)o=i[y++],u=v>h?0:m[a-v],m[a++]=(o+u)%256;break;case 2:for(h=E=0;_>E;h=E+=1)o=i[y++],s=(h-h%v)/v,b=w&&m[(w-1)*_+s*v+h%v],m[a++]=(b+o)%256;break;case 3:for(h=C=0;_>C;h=C+=1)o=i[y++],s=(h-h%v)/v,u=v>h?0:m[a-v],b=w&&m[(w-1)*_+s*v+h%v],m[a++]=(o+Math.floor((u+b)/2))%256;break;case 4:for(h=I=0;_>I;h=I+=1)o=i[y++],s=(h-h%v)/v,u=v>h?0:m[a-v],0===w?b=x=0:(b=m[(w-1)*_+s*v+h%v],x=s&&m[(w-1)*_+(s-1)*v+h%v]),c=u+b-x,f=Math.abs(c-u),p=Math.abs(c-b),g=Math.abs(c-x),d=p>=f&&g>=f?u:g>=p?b:x,m[a++]=(o+d)%256;break;default:throw new Error("Invalid filter algorithm: "+i[y-1])}w++}return t(m)})},t.prototype.decodePalette=function(){var t,n,r,i,o,a,s,h,u,l;for(i=this.palette,s=this.transparency.indexed||[],a=new e(s.length+i.length),o=0,r=i.length,t=0,n=h=0,u=i.length;u>h;n=h+=3)a[o++]=i[n],a[o++]=i[n+1],a[o++]=i[n+2],a[o++]=null!=(l=s[t++])?l:255;return a},t.prototype.copyToImageData=function(t,e){var n,r,i,o,a,s,h,u,l,c,f;if(r=this.colors,l=null,n=this.hasAlphaChannel,this.palette.length&&(l=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),r=4,n=!0),i=(null!=t?t.data:void 0)||t,u=i.length,a=l||e,o=s=0,1===r)for(;u>o;)h=l?4*e[o/4]:s,c=a[h++],i[o++]=c,i[o++]=c,i[o++]=c,i[o++]=n?a[h++]:255,s=h;else for(;u>o;)h=l?4*e[o/4]:s,i[o++]=a[h++],i[o++]=a[h++],i[o++]=a[h++],i[o++]=n?a[h++]:255,s=h},t.prototype.decode=function(t){var n,r=this;return n=new e(this.width*this.height*4),this.decodePixels(function(e){return r.copyToImageData(n,e),t(n)})},t}()}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){(function(e,r){(function(){var i,o,a,s,h;s=n(64),i=n(63),a=n(65),h=n(10),o=function(){function t(t,r,o,h){if(this.document=t,this.id=h,"string"==typeof r){if(r in n)return this.isAFM=!0,this.font=new i(n[r]()),void this.registerAFM(r);if(/\.(ttf|ttc)$/i.test(r))this.font=s.open(r,o);else{if(!/\.dfont$/i.test(r))throw new Error("Not a supported font format or standard PDF font.");this.font=s.fromDFont(r,o)}}else if(e.isBuffer(r))this.font=s.fromBuffer(r,o);else if(r instanceof Uint8Array)this.font=s.fromBuffer(new e(r),o);else{if(!(r instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=s.fromBuffer(new e(new Uint8Array(r)),o)}this.subset=new a(this.font),this.registerTTF()}var n,o;return n={Courier:function(){return h.readFileSync(r+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return h.readFileSync(r+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return h.readFileSync(r+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return h.readFileSync(r+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return h.readFileSync(r+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return h.readFileSync(r+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return h.readFileSync(r+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return h.readFileSync(r+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return h.readFileSync(r+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return h.readFileSync(r+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return h.readFileSync(r+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return h.readFileSync(r+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return h.readFileSync(r+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return h.readFileSync(r+"/font/data/ZapfDingbats.afm","utf8")}},t.prototype.use=function(t){var e;return null!=(e=this.subset)?e.use(t):void 0},t.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},t.prototype.encode=function(t){var e;return this.isAFM?this.font.encodeText(t):(null!=(e=this.subset)?e.encodeText(t):void 0)||t},t.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},t.prototype.registerTTF=function(){var t,e,n,r,i;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var e,n,r,i;for(r=this.font.bbox,i=[],e=0,n=r.length;n>e;e++)t=r[e],i.push(Math.round(t*this.scaleFactor));return i}.call(this),this.stemV=0,this.font.post.exists?(r=this.font.post.italic_angle,e=r>>16,n=255&r,e&!0&&(e=-((65535^e)+1)),this.italicAngle=+(""+e+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.embedTTF=function(){var t,e,n,r,i,a,s,h;return r=this.subset.encode(),s=this.document.ref(),s.write(r),s.data.Length1=s.uncompressedLength,s.end(),i=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:s,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),i.end(),a=+Object.keys(this.subset.cmap)[0],t=function(){var t,e;t=this.subset.cmap,e=[];for(n in t)h=t[n],e.push(Math.round(this.font.widthOfGlyph(h)));return e}.call(this),e=this.document.ref(),e.end(o(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:i,FirstChar:a,LastChar:a+t.length-1,Widths:t,Encoding:"MacRomanEncoding",ToUnicode:e},this.dictionary.end()},o=function(t){var e,n,r,i,o,a,s;for(o="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",n=Object.keys(t).sort(function(t,e){return t-e}),r=[],a=0,s=n.length;s>a;a++)e=n[a],r.length>=100&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),i=("0000"+t[e].toString(16)).slice(-4),e=(+e).toString(16),r.push("<"+e+"><"+i+">");return r.length&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),o+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},t.prototype.registerAFM=function(t){var e;return this.name=t,e=this.font,this.ascender=e.ascender,this.decender=e.decender,this.bbox=e.bbox,this.lineGap=e.lineGap,e},t.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},t.prototype.widthOfString=function(t,e){var n,r,i,o,a,s;for(t=""+t,o=0,r=a=0,s=t.length;s>=0?s>a:a>s;r=s>=0?++a:--a)n=t.charCodeAt(r),o+=this.font.widthOfGlyph(this.font.characterToGlyph(n))||0;return i=e/1e3,o*i},t.prototype.lineHeight=function(t,e){var n;return null==e&&(e=!1),n=e?this.lineGap:0,(this.ascender+n-this.decender)/1e3*t},t}(),t.exports=o}).call(this)}).call(e,n(4).Buffer,"/")},function(t,e,n){function r(t,e){return d.isUndefined(e)?""+e:d.isNumber(e)&&!isFinite(e)?e.toString():d.isFunction(e)||d.isRegExp(e)?e.toString():e}function i(t,e){return d.isString(t)?t.length=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(i=a[o],!h(t[i],e[i]))return!1;return!0}function c(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function f(t,e,n,r){var i;d.isString(n)&&(r=n,n=null);try{e()}catch(o){i=o}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&a(i,n,"Missing expected exception"+r),!t&&c(i,n)&&a(i,n,"Got unwanted exception"+r),t&&i&&n&&!c(i,n)||!t&&i)throw i}var d=n(60),p=Array.prototype.slice,g=Object.prototype.hasOwnProperty,v=t.exports=s;v.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var e=t.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=e.name,s=r.indexOf("\n"+i);if(s>=0){var h=r.indexOf("\n",s+1);r=r.substring(h+1)}this.stack=r}}},d.inherits(v.AssertionError,Error),v.fail=a,v.ok=s,v.equal=function(t,e,n){t!=e&&a(t,e,n,"==",v.equal)},v.notEqual=function(t,e,n){t==e&&a(t,e,n,"!=",v.notEqual)},v.deepEqual=function(t,e,n){h(t,e)||a(t,e,n,"deepEqual",v.deepEqual)},v.notDeepEqual=function(t,e,n){h(t,e)&&a(t,e,n,"notDeepEqual",v.notDeepEqual)},v.strictEqual=function(t,e,n){t!==e&&a(t,e,n,"===",v.strictEqual)},v.notStrictEqual=function(t,e,n){t===e&&a(t,e,n,"!==",v.notStrictEqual)},v["throws"]=function(t,e,n){f.apply(this,[!0].concat(p.call(arguments)))},v.doesNotThrow=function(t,e){f.apply(this,[!1].concat(p.call(arguments)))},v.ifError=function(t){if(t)throw t};var m=Object.keys||function(t){var e=[];for(var n in t)g.call(t,n)&&e.push(n);return e}},function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,h,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[t],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),h=1;r>h;h++)o[h-1]=arguments[h];n.apply(this,o)}else if(a(n)){for(r=arguments.length,o=new Array(r-1),h=1;r>h;h++)o[h-1]=arguments[h];for(u=n.slice(),r=u.length,h=0;r>h;h++)u[h].apply(this,o)}return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned){var n;n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,"function"==typeof console.trace)}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-->0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},function(t,e,n){t.exports=n(70)},function(t,e,n){e=t.exports=n(71),e.Stream=n(46),e.Readable=e,e.Writable=n(67),e.Duplex=n(69),e.Transform=n(70),e.PassThrough=n(68)},function(t,e,n){t.exports=n(67)},function(t,e,n){t.exports=n(69)},function(t,e,n){t.exports=n(68)},function(t,e,n){(function(t,r){function i(t,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),h(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function h(t,n,r){if(t.customInspect&&n&&C(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return w(i)||(i=h(t,i,r)),i}var o=u(t,n);if(o)return o;var a=Object.keys(n),g=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(C(n)){var v=n.name?": "+n.name:"";return t.stylize("[Function"+v+"]","special")}if(x(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(k(n))return t.stylize(Date.prototype.toString.call(n),"date");if(E(n))return l(n)}var m="",y=!1,_=["{","}"];if(p(n)&&(y=!0,_=["[","]"]),C(n)){var b=n.name?": "+n.name:"";m=" [Function"+b+"]"}if(x(n)&&(m=" "+RegExp.prototype.toString.call(n)),k(n)&&(m=" "+Date.prototype.toUTCString.call(n)),E(n)&&(m=" "+l(n)),0===a.length&&(!y||0==n.length))return _[0]+m+_[1];if(0>r)return x(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var S;return S=y?c(t,n,r,g,a):a.map(function(e){return f(t,n,r,g,e,y)}),t.seen.pop(),d(S,m,_)}function u(t,e){if(b(e))return t.stylize("undefined","undefined");if(w(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,n,r,i){for(var o=[],a=0,s=e.length;s>a;++a)o.push(L(e,String(a))?f(t,e,n,r,String(a),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,n,r,i,!0))}),o}function f(t,e,n,r,i,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),L(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=v(n)?h(t,u.value,null):h(t,u.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t,e,n){var r=0,i=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function p(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function v(t){return null===t}function m(t){return null==t}function y(t){return"number"==typeof t}function w(t){return"string"==typeof t}function _(t){return"symbol"==typeof t}function b(t){return void 0===t}function x(t){return S(t)&&"[object RegExp]"===A(t)}function S(t){return"object"==typeof t&&null!==t}function k(t){return S(t)&&"[object Date]"===A(t)}function E(t){return S(t)&&("[object Error]"===A(t)||t instanceof Error)}function C(t){return"function"==typeof t}function I(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function A(t){return Object.prototype.toString.call(t)}function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var R=/%[sdj%]/g;e.format=function(t){if(!w(t)){for(var e=[],n=0;n=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),s=r[n];o>n;s=r[++n])a+=v(s)||!S(s)?" "+s:" "+i(s);return a},e.deprecate=function(n,i){function o(){if(!a){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation,a=!0}return n.apply(this,arguments)}if(b(t.process))return function(){return e.deprecate(n,i).apply(this,arguments); + +};if(r.noDeprecation===!0)return n;var a=!1;return o};var B,T={};e.debuglog=function(t){if(b(B)&&(B=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!T[t])if(new RegExp("\\b"+t+"\\b","i").test(B)){{r.pid}T[t]=function(){e.format.apply(e,arguments)}}else T[t]=function(){};return T[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=g,e.isNull=v,e.isNullOrUndefined=m,e.isNumber=y,e.isString=w,e.isSymbol=_,e.isUndefined=b,e.isRegExp=x,e.isObject=S,e.isDate=k,e.isError=E,e.isFunction=C,e.isPrimitive=I,e.isBuffer=n(72);e.log=function(){},e.inherits=n(94),e._extend=function(t,e){if(!e||!S(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(e,function(){return this}(),n(61))},function(t,e,n){function r(){if(!s){s=!0;for(var t,e=a.length;e;){t=a,a=[];for(var n=-1;++n=t;r=++t)e.push(this.glyphWidths[n[r]]);return e}.call(this),this.bbox=function(){var t,n,r,i;for(r=this.attributes.FontBBox.split(/\s+/),i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(+e);return i}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var e,n;return t.open=function(e){return new t(r.readFileSync(e,"utf8"))},t.prototype.parse=function(){var t,e,n,r,i,o,a,s,h,u;for(o="",u=this.contents.split("\n"),s=0,h=u.length;h>s;s++)if(n=u[s],r=n.match(/^Start(\w+)/))o=r[1];else if(r=n.match(/^End(\w+)/))o="";else switch(o){case"FontMetrics":r=n.match(/(^\w+)\s+(.*)/),e=r[1],a=r[2],(t=this.attributes[e])?(Array.isArray(t)||(t=this.attributes[e]=[t]),t.push(a)):this.attributes[e]=a;break;case"CharMetrics":if(!/^CH?\s/.test(n))continue;i=n.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[i]=+n.match(/\bWX\s+(\d+)\s*;/)[1]}},e={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},t.prototype.encodeText=function(t){var n,r,i,o,a;for(i="",r=o=0,a=t.length;a>=0?a>o:o>a;r=a>=0?++o:--o)n=t.charCodeAt(r),n=e[n]||n,i+=String.fromCharCode(n);return i},t.prototype.characterToGlyph=function(t){return n[e[t]||t]},t.prototype.widthOfGlyph=function(t){return this.glyphWidths[t]},n=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var CmapTable,e,r,i,GlyfTable,HeadTable,HheaTable,HmtxTable,LocaTable,MaxpTable,NameTable,OS2Table,PostTable,o,a;a=n(10),r=n(34),e=n(78),i=n(79),NameTable=n(80),HeadTable=n(81),CmapTable=n(82),HmtxTable=n(83),HheaTable=n(84),MaxpTable=n(85),PostTable=n(86),OS2Table=n(87),LocaTable=n(88),GlyfTable=n(90),o=function(){function t(t,e){var n,i,o,a,s,h,u,l,c;if(this.rawData=t,n=this.contents=new r(this.rawData),"ttcf"===n.readString(4)){if(!e)throw new Error("Must specify a font name for TTC files.");for(h=n.readInt(),o=n.readInt(),s=[],i=u=0;o>=0?o>u:u>o;i=o>=0?++u:--u)s[i]=n.readInt();for(i=l=0,c=s.length;c>l;i=++l)if(a=s[i],n.pos=a,this.parse(),this.name.postscriptName===e)return;throw new Error("Font "+e+" not found in TTC file.")}n.pos=0,this.parse()}return t.open=function(e,n){var r;return r=a.readFileSync(e),new t(r,n)},t.fromDFont=function(n,r){var i;return i=e.open(n),new t(i.getNamedFont(r))},t.fromBuffer=function(n,r){var i,o,a;try{if(a=new t(n,r),!(a.head.exists&&a.name.exists&&a.cmap.exists||(i=new e(n),a=new t(i.getNamedFont(r)),a.head.exists&&a.name.exists&&a.cmap.exists)))throw new Error("Invalid TTF file in DFont");return a}catch(s){throw o=s,new Error("Unknown font format in buffer: "+o.message)}},t.prototype.parse=function(){return this.directory=new i(this.contents),this.head=new HeadTable(this),this.name=new NameTable(this),this.cmap=new CmapTable(this),this.hhea=new HheaTable(this),this.maxp=new MaxpTable(this),this.hmtx=new HmtxTable(this),this.post=new PostTable(this),this.os2=new OS2Table(this),this.loca=new LocaTable(this),this.glyf=new GlyfTable(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t}(),t.exports=o}).call(this)},function(t,e,n){(function(){var CmapTable,e,r,i=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};CmapTable=n(82),r=n(89),e=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.use=function(t){var e,n,r;{if("string"!=typeof t)return this.unicodes[t]?void 0:(this.subset[this.next]=t,this.unicodes[t]=this.next++);for(e=n=0,r=t.length;r>=0?r>n:n>r;e=r>=0?++n:--n)this.use(t.charCodeAt(e))}},t.prototype.encodeText=function(t){var e,n,r,i,o;for(r="",n=i=0,o=t.length;o>=0?o>i:i>o;n=o>=0?++i:--i)e=this.unicodes[t.charCodeAt(n)],r+=String.fromCharCode(e);return r},t.prototype.generateCmap=function(){var t,e,n,r,i;r=this.font.cmap.tables[0].codeMap,t={},i=this.subset;for(e in i)n=i[e],t[e]=r[n];return t},t.prototype.glyphIDs=function(){var t,e,n,r,o,a;r=this.font.cmap.tables[0].codeMap,t=[0],a=this.subset;for(e in a)n=a[e],o=r[n],null!=o&&i.call(t,o)<0&&t.push(o);return t.sort()},t.prototype.glyphsFor=function(t){var e,n,r,i,o,a,s;for(r={},o=0,a=t.length;a>o;o++)i=t[o],r[i]=this.font.glyf.glyphFor(i);e=[];for(i in r)n=r[i],(null!=n?n.compound:void 0)&&e.push.apply(e,n.glyphIDs);if(e.length>0){s=this.glyphsFor(e);for(i in s)n=s[i],r[i]=n}return r},t.prototype.encode=function(){var t,e,n,i,o,a,s,h,u,l,c,f,d,p,g,v,m;t=CmapTable.encode(this.generateCmap(),"unicode"),i=this.glyphsFor(this.glyphIDs()),f={0:0},v=t.charMap;for(e in v)a=v[e],f[a.old]=a["new"];c=t.maxGlyphID;for(d in i)d in f||(f[d]=c++);u=r.invert(f),l=Object.keys(u).sort(function(t,e){return t-e}),p=function(){var t,e,n;for(n=[],t=0,e=l.length;e>t;t++)o=l[t],n.push(u[o]);return n}(),n=this.font.glyf.encode(i,p,f),s=this.font.loca.encode(n.offsets),h=this.font.name.encode(),this.postscriptName=h.postscriptName,this.cmap={},m=t.charMap;for(e in m)a=m[e],this.cmap[e]=a.old;return g={cmap:t.table,glyf:n.table,loca:s.table,hmtx:this.font.hmtx.encode(p),hhea:this.font.hhea.encode(p),maxp:this.font.maxp.encode(p),post:this.font.post.encode(p),name:h.table,head:this.font.head.encode(s)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},t}(),t.exports=e}).call(this)},function(t,e,n){(function(){var e,r,i,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I,A,L;x=n(100),C=new x(n(106)),A=n(92),o=A.BK,l=A.CR,p=A.LF,v=A.NL,a=A.CB,i=A.BA,b=A.SP,S=A.WJ,b=A.SP,o=A.BK,p=A.LF,v=A.NL,e=A.AI,r=A.AL,w=A.SA,_=A.SG,k=A.XX,h=A.CJ,f=A.ID,m=A.NS,E=A.characterClasses,L=n(91),c=L.DI_BRK,d=L.IN_BRK,s=L.CI_BRK,u=L.CP_BRK,y=L.PR_BRK,I=L.pairTable,g=function(){function t(t){this.string=t,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var n,f,g;return t.prototype.nextCodePoint=function(){var t,e;return t=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos),t>=55296&&56319>=t&&e>=56320&&57343>=e?(this.pos++,1024*(t-55296)+(e-56320)+65536):t},f=function(t){switch(t){case e:return r;case w:case _:case k:return r;case h:return m;default:return t}},g=function(t){switch(t){case p:case v:return o;case a:return i;case b:return S;default:return t}},t.prototype.nextCharClass=function(t){return null==t&&(t=!1),f(C.get(this.nextCodePoint()))},n=function(){function t(t,e){this.position=t,this.required=null!=e?e:!1}return t}(),t.prototype.nextBreak=function(){var t,e,r;for(null==this.curClass&&(this.curClass=g(this.nextCharClass()));this.pos=this.string.length?this.lastPos1){for(var n=[],r=0;rn;n++)e(t[n],n)}t.exports=r;var a=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},s=n(105);s.inherits=n(104);var h=n(71),u=n(67);s.inherits(r,h),o(a(u.prototype),function(t){r.prototype[t]||(r.prototype[t]=u.prototype[t])})}).call(e,n(61))},function(t,e,n){function r(t,e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,h.isNullOrUndefined(n)||t.push(n),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else!e.decoder||i||r||(n=e.decoder.write(n)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&c(t)),d(t,e);else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length=R)t=R;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function h(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||I.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=s(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function u(t,e){var n=null;return I.isBuffer(e)||I.isString(e)||I.isNullOrUndefined(e)||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function l(t,e){if(e.decoder&&!e.ended){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,c(t)}function c(t){var n=t._readableState;n.needReadable=!1,n.emittedReadable||(L("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?e.nextTick(function(){f(t)}):f(t))}function f(t){L("emit readable"),t.emit("readable"),y(t)}function d(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(function(){p(t,n)}))}function p(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=i)n=o?r.join(""):k.concat(r,i),r.length=0;else if(tu&&t>h;u++){var s=r[0],c=Math.min(t-h,s.length);o?n+=s.slice(0,c):s.copy(n,h,0,c),c0)throw new Error("endReadable called on non-empty stream");n.endEmitted||(n.ended=!0,e.nextTick(function(){n.endEmitted||0!==n.length||(n.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function b(t,e){for(var n=0,r=t.length;r>n;n++)e(t[n],n)}function x(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1}t.exports=i;var S=n(107),k=n(4).Buffer;i.ReadableState=r;var E=n(54).EventEmitter;E.listenerCount||(E.listenerCount=function(t,e){return t.listeners(e).length});var C=n(46),I=n(105);I.inherits=n(104);var A,L=n(93);L=L&&L.debuglog?L.debuglog("stream"):function(){},I.inherits(i,C),i.prototype.push=function(t,e){var n=this._readableState;return I.isString(t)&&!n.objectMode&&(e=e||n.defaultEncoding,e!==n.encoding&&(t=new k(t,e),e="")),o(this,n,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return A||(A=n(101).StringDecoder),this._readableState.decoder=new A(t),this._readableState.encoding=t,this};var R=8388608;i.prototype.read=function(t){L("read",t);var e=this._readableState,n=t;if((!I.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return L("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?_(this):c(this),null;if(t=h(t,e),0===t&&e.ended)return 0===e.length&&_(this),null;var r=e.needReadable;L("need readable",r),(0===e.length||e.length-t0?w(t,e):null,I.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),n!==t&&e.ended&&0===e.length&&_(this),I.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,n){function r(t){L("onunpipe"),t===c&&o()}function i(){L("onend"),t.end()}function o(){L("cleanup"),t.removeListener("close",h),t.removeListener("finish",u),t.removeListener("drain",v),t.removeListener("error",s),t.removeListener("unpipe",r),c.removeListener("end",i),c.removeListener("end",o),c.removeListener("data",a),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function a(e){L("ondata");var n=t.write(e);!1===n&&(L("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,c.pause())}function s(e){L("onerror",e),l(),t.removeListener("error",s),0===E.listenerCount(t,"error")&&t.emit("error",e)}function h(){t.removeListener("finish",u),l()}function u(){L("onfinish"),t.removeListener("close",h),l()}function l(){L("unpipe"),c.unpipe(t)}var c=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,L("pipe count=%d opts=%j",f.pipesCount,n);var d=(!n||n.end!==!1)&&t!==e.stdout&&t!==e.stderr,p=d?i:o;f.endEmitted?e.nextTick(p):c.once("end",p),t.on("unpipe",r);var v=g(c);return t.on("drain",v),c.on("data",a),t._events&&t._events.error?S(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",h),t.once("finish",u),t.emit("pipe",c),f.flowing||(L("pipe resume"),c.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=x(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,n){var r=C.prototype.on.call(this,t,n);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&c(this,i);else{var o=this;e.nextTick(function(){L("readable nexttick read 0"),o.read(0)})}}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!0,t.reading||(L("resume read 0"),this.read(0)),v(this,t)),this},i.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;t.on("end",function(){if(L("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)}),t.on("data",function(i){if(L("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=r.push(i);o||(n=!0,t.pause())}});for(var i in t)I.isFunction(t[i])&&I.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return b(o,function(e){t.on(e,r.emit.bind(r,e))}),r._read=function(e){L("wrapped _read",e),n&&(n=!1,t.resume())},r},i._fromList=w}).call(e,n(61))},function(t,e,n){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,n){"use strict";function r(t,e){return t.msg=T[e],e}function i(t){return(t<<1)-(t>4?9:0)}function o(t){for(var e=t.length;--e>=0;)t[e]=0}function a(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(A.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function s(t,e){L._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,a(t.strm)}function h(t,e){t.pending_buf[t.pending++]=e}function u(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function l(t,e,n,r){var i=t.avail_in;return i>r&&(i=r),0===i?0:(t.avail_in-=i,A.arraySet(e,t.input,t.next_in,i,n),1===t.state.wrap?t.adler=R(t.adler,e,i,n):2===t.state.wrap&&(t.adler=B(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)}function c(t,e){var n,r,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,h=t.strstart>t.w_size-ut?t.strstart-(t.w_size-ut):0,u=t.window,l=t.w_mask,c=t.prev,f=t.strstart+ht,d=u[o+a-1],p=u[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do if(n=e,u[n+a]===p&&u[n+a-1]===d&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do;while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&f>o);if(r=ht-(f-o),o=f-ht,r>a){if(t.match_start=e,a=r,r>=s)break;d=u[o+a-1],p=u[o+a]}}while((e=c[e&l])>h&&0!==--i);return a<=t.lookahead?a:t.lookahead}function f(t){var e,n,r,i,o,a=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-ut)){A.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,n=t.hash_size,e=n;do r=t.head[--e],t.head[e]=r>=a?r-a:0;while(--n);n=a,e=n;do r=t.prev[--e],t.prev[e]=r>=a?r-a:0;while(--n);i+=a}if(0===t.strm.avail_in)break;if(n=l(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=st)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(f(t),0===t.lookahead&&e===M)return yt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r, +t.strstart=r,s(t,!1),0===t.strm.avail_out))return yt;if(t.strstart-t.block_start>=t.w_size-ut&&(s(t,!1),0===t.strm.avail_out))return yt}return t.insert=0,e===U?(s(t,!0),0===t.strm.avail_out?_t:bt):t.strstart>t.block_start&&(s(t,!1),0===t.strm.avail_out)?yt:yt}function p(t,e){for(var n,r;;){if(t.lookahead=st&&(t.ins_h=(t.ins_h<=st)if(r=L._tr_tally(t,t.strstart-t.match_start,t.match_length-st),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=st){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<=st&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=st-1)),t.prev_length>=st&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-st,r=L._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-st),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(t.ins_h=(t.ins_h<=st&&t.strstart>0&&(i=t.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=t.strstart+ht;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&o>i);t.match_length=ht-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=st?(n=L._tr_tally(t,1,t.match_length-st),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=L._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(s(t,!1),0===t.strm.avail_out))return yt}return t.insert=0,e===U?(s(t,!0),0===t.strm.avail_out?_t:bt):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?yt:wt}function m(t,e){for(var n;;){if(0===t.lookahead&&(f(t),0===t.lookahead)){if(e===M)return yt;break}if(t.match_length=0,n=L._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(s(t,!1),0===t.strm.avail_out))return yt}return t.insert=0,e===U?(s(t,!0),0===t.strm.avail_out?_t:bt):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?yt:wt}function y(t){t.window_size=2*t.w_size,o(t.head),t.max_lazy_match=I[t.level].max_lazy,t.good_match=I[t.level].good_length,t.nice_match=I[t.level].nice_length,t.max_chain_length=I[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=st-1,t.match_available=0,t.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=V,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new A.Buf16(2*ot),this.dyn_dtree=new A.Buf16(2*(2*rt+1)),this.bl_tree=new A.Buf16(2*(2*it+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new A.Buf16(at+1),this.heap=new A.Buf16(2*nt+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new A.Buf16(2*nt+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function _(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=X,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ct:vt,t.adler=2===e.wrap?0:1,e.last_flush=M,L._tr_init(e),F):r(t,W)}function b(t){var e=_(t);return e===F&&y(t.state),e}function x(t,e){return t&&t.state?2!==t.state.wrap?W:(t.state.gzhead=e,F):W}function S(t,e,n,i,o,a){if(!t)return W;var s=1;if(e===H&&(e=6),0>i?(s=0,i=-i):i>15&&(s=2,i-=16),1>o||o>$||n!==V||8>i||i>15||0>e||e>9||0>a||a>Y)return r(t,W);8===i&&(i=9);var h=new w;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=i,h.w_size=1<>1,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=a,h.method=n,b(t)}function k(t,e){return S(t,e,V,J,Q,K)}function E(t,e){var n,s,l,c;if(!t||!t.state||e>P||0>e)return t?r(t,W):W;if(s=t.state,!t.output||!t.input&&0!==t.avail_in||s.status===mt&&e!==U)return r(t,0===t.avail_out?j:W);if(s.strm=t,n=s.last_flush,s.last_flush=e,s.status===ct)if(2===s.wrap)t.adler=0,h(s,31),h(s,139),h(s,8),s.gzhead?(h(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),h(s,255&s.gzhead.time),h(s,s.gzhead.time>>8&255),h(s,s.gzhead.time>>16&255),h(s,s.gzhead.time>>24&255),h(s,9===s.level?2:s.strategy>=G||s.level<2?4:0),h(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(h(s,255&s.gzhead.extra.length),h(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=B(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=ft):(h(s,0),h(s,0),h(s,0),h(s,0),h(s,0),h(s,9===s.level?2:s.strategy>=G||s.level<2?4:0),h(s,xt),s.status=vt);else{var f=V+(s.w_bits-8<<4)<<8,d=-1;d=s.strategy>=G||s.level<2?0:s.level<6?1:6===s.level?2:3,f|=d<<6,0!==s.strstart&&(f|=lt),f+=31-f%31,s.status=vt,u(s,f),0!==s.strstart&&(u(s,t.adler>>>16),u(s,65535&t.adler)),t.adler=1}if(s.status===ft)if(s.gzhead.extra){for(l=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>l&&(t.adler=B(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending!==s.pending_buf_size));)h(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>l&&(t.adler=B(t.adler,s.pending_buf,s.pending-l,l)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=dt)}else s.status=dt;if(s.status===dt)if(s.gzhead.name){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(t.adler=B(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending===s.pending_buf_size)){c=1;break}c=s.gzindexl&&(t.adler=B(t.adler,s.pending_buf,s.pending-l,l)),0===c&&(s.gzindex=0,s.status=pt)}else s.status=pt;if(s.status===pt)if(s.gzhead.comment){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(t.adler=B(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending===s.pending_buf_size)){c=1;break}c=s.gzindexl&&(t.adler=B(t.adler,s.pending_buf,s.pending-l,l)),0===c&&(s.status=gt)}else s.status=gt;if(s.status===gt&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&a(t),s.pending+2<=s.pending_buf_size&&(h(s,255&t.adler),h(s,t.adler>>8&255),t.adler=0,s.status=vt)):s.status=vt),0!==s.pending){if(a(t),0===t.avail_out)return s.last_flush=-1,F}else if(0===t.avail_in&&i(e)<=i(n)&&e!==U)return r(t,j);if(s.status===mt&&0!==t.avail_in)return r(t,j);if(0!==t.avail_in||0!==s.lookahead||e!==M&&s.status!==mt){var p=s.strategy===G?m(s,e):s.strategy===q?v(s,e):I[s.level].func(s,e);if((p===_t||p===bt)&&(s.status=mt),p===yt||p===_t)return 0===t.avail_out&&(s.last_flush=-1),F;if(p===wt&&(e===O?L._tr_align(s):e!==P&&(L._tr_stored_block(s,0,0,!1),e===D&&(o(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),a(t),0===t.avail_out))return s.last_flush=-1,F}return e!==U?F:s.wrap<=0?z:(2===s.wrap?(h(s,255&t.adler),h(s,t.adler>>8&255),h(s,t.adler>>16&255),h(s,t.adler>>24&255),h(s,255&t.total_in),h(s,t.total_in>>8&255),h(s,t.total_in>>16&255),h(s,t.total_in>>24&255)):(u(s,t.adler>>>16),u(s,65535&t.adler)),a(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?F:z)}function C(t){var e;return t&&t.state?(e=t.state.status,e!==ct&&e!==ft&&e!==dt&&e!==pt&&e!==gt&&e!==vt&&e!==mt?r(t,W):(t.state=null,e===vt?r(t,N):F)):W}var I,A=n(98),L=n(95),R=n(96),B=n(97),T=n(73),M=0,O=1,D=3,U=4,P=5,F=0,z=1,W=-2,N=-3,j=-5,H=-1,Z=1,G=2,q=3,Y=4,K=0,X=2,V=8,$=9,J=15,Q=8,tt=29,et=256,nt=et+1+tt,rt=30,it=19,ot=2*nt+1,at=15,st=3,ht=258,ut=ht+st+1,lt=32,ct=42,ft=69,dt=73,pt=91,gt=103,vt=113,mt=666,yt=1,wt=2,_t=3,bt=4,xt=3,St=function(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i};I=[new St(0,0,0,0,d),new St(4,4,8,4,p),new St(4,5,16,8,p),new St(4,6,32,32,p),new St(4,4,16,16,g),new St(8,16,32,32,g),new St(8,16,128,128,g),new St(8,32,128,256,g),new St(32,128,258,1024,g),new St(32,258,258,4096,g)],e.deflateInit=k,e.deflateInit2=S,e.deflateReset=b,e.deflateResetKeep=_,e.deflateSetHeader=x,e.deflate=E,e.deflateEnd=C,e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,n){"use strict";function r(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=U,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new m.Buf32(pt),e.distcode=e.distdyn=new m.Buf32(gt),e.sane=1,e.back=-1,A):B}function a(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,o(t)):B}function s(t,e){var n,r;return t&&t.state?(r=t.state,0>e?(n=0,e=-e):(n=(e>>4)+1,48>e&&(e&=15)),e&&(8>e||e>15)?B:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,a(t))):B}function h(t,e){var n,r;return t?(r=new i,t.state=r,r.window=null,n=s(t,e),n!==A&&(t.state=null),n):B}function u(t){return h(t,mt)}function l(t){if(yt){var e;for(g=new m.Buf32(512),v=new m.Buf32(32),e=0;144>e;)t.lens[e++]=8;for(;256>e;)t.lens[e++]=9;for(;280>e;)t.lens[e++]=7;for(;288>e;)t.lens[e++]=8;for(b(S,t.lens,0,288,g,0,t.work,{bits:9}),e=0;32>e;)t.lens[e++]=5;b(k,t.lens,0,32,v,0,t.work,{bits:5}),yt=!1}t.lencode=g,t.lenbits=9,t.distcode=v,t.distbits=5}function c(t,e,n,r){var i,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(m.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),m.arraySet(o.window,e,n-r,i,o.wnext),r-=i,r?(m.arraySet(o.window,e,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaved;){if(0===h)break t;h--,f+=i[a++]<>>8&255,n.check=w(n.check,It,2,0),f=0,d=0,n.mode=P;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&f)<<8)+(f>>8))%31){t.msg="incorrect header check",n.mode=ct;break}if((15&f)!==D){t.msg="unknown compression method",n.mode=ct;break}if(f>>>=4,d-=4,xt=(15&f)+8,0===n.wbits)n.wbits=xt;else if(xt>n.wbits){t.msg="invalid window size",n.mode=ct;break}n.dmax=1<d;){if(0===h)break t;h--,f+=i[a++]<>8&1),512&n.flags&&(It[0]=255&f,It[1]=f>>>8&255,n.check=w(n.check,It,2,0)),f=0,d=0,n.mode=F;case F:for(;32>d;){if(0===h)break t;h--,f+=i[a++]<>>8&255,It[2]=f>>>16&255,It[3]=f>>>24&255,n.check=w(n.check,It,4,0)),f=0,d=0,n.mode=z;case z:for(;16>d;){if(0===h)break t;h--,f+=i[a++]<>8),512&n.flags&&(It[0]=255&f,It[1]=f>>>8&255,n.check=w(n.check,It,2,0)),f=0,d=0,n.mode=W;case W:if(1024&n.flags){for(;16>d;){if(0===h)break t;h--,f+=i[a++]<>>8&255,n.check=w(n.check,It,2,0)),f=0,d=0}else n.head&&(n.head.extra=null);n.mode=N;case N:if(1024&n.flags&&(v=n.length,v>h&&(v=h),v&&(n.head&&(xt=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),m.arraySet(n.head.extra,i,a,v,xt)),512&n.flags&&(n.check=w(n.check,i,v,a)),h-=v,a+=v,n.length-=v),n.length))break t;n.length=0,n.mode=j;case j:if(2048&n.flags){if(0===h)break t;v=0;do xt=i[a+v++],n.head&&xt&&n.length<65536&&(n.head.name+=String.fromCharCode(xt));while(xt&&h>v);if(512&n.flags&&(n.check=w(n.check,i,v,a)),h-=v,a+=v,xt)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=H;case H:if(4096&n.flags){if(0===h)break t;v=0;do xt=i[a+v++],n.head&&xt&&n.length<65536&&(n.head.comment+=String.fromCharCode(xt));while(xt&&h>v);if(512&n.flags&&(n.check=w(n.check,i,v,a)),h-=v,a+=v,xt)break t}else n.head&&(n.head.comment=null);n.mode=Z;case Z:if(512&n.flags){for(;16>d;){if(0===h)break t;h--,f+=i[a++]<>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=Y;break;case G:for(;32>d;){if(0===h)break t;h--,f+=i[a++]<>>=7&d,d-=7&d,n.mode=ht;break}for(;3>d;){if(0===h)break t;h--,f+=i[a++]<>>=1,d-=1,3&f){case 0:n.mode=X;break;case 1:if(l(n),n.mode=et,e===I){f>>>=2,d-=2;break t}break;case 2:n.mode=J;break;case 3:t.msg="invalid block type",n.mode=ct}f>>>=2,d-=2;break;case X:for(f>>>=7&d,d-=7&d;32>d;){if(0===h)break t;h--,f+=i[a++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=ct;break}if(n.length=65535&f,f=0,d=0,n.mode=V,e===I)break t;case V:n.mode=$;case $:if(v=n.length){if(v>h&&(v=h),v>u&&(v=u),0===v)break t;m.arraySet(o,i,a,v,s),h-=v,a+=v,u-=v,s+=v,n.length-=v;break}n.mode=Y;break;case J:for(;14>d;){if(0===h)break t;h--,f+=i[a++]<>>=5,d-=5,n.ndist=(31&f)+1,f>>>=5,d-=5,n.ncode=(15&f)+4,f>>>=4,d-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=ct;break}n.have=0,n.mode=Q;case Q:for(;n.haved;){if(0===h)break t;h--,f+=i[a++]<>>=3,d-=3}for(;n.have<19;)n.lens[At[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,kt={bits:n.lenbits},St=b(x,n.lens,0,19,n.lencode,0,n.work,kt),n.lenbits=kt.bits,St){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=tt;case tt:for(;n.have>>24,mt=Ct>>>16&255,yt=65535&Ct,!(d>=vt);){if(0===h)break t;h--,f+=i[a++]<yt)f>>>=vt,d-=vt,n.lens[n.have++]=yt;else{if(16===yt){for(Et=vt+2;Et>d;){if(0===h)break t;h--,f+=i[a++]<>>=vt,d-=vt,0===n.have){t.msg="invalid bit length repeat",n.mode=ct;break}xt=n.lens[n.have-1],v=3+(3&f),f>>>=2,d-=2}else if(17===yt){for(Et=vt+3;Et>d;){if(0===h)break t;h--,f+=i[a++]<>>=vt,d-=vt,xt=0,v=3+(7&f),f>>>=3,d-=3}else{for(Et=vt+7;Et>d;){if(0===h)break t;h--,f+=i[a++]<>>=vt,d-=vt,xt=0,v=11+(127&f),f>>>=7,d-=7}if(n.have+v>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=ct;break}for(;v--;)n.lens[n.have++]=xt}}if(n.mode===ct)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=ct;break}if(n.lenbits=9,kt={bits:n.lenbits},St=b(S,n.lens,0,n.nlen,n.lencode,0,n.work,kt),n.lenbits=kt.bits,St){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,kt={bits:n.distbits},St=b(k,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,kt),n.distbits=kt.bits,St){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=et,e===I)break t;case et:n.mode=nt;case nt:if(h>=6&&u>=258){t.next_out=s,t.avail_out=u,t.next_in=a,t.avail_in=h,n.hold=f,n.bits=d,_(t,g),s=t.next_out,o=t.output,u=t.avail_out,a=t.next_in,i=t.input,h=t.avail_in,f=n.hold,d=n.bits,n.mode===Y&&(n.back=-1);break}for(n.back=0;Ct=n.lencode[f&(1<>>24,mt=Ct>>>16&255,yt=65535&Ct,!(d>=vt);){if(0===h)break t;h--,f+=i[a++]<>wt)],vt=Ct>>>24,mt=Ct>>>16&255,yt=65535&Ct,!(d>=wt+vt);){if(0===h)break t;h--,f+=i[a++]<>>=wt,d-=wt,n.back+=wt}if(f>>>=vt,d-=vt,n.back+=vt,n.length=yt,0===mt){n.mode=st;break}if(32&mt){n.back=-1,n.mode=Y;break}if(64&mt){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=15&mt,n.mode=rt;case rt:if(n.extra){for(Et=n.extra;Et>d;){if(0===h)break t;h--,f+=i[a++]<>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=it;case it:for(;Ct=n.distcode[f&(1<>>24,mt=Ct>>>16&255,yt=65535&Ct,!(d>=vt);){if(0===h)break t;h--,f+=i[a++]<>wt)],vt=Ct>>>24,mt=Ct>>>16&255,yt=65535&Ct,!(d>=wt+vt);){if(0===h)break t;h--,f+=i[a++]<>>=wt,d-=wt,n.back+=wt}if(f>>>=vt,d-=vt,n.back+=vt,64&mt){t.msg="invalid distance code",n.mode=ct;break}n.offset=yt,n.extra=15&mt,n.mode=ot;case ot:if(n.extra){for(Et=n.extra;Et>d;){if(0===h)break t;h--,f+=i[a++]<>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=ct;break}n.mode=at;case at:if(0===u)break t;if(v=g-u,n.offset>v){if(v=n.offset-v,v>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=ct;break}v>n.wnext?(v-=n.wnext,pt=n.wsize-v):pt=n.wnext-v,v>n.length&&(v=n.length),gt=n.window}else gt=o,pt=s-n.offset,v=n.length;v>u&&(v=u),u-=v,n.length-=v;do o[s++]=gt[pt++];while(--v);0===n.length&&(n.mode=nt);break;case st:if(0===u)break t;o[s++]=n.length,u--,n.mode=nt;break;case ht:if(n.wrap){for(;32>d;){if(0===h)break t;h--,f|=i[a++]<d;){if(0===h)break t;h--,f+=i[a++]<=R;d=R+=1){for(A=t.readString(4),b=t.readShort(),I=t.readShort(),this.map[A]={list:[],named:{}},C=t.pos,t.pos=L+I,g=B=0;b>=B;g=B+=1)p=t.readShort(),k=t.readShort(),e=t.readByte(),n=t.readByte()<<16,o=t.readByte()<<8,a=t.readByte(),u=h+(0|n|o|a),f=t.readUInt32(),l={id:p,attributes:e,offset:u,handle:f},E=t.pos,-1!==k&&w+y>S+k?(t.pos=S+k,v=t.readByte(),l.name=t.readString(v)):"sfnt"===A&&(t.pos=l.offset,m=t.readUInt32(),c={},c.contents=new r(t.slice(t.pos,t.pos+m)),c.directory=new i(c.contents),x=new NameTable(c),l.name=x.fontName[0].raw),t.pos=E,this.map[A].list.push(l),l.name&&(this.map[A].named[l.name]=l);t.pos=C}},t.prototype.getNamedFont=function(t){var e,n,r,i,o,a;if(e=this.contents,i=e.pos,n=null!=(a=this.map.sfnt)?a.named[t]:void 0,!n)throw new Error("Font "+t+" not found in DFont file.");return e.pos=n.offset,r=e.readUInt32(),o=e.slice(e.pos,e.pos+r),e.pos=i,o},t}(),t.exports=e}).call(this)},function(t,e,n){(function(e){(function(){var r,i,o=[].slice;r=n(34),i=function(){function t(t){var e,n,r,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},n=r=0,i=this.tableCount;i>=0?i>r:r>i;n=i>=0?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}var n;return t.prototype.encode=function(t){var i,o,a,s,h,u,l,c,f,d,p,g,v,m;g=Object.keys(t).length,u=Math.log(2),f=16*Math.floor(Math.log(g)/u),s=Math.floor(f/u),c=16*g-f,o=new r,o.writeInt(this.scalarType),o.writeShort(g),o.writeShort(f),o.writeShort(s),o.writeShort(c),a=16*g,l=o.pos+a,h=null,v=[];for(m in t)for(p=t[m],o.writeString(m),o.writeInt(n(p)),o.writeInt(l),o.writeInt(p.length),v=v.concat(p),"head"===m&&(h=l),l+=p.length;l%4;)v.push(0),l++;return o.write(v),d=n(o.data),i=2981146554-d,o.pos=h+8,o.writeUInt32(i),new e(o.data)},n=function(t){var e,n,i,a,s;for(t=o.call(t);t.length%4;)t.push(0);for(i=new r(t),n=0,e=a=0,s=t.length;s>a;e=a+=4)n+=i.readUInt32();return 4294967295&n},t}(),t.exports=i}).call(this)}).call(e,n(4).Buffer)},function(t,e,n){(function(){var e,r,NameTable,i,o,a={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(99),e=n(34),o=n(89),NameTable=function(t){function NameTable(){return NameTable.__super__.constructor.apply(this,arguments)}var n;return s(NameTable,t),NameTable.prototype.tag="name",NameTable.prototype.parse=function(t){var e,n,i,o,a,s,h,u,l,c,f,d,p;for(t.pos=this.offset,o=t.readShort(),e=t.readShort(),h=t.readShort(),n=[],a=c=0;e>=0?e>c:c>e;a=e>=0?++c:--c)n.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+h+t.readShort()});for(u={},a=f=0,d=n.length;d>f;a=++f)i=n[a],t.pos=i.offset,l=t.readString(i.length),s=new r(l,i),null==u[p=i.nameID]&&(u[p]=[]),u[i.nameID].push(s);return this.strings=u,this.copyright=u[0],this.fontFamily=u[1],this.fontSubfamily=u[2],this.uniqueSubfamily=u[3],this.fontName=u[4],this.version=u[5],this.postscriptName=u[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""),this.trademark=u[7],this.manufacturer=u[8],this.designer=u[9],this.description=u[10],this.vendorUrl=u[11],this.designerUrl=u[12],this.license=u[13],this.licenseUrl=u[14],this.preferredFamily=u[15],this.preferredSubfamily=u[17],this.compatibleFull=u[18],this.sampleText=u[19]},n="AAAAAA",NameTable.prototype.encode=function(){var t,i,a,s,h,u,l,c,f,d,p,g,v,m;f={},m=this.strings;for(t in m)p=m[t],f[t]=p;h=new r(""+n+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),f[6]=[h],n=o.successorOf(n),u=0;for(t in f)i=f[t],null!=i&&(u+=i.length);d=new e,l=new e,d.writeShort(0),d.writeShort(u),d.writeShort(6+12*u);for(a in f)if(i=f[a],null!=i)for(g=0,v=i.length;v>g;g++)c=i[g],d.writeShort(c.platformID),d.writeShort(c.encodingID),d.writeShort(c.languageID),d.writeShort(a),d.writeShort(c.length),d.writeShort(l.pos),l.writeString(c.raw);return s={postscriptName:h.raw,table:d.data.concat(l.data)}},NameTable}(i),t.exports=NameTable,r=function(){function t(t,e){this.raw=t,this.length=this.raw.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID}return t}()}).call(this)},function(t,e,n){(function(){var e,HeadTable,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(99),e=n(34),HeadTable=function(t){function HeadTable(){return HeadTable.__super__.constructor.apply(this,arguments)}return o(HeadTable,t),HeadTable.prototype.tag="head",HeadTable.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},HeadTable.prototype.encode=function(t){var n;return n=new e,n.writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t.type),n.writeShort(this.glyphDataFormat),n.data},HeadTable}(r),t.exports=HeadTable}).call(this)},function(t,e,n){(function(){var e,CmapTable,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};i=n(99),r=n(34),CmapTable=function(t){function CmapTable(){return CmapTable.__super__.constructor.apply(this,arguments)}return a(CmapTable,t),CmapTable.prototype.tag="cmap",CmapTable.prototype.parse=function(t){var n,r,i,o;for(t.pos=this.offset,this.version=t.readUInt16(),i=t.readUInt16(),this.tables=[],this.unicode=null,r=o=0;i>=0?i>o:o>i;r=i>=0?++o:--o)n=new e(t,this.offset),this.tables.push(n),n.isUnicode&&null==this.unicode&&(this.unicode=n);return!0},CmapTable.encode=function(t,n){var i,o;return null==n&&(n="macroman"),i=e.encode(t,n),o=new r,o.writeUInt16(0),o.writeUInt16(1),i.table=o.data.concat(i.subtable),i},CmapTable}(i),e=function(){function t(t,e){var n,r,i,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=m=0;256>m;s=++m)this.codeMap[s]=t.readByte();break;case 4:for(d=t.readUInt16(),f=d/2,t.pos+=6,i=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),t.pos+=2,g=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),h=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),u=function(){var e,n;for(n=[],s=e=0;f>=0?f>e:e>f;s=f>=0?++e:--e)n.push(t.readUInt16());return n}(),r=(this.length-t.pos+this.offset)/2,a=function(){var e,n;for(n=[],s=e=0;r>=0?r>e:e>r;s=r>=0?++e:--e)n.push(t.readUInt16());return n}(),s=y=0,_=i.length;_>y;s=++y)for(v=i[s],p=g[s],n=w=p;v>=p?v>=w:w>=v;n=v>=p?++w:--w)0===u[s]?o=n+h[s]:(l=u[s]/2+(n-p)-(f-s),o=a[l]||0,0!==o&&(o+=h[s])),this.codeMap[n]=65535&o}t.pos=c}return t.encode=function(t,e){var n,i,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I,A,L,R,B,T,M,O,D,U,P,F,z,W,N,j,H,Z,G,q,Y,K,X;switch(B=new r,a=Object.keys(t).sort(function(t,e){return t-e}),e){case"macroman":for(g=0,v=function(){var t,e;for(e=[],p=t=0;256>t;p=++t)e.push(0);return e}(),y={0:0},o={},T=0,U=a.length;U>T;T++)i=a[T],null==y[q=t[i]]&&(y[q]=++g),o[i]={old:t[i],"new":y[t[i]]},v[i]=y[t[i]];return B.writeUInt16(1),B.writeUInt16(0),B.writeUInt32(12),B.writeUInt16(0), +B.writeUInt16(262),B.writeUInt16(0),B.write(v),k={charMap:o,subtable:B.data,maxGlyphID:g+1};case"unicode":for(L=[],c=[],w=0,y={},n={},m=u=null,M=0,P=a.length;P>M;M++)i=a[M],b=t[i],null==y[b]&&(y[b]=++w),n[i]={old:b,"new":y[b]},s=y[b]-i,(null==m||s!==u)&&(m&&c.push(m),L.push(i),u=s),m=i;for(m&&c.push(m),c.push(65535),L.push(65535),C=L.length,I=2*C,E=2*Math.pow(Math.log(C)/Math.LN2,2),f=Math.log(E/2)/Math.LN2,S=2*C-E,h=[],x=[],d=[],p=O=0,F=L.length;F>O;p=++O){if(A=L[p],l=c[p],65535===A){h.push(0),x.push(0);break}if(R=n[A]["new"],A-R>=32768)for(h.push(0),x.push(2*(d.length+C-p)),i=D=A;l>=A?l>=D:D>=l;i=l>=A?++D:--D)d.push(n[i]["new"]);else h.push(R-A),x.push(0)}for(B.writeUInt16(3),B.writeUInt16(1),B.writeUInt32(12),B.writeUInt16(4),B.writeUInt16(16+8*C+2*d.length),B.writeUInt16(0),B.writeUInt16(I),B.writeUInt16(E),B.writeUInt16(f),B.writeUInt16(S),Z=0,z=c.length;z>Z;Z++)i=c[Z],B.writeUInt16(i);for(B.writeUInt16(0),G=0,W=L.length;W>G;G++)i=L[G],B.writeUInt16(i);for(Y=0,N=h.length;N>Y;Y++)s=h[Y],B.writeUInt16(s);for(K=0,j=x.length;j>K;K++)_=x[K],B.writeUInt16(_);for(X=0,H=d.length;H>X;X++)g=d[X],B.writeUInt16(g);return k={charMap:n,subtable:B.data,maxGlyphID:w+1}}},t}(),t.exports=CmapTable}).call(this)},function(t,e,n){(function(){var e,HmtxTable,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(99),e=n(34),HmtxTable=function(t){function HmtxTable(){return HmtxTable.__super__.constructor.apply(this,arguments)}return o(HmtxTable,t),HmtxTable.prototype.tag="hmtx",HmtxTable.prototype.parse=function(t){var e,n,r,i,o,a,s,h;for(t.pos=this.offset,this.metrics=[],e=o=0,s=this.file.hhea.numberOfMetrics;s>=0?s>o:o>s;e=s>=0?++o:--o)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i;for(i=[],e=n=0;r>=0?r>n:n>r;e=r>=0?++n:--n)i.push(t.readInt16());return i}(),this.widths=function(){var t,e,n,r;for(n=this.metrics,r=[],t=0,e=n.length;e>t;t++)i=n[t],r.push(i.advance);return r}.call(this),n=this.widths[this.widths.length-1],h=[],e=a=0;r>=0?r>a:a>r;e=r>=0?++a:--a)h.push(this.widths.push(n));return h},HmtxTable.prototype.forGlyph=function(t){var e;return t in this.metrics?this.metrics[t]:e={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},HmtxTable.prototype.encode=function(t){var n,r,i,o,a;for(i=new e,o=0,a=t.length;a>o;o++)n=t[o],r=this.forGlyph(n),i.writeUInt16(r.advance),i.writeUInt16(r.lsb);return i.data},HmtxTable}(r),t.exports=HmtxTable}).call(this)},function(t,e,n){(function(){var e,HheaTable,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(99),e=n(34),HheaTable=function(t){function HheaTable(){return HheaTable.__super__.constructor.apply(this,arguments)}return o(HheaTable,t),HheaTable.prototype.tag="hhea",HheaTable.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},HheaTable.prototype.encode=function(t){var n,r,i,o;for(r=new e,r.writeInt(this.version),r.writeShort(this.ascender),r.writeShort(this.decender),r.writeShort(this.lineGap),r.writeShort(this.advanceWidthMax),r.writeShort(this.minLeftSideBearing),r.writeShort(this.minRightSideBearing),r.writeShort(this.xMaxExtent),r.writeShort(this.caretSlopeRise),r.writeShort(this.caretSlopeRun),r.writeShort(this.caretOffset),n=i=0,o=8;o>=0?o>i:i>o;n=o>=0?++i:--i)r.writeByte(0);return r.writeShort(this.metricDataFormat),r.writeUInt16(t.length),r.data},HheaTable}(r),t.exports=HheaTable}).call(this)},function(t,e,n){(function(){var e,MaxpTable,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(99),e=n(34),MaxpTable=function(t){function MaxpTable(){return MaxpTable.__super__.constructor.apply(this,arguments)}return o(MaxpTable,t),MaxpTable.prototype.tag="maxp",MaxpTable.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},MaxpTable.prototype.encode=function(t){var n;return n=new e,n.writeInt(this.version),n.writeUInt16(t.length),n.writeUInt16(this.maxPoints),n.writeUInt16(this.maxContours),n.writeUInt16(this.maxCompositePoints),n.writeUInt16(this.maxComponentContours),n.writeUInt16(this.maxZones),n.writeUInt16(this.maxTwilightPoints),n.writeUInt16(this.maxStorage),n.writeUInt16(this.maxFunctionDefs),n.writeUInt16(this.maxInstructionDefs),n.writeUInt16(this.maxStackElements),n.writeUInt16(this.maxSizeOfInstructions),n.writeUInt16(this.maxComponentElements),n.writeUInt16(this.maxComponentDepth),n.data},MaxpTable}(r),t.exports=MaxpTable}).call(this)},function(t,e,n){(function(){var e,PostTable,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(99),e=n(34),PostTable=function(t){function PostTable(){return PostTable.__super__.constructor.apply(this,arguments)}var n;return o(PostTable,t),PostTable.prototype.tag="post",PostTable.prototype.parse=function(t){var e,n,r,i,o;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:for(r=t.readUInt16(),this.glyphNameIndex=[],e=i=0;r>=0?r>i:i>r;e=r>=0?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],o=[];t.pos=0?r>n:n>r;e=r>=0?++n:--n)i.push(t.readUInt32());return i}.call(this)}},PostTable.prototype.glyphFor=function(t){var e;switch(this.format){case 65536:return n[t]||".notdef";case 131072:return e=this.glyphNameIndex[t],257>=e?n[e]:this.names[e-258]||".notdef";case 151552:return n[t+this.offsets[t]]||".notdef";case 196608:return".notdef";case 262144:return this.map[t]||65535}},PostTable.prototype.encode=function(t){var r,i,o,a,s,h,u,l,c,f,d,p,g,v,m;if(!this.exists)return null;if(h=this.raw(),196608===this.format)return h;for(c=new e(h.slice(0,32)),c.writeUInt32(131072),c.pos=32,o=[],l=[],f=0,g=t.length;g>f;f++)r=t[f],s=this.glyphFor(r),a=n.indexOf(s),-1!==a?o.push(a):(o.push(257+l.length),l.push(s));for(c.writeUInt16(Object.keys(t).length),d=0,v=o.length;v>d;d++)i=o[d],c.writeUInt16(i);for(p=0,m=l.length;m>p;p++)u=l[p],c.writeByte(u.length),c.writeString(u);return c.data},n=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\nbracketleft backslash bracketright asciicircum underscore grave\na b c d e f g h i j k l m n o p q r s t u v w x y z\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),PostTable}(r),t.exports=PostTable}).call(this)},function(t,e,n){(function(){var OS2Table,e,r={}.hasOwnProperty,i=function(t,e){function n(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};e=n(99),OS2Table=function(t){function OS2Table(){return OS2Table.__super__.constructor.apply(this,arguments)}return i(OS2Table,t),OS2Table.prototype.tag="OS/2",OS2Table.prototype.parse=function(t){var e;return t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,r;for(r=[],e=n=0;10>n;e=++n)r.push(t.readByte());return r}(),this.charRange=function(){var n,r;for(r=[],e=n=0;4>n;e=++n)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,r;for(r=[],e=n=0;2>n;e=++n)r.push(t.readInt());return r}(),this.version>1)?(this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()):void 0},OS2Table.prototype.encode=function(){return this.raw()},OS2Table}(e),t.exports=OS2Table}).call(this)},function(t,e,n){(function(){var e,LocaTable,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=n(99),e=n(34),LocaTable=function(t){function LocaTable(){return LocaTable.__super__.constructor.apply(this,arguments)}return o(LocaTable,t),LocaTable.prototype.tag="loca",LocaTable.prototype.parse=function(t){var e,n;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=0===e?function(){var e,r,i;for(i=[],n=e=0,r=this.length;r>e;n=e+=2)i.push(2*t.readUInt16());return i}.call(this):function(){var e,r,i;for(i=[],n=e=0,r=this.length;r>e;n=e+=4)i.push(t.readUInt32());return i}.call(this)},LocaTable.prototype.indexOf=function(t){return this.offsets[t]},LocaTable.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},LocaTable.prototype.encode=function(t){var n,r,i,o,a,s,h,u,l,c,f;for(o=new e,a=0,u=t.length;u>a;a++)if(r=t[a],r>65535){for(f=this.offsets,s=0,l=f.length;l>s;s++)n=f[s],o.writeUInt32(n);return i={format:1,table:o.data}}for(h=0,c=t.length;c>h;h++)n=t[h],o.writeUInt16(n/2);return i={format:0,table:o.data}},LocaTable}(r),t.exports=LocaTable}).call(this)},function(t,e,n){(function(){e.successorOf=function(t){var e,n,r,i,o,a,s,h,u,l;for(n="abcdefghijklmnopqrstuvwxyz",h=n.length,l=t,i=t.length;i>=0;){if(s=t.charAt(--i),isNaN(s)){if(o=n.indexOf(s.toLowerCase()),-1===o)u=s,r=!0;else if(u=n.charAt((o+1)%h),a=s===s.toUpperCase(),a&&(u=u.toUpperCase()),r=o+1>=h,r&&0===i){e=a?"A":"a",l=e+u+l.slice(1);break}}else if(u=+s+1,r=u>9,r&&(u=0),r&&0===i){l="1"+u+l.slice(1);break}if(l=l.slice(0,i)+u+l.slice(i+1),!r)break}return l},e.invert=function(t){var e,n,r;n={};for(e in t)r=t[e],n[r]=e;return n}}).call(this)},function(t,e,n){(function(){var e,r,GlyfTable,i,o,a={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h=[].slice;o=n(99),r=n(34),GlyfTable=function(t){function GlyfTable(){return GlyfTable.__super__.constructor.apply(this,arguments)}return s(GlyfTable,t),GlyfTable.prototype.tag="glyf",GlyfTable.prototype.parse=function(t){return this.cache={}},GlyfTable.prototype.glyphFor=function(t){var n,o,a,s,h,u,l,c,f,d;return t in this.cache?this.cache[t]:(s=this.file.loca,n=this.file.contents,o=s.indexOf(t),a=s.lengthOf(t),0===a?this.cache[t]=null:(n.pos=this.offset+o,u=new r(n.read(a)),h=u.readShort(),c=u.readShort(),d=u.readShort(),l=u.readShort(),f=u.readShort(),this.cache[t]=-1===h?new e(u,c,d,l,f):new i(u,h,c,d,l,f),this.cache[t]))},GlyfTable.prototype.encode=function(t,e,n){var r,i,o,a,s,h;for(a=[],o=[],s=0,h=e.length;h>s;s++)i=e[s],r=t[i],o.push(a.length),r&&(a=a.concat(r.encode(n)));return o.push(a.length),{table:a,offsets:o}},GlyfTable}(o),i=function(){function t(t,e,n,r,i,o){this.raw=t,this.numberOfContours=e,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=o,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),e=function(){function t(t,r,s,h,u){var l,c;for(this.raw=t,this.xMin=r,this.yMin=s,this.xMax=h,this.yMax=u,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],l=this.raw;;){if(c=l.readShort(),this.glyphOffsets.push(l.pos),this.glyphIDs.push(l.readShort()),!(c&n))break;l.pos+=c&e?4:2,c&a?l.pos+=8:c&i?l.pos+=4:c&o&&(l.pos+=2)}}var e,n,i,o,a,s;return e=1,o=8,n=32,i=64,a=128,s=256,t.prototype.encode=function(t){var e,n,i,o,a,s;for(i=new r(h.call(this.raw.data)),s=this.glyphIDs,e=o=0,a=s.length;a>o;e=++o)n=s[e],i.pos=this.glyphOffsets[e],i.writeShort(t[n]);return i.data},t}(),t.exports=GlyfTable}).call(this)},function(t,e,n){(function(){var t,n,r,i,o;e.DI_BRK=r=0,e.IN_BRK=i=1,e.CI_BRK=t=2,e.CP_BRK=n=3,e.PR_BRK=o=4,e.pairTable=[[o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,n,o,o,o,o,o,o,o],[r,o,o,i,i,o,o,o,o,i,i,r,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,i,o,o,o,o,i,i,i,i,i,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[o,o,o,i,i,i,o,o,o,i,i,i,i,i,i,i,i,i,i,i,o,t,o,i,i,i,i,i,i],[i,o,o,i,i,i,o,o,o,i,i,i,i,i,i,i,i,i,i,i,o,t,o,i,i,i,i,i,i],[r,o,o,i,i,i,o,o,o,r,r,r,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,i,i,o,o,o,r,r,r,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,i,i,o,o,o,r,r,i,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,i,i,o,o,o,r,r,i,i,i,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,r,r,i,i,i,i,r,i,i,r,r,o,t,o,i,i,i,i,i,r],[i,o,o,i,i,i,o,o,o,r,r,i,i,i,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,i,i,i,i,i,r,i,i,i,r,r,o,t,o,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,r,r,i,i,i,r,i,i,i,r,r,o,t,o,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,r,r,i,i,i,r,i,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,i,i,o,o,o,r,i,r,r,r,r,i,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,i,i,o,o,o,r,r,r,r,r,r,i,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,r,i,o,o,o,r,r,i,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[r,o,o,i,r,i,o,o,o,r,r,r,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,i,i,i,i,i,i,i,i,i,i,i,o,t,o,i,i,i,i,i,i],[r,o,o,i,i,i,o,o,o,r,r,r,r,r,r,r,i,i,r,o,o,t,o,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,o,r,r,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,r,r,i,i,i,r,i,i,i,r,r,o,t,o,r,r,r,r,r,r],[i,o,o,i,i,i,o,o,o,i,i,i,i,i,i,i,i,i,i,i,o,t,o,i,i,i,i,i,i],[r,o,o,i,i,i,o,o,o,r,i,r,r,r,r,i,i,i,r,r,o,t,o,r,r,r,i,i,r],[r,o,o,i,i,i,o,o,o,r,i,r,r,r,r,i,i,i,r,r,o,t,o,r,r,r,r,i,r],[r,o,o,i,i,i,o,o,o,r,i,r,r,r,r,i,i,i,r,r,o,t,o,i,i,i,i,r,r],[r,o,o,i,i,i,o,o,o,r,i,r,r,r,r,i,i,i,r,r,o,t,o,r,r,r,i,i,r],[r,o,o,i,i,i,o,o,o,r,i,r,r,r,r,i,i,i,r,r,o,t,o,r,r,r,r,i,r],[r,o,o,i,i,i,o,o,o,r,r,r,r,r,r,r,i,i,r,r,o,t,o,r,r,r,r,r,i]]}).call(this)},function(t,e,n){(function(){var t,n,r,i,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I,A,L,R,B,T,M,O,D,U,P,F,z,W;e.OP=L=0,e.CL=u=1,e.CP=c=2,e.QU=T=3,e.GL=p=4,e.NS=I=5,e.EX=d=6,e.SY=P=7,e.IS=b=8,e.PR=B=9,e.PO=R=10,e.NU=A=11,e.AL=n=12,e.HL=m=13,e.ID=w=14,e.IN=_=15,e.HY=y=16,e.BA=i=17,e.BB=o=18,e.B2=r=19,e.ZW=W=20,e.CM=l=21,e.WJ=F=22,e.H2=g=23,e.H3=v=24,e.JL=x=25,e.JV=k=26,e.JT=S=27,e.RI=M=28,e.AI=t=29,e.BK=a=30,e.CB=s=31,e.CJ=h=32,e.CR=f=33,e.LF=E=34,e.NL=C=35,e.SA=O=36,e.SG=D=37,e.SP=U=38,e.XX=z=39}).call(this)},function(t,e,n){},function(t,e,n){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";function r(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t){return 256>t?at[t]:at[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function a(t,e,n){t.bi_valid>Y-n?(t.bi_buf|=e<>Y-t.bi_valid,t.bi_valid+=n-Y):(t.bi_buf|=e<>>=1,n<<=1;while(--e>0);return n>>>1}function u(t){16===t.bi_valid?(o(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function l(t,e){var n,r,i,o,a,s,h=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,c=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(o=0;q>=o;o++)t.bl_count[o]=0;for(h[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;G>n;n++)r=t.heap[n],o=h[2*h[2*r+1]+1]+1,o>p&&(o=p,g++),h[2*r+1]=o,r>u||(t.bl_count[o]++,a=0,r>=d&&(a=f[r-d]),s=h[2*r],t.opt_len+=s*(o+a),c&&(t.static_len+=s*(l[2*r+1]+a)));if(0!==g){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(r=t.bl_count[o];0!==r;)i=t.heap[--n],i>u||(h[2*i+1]!==o&&(t.opt_len+=(o-h[2*i+1])*h[2*i],h[2*i+1]=o),r--)}}function c(t,e,n){var r,i,o=new Array(q+1),a=0;for(r=1;q>=r;r++)o[r]=a=a+n[r-1]<<1;for(i=0;e>=i;i++){var s=t[2*i+1];0!==s&&(t[2*i]=h(o[s]++,s))}}function f(){var t,e,n,r,i,o=new Array(q+1);for(n=0,r=0;W-1>r;r++)for(ht[r]=n,t=0;t<1<r;r++)for(ut[r]=i,t=0;t<1<>=7;H>r;r++)for(ut[r]=i<<7,t=0;t<1<=e;e++)o[e]=0;for(t=0;143>=t;)it[2*t+1]=8,t++,o[8]++;for(;255>=t;)it[2*t+1]=9,t++,o[9]++;for(;279>=t;)it[2*t+1]=7,t++,o[7]++;for(;287>=t;)it[2*t+1]=8,t++,o[8]++;for(c(it,j+1,o),t=0;H>t;t++)ot[2*t+1]=5,ot[2*t]=h(t,5);lt=new dt(it,Q,N+1,j,q),ct=new dt(ot,tt,0,H,q),ft=new dt(new Array(0),et,0,Z,K)}function d(t){var e;for(e=0;j>e;e++)t.dyn_ltree[2*e]=0;for(e=0;H>e;e++)t.dyn_dtree[2*e]=0;for(e=0;Z>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*X]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function p(t){t.bi_valid>8?o(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function g(t,e,n,r){p(t),r&&(o(t,n),o(t,~n)),R.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}function v(t,e,n,r){var i=2*e,o=2*n;return t[i]n;n++)0!==o[2*n]?(t.heap[++t.heap_len]=u=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>u?++u:0,o[2*i]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=a[2*i+1]);for(e.max_code=u,n=t.heap_len>>1;n>=1;n--)m(t,o,n);i=h;do n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],m(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,o[2*i]=o[2*n]+o[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,o[2*n+1]=o[2*r+1]=i,t.heap[1]=i++,m(t,o,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],l(t,e),c(o,u,t.bl_count)}function _(t,e,n){var r,i,o=-1,a=e[1],s=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(n+1)+1]=65535,r=0;n>=r;r++)i=a,a=e[2*(r+1)+1],++ss?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[2*V]++):10>=s?t.bl_tree[2*$]++:t.bl_tree[2*J]++,s=0,o=i,0===a?(h=138,u=3):i===a?(h=6,u=3):(h=7,u=4))}function b(t,e,n){var r,i,o=-1,h=e[1],u=0,l=7,c=4;for(0===h&&(l=138,c=3),r=0;n>=r;r++)if(i=h,h=e[2*(r+1)+1],!(++uu){do s(t,i,t.bl_tree);while(0!==--u)}else 0!==i?(i!==o&&(s(t,i,t.bl_tree),u--),s(t,V,t.bl_tree),a(t,u-3,2)):10>=u?(s(t,$,t.bl_tree),a(t,u-3,3)):(s(t,J,t.bl_tree),a(t,u-11,7));u=0,o=i,0===h?(l=138,c=3):i===h?(l=6,c=3):(l=7,c=4)}}function x(t){var e;for(_(t,t.dyn_ltree,t.l_desc.max_code),_(t,t.dyn_dtree,t.d_desc.max_code),w(t,t.bl_desc),e=Z-1;e>=3&&0===t.bl_tree[2*nt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function S(t,e,n,r){var i;for(a(t,e-257,5),a(t,n-1,5),a(t,r-4,4),i=0;r>i;i++)a(t,t.bl_tree[2*nt[i]+1],3);b(t,t.dyn_ltree,e-1),b(t,t.dyn_dtree,n-1)}function k(t){var e,n=4093624447;for(e=0;31>=e;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return T;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return M;for(e=32;N>e;e++)if(0!==t.dyn_ltree[2*e])return M;return T}function E(t){gt||(f(),gt=!0),t.l_desc=new pt(t.dyn_ltree,lt),t.d_desc=new pt(t.dyn_dtree,ct),t.bl_desc=new pt(t.bl_tree,ft),t.bi_buf=0,t.bi_valid=0,d(t)}function C(t,e,n,r){a(t,(D<<1)+(r?1:0),3),g(t,e,n,!0)}function I(t){a(t,U<<1,3),s(t,X,it),u(t)}function A(t,e,n,r){var i,o,s=0;t.level>0?(t.strm.data_type===O&&(t.strm.data_type=k(t)),w(t,t.l_desc),w(t,t.d_desc),s=x(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,i>=o&&(i=o)):i=o=n+5,i>=n+4&&-1!==e?C(t,e,n,r):t.strategy===B||o===i?(a(t,(U<<1)+(r?1:0),3),y(t,it,ot)):(a(t,(P<<1)+(r?1:0),3),S(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),y(t,t.dyn_ltree,t.dyn_dtree)),d(t),r&&p(t)}function L(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(st[n]+N+1)]++,t.dyn_dtree[2*i(e)]++),t.last_lit===t.lit_bufsize-1}var R=n(98),B=4,T=0,M=1,O=2,D=0,U=1,P=2,F=3,z=258,W=29,N=256,j=N+1+W,H=30,Z=19,G=2*j+1,q=15,Y=16,K=7,X=256,V=16,$=17,J=18,Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],et=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],rt=512,it=new Array(2*(j+2));r(it);var ot=new Array(2*H);r(ot);var at=new Array(rt);r(at);var st=new Array(z-F+1);r(st);var ht=new Array(W);r(ht);var ut=new Array(H);r(ut);var lt,ct,ft,dt=function(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length},pt=function(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e},gt=!1;e._tr_init=E,e._tr_stored_block=C,e._tr_flush_block=A,e._tr_tally=L,e._tr_align=I},function(t,e,n){"use strict";function r(t,e,n,r){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){a=n>2e3?2e3:n,n-=a;do i=i+e[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}t.exports=r},function(t,e,n){"use strict";function r(){for(var t,e=[],n=0;256>n;n++){t=n;for(var r=0;8>r;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}function i(t,e,n,r){var i=o,a=r+n;t=-1^t;for(var s=r;a>s;s++)t=t>>>8^i[255&(t^e[s])];return-1^t}var o=r();t.exports=i},function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(n,n+r),i);for(var o=0;r>o;o++)t[i+o]=e[n+o]},flattenChunks:function(t){var e,n,r,i,o,a;for(r=0,e=0,n=t.length;n>e;e++)r+=t[e].length;for(a=new Uint8Array(r),i=0,e=0,n=t.length;n>e;e++)o=t[e],a.set(o,i),i+=o.length;return a}},o={arraySet:function(t,e,n,r,i){for(var o=0;r>o;o++)t[i+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,i)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(r)},function(t,e,n){(function(){var e;e=function(){function t(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}(),t.exports=e}).call(this)},function(t,e,n){var r,i=[].slice;r=function(){function t(t){var e,n;null==t&&(t={}),this.data=t.data||[],this.highStart=null!=(e=t.highStart)?e:0,this.errorValue=null!=(n=t.errorValue)?n:-1}var e,n,r,o,a,s,h,u,l,c,f,d,p,g,v,m;return d=11,g=5,p=d-g,f=65536>>d,a=1<>g,l=1024>>g,s=c+l,m=s,v=32,o=m+v,n=1<t||t>1114111?this.errorValue:55296>t||t>56319&&65535>=t?(e=(this.data[t>>g]<=t?(e=(this.data[c+(t-55296>>g)]<>d)],e=this.data[e+(t>>g&h)],e=(e<=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&56319>=r)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,r=e.charCodeAt(i);if(r>=55296&&56319>=r){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},u.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(2>=e&&n>>4==14){this.charLength=3;break}if(3>=e&&n>>3==30){this.charLength=4;break}}this.charReceived=e},u.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e}},function(t,e,n){"use strict";var r=30,i=12;t.exports=function(t,e){var n,o,a,s,h,u,l,c,f,d,p,g,v,m,y,w,_,b,x,S,k,E,C,I,A;n=t.state,o=t.next_in,I=t.input,a=o+(t.avail_in-5),s=t.next_out,A=t.output,h=s-(e-t.avail_out),u=s+(t.avail_out-257),l=n.dmax,c=n.wsize,f=n.whave,d=n.wnext,p=n.window,g=n.hold,v=n.bits,m=n.lencode,y=n.distcode,w=(1<v&&(g+=I[o++]<>>24,g>>>=x,v-=x,x=b>>>16&255,0===x)A[s++]=65535&b;else{if(!(16&x)){if(0===(64&x)){b=m[(65535&b)+(g&(1<v&&(g+=I[o++]<>>=x,v-=x),15>v&&(g+=I[o++]<>>24,g>>>=x,v-=x,x=b>>>16&255,!(16&x)){if(0===(64&x)){b=y[(65535&b)+(g&(1<v&&(g+=I[o++]<v&&(g+=I[o++]<l){t.msg="invalid distance too far back",n.mode=r;break t}if(g>>>=x,v-=x,x=s-h,k>x){if(x=k-x,x>f&&n.sane){t.msg="invalid distance too far back",n.mode=r;break t}if(E=0,C=p,0===d){if(E+=c-x,S>x){S-=x;do A[s++]=p[E++];while(--x);E=s-k,C=A}}else if(x>d){if(E+=c+d-x,x-=d,S>x){S-=x;do A[s++]=p[E++];while(--x);if(E=0,S>d){x=d,S-=x;do A[s++]=p[E++];while(--x);E=s-k,C=A}}}else if(E+=d-x,S>x){S-=x;do A[s++]=p[E++];while(--x);E=s-k,C=A}for(;S>2;)A[s++]=C[E++],A[s++]=C[E++],A[s++]=C[E++],S-=3;S&&(A[s++]=C[E++],S>1&&(A[s++]=C[E++]))}else{E=s-k;do A[s++]=A[E++],A[s++]=A[E++],A[s++]=A[E++],S-=3;while(S>2);S&&(A[s++]=A[E++],S>1&&(A[s++]=A[E++]))}break}}break}}while(a>o&&u>s);S=v>>3,o-=S,v-=S<<3,g&=(1<o?5+(a-o):5-(o-a),t.avail_out=u>s?257+(u-s):257-(s-u),n.hold=g,n.bits=v}},function(t,e,n){"use strict";var r=n(98),i=15,o=852,a=592,s=0,h=1,u=2,l=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],c=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],f=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],d=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]; + +t.exports=function(t,e,n,p,g,v,m,y){var w,_,b,x,S,k,E,C,I,A=y.bits,L=0,R=0,B=0,T=0,M=0,O=0,D=0,U=0,P=0,F=0,z=null,W=0,N=new r.Buf16(i+1),j=new r.Buf16(i+1),H=null,Z=0;for(L=0;i>=L;L++)N[L]=0;for(R=0;p>R;R++)N[e[n+R]]++;for(M=A,T=i;T>=1&&0===N[T];T--);if(M>T&&(M=T),0===T)return g[v++]=20971520,g[v++]=20971520,y.bits=1,0;for(B=1;T>B&&0===N[B];B++);for(B>M&&(M=B),U=1,L=1;i>=L;L++)if(U<<=1,U-=N[L],0>U)return-1;if(U>0&&(t===s||1!==T))return-1;for(j[1]=0,L=1;i>L;L++)j[L+1]=j[L]+N[L];for(R=0;p>R;R++)0!==e[n+R]&&(m[j[e[n+R]]++]=R);if(t===s?(z=H=m,k=19):t===h?(z=l,W-=257,H=c,Z-=257,k=256):(z=f,H=d,k=-1),F=0,R=0,L=B,S=v,O=M,D=0,b=-1,P=1<o||t===u&&P>a)return 1;for(var G=0;;){G++,E=L-D,m[R]k?(C=H[Z+m[R]],I=z[W+m[R]]):(C=96,I=0),w=1<>D)+_]=E<<24|C<<16|I|0;while(0!==_);for(w=1<>=1;if(0!==w?(F&=w-1,F+=w):F=0,R++,0===--N[L]){if(L===T)break;L=e[n+m[R]]}if(L>M&&(F&x)!==b){for(0===D&&(D=M),S+=B,O=L-D,U=1<O+D&&(U-=N[O+D],!(0>=U));)O++,U<<=1;if(P+=1<o||t===u&&P>a)return 1;b=F&x,g[b]=M<<24|O<<16|S-v|0}}return 0!==F&&(g[S+F]=L-D<<24|64<<16|0),y.bits=M,0}},function(t,e,n){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){(function(t){function n(t){return Array.isArray(t)}function r(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function a(t){return"number"==typeof t}function s(t){return"string"==typeof t}function h(t){return"symbol"==typeof t}function u(t){return void 0===t}function l(t){return c(t)&&"[object RegExp]"===m(t)}function c(t){return"object"==typeof t&&null!==t}function f(t){return c(t)&&"[object Date]"===m(t)}function d(t){return c(t)&&("[object Error]"===m(t)||t instanceof Error)}function p(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function v(e){return t.isBuffer(e)}function m(t){return Object.prototype.toString.call(t)}e.isArray=n,e.isBoolean=r,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=a,e.isString=s,e.isSymbol=h,e.isUndefined=u,e.isRegExp=l,e.isObject=c,e.isDate=f,e.isError=d,e.isFunction=p,e.isPrimitive=g,e.isBuffer=v}).call(e,n(4).Buffer)},function(t,e,n){t.exports={data:[1961,1969,1977,1985,2025,2033,2041,2049,2057,2065,2073,2081,2089,2097,2105,2113,2121,2129,2137,2145,2153,2161,2169,2177,2185,2193,2201,2209,2217,2225,2233,2241,2249,2257,2265,2273,2281,2289,2297,2305,2313,2321,2329,2337,2345,2353,2361,2369,2377,2385,2393,2401,2409,2417,2425,2433,2441,2449,2457,2465,2473,2481,2489,2497,2505,2513,2521,2529,2529,2537,2009,2545,2553,2561,2569,2577,2585,2593,2601,2609,2617,2625,2633,2641,2649,2657,2665,2673,2681,2689,2697,2705,2713,2721,2729,2737,2745,2753,2761,2769,2777,2785,2793,2801,2809,2817,2825,2833,2841,2849,2857,2865,2873,2881,2889,2009,2897,2905,2913,2009,2921,2929,2937,2945,2953,2961,2969,2009,2977,2977,2985,2993,3001,3009,3009,3009,3017,3017,3017,3025,3025,3033,3041,3041,3049,3049,3049,3049,3049,3049,3049,3049,3049,3049,3057,3065,3073,3073,3073,3081,3089,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3097,3105,3113,3113,3121,3129,3137,3145,3153,3161,3161,3169,3177,3185,3193,3193,3193,3193,3201,3209,3209,3217,3225,3233,3241,3241,3241,3249,3257,3265,3273,3273,3281,3289,3297,2009,2009,3305,3313,3321,3329,3337,3345,3353,3361,3369,3377,3385,3393,2009,2009,3401,3409,3417,3417,3417,3417,3417,3417,3425,3425,3433,3433,3433,3433,3433,3433,3433,3433,3433,3433,3433,3433,3433,3433,3433,3441,3449,3457,3465,3473,3481,3489,3497,3505,3513,3521,3529,3537,3545,3553,3561,3569,3577,3585,3593,3601,3609,3617,3625,3625,3633,3641,3649,3649,3649,3649,3649,3657,3665,3665,3673,3681,3681,3681,3681,3689,3697,3697,3705,3713,3721,3729,3737,3745,3753,3761,3769,3777,3785,3793,3801,3809,3817,3825,3833,3841,3849,3857,3865,3873,3881,3881,3881,3881,3881,3881,3881,3881,3881,3881,3881,3881,3889,3897,3905,3913,3921,3921,3921,3921,3921,3921,3921,3921,3921,3921,3929,2009,2009,2009,2009,2009,3937,3937,3937,3937,3937,3937,3937,3945,3953,3953,3953,3961,3969,3969,3977,3985,3993,4001,2009,2009,4009,4009,4009,4009,4009,4009,4009,4009,4009,4009,4009,4009,4017,4025,4033,4041,4049,4057,4065,4073,4081,4081,4081,4081,4081,4081,4081,4089,4097,4097,4105,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4113,4121,4121,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4129,4137,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4145,4153,4161,4169,4169,4169,4169,4169,4169,4169,4169,4177,4185,4193,4201,4209,4217,4217,4225,4233,4233,4233,4233,4233,4233,4233,4233,4241,4249,4257,4265,4273,4281,4289,4297,4305,4313,4321,4329,4337,4345,4353,4361,4361,4369,4377,4385,4385,4385,4385,4393,4401,4409,4409,4409,4409,4409,4409,4417,4425,4433,4441,4449,4457,4465,4473,4481,4489,4497,4505,4513,4521,4529,4537,4545,4553,4561,4569,4577,4585,4593,4601,4609,4617,4625,4633,4641,4649,4657,4665,4673,4681,4689,4697,4705,4713,4721,4729,4737,4745,4753,4761,4769,4777,4785,4793,4801,4809,4817,4825,4833,4841,4849,4857,4865,4873,4881,4889,4897,4905,4913,4921,4929,4937,4945,4953,4961,4969,4977,4985,4993,5001,5009,5017,5025,5033,5041,5049,5057,5065,5073,5081,5089,5097,5105,5113,5121,5129,5137,5145,5153,5161,5169,5177,5185,5193,5201,5209,5217,5225,5233,5241,5249,5257,5265,5273,5281,5289,5297,5305,5313,5321,5329,5337,5345,5353,5361,5369,5377,5385,5393,5401,5409,5417,5425,5433,5441,5449,5457,5465,5473,5481,5489,5497,5505,5513,5521,5529,5537,5545,5553,5561,5569,5577,5585,5593,5601,5609,5617,5625,5633,5641,5649,5657,5665,5673,5681,5689,5697,5705,5713,5721,5729,5737,5745,5753,5761,5769,5777,5785,5793,5801,5809,5817,5825,5833,5841,5849,5857,5865,5873,5881,5889,5897,5905,5913,5921,5929,5937,5945,5953,5961,5969,5977,5985,5993,6001,6009,6017,6025,6033,6041,6049,6057,6065,6073,6081,6089,6097,6105,6113,6121,6129,6137,6145,6153,6161,6169,6177,6185,6193,6201,6209,6217,6225,6233,6241,6249,6257,6265,6273,6281,6289,6297,6305,6313,6321,6329,6337,6345,6353,6361,6369,6377,6385,6393,6401,6409,6417,6425,6433,6441,6449,6457,6465,6473,6481,6489,6497,6505,6513,6521,6529,6537,6545,6553,6561,6569,6577,6585,6593,6601,6609,6617,6625,6633,6641,6649,6657,6665,6673,6681,6689,6697,6705,6713,6721,6729,6737,6745,6753,6761,6769,6777,6785,6793,6801,6809,6817,6825,6833,6841,6849,6857,6865,6873,6881,6889,6897,6905,6913,6921,6929,6937,6945,6953,6961,6969,6977,6985,6993,7001,7009,7017,7025,7033,7041,7049,7057,7065,7073,7081,7089,7097,7105,7113,7121,7129,7137,7145,7153,7161,7169,7177,7185,7193,7201,7209,7217,7225,7233,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7249,7257,7265,7273,7281,7281,7281,7281,7281,7281,7281,7281,7281,7281,7281,7281,7281,7281,7289,7297,7305,7305,7305,7305,7313,7321,7329,7337,7345,7353,7353,7353,7361,7369,7377,7385,7393,7401,7409,7417,7425,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7241,7972,7972,8100,8164,8228,8292,8356,8420,8484,8548,8612,8676,8740,8804,8868,8932,8996,9060,9124,9188,9252,9316,9380,9444,9508,9572,9636,9700,9764,9828,9892,9956,2593,2657,2721,2529,2785,2529,2849,2913,2977,3041,3105,3169,3233,3297,2529,2529,2529,2529,2529,2529,2529,2529,3361,2529,2529,2529,3425,2529,2529,3489,3553,2529,3617,3681,3745,3809,3873,3937,4001,4065,4129,4193,4257,4321,4385,4449,4513,4577,4641,4705,4769,4833,4897,4961,5025,5089,5153,5217,5281,5345,5409,5473,5537,5601,5665,5729,5793,5857,5921,5985,6049,6113,6177,6241,6305,6369,6433,6497,6561,6625,6689,6753,6817,6881,6945,7009,7073,7137,7201,7265,7329,7393,7457,7521,7585,7649,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,2529,7713,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7433,7433,7433,7433,7433,7433,7433,7441,7449,7457,7457,7457,7457,7457,7457,7465,2009,2009,2009,2009,7473,7473,7473,7473,7473,7473,7473,7473,7481,7489,7497,7505,7505,7505,7505,7505,7513,7521,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7529,7529,7537,7545,7545,7545,7545,7545,7553,7561,7561,7561,7561,7561,7561,7561,7569,7577,7585,7593,7593,7593,7593,7593,7593,7601,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7609,7617,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7625,7633,7641,7649,7657,7665,7673,7681,7689,7697,7705,2009,7713,7721,7729,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7737,7745,7753,2009,2009,2009,2009,2009,2009,2009,2009,2009,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7761,7769,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7777,7785,7793,7801,7809,7809,7809,7809,7809,7809,7817,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7825,7833,7841,7849,2009,2009,2009,7857,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7865,7865,7865,7865,7865,7865,7865,7865,7865,7865,7865,7873,7881,7889,7897,7897,7897,7897,7905,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7913,7921,7929,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,7937,7937,7937,7937,7937,7937,7937,7945,2009,2009,2009,2009,2009,2009,2009,2009,7953,7953,7953,7953,7953,7953,7953,2009,7961,7969,7977,7985,7993,2009,2009,8001,8009,8009,8009,8009,8009,8009,8009,8009,8009,8009,8009,8009,8009,8017,8025,8025,8025,8025,8025,8025,8025,8033,8041,8049,8057,8065,8073,8081,8081,8081,8081,8081,8081,8081,8081,8081,8081,8081,8089,2009,8097,8097,8097,8105,2009,2009,2009,2009,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8113,8121,8129,8137,8137,8137,8137,8137,8137,8137,8137,8137,8137,8137,8137,8137,8137,8145,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,2009,67496,67496,67496,21,21,21,21,21,21,21,21,21,17,34,30,30,33,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,38,6,3,12,9,10,12,3,0,2,12,9,8,16,8,7,11,11,11,11,11,11,11,11,11,11,8,8,12,12,12,6,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,9,2,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,17,1,12,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,21,21,35,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,4,0,10,9,9,9,12,29,29,12,29,3,12,17,12,12,10,9,29,29,18,12,29,29,29,29,29,3,29,29,29,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,18,29,29,29,18,29,12,12,29,12,12,12,12,12,12,12,29,29,29,29,12,29,12,18,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,4,21,21,21,21,21,21,21,21,21,21,21,21,4,4,4,4,4,4,4,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,8,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,8,17,39,39,39,39,9,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,17,21,12,21,21,12,21,21,6,21,39,39,39,39,39,39,39,39,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,10,10,10,8,8,12,12,21,21,21,21,21,21,21,21,21,21,21,6,6,6,6,6,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,11,11,11,11,11,11,11,11,11,11,10,11,11,12,12,12,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,6,12,21,21,21,21,21,21,21,12,12,21,21,21,21,21,21,12,12,21,21,12,21,21,21,21,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,12,39,39,39,39,39,39,39,39,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,12,12,12,12,8,6,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,12,21,21,21,21,21,21,21,21,21,12,21,21,21,12,21,21,21,21,21,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,21,21,17,17,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,21,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,21,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,39,39,39,39,39,39,39,39,21,39,39,39,39,12,12,12,12,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,12,12,10,10,12,12,12,12,12,10,12,9,39,39,39,39,39,21,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,12,12,12,12,12,12,39,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,21,21,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,21,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,12,9,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,21,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,12,12,12,12,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,12,39,39,39,39,39,39,21,39,39,39,39,39,39,39,39,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,9,12,39,39,39,39,39,39,21,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,12,12,12,12,12,12,12,12,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,39,39,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,21,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,12,12,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,39,12,12,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,39,39,39,39,39,39,39,39,21,39,39,39,39,39,39,39,39,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,39,39,39,10,12,12,12,12,12,12,39,39,21,21,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,39,39,39,39,39,39,39,39,39,39,39,39,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,39,39,39,39,9,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,12,11,11,11,11,11,11,11,11,11,11,17,17,39,39,39,39,39,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,39,39,11,11,11,11,11,11,11,11,11,11,39,39,36,36,36,36,12,18,18,18,18,12,18,18,4,18,18,17,4,6,6,6,6,6,4,12,6,12,12,12,21,21,12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,17,21,12,21,12,21,0,1,0,1,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,17,21,21,21,21,21,17,21,21,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,17,17,12,12,12,12,12,12,21,12,12,12,12,12,12,12,12,12,18,18,17,18,12,12,12,12,12,4,4,39,39,39,39,39,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,11,11,11,11,11,11,11,11,11,11,17,17,12,12,12,12,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,11,11,11,11,11,11,11,11,11,11,36,36,36,36,36,36,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,21,21,21,12,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,17,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,17,17,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,21,21,39,39,39,39,39,39,39,39,39,39,39,39,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,17,17,5,36,17,12,17,9,36,36,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,6,6,17,17,18,12,6,6,12,21,21,21,4,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,12,39,39,39,6,6,11,11,11,11,11,11,11,11,11,11,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,36,36,36,36,36,36,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,39,39,12,12,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,39,39,21,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,36,36,36,36,36,36,36,36,36,36,36,36,36,36,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,39,39,39,39,11,11,11,11,11,11,11,11,11,11,17,17,12,17,17,17,17,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,39,39,39,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,17,17,17,17,17,11,11,11,11,11,11,11,11,11,11,39,39,39,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,17,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,21,21,21,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,21,12,12,12,12,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,18,12,39,17,17,17,17,17,17,17,4,17,17,17,20,21,21,21,21,17,4,17,17,19,29,29,12,3,3,0,3,3,3,0,3,29,29,12,12,15,15,15,17,30,30,21,21,21,21,21,4,10,10,10,10,10,10,10,10,12,3,3,29,5,5,12,12,12,12,12,12,8,0,1,5,5,5,12,12,12,12,12,12,12,12,12,12,12,12,17,12,17,17,17,17,12,17,17,17,22,12,12,12,12,39,39,39,39,39,21,21,21,21,21,21,12,12,39,39,29,12,12,12,12,12,12,12,12,0,1,29,12,29,29,29,29,12,12,12,12,12,12,12,12,0,1,39,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,9,9,9,9,9,9,9,10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,9,9,9,9,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,10,12,29,12,12,12,10,12,12,12,12,12,12,12,12,12,29,12,12,9,12,12,12,12,12,12,12,12,12,12,29,29,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,12,12,12,12,12,29,12,12,29,12,29,29,29,29,29,29,29,29,29,29,29,29,12,12,12,12,29,29,29,29,29,29,29,29,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,29,29,12,12,12,29,29,12,12,29,12,12,12,29,12,29,9,9,12,29,12,12,12,12,29,12,12,29,29,29,29,12,12,29,12,29,12,29,29,29,29,29,29,12,29,12,12,12,12,12,29,29,29,29,12,12,12,12,29,29,12,12,12,12,12,12,12,12,12,12,29,12,12,12,29,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,12,12,29,29,29,29,12,12,29,29,12,12,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,12,12,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,14,14,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,12,12,12,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,12,12,12,12,12,12,12,12,12,12,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,12,29,29,29,29,12,12,12,12,12,12,12,12,12,12,29,29,12,29,29,29,29,29,29,29,12,12,12,12,12,12,12,12,29,29,12,12,29,29,12,12,12,12,29,29,12,12,29,29,12,12,12,12,29,29,29,12,12,29,12,12,29,29,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,29,29,12,12,12,12,12,12,12,12,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,14,14,12,29,29,12,12,29,12,12,12,12,29,29,12,12,12,12,14,14,29,29,14,12,14,14,14,14,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,14,12,12,12,12,29,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,12,29,29,29,12,29,14,29,29,12,29,29,12,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,14,14,14,14,14,14,14,14,14,14,29,29,29,29,14,12,14,14,14,29,14,14,29,29,29,14,14,29,29,14,29,29,14,14,14,12,29,12,12,12,12,29,29,14,29,29,29,29,29,29,14,14,14,14,14,29,14,14,14,14,29,29,14,14,14,14,14,14,14,14,12,12,12,14,14,14,14,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,12,12,12,3,3,3,3,12,12,12,6,6,12,12,12,12,0,1,0,1,0,1,0,1,0,1,0,1,0,1,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,0,1,0,1,0,1,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,29,29,29,29,29,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,12,12,39,39,39,39,39,6,17,17,17,12,6,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,3,3,3,3,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,17,12,17,0,17,12,12,3,3,12,12,3,3,0,1,0,1,0,1,0,1,17,17,17,17,6,12,17,17,12,17,17,12,12,12,12,12,19,19,39,39,39,39,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,1,1,14,14,5,14,14,0,1,0,1,0,1,0,1,0,1,14,14,0,1,0,1,0,1,0,1,5,0,1,1,14,14,14,14,14,14,14,14,14,14,21,21,21,21,21,21,14,14,14,14,14,14,14,14,14,14,14,5,5,14,14,14,39,32,14,32,14,32,14,32,14,32,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,32,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,32,14,32,14,32,14,14,14,14,14,14,32,14,14,14,14,14,14,32,32,39,39,21,21,5,5,5,5,14,5,32,14,32,14,32,14,32,14,32,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,32,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,32,14,32,14,32,14,14,14,14,14,14,32,14,14,14,14,14,14,32,32,14,14,14,14,5,32,5,5,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,39,39,39,39,39,39,39,39,39,39,39,39,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,29,29,29,29,29,29,29,29,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,5,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,6,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,12,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,12,17,17,17,17,17,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,12,12,12,21,12,12,12,12,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,10,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,18,18,6,6,39,39,39,39,39,39,39,39,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,39,17,17,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,39,39,39,39,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,17,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,39,39,39,12,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,39,39,39,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,17,17,17,12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,39,12,12,12,21,12,12,12,12,12,12,12,12,21,21,39,39,11,11,11,11,11,11,11,11,11,11,39,39,12,17,17,17,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,17,17,12,12,12,21,21,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,17,21,21,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,39,39,39,39,39,39,39,39,39,39,39,39,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,39,39,39,39,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,39,39,39,39,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,13,21,13,13,13,13,13,13,13,13,13,13,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,10,12,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,8,1,1,8,8,6,6,0,1,15,39,39,39,39,39,39,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,39,14,14,14,14,14,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,14,14,0,1,14,14,14,14,14,14,14,1,14,1,39,5,5,6,6,14,0,1,0,1,0,1,14,14,14,14,14,14,14,14,14,14,9,10,14,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,22,39,6,14,14,9,10,14,14,0,1,14,14,1,14,1,14,14,14,14,14,14,14,14,14,14,14,5,5,14,14,14,6,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,14,1,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,14,1,14,0,1,1,0,1,1,5,12,32,32,32,32,32,32,32,32,32,32,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,5,5,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,10,9,14,14,14,9,9,39,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,21,21,21,31,29,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,17,17,17,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,17,17,17,17,17,17,17,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,17,17,17,17,17,17,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,17,17,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,12,12,12,17,17,17,17,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,11,11,11,11,11,11,11,11,11,11,17,17,17,17,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,17,17,12,17,39,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,11,11,11,11,11,11,11,11,11,11,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,39,39,17,17,17,17,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,0,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,12,12,12,0,1,0,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,1,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,21,12,12,12,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,12,12,21,21,21,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,21,21,21,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,39,39,39,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,39,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,12,12,39,39,39,39,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,39,39,39,39,39,39,39,39,39,39,39,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,14,14,14,14,14,12,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,14,12,14,12,14,14,14,14,14,14,14,14,14,14,12,14,12,12,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,39,39,39,12,12,12,12,12,12,12,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,14,14,14,14,14,14,14,14,14,14,14,14,14,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,39,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,39,39,39,39,39,39,39,39,39,39,39,39,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,39,39,39,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39], +highStart:919552,errorValue:0}},function(t,e,n){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}}]); //# sourceMappingURL=pdfmake.min.js.map \ No newline at end of file diff --git a/public/js/script.js b/public/js/script.js index e14bb393c862..dded462d101a 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -8,33 +8,51 @@ var isIE = /*@cc_on!@*/false || !!document.documentMode; // At least IE6 var invoiceOld; +var refreshTimer; function generatePDF(invoice, javascript, force, cb) { + if (!invoice || !javascript) { + return; + } + console.log('== generatePDF - force: %s', force); + if (force || !invoiceOld) { + refreshTimer = null; + } else { + if (refreshTimer) { + clearTimeout(refreshTimer); + } + refreshTimer = setTimeout(function() { + generatePDF(invoice, javascript, true, cb); + }, 500); + return; + } + invoice = calculateAmounts(invoice); - var a = copyInvoice(invoice); - var b = copyInvoice(invoiceOld); + var a = copyObject(invoice); + var b = copyObject(invoiceOld); if (!force && _.isEqual(a, b)) { return; } - pdfmakeMarker = "//pdfmake"; invoiceOld = invoice; - report_id = invoice.invoice_design_id; + pdfmakeMarker = "{"; if(javascript.slice(0, pdfmakeMarker.length) === pdfmakeMarker) { doc = GetPdfMake(invoice, javascript, cb); - //doc.getDataUrl(cb); } else { doc = GetPdf(invoice, javascript); doc.getDataUrl = function(cb) { cb( this.output("datauristring")); }; } + + if (cb) { + doc.getDataUrl(cb); + } + return doc; } -function copyInvoice(orig) { +function copyObject(orig) { if (!orig) return false; - var copy = JSON.stringify(orig); - var copy = JSON.parse(copy); - return copy; + return JSON.parse(JSON.stringify(orig)); } @@ -705,8 +723,12 @@ function getInvoiceDetails(invoice) { {'due_date': invoice.due_date}, ]; + if (NINJA.parseFloat(invoice.balance) < NINJA.parseFloat(invoice.amount)) { + fields.push({'total': formatMoney(invoice.amount, invoice.client.currency_id)}); + } + if (NINJA.parseFloat(invoice.partial)) { - fields.push({'total': formatMoney(invoice.total_amount, invoice.client.currency_id)}); + fields.push({'balance': formatMoney(invoice.total_amount, invoice.client.currency_id)}); } fields.push({'balance_due': formatMoney(invoice.balance_amount, invoice.client.currency_id)}) @@ -762,12 +784,16 @@ function displaySubtotals(doc, layout, invoice, y, rightAlignTitleX) } var paid = invoice.amount - invoice.balance; + if (paid) { + data.push({'total': formatMoney(invoice.amount, invoice.client.currency_id)}); + } + if (invoice.account.hide_paid_to_date != '1' || paid) { data.push({'paid_to_date': formatMoney(paid, invoice.client.currency_id)}); } if (NINJA.parseFloat(invoice.partial) && invoice.total_amount != invoice.subtotal_amount) { - data.push({'total': formatMoney(invoice.total_amount, invoice.client.currency_id)}); + data.push({'balance': formatMoney(invoice.total_amount, invoice.client.currency_id)}); } var options = { @@ -1053,7 +1079,7 @@ function displayInvoiceItems(doc, invoice, layout) { } shownItem = true; - var numLines = doc.splitTextToSize(item.notes, 200).length + 2; + var numLines = Math.max(doc.splitTextToSize(item.notes, 200).length, doc.splitTextToSize(item.product_key, 60).length) + 2; //console.log('num lines %s', numLines); var y = tableTop + (line * layout.tableRowHeight) + (2 * layout.tablePadding); @@ -1566,4 +1592,15 @@ function twoDigits(value) { return '0' + value; } return value; +} + +function toSnakeCase(str) { + if (!str) return ''; + return str.replace(/([A-Z])/g, function($1){return "_"+$1.toLowerCase();}); +} + +function getDescendantProp(obj, desc) { + var arr = desc.split("."); + while(arr.length && (obj = obj[arr.shift()])); + return obj; } \ No newline at end of file diff --git a/public/js/templates/clean.js b/public/js/templates/clean.js deleted file mode 100644 index b697f0292c51..000000000000 --- a/public/js/templates/clean.js +++ /dev/null @@ -1,162 +0,0 @@ -//pdfmake - -/* -var dd = { - content: 'wqy中文wqy', - defaultStyle: { - font: 'wqy' - } -}; -*/ - -var dd = { - content: [ - { - columns: [ - [ - invoice.image? - { - image: invoice.image, - fit: [150, 80] - }:"" - ], - { - stack: NINJA.accountDetails(account) - }, - { - stack: NINJA.accountAddress(account) - } - ] - }, - { - text:(NINJA.getEntityLabel(invoice)).toUpperCase(), - margin: [8, 70, 8, 16], - style: 'primaryColor', - fontSize: NINJA.fontSize + 2 - }, - { - table: { - headerRows: 1, - widths: ['auto', 'auto', '*'], - body: [ - [ - { - table: { - body: NINJA.invoiceDetails(invoice), - }, - layout: 'noBorders', - }, - { - table: { - body: NINJA.clientDetails(invoice), - }, - layout: 'noBorders', - }, - '' - ] - ] - }, - layout: { - hLineWidth: function (i, node) { - return (i === 0 || i === node.table.body.length) ? .5 : 0; - }, - vLineWidth: function (i, node) { - return 0; - }, - hLineColor: function (i, node) { - return '#D8D8D8'; - }, - paddingLeft: function(i, node) { return 8; }, - paddingRight: function(i, node) { return 8; }, - paddingTop: function(i, node) { return 4; }, - paddingBottom: function(i, node) { return 4; } - } - }, - '\n', - { - table: { - headerRows: 1, - widths: ['15%', '*', 'auto', 'auto', 'auto', 'auto'], - body: NINJA.invoiceLines(invoice), - }, - layout: { - hLineWidth: function (i, node) { - return i === 0 ? 0 : .5; - }, - vLineWidth: function (i, node) { - return 0; - }, - hLineColor: function (i, node) { - return '#D8D8D8'; - }, - paddingLeft: function(i, node) { return 8; }, - paddingRight: function(i, node) { return 8; }, - paddingTop: function(i, node) { return 8; }, - paddingBottom: function(i, node) { return 8; } - }, - }, - '\n', - { - columns: [ - NINJA.notesAndTerms(invoice), - { - style: 'subtotals', - table: { - widths: ['*', '*'], - body: NINJA.subtotals(invoice), - }, - layout: { - hLineWidth: function (i, node) { - return 0; - }, - vLineWidth: function (i, node) { - return 0; - }, - paddingLeft: function(i, node) { return 8; }, - paddingRight: function(i, node) { return 8; }, - paddingTop: function(i, node) { return 4; }, - paddingBottom: function(i, node) { return 4; } - }, - } - ] - }, - ], - - defaultStyle: { - //font: 'arialuni', - fontSize: NINJA.fontSize, - margin: [8, 4, 8, 4] - }, - styles: { - primaryColor:{ - color: NINJA.getPrimaryColor('#299CC2') - }, - accountName: { - margin: [4, 2, 4, 2], - color: NINJA.getPrimaryColor('#299CC2') - }, - accountDetails: { - margin: [4, 2, 4, 2], - color: '#AAA9A9' - }, - even: { - }, - odd: { - fillColor:'#F4F4F4' - }, - productKey: { - color: NINJA.getPrimaryColor('#299CC2') - }, - tableHeader: { - bold: true - }, - balanceDueLabel: { - fontSize: NINJA.fontSize + 2 - }, - balanceDueValue: { - fontSize: NINJA.fontSize + 2, - color: NINJA.getPrimaryColor('#299CC2') - }, - }, - pageMargins: [40, 40, 40, 40], -}; \ No newline at end of file diff --git a/readme.md b/readme.md index d56f682ead8d..29cf0925cef2 100644 --- a/readme.md +++ b/readme.md @@ -1,18 +1,20 @@ # Invoice Ninja ### [https://www.invoiceninja.com](https://www.invoiceninja.com) -If you'd like to use our code to sell your own invoicing app we have an affiliate program. Get in touch for more details. +If you'd like to use our code to sell your own invoicing app email us for details about our affiliate program. -### Introduction +### Installation Options -To setup the site you can either use the [zip file](https://www.invoiceninja.com/knowledgebase/self-host/) (easier to run) or checkout the code from GitHub (easier to make changes). +* [Zip - Free](https://www.invoiceninja.com/knowledgebase/self-host/) +* [Bitnami - Free](https://bitnami.com/stack/invoice-ninja) +* [Softaculous - $30](https://www.softaculous.com/apps/ecommerce/Invoice_Ninja) -For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). For discussion of the app please use our [new forum](http://www.invoiceninja.com/forums). +### Getting Started + +If you have any questions or comments please use our [support forum](https://www.invoiceninja.com/forums/forum/support/). For updates follow [@invoiceninja](https://twitter.com/invoiceninja) or join the [Facebook Group](https://www.facebook.com/invoiceninja). If you'd like to translate the site please use [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) for the starter files. -Developed by [@hillelcoren](https://twitter.com/hillelcoren) | Designed by [kantorp-wegl.in](http://kantorp-wegl.in/). - ### Features * Built using Laravel 5 @@ -33,12 +35,11 @@ Developed by [@hillelcoren](https://twitter.com/hillelcoren) | Designed by [kant * [Jeramy Simpson](https://github.com/JeramyMywork) - [MyWork](https://www.mywork.com.au) * [Sigitas Limontas](https://lt.linkedin.com/in/sigitaslimontas) -### Documentation - -* [Self Host](https://www.invoiceninja.com/knowledgebase/self-host/) +### Documentation * [Ubuntu and Apache](http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/) * [Debian and Nginx](https://www.rosehosting.com/blog/install-invoice-ninja-on-a-debian-7-vps/) * [API Documentation](https://www.invoiceninja.com/knowledgebase/api-documentation/) +* [User Guide](https://www.invoiceninja.com/user-guide/) * [Developer Guide](https://www.invoiceninja.com/knowledgebase/developer-guide/) ### Frameworks/Libraries @@ -69,4 +70,5 @@ Developed by [@hillelcoren](https://twitter.com/hillelcoren) | Designed by [kant * [jashkenas/underscore](https://github.com/jashkenas/underscore) - JavaScript's utility _ belt * [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) - List of languages ​​for Laravel4 * [bgrins/spectrum](https://github.com/bgrins/spectrum) - The No Hassle JavaScript Colorpicker -* [lokesh/lightbox2](https://github.com/lokesh/lightbox2/) - The original lightbox script \ No newline at end of file +* [lokesh/lightbox2](https://github.com/lokesh/lightbox2/) - The original lightbox script +* [josdejong/jsoneditor](https://github.com/josdejong/jsoneditor/) - A web-based tool to view, edit and format JSON \ No newline at end of file diff --git a/resources/lang/da/texts.php b/resources/lang/da/texts.php index b7169eb78126..429d778ca2e1 100644 --- a/resources/lang/da/texts.php +++ b/resources/lang/da/texts.php @@ -599,7 +599,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -677,5 +677,68 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); diff --git a/resources/lang/de/texts.php b/resources/lang/de/texts.php index 6ef7623be704..e91162679c8b 100644 --- a/resources/lang/de/texts.php +++ b/resources/lang/de/texts.php @@ -419,7 +419,7 @@ return array( 'confirm_email_quote' => 'Bist du sicher, dass du dieses Angebot per E-Mail versenden möchtest', 'confirm_recurring_email_invoice' => 'Wiederkehrende Rechnung ist aktiv. Bis du sicher, dass du diese Rechnung weiterhin als E-Mail verschicken möchtest?', - 'cancel_account' => 'Account Kündigen', + 'cancel_account' => 'Konto Kündigen', 'cancel_account_message' => 'Warnung: Alle Daten werden unwiderruflich und vollständig gelöscht, es gibt kein zurück.', 'go_back' => 'Zurück', @@ -481,7 +481,7 @@ return array( 'restored_client' => 'Kunde erfolgreich wiederhergestellt', 'restored_payment' => 'Zahlung erfolgreich wiederhergestellt', 'restored_credit' => 'Guthaben erfolgreich wiederhergestellt', - + 'reason_for_canceling' => 'Hilf uns, unser Angebot zu verbessern, indem du uns mitteilst, weswegen du dich dazu entschieden hast, unseren Service nicht länger zu nutzen.', 'discount_percent' => 'Prozent', 'discount_amount' => 'Wert', @@ -562,7 +562,7 @@ return array( 'api_tokens' => 'API Token', 'users_and_tokens' => 'Benutzer & Token', - 'account_login' => 'Account Login', + 'account_login' => 'Konto Login', 'recover_password' => 'Passwort wiederherstellen', 'forgot_password' => 'Passwort vergessen?', 'email_address' => 'E-Mail-Adresse', @@ -590,14 +590,13 @@ return array( 'less_fields' => 'Weniger Felder', 'client_name' => 'Kundenname', 'pdf_settings' => 'PDF Einstellungen', - 'utf8_invoices' => 'Cyrillic Unterstützung Beta', 'product_settings' => 'Produkt Einstellungen', 'auto_wrap' => 'Automatischer Zeilenumbruch', 'duplicate_post' => 'Achtung: Die vorherige Seite wurde zweimal abgeschickt. Das zweite Abschicken wurde ignoriert.', 'view_documentation' => 'Dokumentation anzeigen', 'app_title' => 'Kostenlose Online Open-Source Rechnungsausstellung', 'app_description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - + 'rows' => 'Zeilen', 'www' => 'www', 'logo' => 'Logo', @@ -660,7 +659,7 @@ return array( 'create_task' => 'Aufgabe erstellen', 'stopped_task' => 'Aufgabe erfolgreich angehalten', 'invoice_task' => 'Aufgabe in Rechnung stellen', - 'invoice_labels' => 'Rechnung Etiketten', + 'invoice_labels' => 'Rechnung Spaltenüberschriften', 'prefix' => 'Präfix', 'counter' => 'Zähler', @@ -669,4 +668,68 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Jetzt Upgraden!', + 'pro_plan_feature1' => 'Unlimitierte Anzahl Kunden erstellen', + 'pro_plan_feature2' => 'Zugriff ui 10 schönen Rechnungsdesigns', + 'pro_plan_feature3' => 'Benutzerdefinierte URLs - "DeineFirma.InvoiceNinja.com"', + 'pro_plan_feature4' => '"Created by Invoice Ninja" entfernen', + 'pro_plan_feature5' => 'Multi-Benutzer Zugriff & Aktivitätstracking', + 'pro_plan_feature6' => 'Angebote & pro-forma Rechnungen erstellen', + 'pro_plan_feature7' => 'Rechungstitelfelder und Nummerierung anpassen', + 'pro_plan_feature8' => 'PDFs an E-Mails zu Kunden anhängen', + + 'resume' => 'Fortfahren', + 'break_duration' => 'Pause', + 'edit_details' => 'Details bearbeiten', + 'work' => 'Arbeiten', + 'timezone_unset' => 'Bitte :link um deine Zeitzone zu setzen', + 'click_here' => 'hier klicken', + + 'email_receipt' => 'Zahlungsbestätigung an Kunden per E-Mail senden', + 'created_payment_emailed_client' => 'Zahlung erfolgreich erstellt und Kunde per E-Mail benachrichtigt', + 'add_account' => 'Konto hinzufügen', + 'untitled' => 'Unbenannt', + 'new_account' => 'Neues Konto', + 'associated_accounts' => 'Konten erfolgreich verlinkt', + 'unlinked_account' => 'Konten erfolgreich getrennt', + 'login' => 'Login', + 'or' => 'oder', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'utf8_invoices' => 'New PDF Engine Beta', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + + ); \ No newline at end of file diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 92dca9e3b971..8b590d85ae12 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -40,8 +40,8 @@ return array( 'taxes' => 'Taxes', 'tax' => 'Tax', 'item' => 'Item', - 'description' => 'Description', - 'unit_cost' => 'Unit Cost', + 'description' => 'Description', + 'unit_cost' => 'Cost', 'quantity' => 'Quantity', 'line_total' => 'Line Total', 'subtotal' => 'Subtotal', @@ -276,9 +276,9 @@ return array( // Payment page 'secure_payment' => 'Secure Payment', - 'card_number' => 'Card number', - 'expiration_month' => 'Expiration month', - 'expiration_year' => 'Expiration year', + 'card_number' => 'Card Number', + 'expiration_month' => 'Expiration Month', + 'expiration_year' => 'Expiration Year', 'cvv' => 'CVV', // Security alerts @@ -401,9 +401,9 @@ return array( 'invoice_fields' => 'Invoice Fields', 'invoice_options' => 'Invoice Options', - 'hide_quantity' => 'Hide quantity', + 'hide_quantity' => 'Hide Quantity', 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', - 'hide_paid_to_date' => 'Hide paid to date', + 'hide_paid_to_date' => 'Hide Paid to Date', 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', 'charge_taxes' => 'Charge taxes', @@ -526,11 +526,11 @@ return array( 'token_billing_secure' => 'The data is stored securely by :stripe_link', 'support' => 'Support', - 'contact_information' => 'Contact information', + 'contact_information' => 'Contact Information', '256_encryption' => '256-Bit Encryption', 'amount_due' => 'Amount due', - 'billing_address' => 'Billing address', - 'billing_method' => 'Billing method', + 'billing_address' => 'Billing Address', + 'billing_method' => 'Billing Method', 'order_overview' => 'Order overview', 'match_address' => '*Address must match address associated with credit card.', 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', @@ -597,7 +597,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -676,4 +676,68 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + 'invoice_to' => 'Invoice to', + 'invoice_no' => 'Invoice No.', + ); + diff --git a/resources/lang/es/texts.php b/resources/lang/es/texts.php index 0d018879a04f..f5ecb6107543 100644 --- a/resources/lang/es/texts.php +++ b/resources/lang/es/texts.php @@ -569,7 +569,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -648,4 +648,66 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); \ No newline at end of file diff --git a/resources/lang/es_ES/texts.php b/resources/lang/es_ES/texts.php index 2e67ec47b61b..d8677edff31e 100644 --- a/resources/lang/es_ES/texts.php +++ b/resources/lang/es_ES/texts.php @@ -598,7 +598,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -677,4 +677,67 @@ return array( 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + + ); \ No newline at end of file diff --git a/resources/lang/fr/texts.php b/resources/lang/fr/texts.php index 879b5f8739d6..bdbd4c505254 100644 --- a/resources/lang/fr/texts.php +++ b/resources/lang/fr/texts.php @@ -1,4 +1,4 @@ - 'Appt/Bâtiment', 'city' => 'Ville', 'state' => 'Région/Département', - 'postal_code' => 'Code Postal', + 'postal_code' => 'Code postal', 'country_id' => 'Pays', - 'contacts' => 'Informations de contact', //if you speak about contact details + 'contacts' => 'Informations de contact', 'first_name' => 'Prénom', 'last_name' => 'Nom', 'phone' => 'Téléphone', @@ -23,7 +23,7 @@ return array( 'payment_terms' => 'Conditions de paiement', 'currency_id' => 'Devise', 'size_id' => 'Taille', - 'industry_id' => 'Secteur', // literal translation : Industrie + 'industry_id' => 'Secteur', 'private_notes' => 'Note personnelle', // invoice @@ -35,21 +35,21 @@ return array( 'invoice_number_short' => 'Facture #', 'po_number' => 'Numéro du bon de commande', 'po_number_short' => 'Bon de commande #', - 'frequency_id' => 'Fréquence', + 'frequency_id' => 'Fréquence', 'discount' => 'Remise', 'taxes' => 'Taxes', 'tax' => 'Taxe', - 'item' => 'Article', + 'item' => 'Article', 'description' => 'Description', 'unit_cost' => 'Coût unitaire', 'quantity' => 'Quantité', 'line_total' => 'Total', 'subtotal' => 'Total', - 'paid_to_date' => 'Versé à ce jour',//this one is not very used in France - 'balance_due' => 'Montant total',//can be "Montant à verser" or "Somme totale" - 'invoice_design_id' => 'Design', //if you speak about invoice's design -> "Modèle" + 'paid_to_date' => 'Versé à ce jour', + 'balance_due' => 'Montant total', + 'invoice_design_id' => 'Design', 'terms' => 'Conditions', - 'your_invoice' => 'Votre Facture', + 'your_invoice' => 'Votre facture', 'remove_contact' => 'Supprimer un contact', 'add_contact' => 'Ajouter un contact', @@ -117,11 +117,11 @@ return array( 'billed_client' => 'client facturé', 'billed_clients' => 'clients facturés', 'active_client' => 'client actif', - 'active_clients' => 'clients actifs', + 'active_clients' => 'clients actifs', 'invoices_past_due' => 'Date limite de paiement dépassée', 'upcoming_invoices' => 'Factures à venir', 'average_invoice' => 'Moyenne de facturation', - + // list pages 'archive' => 'Archiver', 'delete' => 'Supprimer', @@ -133,17 +133,17 @@ return array( 'delete_credit' => 'Supprimer ce crédit', 'show_archived_deleted' => 'Afficher archivés/supprimés', 'filter' => 'Filtrer', - 'new_client' => 'Nouveau Client', - 'new_invoice' => 'Nouvelle Facture', - 'new_payment' => 'Nouveau Paiement', - 'new_credit' => 'Nouveau Crédit', + 'new_client' => 'Nouveau client', + 'new_invoice' => 'Nouvelle facture', + 'new_payment' => 'Nouveau paiement', + 'new_credit' => 'Nouveau crédit', 'contact' => 'Contact', 'date_created' => 'Date de création', 'last_login' => 'Dernière connexion', 'balance' => 'Solde', 'action' => 'Action', 'status' => 'Statut', - 'invoice_total' => 'Montant Total', + 'invoice_total' => 'Montant total', 'frequency' => 'Fréquence', 'start_date' => 'Date de début', 'end_date' => 'Date de fin', @@ -156,8 +156,8 @@ return array( 'credit_date' => 'Date de crédit', 'empty_table' => 'Aucune donnée disponible dans la table', 'select' => 'Sélectionner', - 'edit_client' => 'Éditer le Client', - 'edit_invoice' => 'Éditer la Facture', + 'edit_client' => 'Éditer le client', + 'edit_invoice' => 'Éditer la facture', // client view page 'create_invoice' => 'Créer une facture', @@ -206,13 +206,13 @@ return array( 'import_to' => 'Importer en tant que', 'client_will_create' => 'client sera créé', 'clients_will_create' => 'clients seront créés', - 'email_settings' => 'Email Settings', - 'pdf_email_attachment' => 'Attach PDF to Emails', + 'email_settings' => 'Paramètres mail', + 'pdf_email_attachment' => 'Joindre PDF aux emails', // application messages 'created_client' => 'Client créé avec succès', - 'created_clients' => ':count clients créés ave csuccès', - 'updated_settings' => 'paramètres mis à jour avec succès', + 'created_clients' => ':count clients créés avec succès', + 'updated_settings' => 'Paramètres mis à jour avec succès', 'removed_logo' => 'Logo supprimé avec succès', 'sent_message' => 'Message envoyé avec succès', 'invoice_error' => 'Veuillez vous assurer de sélectionner un client et de corriger les erreurs', @@ -252,7 +252,7 @@ return array( 'deleted_credits' => ':count crédits supprimés avec succès', // Emails - 'confirmation_subject' => 'Validation du compte invoice ninja', + 'confirmation_subject' => 'Validation du compte Invoice Ninja', 'confirmation_header' => 'Validation du compte', 'confirmation_message' => 'Veuillez cliquer sur le lien ci-après pour valider votre compte.', 'invoice_subject' => 'Nouvelle facture :invoice en provenance de :account', @@ -261,7 +261,7 @@ return array( 'payment_message' => 'Merci pour votre paiement d\'un montant de :amount', 'email_salutation' => 'Cher :name,', 'email_signature' => 'Cordialement,', - 'email_from' => 'L\'équipe InvoiceNinja', + 'email_from' => 'L\'équipe Invoice Ninja', 'user_email_footer' => 'Pour modifier vos paramètres de notification par courriel, veuillez visiter '.SITE_URL.'/company/notifications', 'invoice_link_message' => 'Pour voir la facture de votre client cliquez sur le lien ci-après :', 'notification_invoice_paid_subject' => 'La facture :invoice a été payée par le client :client', @@ -276,7 +276,7 @@ return array( // Payment page 'secure_payment' => 'Paiement sécurisé', 'card_number' => 'Numéro de carte', - 'expiration_month' => 'Mois d\'expiration', + 'expiration_month' => 'Mois d\'expiration', 'expiration_year' => 'Année d\'expiration', 'cvv' => 'CVV', @@ -293,12 +293,12 @@ return array( // Pro Plan 'pro_plan' => [ - 'remove_logo' => ':link pour supprimer le logo Invoice Ninja en souscrivant au plan pro', + 'remove_logo' => ':link pour supprimer le logo Invoice Ninja en souscrivant au Plan Pro', 'remove_logo_link' => 'Cliquez ici', ], - 'logout' => 'Se déconnecter', - 'sign_up_to_save' => 'Connectez vous pour sauvegarder votre travail', + 'logout' => 'Se déconnecter', + 'sign_up_to_save' => 'Connectez vous pour sauvegarder votre travail', 'agree_to_terms' =>'J\'accepte les conditions d\'utilisation d\'Invoice ninja :terms', 'terms_of_service' => 'Conditions d\'utilisation', 'email_taken' => 'L\'adresse courriel existe déjà', @@ -319,7 +319,7 @@ return array( 'field_label' => 'Nom du champ', 'field_value' => 'Valeur du champ', 'edit' => 'Éditer', - 'view_as_recipient' => 'Voir en tant que destinataire', + 'view_as_recipient' => 'Voir en tant que destinataire', // product management 'product_library' => 'Inventaire', @@ -330,7 +330,7 @@ return array( 'update_products' => 'Mise à jour auto des produits', 'update_products_help' => 'La mise à jour d\'une facture entraîne la mise à jour des produits', 'create_product' => 'Nouveau produit', - 'edit_product' => 'Éditer Produit', + 'edit_product' => 'Éditer produit', 'archive_product' => 'Archiver Produit', 'updated_product' => 'Produit mis à jour', 'created_product' => 'Produit créé', @@ -387,7 +387,7 @@ return array( 'notification_quote_sent_subject' => 'Le devis :invoice a été envoyé à :client', 'notification_quote_viewed_subject' => 'Le devis :invoice a été visionné par :client', 'notification_quote_sent' => 'Le devis :invoice de :amount a été envoyé au client :client.', - 'notification_quote_viewed' => 'Le devis :invoice de :amount a été visioné par le client :client.', + 'notification_quote_viewed' => 'Le devis :invoice de :amount a été visioné par le client :client.', 'session_expired' => 'Votre session a expiré.', @@ -426,7 +426,7 @@ return array( 'sample_data' => 'Données fictives présentées', 'hide' => 'Cacher', 'new_version_available' => 'Une nouvelle version de :releases_link est disponible. Vous utilisez v:user_version, la plus récente est v:latest_version', - + 'invoice_settings' => 'Paramètres des factures', 'invoice_number_prefix' => 'Préfixe du numéro de facture', @@ -436,7 +436,7 @@ return array( 'share_invoice_counter' => 'Partager le compteur de facture', 'invoice_issued_to' => 'Facture destinée à', 'invalid_counter' => 'Pour éviter un éventuel conflit, merci de définir un préfixe pour le numéro de facture ou pour le numéro de devis', - 'mark_sent' => 'Marquer comme envoyé', + 'mark_sent' => 'Marquer comme envoyé', 'gateway_help_1' => ':link to sign up for Authorize.net.', 'gateway_help_2' => ':link to sign up for Authorize.net.', @@ -452,15 +452,15 @@ return array( 'more_designs_self_host_text' => '', 'buy' => 'Acheter', 'bought_designs' => 'Les nouveaux modèles ont été ajoutés avec succès', - + 'sent' => 'envoyé', 'timesheets' => 'Feuilles de temps', - 'payment_title' => 'Enter Your Billing Address and Credit Card information', - 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', - 'payment_footer1' => '*Billing address must match address associated with credit card.', - 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Numéro de TVA', + 'payment_title' => 'Entrez votre adresse de facturation et vos informations bancaires', + 'payment_cvv' => '*Numéro à 3 ou 4 chiffres au dos de votre carte', + 'payment_footer1' => '*L\'adresse de facturation doit correspondre à celle enregistrée avec votre carte bancaire', + 'payment_footer2' => '*Merci de cliquer sur "Payer maintenant" une seule fois. Le processus peut prendre jusqu\'à 1 minute.', + 'vat_number' => 'Numéro de TVA', 'id_number' => 'Numéro ID', 'white_label_link' => 'Marque blanche', @@ -485,25 +485,25 @@ return array( 'reason_for_canceling' => 'Aidez nous à améliorer notre site en nous disant pourquoi vous partez.', 'discount_percent' => 'Pourcent', 'discount_amount' => 'Montant', - + 'invoice_history' => 'Historique des factures', 'quote_history' => 'Historique des devis', 'current_version' => 'Version courante', 'select_versiony' => 'Choix de la verison', 'view_history' => 'Consulter l\'historique', - 'edit_payment' => 'Edit Payment', - 'updated_payment' => 'Successfully updated payment', - 'deleted' => 'Deleted', - 'restore_user' => 'Restore User', - 'restored_user' => 'Successfully restored user', - 'show_deleted_users' => 'Show deleted users', - 'email_templates' => 'Email Templates', - 'invoice_email' => 'Invoice Email', - 'payment_email' => 'Payment Email', - 'quote_email' => 'Quote Email', - 'reset_all' => 'Reset All', - 'approve' => 'Approve', + 'edit_payment' => 'Editer le paiement', + 'updated_payment' => 'Paiement édité avec succès', + 'deleted' => 'Supprimé', + 'restore_user' => 'Restaurer l\'utilisateur', + 'restored_user' => 'Restaurer la commande', + 'show_deleted_users' => 'Voir les utilisateurs supprimés', + 'email_templates' => 'Templates de mail', + 'invoice_email' => 'Templates de facture', + 'payment_email' => 'Email de paiement', + 'quote_email' => 'Email de déclaration', + 'reset_all' => 'Réinitialiser', + 'approve' => 'Accepter', 'token_billing_type_id' => 'Token Billing', 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', @@ -519,18 +519,18 @@ return array( 'token_billing_secure' => 'The data is stored securely by :stripe_link', 'support' => 'Support', - 'contact_information' => 'Contact information', + 'contact_information' => 'Information de contact', '256_encryption' => '256-Bit Encryption', - 'amount_due' => 'Amount due', + 'amount_due' => 'Montant dû', 'billing_address' => 'Billing address', 'billing_method' => 'Billing method', 'order_overview' => 'Order overview', 'match_address' => '*Address must match address associated with credit card.', 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - - 'default_invoice_footer' => 'Set default invoice footer', - 'invoice_footer' => 'Invoice footer', - 'save_as_default_footer' => 'Save as default footer', + + 'default_invoice_footer' => 'Définir par défaut', + 'invoice_footer' => 'Pied de facture', + 'save_as_default_footer' => 'Définir comme pied de facture par défatu', 'token_management' => 'Token Management', 'tokens' => 'Tokens', @@ -543,30 +543,30 @@ return array( 'delete_token' => 'Delete Token', 'token' => 'Token', - 'add_gateway' => 'Add Gateway', - 'delete_gateway' => 'Delete Gateway', - 'edit_gateway' => 'Edit Gateway', - 'updated_gateway' => 'Successfully updated gateway', - 'created_gateway' => 'Successfully created gateway', - 'deleted_gateway' => 'Successfully deleted gateway', + 'add_gateway' => 'Ajouter passerelle', + 'delete_gateway' => 'Supprimer passerelle', + 'edit_gateway' => 'Editer passerelle', + 'updated_gateway' => 'Passerelle mise à jour avec succès', + 'created_gateway' => 'Passerelle crée avec succès', + 'deleted_gateway' => 'Passerelle supprimée avec succès', 'pay_with_paypal' => 'PayPal', - 'pay_with_card' => 'Credit card', + 'pay_with_card' => 'Carte bancaire', - 'change_password' => 'Change password', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'confirm_password' => 'Confirm password', - 'password_error_incorrect' => 'The current password is incorrect.', - 'password_error_invalid' => 'The new password is invalid.', - 'updated_password' => 'Successfully updated password', + 'change_password' => 'Changer de pot de passe', + 'current_password' => 'Mot de passe actuel', + 'new_password' => 'Nouveau mot de passe', + 'confirm_password' => 'Confirmer le mot de passe', + 'password_error_incorrect' => 'Le mot de passe actuel est incorrect.', + 'password_error_invalid' => 'Le nouveau mot de passe est invalide', + 'updated_password' => 'Mot de passe mis à jour avec succès', 'api_tokens' => 'API Tokens', 'users_and_tokens' => 'Users & Tokens', 'account_login' => 'Account Login', 'recover_password' => 'Recover your password', - 'forgot_password' => 'Forgot your password?', - 'email_address' => 'Email address', - 'lets_go' => 'Let’s go', + 'forgot_password' => 'Mot de passe oublié ?', + 'email_address' => 'Adresse email', + 'lets_go' => 'Allons-y !', 'password_recovery' => 'Password Recovery', 'send_email' => 'Send email', 'set_password' => 'Set Password', @@ -577,96 +577,159 @@ return array( 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', - + 'gateway_help_42' => ':link to sign up for BitPay.
    Note: use a Legacy API Key, not an API token.', - 'payment_type_credit_card' => 'Credit card', + 'payment_type_credit_card' => 'Carte de crédit', 'payment_type_paypal' => 'PayPal', 'payment_type_bitcoin' => 'Bitcoin', - 'knowledge_base' => 'Knowledge Base', - 'partial' => 'Partial', - 'partial_remaining' => ':partial of :balance', - - 'more_fields' => 'More Fields', - 'less_fields' => 'Less Fields', - 'client_name' => 'Client Name', - 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', - 'product_settings' => 'Product Settings', + 'knowledge_base' => 'Base de connaissances', + 'partial' => 'Partiel', + 'partial_remaining' => ':partial de :balance', + + 'more_fields' => 'Plus de champs', + 'less_fields' => 'Moins de champs', + 'client_name' => 'Nom du client', + 'pdf_settings' => 'Réglages PDF', + 'utf8_invoices' => 'New PDF Engine Beta', + 'product_settings' => 'Réglages du produit', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', - 'view_documentation' => 'View Documentation', + 'view_documentation' => 'Voir documentation', 'app_title' => 'Free Open-Source Online Invoicing', 'app_description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - - 'rows' => 'rows', + + 'rows' => 'lignes', 'www' => 'www', 'logo' => 'Logo', - 'subdomain' => 'Subdomain', - 'provide_name_or_email' => 'Please provide a contact name or email', + 'subdomain' => 'Sous domaine', + 'provide_name_or_email' => 'Merci d\'indiquer un nom ou une adresse email', 'charts_and_reports' => 'Charts & Reports', 'chart' => 'Chart', 'report' => 'Report', - 'group_by' => 'Group by', - 'paid' => 'Paid', + 'group_by' => 'Grouper par', + 'paid' => 'Payé', 'enable_report' => 'Report', 'enable_chart' => 'Chart', 'totals' => 'Totals', 'run' => 'Run', - 'export' => 'Export', + 'export' => 'Exporter', 'documentation' => 'Documentation', 'zapier' => 'Zapier Beta', - 'recurring' => 'Recurring', - 'last_invoice_sent' => 'Last invoice sent :date', + 'recurring' => 'Récurrent', + 'last_invoice_sent' => 'Dernière facture envoyée le :date', - 'processed_updates' => 'Successfully completed update', - 'tasks' => 'Tasks', - 'new_task' => 'New Task', - 'start_time' => 'Start Time', - 'created_task' => 'Successfully created task', - 'updated_task' => 'Successfully updated task', - 'edit_task' => 'Edit Task', - 'archive_task' => 'Archive Task', - 'restore_task' => 'Restore Task', - 'delete_task' => 'Delete Task', - 'stop_task' => 'Stop Task', - 'time' => 'Time', - 'start' => 'Start', - 'stop' => 'Stop', - 'now' => 'Now', - 'timer' => 'Timer', - 'manual' => 'Manual', - 'date_and_time' => 'Date & Time', - 'second' => 'second', - 'seconds' => 'seconds', + 'processed_updates' => 'Mise à jour effectuée avec succès', + 'tasks' => 'Tâches', + 'new_task' => 'Nouvelle tâche', + 'start_time' => 'Début', + 'created_task' => 'Tâche crée avec succès', + 'updated_task' => 'Tâche mise à jour avec succès', + 'edit_task' => 'Editer la tâche', + 'archive_task' => 'Archiver tâche', + 'restore_task' => 'Restaurer tâche', + 'delete_task' => 'Supprimer tâche', + 'stop_task' => 'Arrêter tâche', + 'time' => 'Temps', + 'start' => 'Début', + 'stop' => 'Fin', + 'now' => 'Maintenant', + 'timer' => 'Compteur', + 'manual' => 'Manuel', + 'date_and_time' => 'Date & heure', + 'second' => 'seconde', + 'seconds' => 'secondes', 'minute' => 'minute', 'minutes' => 'minutes', - 'hour' => 'hour', - 'hours' => 'hours', - 'task_details' => 'Task Details', - 'duration' => 'Duration', - 'end_time' => 'End Time', - 'end' => 'End', - 'invoiced' => 'Invoiced', - 'logged' => 'Logged', - 'running' => 'Running', - 'task_error_multiple_clients' => 'The tasks can\'t belong to different clients', - 'task_error_running' => 'Please stop running tasks first', - 'task_error_invoiced' => 'Tasks have already been invoiced', - 'restored_task' => 'Successfully restored task', - 'archived_task' => 'Successfully archived task', - 'archived_tasks' => 'Successfully archived :count tasks', - 'deleted_task' => 'Successfully deleted task', - 'deleted_tasks' => 'Successfully deleted :count tasks', - 'create_task' => 'Create Task', - 'stopped_task' => 'Successfully stopped task', - 'invoice_task' => 'Invoice Task', - 'invoice_labels' => 'Invoice Labels', - 'prefix' => 'Prefix', - 'counter' => 'Counter', + 'hour' => 'heure', + 'hours' => 'heures', + 'task_details' => 'Détails tâche', + 'duration' => 'Durée', + 'end_time' => 'Heure de fin', + 'end' => 'Fin', + 'invoiced' => 'Facturé', + 'logged' => 'Connecté', + 'running' => 'En cours', + 'task_error_multiple_clients' => 'Cette tâche ne peut appartenir à plusieurs clients', + 'task_error_running' => 'Merci d\'arrêter les tâches en cours', + 'task_error_invoiced' => 'Tâches déjà facturées', + 'restored_task' => 'Tâche restaurée avec succès', + 'archived_task' => 'Tâche archivée avec succès', + 'archived_tasks' => ':count tâches archivées avec succès', + 'deleted_task' => 'Tâche supprimée avec succès', + 'deleted_tasks' => ':count tâches supprimées avec succès', + 'create_task' => 'Créer tâche', + 'stopped_task' => 'Tâche stoppée avec succès', + 'invoice_task' => 'Tâche facturation', + 'invoice_labels' => 'Champs facture', + 'prefix' => 'Préfixe', + 'counter' => 'Compteur', 'payment_type_dwolla' => 'Dwolla', 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', -); \ No newline at end of file + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Modifier', + 'work' => 'Travail', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'cliquer ici', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Paiement crée avec succès et envoyé au client', + 'add_account' => 'Ajouter compte', + 'untitled' => 'Sans titre', + 'new_account' => 'Nouveau compte', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Connexion', + 'or' => 'ou', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + + +); diff --git a/resources/lang/fr_CA/texts.php b/resources/lang/fr_CA/texts.php index 915db3d8670e..eaf88d318209 100644 --- a/resources/lang/fr_CA/texts.php +++ b/resources/lang/fr_CA/texts.php @@ -1,4 +1,4 @@ - 'Facture #', 'po_number' => 'Numéro du bon de commande', 'po_number_short' => 'Bon de commande #', - 'frequency_id' => 'Fréquence', + 'frequency_id' => 'Fréquence', 'discount' => 'Remise', 'taxes' => 'Taxes', 'tax' => 'Taxe', - 'item' => 'Article', + 'item' => 'Article', 'description' => 'Description', 'unit_cost' => 'Coût unitaire', 'quantity' => 'Quantité', @@ -117,11 +117,11 @@ return array( 'billed_client' => 'client facturé', 'billed_clients' => 'clients facturés', 'active_client' => 'client actif', - 'active_clients' => 'clients actifs', + 'active_clients' => 'clients actifs', 'invoices_past_due' => 'Date limite de paiement dépassée', 'upcoming_invoices' => 'Factures à venir', 'average_invoice' => 'Moyenne de facturation', - + // list pages 'archive' => 'Archiver', 'delete' => 'Supprimer', @@ -276,7 +276,7 @@ return array( // Payment page 'secure_payment' => 'Paiement sécurisé', 'card_number' => 'Numéro de carte', - 'expiration_month' => 'Mois d\'expiration', + 'expiration_month' => 'Mois d\'expiration', 'expiration_year' => 'Année d\'expiration', 'cvv' => 'CVV', @@ -297,8 +297,8 @@ return array( 'remove_logo_link' => 'Cliquez ici', ], - 'logout' => 'Se déconnecter', - 'sign_up_to_save' => 'Connectez vous pour sauvegarder votre travail', + 'logout' => 'Se déconnecter', + 'sign_up_to_save' => 'Connectez vous pour sauvegarder votre travail', 'agree_to_terms' =>'J\'accepte les conditions d\'utilisation d\'Invoice ninja :terms', 'terms_of_service' => 'Conditions d\'utilisation', 'email_taken' => 'L\'adresse courriel existe déjà', @@ -319,7 +319,7 @@ return array( 'field_label' => 'Nom du champ', 'field_value' => 'Valeur du champ', 'edit' => 'Éditer', - 'view_as_recipient' => 'Voir en tant que destinataire', + 'view_as_recipient' => 'Voir en tant que destinataire', // product management 'product_library' => 'Inventaire', @@ -387,7 +387,7 @@ return array( 'notification_quote_sent_subject' => 'Le devis :invoice a été envoyé à :client', 'notification_quote_viewed_subject' => 'Le devis :invoice a été visionné par :client', 'notification_quote_sent' => 'Le devis :invoice de :amount a été envoyé au client :client.', - 'notification_quote_viewed' => 'Le devis :invoice de :amount a été visioné par le client :client.', + 'notification_quote_viewed' => 'Le devis :invoice de :amount a été visioné par le client :client.', 'session_expired' => 'Votre session a expiré.', @@ -426,7 +426,7 @@ return array( 'sample_data' => 'Données fictives présentées', 'hide' => 'Cacher', 'new_version_available' => 'Une nouvelle version de :releases_link est disponible. Vous utilisez v:user_version, la plus récente est v:latest_version', - + 'invoice_settings' => 'Paramètres des factures', 'invoice_number_prefix' => 'Préfixe du numéro de facture', @@ -436,7 +436,7 @@ return array( 'share_invoice_counter' => 'Partager le compteur de facture', 'invoice_issued_to' => 'Facture destinée à', 'invalid_counter' => 'Pour éviter un éventuel conflit, merci de définir un préfixe pour le numéro de facture ou pour le numéro de devis', - 'mark_sent' => 'Marquer comme envoyé', + 'mark_sent' => 'Marquer comme envoyé', 'gateway_help_1' => ':link to sign up for Authorize.net.', 'gateway_help_2' => ':link to sign up for Authorize.net.', @@ -452,7 +452,7 @@ return array( 'more_designs_self_host_text' => '', 'buy' => 'Acheter', 'bought_designs' => 'Les nouveaux modèles ont été ajoutés avec succès', - + 'sent' => 'envoyé', 'timesheets' => 'Feuilles de temps', @@ -460,7 +460,7 @@ return array( 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', 'payment_footer1' => '*Billing address must match address associated with credit card.', 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'vat_number' => 'Numéro de TVA', + 'vat_number' => 'Numéro de TVA', 'id_number' => 'Numéro ID', 'white_label_link' => 'Marque blanche', @@ -485,7 +485,7 @@ return array( 'reason_for_canceling' => 'Aidez nous à améliorer notre site en nous disant pourquoi vous partez.', 'discount_percent' => 'Pourcent', 'discount_amount' => 'Montant', - + 'invoice_history' => 'Historique des factures', 'quote_history' => 'Historique des devis', 'current_version' => 'Version courante', @@ -503,7 +503,7 @@ return array( 'payment_email' => 'Courriel de paiement', 'quote_email' => 'Courriel de devis', 'reset_all' => 'Tout remettre à zéro', - 'approve' => 'Approuver', + 'approve' => 'Approuver', 'token_billing_type_id' => 'Token Billing', 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', @@ -527,7 +527,7 @@ return array( 'order_overview' => 'Order overview', 'match_address' => '*Address must match address associated with credit card.', 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - + 'default_invoice_footer' => 'Set default invoice footer', 'invoice_footer' => 'Invoice footer', 'save_as_default_footer' => 'Save as default footer', @@ -571,13 +571,13 @@ return array( 'send_email' => 'Send email', 'set_password' => 'Set Password', 'converted' => 'Converted', - + 'email_approved' => 'Email me when a quote is approved', 'notification_quote_approved_subject' => 'Quote :invoice was approved by :client', 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', - + 'gateway_help_42' => ':link to sign up for BitPay.
    Note: use a Legacy API Key, not an API token.', 'payment_type_credit_card' => 'Credit card', 'payment_type_paypal' => 'PayPal', @@ -590,14 +590,14 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', 'view_documentation' => 'View Documentation', 'app_title' => 'Free Open-Source Online Invoicing', 'app_description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - + 'rows' => 'rows', 'www' => 'www', 'logo' => 'Logo', @@ -619,54 +619,117 @@ return array( 'last_invoice_sent' => 'Last invoice sent :date', 'processed_updates' => 'Successfully completed update', - 'tasks' => 'Tasks', - 'new_task' => 'New Task', - 'start_time' => 'Start Time', - 'created_task' => 'Successfully created task', - 'updated_task' => 'Successfully updated task', + 'tasks' => 'Tâches', + 'new_task' => 'Nouvelle Tâche', + 'start_time' => 'Démarrée à', + 'created_task' => 'Tâche créée avec succès', + 'updated_task' => 'Tâche modifiée avec succès', 'edit_task' => 'Edit Task', - 'archive_task' => 'Archive Task', - 'restore_task' => 'Restore Task', - 'delete_task' => 'Delete Task', - 'stop_task' => 'Stop Task', + 'archive_task' => 'Archiver la Tâche', + 'restore_task' => 'Restaurer la Tâche', + 'delete_task' => 'Supprimer la Tâche', + 'stop_task' => 'Arrêter la Tâche', 'time' => 'Time', - 'start' => 'Start', - 'stop' => 'Stop', + 'start' => 'Démarrer', + 'stop' => 'Arrêter', 'now' => 'Now', 'timer' => 'Timer', 'manual' => 'Manual', 'date_and_time' => 'Date & Time', - 'second' => 'second', - 'seconds' => 'seconds', + 'second' => 'seconde', + 'seconds' => 'secondes', 'minute' => 'minute', 'minutes' => 'minutes', - 'hour' => 'hour', - 'hours' => 'hours', - 'task_details' => 'Task Details', - 'duration' => 'Duration', - 'end_time' => 'End Time', + 'hour' => 'heure', + 'hours' => 'heures', + 'task_details' => 'Détails de la Tâche', + 'duration' => 'Durée', + 'end_time' => 'Arrêtée à', 'end' => 'End', 'invoiced' => 'Invoiced', 'logged' => 'Logged', 'running' => 'Running', - 'task_error_multiple_clients' => 'The tasks can\'t belong to different clients', - 'task_error_running' => 'Please stop running tasks first', - 'task_error_invoiced' => 'Tasks have already been invoiced', - 'restored_task' => 'Successfully restored task', - 'archived_task' => 'Successfully archived task', - 'archived_tasks' => 'Successfully archived :count tasks', - 'deleted_task' => 'Successfully deleted task', - 'deleted_tasks' => 'Successfully deleted :count tasks', - 'create_task' => 'Create Task', - 'stopped_task' => 'Successfully stopped task', - 'invoice_task' => 'Invoice Task', + 'task_error_multiple_clients' => 'Une tâche ne peut appartenir à plusieurs clients', + 'task_error_running' => 'Merci d\'arrêter les tâches en cours', + 'task_error_invoiced' => 'Ces tâches ont déjà été facturées', + 'restored_task' => 'Tâche restaurée avec succès', + 'archived_task' => 'Tâche archivée avec succès', + 'archived_tasks' => ':count tâches archivées avec succès', + 'deleted_task' => 'Tâche supprimée avec succès', + 'deleted_tasks' => ':count tâches supprimées avec succès', + 'create_task' => 'Créer une Tâche', + 'stopped_task' => 'Tâche arrêtée avec succès', + 'invoice_task' => 'Facturer Tâche', 'invoice_labels' => 'Invoice Labels', - 'prefix' => 'Prefix', - 'counter' => 'Counter', + 'prefix' => 'Préfixe', + 'counter' => 'Compteur', 'payment_type_dwolla' => 'Dwolla', 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Continuer', + 'break_duration' => 'Pause', + 'edit_details' => 'Modifier', + 'work' => 'Travail', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'cliquer içi', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); diff --git a/resources/lang/it/texts.php b/resources/lang/it/texts.php index fa4f842e1838..b4cc4736638f 100644 --- a/resources/lang/it/texts.php +++ b/resources/lang/it/texts.php @@ -592,7 +592,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -670,5 +670,69 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); diff --git a/resources/lang/lt/pagination.php b/resources/lang/lt/pagination.php index eb9be3baaed5..d2ba5375c39c 100644 --- a/resources/lang/lt/pagination.php +++ b/resources/lang/lt/pagination.php @@ -1,20 +1,19 @@ - '« Previous', + 'previous' => '« Ankstesnis', + 'next' => 'Sekantis »', - 'next' => 'Next »', - -); \ No newline at end of file +]; diff --git a/resources/lang/lt/reminders.php b/resources/lang/lt/reminders.php index ad2262124d4d..05af271289f3 100644 --- a/resources/lang/lt/reminders.php +++ b/resources/lang/lt/reminders.php @@ -1,24 +1,21 @@ "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!", - -); \ No newline at end of file + "password" => "Slaptažodis turi būti bent šešių simbolių ir sutapti su patvirtinimu.", + "user" => "Vartotojas su tokiu el. pašu nerastas.", + "token" => "Šis slaptažodžio raktas yra neteisingas.", + "sent" => "Naujo slaptažodžio nustatymo nuoroda išsiųsta", + "reset" => "Nustatytas naujas slaptažodis!", +]; diff --git a/resources/lang/lt/texts.php b/resources/lang/lt/texts.php index 8d5a878e2eff..a507fa01a433 100644 --- a/resources/lang/lt/texts.php +++ b/resources/lang/lt/texts.php @@ -600,7 +600,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -678,6 +678,69 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); diff --git a/resources/lang/lt/validation.php b/resources/lang/lt/validation.php index 1c12d36aa4ca..7a76d1c22a8b 100644 --- a/resources/lang/lt/validation.php +++ b/resources/lang/lt/validation.php @@ -1,103 +1,108 @@ "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 - :max.", - "file" => "The :attribute must be between :min - :max kilobytes.", - "string" => "The :attribute must be between :min - :max characters.", - "array" => "The :attribute must have between :min - :max items.", - ), - "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 format is invalid.", - "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_without" => "The :attribute field is required when :values is not 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.", - - "positive" => "The :attribute must be greater than zero.", - "has_credit" => "The client does not have enough credit.", - "notmasked" => "The values are masked", - "less_than" => 'The :attribute must be less than :value', - - /* - |-------------------------------------------------------------------------- - | 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. - | - */ + "accepted" => "Laukas :attribute turi būti priimtas.", + "active_url" => "Laukas :attribute nėra galiojantis internetinis adresas.", + "after" => "Laukelyje :attribute turi būti data po :date.", + "alpha" => "Laukas :attribute gali turėti tik raides.", + "alpha_dash" => "Laukas :attribute gali turėti tik raides, skaičius ir brūkšnelius.", + "alpha_num" => "Laukas :attribute gali turėti tik raides ir skaičius.", + "array" => "Laukas :attribute turi būti masyvas.", + "before" => "Laukas :attribute turi būti data prieš :date.", + "between" => [ + "numeric" => "Lauko :attribute reikšmė turi būti tarp :min ir :max.", + "file" => "Failo dydis lauke :attribute turi būti tarp :min ir :max kilobaitų.", + "string" => "Simbolių skaičius lauke :attribute turi būti tarp :min ir :max.", + "array" => "Elementų skaičius lauke :attribute turi turėti nuo :min iki :max.", + ], + "boolean" => "Lauko reikšmė :attribute turi būti 'taip' arba 'ne'.", + "confirmed" => "Lauko :attribute patvirtinimas nesutampa.", + "date" => "Lauko :attribute reikšmė nėra galiojanti data.", + "date_format" => "Lauko :attribute reikšmė neatitinka formato :format.", + "different" => "Laukų :attribute ir :other reikšmės turi skirtis.", + "digits" => "Laukas :attribute turi būti sudarytas iš :digits skaitmenų.", + "digits_between" => "Laukas :attribute tuti turėti nuo :min iki :max skaitmenų.", + "email" => "Lauko :attribute reikšmė turi būti galiojantis el. pašto adresas.", + "filled" => "Laukas :attribute turi būti užpildytas.", + "exists" => "Pasirinkta negaliojanti :attribute reikšmė.", + "image" => "Lauko :attribute reikšmė turi būti paveikslėlis.", + "in" => "Pasirinkta negaliojanti :attribute reikšmė.", + "integer" => "Lauko :attribute reikšmė turi būti veikasis skaičius.", + "ip" => "Lauko :attribute reikšmė turi būti galiojantis IP adresas.", + "max" => [ + "numeric" => "Lauko :attribute reikšmė negali būti didesnė nei :max.", + "file" => "Failo dydis lauke :attribute reikšmė negali būti didesnė nei :max kilobaitų.", + "string" => "Simbolių kiekis lauke :attribute reikšmė negali būti didesnė nei :max simbolių.", + "array" => "Elementų kiekis lauke :attribute negali turėti daugiau nei :max elementų.", + ], + "mimes" => "Lauko reikšmė :attribute turi būti failas vieno iš sekančių tipų: :values.", + "min" => [ + "numeric" => "Lauko :attribute reikšmė turi būti ne mažesnė nei :min.", + "file" => "Failo dydis lauke :attribute turi būti ne mažesnis nei :min kilobaitų.", + "string" => "Simbolių kiekis lauke :attribute turi būti ne mažiau nei :min.", + "array" => "Elementų kiekis lauke :attribute turi būti ne mažiau nei :min.", + ], + "not_in" => "Pasirinkta negaliojanti reikšmė :attribute.", + "numeric" => "Lauko :attribute reikšmė turi būti skaičius.", + "regex" => "Negaliojantis lauko :attribute formatas.", + "required" => "Privaloma užpildyti lauką :attribute.", + "required_if" => "Privaloma užpildyti lauką :attribute kai :other yra :value.", + "required_with" => "Privaloma užpildyti lauką :attribute kai pateikta :values.", + "required_with_all" => "Privaloma užpildyti lauką :attribute kai pateikta :values.", + "required_without" => "Privaloma užpildyti lauką :attribute kai nepateikta :values.", + "required_without_all" => "Privaloma užpildyti lauką :attribute kai nepateikta nei viena iš reikšmių :values.", + "same" => "Laukai :attribute ir :other turi sutapti.", + "size" => [ + "numeric" => "Lauko :attribute reikšmė turi būti :size.", + "file" => "Failo dydis lauke :attribute turi būti :size kilobaitai.", + "string" => "Simbolių skaičius lauke :attribute turi būti :size.", + "array" => "Elementų kiekis lauke :attribute turi būti :size.", + ], + "string" => "The :attribute must be a string.", + "timezone" => "Lauko :attribute reikšmė turi būti galiojanti laiko zona.", + "unique" => "Tokia :attribute reikšmė jau pasirinkta.", + "url" => "Negaliojantis lauko :attribute formatas.", - 'custom' => array(), + /* + |-------------------------------------------------------------------------- + | Pasirinktiniai patvirtinimo kalbos eilutės + |-------------------------------------------------------------------------- + | + | Čia galite nurodyti pasirinktinius patvirtinimo pranešimus, naudodami + | konvenciją "attribute.rule" eilučių pavadinimams. Tai leidžia greitai + | nurodyti konkrečią pasirinktinę kalbos eilutę tam tikrai atributo taisyklei. + | + */ - /* - |-------------------------------------------------------------------------- - | 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. - | - */ + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], - 'attributes' => array(), + /* + |-------------------------------------------------------------------------- + | Pasirinktiniai patvirtinimo atributai + |-------------------------------------------------------------------------- + | + | Sekančios kalbos eilutės naudojamos pakeisti vietos žymes + | kuo nors labiau priimtinu skaitytojui (pvz. "El.Pašto Adresas" vietoj + | "email". TTai tiesiog padeda mums padaryti žinutes truputi aiškesnėmis. + | + */ -); + 'attributes' => [], + +]; diff --git a/resources/lang/nb_NO/texts.php b/resources/lang/nb_NO/texts.php index c39965dad0d0..cda4b94fabff 100644 --- a/resources/lang/nb_NO/texts.php +++ b/resources/lang/nb_NO/texts.php @@ -598,7 +598,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -676,5 +676,68 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); \ No newline at end of file diff --git a/resources/lang/nl/texts.php b/resources/lang/nl/texts.php index 547529e40331..5118ac4fdd9a 100644 --- a/resources/lang/nl/texts.php +++ b/resources/lang/nl/texts.php @@ -593,7 +593,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -671,5 +671,68 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); diff --git a/resources/lang/pt_BR/texts.php b/resources/lang/pt_BR/texts.php index 1a59edcd374e..0923299362e7 100644 --- a/resources/lang/pt_BR/texts.php +++ b/resources/lang/pt_BR/texts.php @@ -593,7 +593,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -671,5 +671,67 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + ); diff --git a/resources/lang/sv/texts.php b/resources/lang/sv/texts.php index 477355e8511b..4ac8dfb42977 100644 --- a/resources/lang/sv/texts.php +++ b/resources/lang/sv/texts.php @@ -596,7 +596,7 @@ return array( 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', 'pdf_settings' => 'PDF Settings', - 'utf8_invoices' => 'Cyrillic Support Beta', + 'utf8_invoices' => 'New PDF Engine Beta', 'product_settings' => 'Product Settings', 'auto_wrap' => 'Auto Line Wrap', 'duplicate_post' => 'Warning: the previous page was submitted twice. The second submission had been ignored.', @@ -674,5 +674,68 @@ return array( 'gateway_help_43' => ':link to sign up for Dwolla.', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', + + 'pro_plan_title' => 'NINJA PRO', + 'pro_plan_call_to_action' => 'Upgrade Now!', + 'pro_plan_feature1' => 'Create Unlimited Clients', + 'pro_plan_feature2' => 'Access to 10 Beautiful Invoice Designs', + 'pro_plan_feature3' => 'Custom URLs - "YourBrand.InvoiceNinja.com"', + 'pro_plan_feature4' => 'Remove "Created by Invoice Ninja"', + 'pro_plan_feature5' => 'Multi-user Access & Activity Tracking', + 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', + 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', + 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', + + 'resume' => 'Resume', + 'break_duration' => 'Break', + 'edit_details' => 'Edit Details', + 'work' => 'Work', + 'timezone_unset' => 'Please :link to set your timezone', + 'click_here' => 'click here', + + 'email_receipt' => 'Email payment receipt to the client', + 'created_payment_emailed_client' => 'Successfully created payment and emailed client', + 'add_account' => 'Add Account', + 'untitled' => 'Untitled', + 'new_account' => 'New Account', + 'associated_accounts' => 'Successfully linked accounts', + 'unlinked_account' => 'Successfully unlinked accounts', + 'login' => 'Login', + 'or' => 'or', + + 'email_error' => 'There was a problem sending the email', + 'created_by_recurring' => 'Created by recurring invoice :invoice', + 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', + 'old_browser' => 'Please use a newer browser', + 'payment_terms_help' => 'Sets the default invoice due date', + 'unlink_account' => 'Unlink Account', + 'unlink' => 'Unlink', + 'show_address' => 'Show Address', + 'show_address_help' => 'Require client to provide their billing address', + 'update_address' => 'Update Address', + 'update_address_help' => 'Update client\'s address with provided details', + 'times' => 'Times', + 'set_now' => 'Set now', + 'dark_mode' => 'Dark Mode', + 'dark_mode_help' => 'Show white text on black background', + 'add_to_invoice' => 'Add to invoice :invoice', + 'create_new_invoice' => 'Create new invoice', + 'task_errors' => 'Please correct any overlapping times', + 'from' => 'From', + 'to' => 'To', + 'font_size' => 'Font Size', + 'primary_color' => 'Primary Color', + 'secondary_color' => 'Secondary Color', + 'customize_design' => 'Customize Design', + + 'content' => 'Content', + 'styles' => 'Styles', + 'defaults' => 'Defaults', + 'margins' => 'Margins', + 'header' => 'Header', + 'footer' => 'Footer', + 'custom' => 'Custom', + + ); diff --git a/resources/views/accounts/account_gateway.blade.php b/resources/views/accounts/account_gateway.blade.php index 13d6cd337e27..2aa79c2dbb68 100644 --- a/resources/views/accounts/account_gateway.blade.php +++ b/resources/views/accounts/account_gateway.blade.php @@ -14,9 +14,12 @@
    @if ($accountGateway) - {!! Former::populateField('payment_type_id', $paymentTypeId) !!} {!! Former::populateField('gateway_id', $accountGateway->gateway_id) !!} - {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} + {!! Former::populateField('payment_type_id', $paymentTypeId) !!} + {!! Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) !!} + {!! Former::populateField('show_address', intval($accountGateway->show_address)) !!} + {!! Former::populateField('update_address', intval($accountGateway->update_address)) !!} + @if ($config) @foreach ($accountGateway->fields as $field => $junk) @if (in_array($field, $hiddenFields)) @@ -28,6 +31,8 @@ @endif @else {!! Former::populateField('gateway_id', GATEWAY_STRIPE) !!} + {!! Former::populateField('show_address', 1) !!} + {!! Former::populateField('update_address', 1) !!} @endif {!! Former::select('payment_type_id') @@ -77,6 +82,15 @@ @endforeach + {!! Former::checkbox('show_address') + ->label(trans('texts.billing_address')) + ->text(trans('texts.show_address_help')) + ->addGroupClass('gateway-option') !!} + {!! Former::checkbox('update_address') + ->label(' ') + ->text(trans('texts.update_address_help')) + ->addGroupClass('gateway-option') !!} + {!! Former::checkboxes('creditCardTypes[]') ->label('Accepted Credit Cards') ->checkboxes($creditCardTypes) @@ -131,11 +145,25 @@ } } + function enableUpdateAddress(event) { + var disabled = !$('#show_address').is(':checked'); + $('#update_address').prop('disabled', disabled); + $('label[for=update_address]').css('color', disabled ? '#888' : '#000'); + if (disabled) { + $('#update_address').prop('checked', false); + } else if (event) { + $('#update_address').prop('checked', true); + } + } + $(function() { setPaymentType(); @if ($accountGateway) $('.payment-type-option').hide(); @endif + + $('#show_address').change(enableUpdateAddress); + enableUpdateAddress(); }) diff --git a/resources/views/accounts/customize_design.blade.php b/resources/views/accounts/customize_design.blade.php new file mode 100644 index 000000000000..b14268a5ac9e --- /dev/null +++ b/resources/views/accounts/customize_design.blade.php @@ -0,0 +1,183 @@ +@extends('accounts.nav') + +@section('head') + @parent + + + + + + + + + + + + +@stop + +@section('content') + @parent + @include('accounts.nav_advanced') + + + + + + +
    +
    + + {!! Former::open()->addClass('warn-on-exit') !!} + {!! Former::populateField('invoice_design_id', $account->invoice_design_id) !!} + +
    + {!! Former::text('custom_design') !!} +
    + + + +
    +

     

    + +
    + {!! Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id')->onchange('onSelectChange()')->raw() !!} +
    + {!! Button::normal(trans('texts.documentation'))->asLinkTo(PDFMAKE_DOCS)->withAttributes(['target' => '_blank'])->appendIcon(Icon::create('info-sign')) !!} + {!! Button::normal(trans('texts.cancel'))->asLinkTo(URL::to('/company/advanced_settings/invoice_design'))->appendIcon(Icon::create('remove-circle')) !!} + @if (Auth::user()->isPro()) + {!! Button::success(trans('texts.save'))->withAttributes(['onclick' => 'submitForm()'])->appendIcon(Icon::create('floppy-disk')) !!} + @endif +
    +
    + + @if (!Auth::user()->isPro()) + + @endif + + {!! Former::close() !!} + +
    +
    + + @include('invoices.pdf', ['account' => Auth::user()->account, 'pdfHeight' => 800]) + +
    +
    + +@stop \ No newline at end of file diff --git a/resources/views/accounts/details.blade.php b/resources/views/accounts/details.blade.php index feef5eceb57e..90475d384b75 100644 --- a/resources/views/accounts/details.blade.php +++ b/resources/views/accounts/details.blade.php @@ -22,6 +22,9 @@ {{ Former::populateField('last_name', $account->users()->first()->last_name) }} {{ Former::populateField('email', $account->users()->first()->email) }} {{ Former::populateField('phone', $account->users()->first()->phone) }} + @if (Utils::isNinja()) + {{ Former::populateField('dark_mode', intval($account->users()->first()->dark_mode)) }} + @endif @endif
    @@ -88,6 +91,10 @@ {!! Former::text('last_name') !!} {!! Former::text('email') !!} {!! Former::text('phone') !!} + @if (Utils::isNinja()) + {!! Former::checkbox('dark_mode')->text(trans('texts.dark_mode_help')) !!} + @endif + @if (Auth::user()->confirmed) {!! Former::actions( Button::primary(trans('texts.change_password'))->small()->withAttributes(['onclick'=>'showChangePassword()'])) !!} @elseif (Auth::user()->registered) diff --git a/resources/views/accounts/email_templates.blade.php b/resources/views/accounts/email_templates.blade.php index 5b57c7d8dc09..ab30b19016db 100644 --- a/resources/views/accounts/email_templates.blade.php +++ b/resources/views/accounts/email_templates.blade.php @@ -111,20 +111,10 @@ vals = [{!! json_encode($emailFooter) !!}, '{!! Auth::user()->account->getDisplayName() !!}', 'Client Name', formatMoney(100), '{!! NINJA_WEB_URL !!}', 'Contact Name']; // Add any available payment method links - account->getGatewayByType($type)) { - - // Changes "PAYMENT_TYPE_CREDIT_CARD" to "credit_card" - $gateway_slug = strtolower(str_replace('PAYMENT_TYPE_', '', $type)).'_link'; - - echo "keys.push('$gateway_slug'); "; - echo "vals.push('".URL::to("/payment/xxxxxx/{$type}")."'); "; - echo "\n"; - - } - } - ?> + @foreach (\App\Models\Gateway::getPaymentTypeLinks() as $type) + {!! "keys.push('" . $type.'_link' . "');" !!} + {!! "vals.push('" . URL::to("/payment/xxxxxx/{$type}") . "');" !!} + @endforeach for (var i=0; i - @if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS) + @if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS_SELF_HOST) {!! Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id')->addOption(trans('texts.more_designs') . '...', '-1') !!} @else {!! Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id') !!} @@ -109,6 +109,10 @@ {!! Former::text('primary_color') !!} {!! Former::text('secondary_color') !!} + {!! Former::actions( + Button::primary(trans('texts.customize_design'))->small()->asLinkTo(URL::to('/company/advanced_settings/customize_design')) + ) !!} +
    diff --git a/resources/views/accounts/invoice_settings.blade.php b/resources/views/accounts/invoice_settings.blade.php index b46bdfd17b0c..b3b03011578c 100644 --- a/resources/views/accounts/invoice_settings.blade.php +++ b/resources/views/accounts/invoice_settings.blade.php @@ -23,8 +23,7 @@ {{ Former::populateField('custom_invoice_taxes2', intval($account->custom_invoice_taxes2)) }} {{ Former::populateField('share_counter', intval($account->share_counter)) }} {{ Former::populateField('pdf_email_attachment', intval($account->pdf_email_attachment)) }} - {{ Former::populateField('utf8_invoices', intval($account->utf8_invoices)) }} - {{ Former::populateField('auto_wrap', intval($account->auto_wrap)) }} + {{ Former::populateField('utf8_invoices', intval($account->utf8_invoices)) }}
    @@ -99,9 +98,6 @@
    {!! Former::checkbox('pdf_email_attachment')->text(trans('texts.enable')) !!} {!! Former::checkbox('utf8_invoices')->text(trans('texts.enable')) !!} -
    - {!! Former::checkbox('auto_wrap')->text(trans('texts.enable')) !!} -
    diff --git a/resources/views/accounts/nav.blade.php b/resources/views/accounts/nav.blade.php index d03312d6803c..7341d37231af 100644 --- a/resources/views/accounts/nav.blade.php +++ b/resources/views/accounts/nav.blade.php @@ -8,7 +8,7 @@ {!! HTML::nav_link('company/products', 'product_library') !!} {!! HTML::nav_link('company/notifications', 'notifications') !!} {!! HTML::nav_link('company/import_export', 'import_export', 'company/import_map') !!} - {!! HTML::nav_link('company/advanced_settings/invoice_settings', 'advanced_settings', '*/advanced_settings/*') !!} + {!! HTML::nav_link('company/advanced_settings/invoice_design', 'advanced_settings', '*/advanced_settings/*') !!}
    diff --git a/resources/views/accounts/nav_advanced.blade.php b/resources/views/accounts/nav_advanced.blade.php index 53979af666ae..6726837af01c 100644 --- a/resources/views/accounts/nav_advanced.blade.php +++ b/resources/views/accounts/nav_advanced.blade.php @@ -1,6 +1,6 @@ + + - @if (Auth::user()->getPopOverText() && Utils::isRegistered()) - - @endif - - - - - - -