From 98a42afa78fff0f414985dbe9657b2226697ba70 Mon Sep 17 00:00:00 2001 From: sh1hab Date: Thu, 29 Apr 2021 15:34:05 +0600 Subject: [PATCH 001/144] Feature #9378 remove deleted user from unaccepted assets report --- app/Http/Controllers/ReportsController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 3b55e43a0..7f380fe88 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -12,6 +12,7 @@ use App\Models\Depreciation; use App\Models\License; use App\Models\Setting; use Carbon\Carbon; +use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Http\Request; use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\View; @@ -929,8 +930,9 @@ class ReportsController extends Controller * getAssetAcceptanceReport * * @return mixed - * @author Vincent Sposato + * @throws AuthorizationException * @version v1.0 + * @author Vincent Sposato */ public function getAssetAcceptanceReport() { @@ -940,11 +942,11 @@ class ReportsController extends Controller * Get all assets with pending checkout acceptances */ - $acceptances = CheckoutAcceptance::pending()->get(); + $acceptances = CheckoutAcceptance::pending()->with('assignedTo')->get(); $assetsForReport = $acceptances ->filter(function($acceptance) { - return $acceptance->checkoutable_type == 'App\Models\Asset'; + return $acceptance->checkoutable_type == 'App\Models\Asset' && !is_null($acceptance->assignedTo); }) ->map(function($acceptance) { return $acceptance->checkoutable; From 193a8d923b79a94049e2b19503dc7ed38cfb4ec8 Mon Sep 17 00:00:00 2001 From: sh1hab Date: Thu, 29 Apr 2021 16:32:37 +0600 Subject: [PATCH 002/144] Feature #9378 update phpdoc comment --- app/Http/Controllers/ReportsController.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 7f380fe88..c6faa3cd9 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -12,7 +12,6 @@ use App\Models\Depreciation; use App\Models\License; use App\Models\Setting; use Carbon\Carbon; -use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Http\Request; use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\View; @@ -417,7 +416,7 @@ class ReportsController extends Controller // Open output stream $handle = fopen('php://output', 'w'); stream_set_timeout($handle, 2000); - + if ($request->filled('use_bom')) { fprintf($handle, chr(0xEF) . chr(0xBB) . chr(0xBF)); } @@ -488,7 +487,7 @@ class ReportsController extends Controller if ($request->filled('rtd_location')) { $header[] = trans('admin/hardware/form.default_location'); } - + if ($request->filled('rtd_location_address')) { $header[] = trans('general.address'); $header[] = trans('general.address'); @@ -579,7 +578,7 @@ class ReportsController extends Controller $assets = \App\Models\Company::scopeCompanyables(Asset::select('assets.*'))->with( 'location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo', 'model.category', 'model.manufacturer','supplier'); - + if ($request->filled('by_location_id')) { $assets->where('assets.location_id', $request->input('by_location_id')); } @@ -641,7 +640,7 @@ class ReportsController extends Controller if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) { $assets->whereBetween('assets.next_audit_date', [$request->input('next_audit_start'), $request->input('next_audit_end')]); } - + $assets->orderBy('assets.created_at', 'ASC')->chunk(20, function($assets) use($handle, $customfields, $request) { $executionTime = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"]; @@ -650,7 +649,7 @@ class ReportsController extends Controller foreach ($assets as $asset) { $count++; $row = []; - + if ($request->filled('company')) { $row[] = ($asset->company) ? $asset->company->name : ''; } @@ -699,7 +698,7 @@ class ReportsController extends Controller if ($request->filled('supplier')) { $row[] = ($asset->supplier) ? $asset->supplier->name : ''; } - + if ($request->filled('location')) { $row[] = ($asset->location) ? $asset->location->present()->name() : ''; @@ -930,9 +929,8 @@ class ReportsController extends Controller * getAssetAcceptanceReport * * @return mixed - * @throws AuthorizationException - * @version v1.0 * @author Vincent Sposato + * @version v1.0 */ public function getAssetAcceptanceReport() { From 18b1a155bf37599616f4245388da7beb4bd3351d Mon Sep 17 00:00:00 2001 From: Thomas Misilo Date: Wed, 5 May 2021 11:05:22 -0500 Subject: [PATCH 003/144] Change from ENV to config value for PUBLIC_AWS_URL When running config:cache the env('PUBLIC_AWS'URL') value disappears and isn't available, so it doesn't get added to the CSP Policy. --- app/Http/Middleware/SecurityHeaders.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/SecurityHeaders.php b/app/Http/Middleware/SecurityHeaders.php index 8a3800ffe..7f3194743 100644 --- a/app/Http/Middleware/SecurityHeaders.php +++ b/app/Http/Middleware/SecurityHeaders.php @@ -106,7 +106,10 @@ class SecurityHeaders $csp_policy[] = "connect-src 'self'"; $csp_policy[] = "object-src 'none'"; $csp_policy[] = "font-src 'self' data:"; - $csp_policy[] = "img-src 'self' data: ".config('app.url')." ".env('PUBLIC_AWS_URL')." https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"; + $csp_policy[] = "img-src 'self' data: ".config('app.url')." https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"; + if(config('filesystems.disks.public.driver') == 's3') { + $csp_policy[] = "img-src 'self' data: ".config('filesystems.disks.public.url'); + } $csp_policy = join(';', $csp_policy); $response->headers->set('Content-Security-Policy', $csp_policy); } From f43413bdc3fad1c923bd3b20d41ab92d9fcb9291 Mon Sep 17 00:00:00 2001 From: sh1hab Date: Fri, 21 May 2021 10:19:04 +0600 Subject: [PATCH 004/144] Feature snipe#9378 update --- app/Http/Controllers/ReportsController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 4b92634b4..f0e4c515e 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -12,6 +12,7 @@ use App\Models\Depreciation; use App\Models\License; use App\Models\Setting; use Carbon\Carbon; +use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Http\Request; use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\View; @@ -929,6 +930,7 @@ class ReportsController extends Controller * getAssetAcceptanceReport * * @return mixed + * @throws AuthorizationException * @author Vincent Sposato * @version v1.0 */ @@ -940,11 +942,11 @@ class ReportsController extends Controller * Get all assets with pending checkout acceptances */ - $acceptances = CheckoutAcceptance::pending()->get(); + $acceptances = CheckoutAcceptance::pending()->with('assignedTo')->get(); $assetsForReport = $acceptances ->filter(function($acceptance) { - return $acceptance->checkoutable_type == 'App\Models\Asset'; + return $acceptance->checkoutable_type == 'App\Models\Asset' && !is_null($acceptance->assignedTo); }) ->map(function($acceptance) { return $acceptance->checkoutable; From 9e1d7ffb5dffcc6c5fb65f822c2b144e2f9aafb9 Mon Sep 17 00:00:00 2001 From: Tobias Regnery Date: Tue, 6 Jul 2021 09:08:29 +0200 Subject: [PATCH 005/144] Fix scope of departments for FullMultipleCompanySupport If a user tries to view or edit a department from a different company with FullMultipleCompanySupport enabled, there is a 403 error displayed. Apply the correct company scope in order to only display the departments from the own company in the departments view. Signed-off-by: Tobias Regnery --- app/Http/Controllers/Api/DepartmentsController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/DepartmentsController.php b/app/Http/Controllers/Api/DepartmentsController.php index b692d378b..752c58a04 100644 --- a/app/Http/Controllers/Api/DepartmentsController.php +++ b/app/Http/Controllers/Api/DepartmentsController.php @@ -6,6 +6,7 @@ use App\Helpers\Helper; use App\Http\Controllers\Controller; use App\Http\Transformers\DepartmentsTransformer; use App\Http\Transformers\SelectlistTransformer; +use App\Models\Company; use App\Models\Department; use Auth; use Illuminate\Http\Request; @@ -25,7 +26,7 @@ class DepartmentsController extends Controller $this->authorize('view', Department::class); $allowed_columns = ['id','name','image','users_count']; - $departments = Department::select([ + $departments = Company::scopeCompanyables(Department::select( 'departments.id', 'departments.name', 'departments.location_id', @@ -33,8 +34,8 @@ class DepartmentsController extends Controller 'departments.manager_id', 'departments.created_at', 'departments.updated_at', - 'departments.image' - ])->with('users')->with('location')->with('manager')->with('company')->withCount('users as users_count'); + 'departments.image'), + "company_id", "departments")->with('users')->with('location')->with('manager')->with('company')->withCount('users as users_count'); if ($request->filled('search')) { $departments = $departments->TextSearch($request->input('search')); From 5b5874499d2eabd8088c23dfee4e82c2d3f86f87 Mon Sep 17 00:00:00 2001 From: Oskar Stenberg <01ste02@gmail.com> Date: Mon, 12 Jul 2021 11:46:19 +0200 Subject: [PATCH 006/144] Added import for min_amt for consumables --- app/Importer/ConsumableImporter.php | 3 +++ app/Importer/Importer.php | 5 +++-- app/Importer/import_mappings.md | 1 + app/Models/Consumable.php | 1 + resources/assets/js/components/importer/importer-file.vue | 4 +++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/Importer/ConsumableImporter.php b/app/Importer/ConsumableImporter.php index e7972bb2c..69964a8f3 100644 --- a/app/Importer/ConsumableImporter.php +++ b/app/Importer/ConsumableImporter.php @@ -41,9 +41,12 @@ class ConsumableImporter extends ItemImporter $consumable = new Consumable(); $this->item['model_number'] = $this->findCsvMatch($row, "model_number");; $this->item['item_no'] = $this->findCsvMatch($row, "item_number"); + $this->item['min_amt'] = $this->findCsvMatch($row, "minimum quantity"); + $this->log("min_amt " . $this->item["min_amt"]); $consumable->fill($this->sanitizeItemForStoring($consumable)); //FIXME: this disables model validation. Need to find a way to avoid double-logs without breaking everything. $consumable->unsetEventDispatcher(); + $this->log(implode(",", $this->item)); if ($consumable->save()) { $consumable->logCreate('Imported using CSV Importer'); $this->log("Consumable " . $this->item["name"] . ' was created'); diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php index 6466c3b2d..352caf849 100644 --- a/app/Importer/Importer.php +++ b/app/Importer/Importer.php @@ -75,6 +75,7 @@ abstract class Importer 'department' => 'department', 'manager_first_name' => 'manager first name', 'manager_last_name' => 'manager last name', + 'min_amt' => 'minimum quantity', ]; /** * Map of item fields->csv names @@ -195,11 +196,11 @@ abstract class Importer $val = $default; $key = $this->lookupCustomKey($key); - // $this->log("Custom Key: ${key}"); + $this->log("Custom Key: ${key}"); if (array_key_exists($key, $array)) { $val = Encoding::toUTF8(trim($array[ $key ])); } - // $this->log("${key}: ${val}"); + $this->log("${key}: ${val}"); return $val; } diff --git a/app/Importer/import_mappings.md b/app/Importer/import_mappings.md index 7899cf679..211a68bc9 100644 --- a/app/Importer/import_mappings.md +++ b/app/Importer/import_mappings.md @@ -29,6 +29,7 @@ | serial number | serial | Asset, license | | status | status | Asset ? All | | supplier | supplier | Asset ? All | +| minimum quantity | min_amt | Consumable | | termination date | termination_date | License | | warranty months | warranty_months | Asset | | User Related Fields | assigned_to | Asset | diff --git a/app/Models/Consumable.php b/app/Models/Consumable.php index 14de8c6eb..fa0a64a36 100644 --- a/app/Models/Consumable.php +++ b/app/Models/Consumable.php @@ -68,6 +68,7 @@ class Consumable extends SnipeModel 'purchase_cost', 'purchase_date', 'qty', + 'min_amt', 'requestable' ]; diff --git a/resources/assets/js/components/importer/importer-file.vue b/resources/assets/js/components/importer/importer-file.vue index f4fddcd84..9ad0d6f52 100644 --- a/resources/assets/js/components/importer/importer-file.vue +++ b/resources/assets/js/components/importer/importer-file.vue @@ -155,6 +155,7 @@ consumables: [ {id: 'item_no', text: "Item Number"}, {id: 'model_number', text: "Model Number"}, + {id: 'min_amt', text: "Minimum Quantity"}, ], licenses: [ {id: 'asset_tag', text: 'Assigned To Asset'}, @@ -210,6 +211,7 @@ .sort(sorter); case 'consumable': + console.log('Returned consumable'); return this.columnOptions.general .concat(this.columnOptions.consumables) .sort(sorter); @@ -303,4 +305,4 @@ select2: require('../select2.vue').default } } - \ No newline at end of file + From 35ffe8b90230ec585d79bcef5bf9b7462602d1bb Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 20 Jul 2021 18:56:22 -0500 Subject: [PATCH 007/144] Adds a check to know if the asset is checked out to the logged in user to allow check the state int the view --- app/Http/Transformers/AssetsTransformer.php | 2 +- resources/views/partials/bootstrap-table.blade.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index 400a5dd11..bb75b9868 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -185,12 +185,12 @@ class AssetsTransformer 'expected_checkin' => Helper::getFormattedDateObject($asset->expected_checkin, 'date'), 'location' => ($asset->location) ? e($asset->location->name) : null, 'status'=> ($asset->assetstatus) ? $asset->present()->statusMeta : null, + 'assigned_to_self' => ($asset->assigned_to == \Auth::user()->id), ]; $permissions_array['available_actions'] = [ 'cancel' => ($asset->isRequestedBy(\Auth::user())) ? true : false, 'request' => ($asset->isRequestedBy(\Auth::user())) ? false : true, - ]; $array += $permissions_array; diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 13de846d3..60dbd1bec 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -333,7 +333,9 @@ // This is only used by the requestable assets section function assetRequestActionsFormatter (row, value) { - if (value.available_actions.cancel == true) { + if (value.assigned_to_self == true){ + return ''; + } else if (value.available_actions.cancel == true) { return '
'; } else if (value.available_actions.request == true) { return '
'; From d8fdd1b4082446cc110b312c817cfd1a16f090a5 Mon Sep 17 00:00:00 2001 From: Jethro Nederhof Date: Wed, 28 Jul 2021 14:55:34 +1000 Subject: [PATCH 008/144] Fix branding logo URL path The current method adds an additional slash to the URL which results in the logo request producing a 404 error on for Storage drivers like S3 and GCS that don't automatically collapse additional forward slashes into single slashes. E.g. with the current code my logo URL renders like `https://storage.googleapis.com/mybucketname/public//setting-logo-Al0aKMhmYz.svg` (note the double slash after "public") when instead it should render like `https://storage.googleapis.com/mybucketname/public/setting-logo-Al0aKMhmYz.svg` For a local driver this should work fine since webservers handle the additional slashes case, but for key-based storage this 404s. Thanks for your work on Snipe-It, seems like a good system so far! --- resources/views/layouts/default.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 0ac2479f9..914117210 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -108,14 +108,14 @@ @if ($snipeSettings->brand == '3') @elseif ($snipeSettings->brand == '2') From 976957ddd453db3035b0cf04864694ad886b126f Mon Sep 17 00:00:00 2001 From: NMC Date: Sun, 1 Aug 2021 14:30:16 -0400 Subject: [PATCH 009/144] Add Maintained filed in licenses view and api. + Expires in API --- app/Http/Controllers/Api/LicensesController.php | 7 +++++++ resources/views/licenses/view.blade.php | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.php index 268248ab7..fc153f0ac 100644 --- a/app/Http/Controllers/Api/LicensesController.php +++ b/app/Http/Controllers/Api/LicensesController.php @@ -77,6 +77,13 @@ class LicensesController extends Controller $licenses->where('supplier_id','=',$request->input('supplier_id')); } + if (($request->filled('maintained')) && ($request->input('maintained')=='true')) { + $licenses->where('maintained','=',1); + } + + if (($request->filled('expires')) && ($request->input('expires')=='true')) { + $licenses->whereNotNull('expiration_date'); + } if ($request->filled('search')) { $licenses = $licenses->TextSearch($request->input('search')); diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 96b426d3d..990e5e90b 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -285,6 +285,17 @@ @endif +
+
+ + {{ trans('admin/licenses/form.maintained') }} + +
+
+ {{ $license->maintained ? 'Yes' : 'No' }} +
+
+ @if (($license->seats) && ($license->seats) > 0)
From 4cfc4aec1dd9324c25e63a7952131cfc1ca052a6 Mon Sep 17 00:00:00 2001 From: NMC Date: Sun, 1 Aug 2021 15:10:22 -0400 Subject: [PATCH 010/144] fix false search in api. --- app/Http/Controllers/Api/LicensesController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Api/LicensesController.php b/app/Http/Controllers/Api/LicensesController.php index fc153f0ac..d9a420eb9 100644 --- a/app/Http/Controllers/Api/LicensesController.php +++ b/app/Http/Controllers/Api/LicensesController.php @@ -79,10 +79,14 @@ class LicensesController extends Controller if (($request->filled('maintained')) && ($request->input('maintained')=='true')) { $licenses->where('maintained','=',1); + } elseif (($request->filled('maintained')) && ($request->input('maintained')=='false')) { + $licenses->where('maintained','=',0); } if (($request->filled('expires')) && ($request->input('expires')=='true')) { $licenses->whereNotNull('expiration_date'); + } elseif (($request->filled('expires')) && ($request->input('expires')=='false')) { + $licenses->whereNull('expiration_date'); } if ($request->filled('search')) { From eced1ab77f428ab5eac7a3fe6c442933a085ddea Mon Sep 17 00:00:00 2001 From: Tobias Regnery Date: Thu, 5 Aug 2021 15:07:28 +0200 Subject: [PATCH 011/144] Fix advanced search with serial and another field The advanced search in /hardware produces incorrect results if the serial is combined with another field like category. There is a typo as the fieldname 'product_key' doesn't exist. Change this to 'serial'. Also change the last If-Statement from ->orWhere() to ->where(). Now additional fields like custom fields can be combined with other searches in an And-Clause. I think this function could be simplified further, but this is the minimal bugfix. --- app/Models/Asset.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index d26f8dbc9..cabc5638a 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -1314,7 +1314,7 @@ class Asset extends Depreciable $query->where('assets.name', 'LIKE', '%'.$search_val.'%'); } - if ($fieldname =='product_key') { + if ($fieldname =='serial') { $query->where('assets.serial', 'LIKE', '%'.$search_val.'%'); } @@ -1436,7 +1436,7 @@ class Asset extends Depreciable */ if (($fieldname!='category') && ($fieldname!='model_number') && ($fieldname!='rtd_location') && ($fieldname!='location') && ($fieldname!='supplier') && ($fieldname!='status_label') && ($fieldname!='model') && ($fieldname!='company') && ($fieldname!='manufacturer')) { - $query->orWhere('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%'); + $query->where('assets.'.$fieldname, 'LIKE', '%' . $search_val . '%'); } From 892ae9cf917dffcdae37d899c71b3aff96bde1de Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 7 Aug 2021 21:40:51 +0000 Subject: [PATCH 012/144] fix: upgrade tableexport.jquery.plugin from 1.10.21 to 1.10.26 Snyk has created this PR to upgrade tableexport.jquery.plugin from 1.10.21 to 1.10.26. See this package in npm: https://www.npmjs.com/package/tableexport.jquery.plugin See this project in Snyk: https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 662 ++++++++++++++++++++++++++++++++++++++++------ package.json | 2 +- 2 files changed, 583 insertions(+), 81 deletions(-) diff --git a/package-lock.json b/package-lock.json index b0bfa7df2..a8f617fb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1104,19 +1104,19 @@ } }, "@babel/runtime-corejs3": { - "version": "7.12.18", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.18.tgz", - "integrity": "sha512-ngR7yhNTjDxxe1VYmhqQqqXZWujGb6g0IoA4qeG6MxNGRnIw2Zo8ImY8HfaQ7l3T6GklWhdNfyhWk0C0iocdVA==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.14.9.tgz", + "integrity": "sha512-64RiH2ON4/y8qYtoa8rUiyam/tUVyGqRyNYhe+vCRGmjnV4bUlZvY+mwd0RrmLoCpJpdq3RsrNqKb7SJdw/4kw==", "optional": true, "requires": { - "core-js-pure": "^3.0.0", + "core-js-pure": "^3.16.0", "regenerator-runtime": "^0.13.4" }, "dependencies": { "regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", - "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "optional": true } } @@ -1631,6 +1631,12 @@ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", "dev": true }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "optional": true + }, "ansi-colors": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", @@ -1723,6 +1729,11 @@ "integrity": "sha1-JO+AoowaiTYX4hSbDG0NeIKTsJk=", "dev": true }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=" + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -1809,6 +1820,53 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "ast-transform": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/ast-transform/-/ast-transform-0.0.0.tgz", + "integrity": "sha1-dJRAWIh9goPhidlUYAlHvJj+AGI=", + "requires": { + "escodegen": "~1.2.0", + "esprima": "~1.0.4", + "through": "~2.3.4" + }, + "dependencies": { + "escodegen": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.2.0.tgz", + "integrity": "sha1-Cd55Z3kcyVi3+Jot220jRRrzJ+E=", + "requires": { + "esprima": "~1.0.4", + "estraverse": "~1.5.0", + "esutils": "~1.0.0", + "source-map": "~0.1.30" + } + }, + "esprima": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=" + }, + "estraverse": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", + "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=" + }, + "esutils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", + "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=" + }, + "source-map": { + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", + "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, "ast-types": { "version": "0.9.6", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", @@ -2435,7 +2493,6 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -2521,9 +2578,9 @@ } }, "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", + "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==" }, "base64-js": { "version": "1.5.1", @@ -2744,11 +2801,30 @@ "to-regex": "^3.0.1" } }, + "brfs": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brfs/-/brfs-2.0.2.tgz", + "integrity": "sha512-IrFjVtwu4eTJZyu8w/V2gxU7iLTtcHih67sgEdzrhjLBMHp2uYefUBfdM4k2UvcuWMgV7PQDZHSLeNWnLFKWVQ==", + "requires": { + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^3.0.2", + "through2": "^2.0.0" + } + }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, + "brotli": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", + "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", + "requires": { + "base64-js": "^1.1.2" + } + }, "browser-pack": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", @@ -2916,6 +2992,36 @@ "safe-buffer": "^5.1.2" } }, + "browserify-optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-optional/-/browserify-optional-1.0.1.tgz", + "integrity": "sha1-HhNyLP3g2F8SFnbCpyztUzoBiGk=", + "requires": { + "ast-transform": "0.0.0", + "ast-types": "^0.7.0", + "browser-resolve": "^1.8.1" + }, + "dependencies": { + "ast-types": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.7.8.tgz", + "integrity": "sha1-kC0uDWDQcb3NRtwRXhgJ7RHBOKk=" + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "requires": { + "resolve": "1.1.7" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + } + } + }, "browserify-rsa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", @@ -3001,6 +3107,11 @@ "ieee754": "^1.1.4" } }, + "buffer-equal": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-0.0.1.tgz", + "integrity": "sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs=" + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -3723,7 +3834,6 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, "requires": { "safe-buffer": "~5.1.1" } @@ -3782,8 +3892,7 @@ "core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" }, "core-js-compat": { "version": "3.9.0", @@ -3804,9 +3913,9 @@ } }, "core-js-pure": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.9.0.tgz", - "integrity": "sha512-3pEcmMZC9Cq0D4ZBh3pe2HLtqxpGNJBLXF/kZ2YzK17RbKp94w0HFbdbSx8H8kAlZG5k76hvLrkPm57Uyef+kg==", + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.16.0.tgz", + "integrity": "sha512-wzlhZNepF/QA9yvx3ePDgNGudU5KDB8lu/TRPKelYA/QtSnkS/cLl2W+TIdEX1FAFcBr0YpY7tPDlcmXJ7AyiQ==", "optional": true }, "core-util-is": { @@ -3928,6 +4037,11 @@ "randomfill": "^1.0.3" } }, + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, "css-color-names": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", @@ -3945,11 +4059,11 @@ } }, "css-line-break": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.0.1.tgz", - "integrity": "sha1-GfIGOjPpX7KDG4ZEbAuAwYivRQo=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.0.1.tgz", + "integrity": "sha512-gwKYIMUn7xodIcb346wgUhE2Dt5O1Kmrc16PWi8sL4FTfyDj8P5095rzH7+O8CTZudJr+uw2GCI/hwEkDJFI2w==", "requires": { - "base64-arraybuffer": "^0.1.5" + "base64-arraybuffer": "^0.2.0" } }, "css-loader": { @@ -4158,6 +4272,15 @@ "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", "dev": true }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "dash-ast": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", @@ -4233,7 +4356,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", "integrity": "sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o=", - "dev": true, "requires": { "is-arguments": "^1.0.4", "is-date-object": "^1.0.1", @@ -4375,6 +4497,11 @@ "minimist": "^1.1.1" } }, + "dfa": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dfa/-/dfa-1.2.0.tgz", + "integrity": "sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==" + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -4467,9 +4594,9 @@ } }, "dompurify": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.6.tgz", - "integrity": "sha512-7b7ZArhhH0SP6W2R9cqK6RjaU82FZ2UPM7RO8qN1b1wyvC/NY1FNWcX1Pu00fFOAnzEORtwXe4bPaClg6pUybQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.0.tgz", + "integrity": "sha512-VV5C6Kr53YVHGOBKO/F86OYX6/iLTw2yVSI721gKetxpHCK/V5TaLEf9ODjRgl1KLSWRMY6cUhAbv/c+IUnwQw==", "optional": true }, "domutils": { @@ -4687,11 +4814,76 @@ "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + }, + "dependencies": { + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + } + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, "es6-templates": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz", @@ -4776,6 +4968,11 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=" }, + "estree-is-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/estree-is-function/-/estree-is-function-1.0.0.tgz", + "integrity": "sha512-nSCWn1jkSq2QAtkaVLJZY2ezwcFO161HVc174zL1KPW3RJ+O6C3eJb8Nx7OXzvhoEv+nLgSR1g71oWUHUDTrJA==" + }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -4792,6 +4989,15 @@ "resolved": "https://registry.npmjs.org/eve-raphael/-/eve-raphael-0.5.0.tgz", "integrity": "sha1-F8dUt5K+7z+maE15z1pHxjxM2jA=" }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -5025,6 +5231,21 @@ } } }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -5355,6 +5576,45 @@ "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" }, + "fontkit": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/fontkit/-/fontkit-1.8.1.tgz", + "integrity": "sha512-BsNCjDoYRxmNWFdAuK1y9bQt+igIxGtTC9u/jSFjR9MKhmI00rP1fwSvERt+5ddE82544l0XH5mzXozQVUy2Tw==", + "requires": { + "babel-runtime": "^6.26.0", + "brfs": "^2.0.0", + "brotli": "^1.2.0", + "browserify-optional": "^1.0.1", + "clone": "^1.0.4", + "deep-equal": "^1.0.0", + "dfa": "^1.2.0", + "restructure": "^0.5.3", + "tiny-inflate": "^1.0.2", + "unicode-properties": "^1.2.2", + "unicode-trie": "^0.3.0" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + }, + "unicode-trie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-0.3.1.tgz", + "integrity": "sha1-1nHd3YkQGgi6w3tqUWEBBgIFIIU=", + "requires": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -11629,7 +11889,8 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "optional": true }, "pify": { "version": "2.3.0", @@ -14235,6 +14496,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "optional": true, "requires": { "is-extglob": "^2.1.1" } @@ -14248,7 +14510,8 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true }, "readdirp": { "version": "3.4.0", @@ -15398,9 +15661,12 @@ } }, "html2canvas": { - "version": "0.5.0-beta4", - "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-0.5.0-beta4.tgz", - "integrity": "sha1-goLGKsX9eBaPVwK15IdxV8qT854=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.2.1.tgz", + "integrity": "sha512-XoP12gER5pvxBADy4KKTMinZ69PP/+EZbILEk+WDCJFPIkhbREwMy2nhuMBFWPUDGWCw1DCrhDlbADJ5m8dC5g==", + "requires": { + "css-line-break": "2.0.1" + } }, "htmlescape": { "version": "1.1.1", @@ -16366,9 +16632,9 @@ "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" }, "jspdf": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.3.0.tgz", - "integrity": "sha512-KdWe3y5YGjuD8E3Yv1vN8BMuuaQR1jvLTlcZ4dQxUSr1ZveuTv1CnyXyafNL7xfi4eDcIdzs6z9tb9JRDiDCbg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.3.1.tgz", + "integrity": "sha512-1vp0USP1mQi1h7NKpwxjFgQkJ5ncZvtH858aLpycUc/M+r/RpWJT8PixAU7Cw/3fPd4fpC8eB/Bj42LnsR21YQ==", "requires": { "atob": "^2.1.2", "btoa": "^1.2.1", @@ -16379,35 +16645,11 @@ "html2canvas": "^1.0.0-rc.5" }, "dependencies": { - "base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", - "optional": true - }, "core-js": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.9.0.tgz", - "integrity": "sha512-PyFBJaLq93FlyYdsndE5VaueA9K5cNB7CGzeCj191YYLhkQM0gdZR2SKihM70oF0wdqKSKClv/tEBOpoRmdOVQ==", + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.16.0.tgz", + "integrity": "sha512-5+5VxRFmSf97nM8Jr2wzOwLqRo6zphH2aX+7KsAUONObyzakDNq2G/bgbhinxB4PoV9L3aXQYhiDKyIKWd2c8g==", "optional": true - }, - "css-line-break": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz", - "integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==", - "optional": true, - "requires": { - "base64-arraybuffer": "^0.2.0" - } - }, - "html2canvas": { - "version": "1.0.0-rc.7", - "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.7.tgz", - "integrity": "sha512-yvPNZGejB2KOyKleZspjK/NruXVQuowu8NnV2HYG7gW7ytzl+umffbtUI62v2dCHQLDdsK6HIDtyJZ0W3neerA==", - "optional": true, - "requires": { - "css-line-break": "1.1.1" - } } } }, @@ -16419,6 +16661,11 @@ "jspdf": "^1.0.272" }, "dependencies": { + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" + }, "canvg": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/canvg/-/canvg-1.5.3.tgz", @@ -16437,9 +16684,17 @@ } } }, + "css-line-break": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.0.1.tgz", + "integrity": "sha1-GfIGOjPpX7KDG4ZEbAuAwYivRQo=", + "requires": { + "base64-arraybuffer": "^0.1.5" + } + }, "file-saver": { - "version": "git+ssh://git@github.com/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e", - "from": "file-saver@github:eligrey/FileSaver.js#1.3.8" + "version": "github:eligrey/FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e", + "from": "github:eligrey/FileSaver.js#1.3.8" }, "html2canvas": { "version": "1.0.0-alpha.12", @@ -16455,17 +16710,11 @@ "integrity": "sha512-J9X76xnncMw+wIqb15HeWfPMqPwYxSpPY8yWPJ7rAZN/ZDzFkjCSZObryCyUe8zbrVRNiuCnIeQteCzMn7GnWw==", "requires": { "canvg": "1.5.3", - "file-saver": "git+ssh://git@github.com/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e", + "file-saver": "github:eligrey/FileSaver.js#1.3.8", "html2canvas": "1.0.0-alpha.12", "omggif": "1.0.7", "promise-polyfill": "8.1.0", "stackblur-canvas": "2.2.0" - }, - "dependencies": { - "file-saver": { - "version": "git+ssh://git@github.com/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e", - "from": "git+ssh://git@github.com/eligrey/FileSaver.js.git#e865e37af9f9947ddcced76b549e27dc45c1cb2e" - } } }, "stackblur-canvas": { @@ -16845,6 +17094,23 @@ "type-check": "~0.3.2" } }, + "linebreak": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/linebreak/-/linebreak-1.0.2.tgz", + "integrity": "sha512-bJwSRsJeAmaZYnkcwl5sCQNfSDAhBuXxb6L27tb+qkBRtUQSSTUa5bcgCPD6hFEkRNlpWHfK7nFMmcANU7ZP1w==", + "requires": { + "base64-js": "0.0.8", + "brfs": "^2.0.2", + "unicode-trie": "^1.0.0" + }, + "dependencies": { + "base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=" + } + } + }, "list.js": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/list.js/-/list.js-1.5.0.tgz", @@ -16940,6 +17206,14 @@ "yallist": "^3.0.2" } }, + "magic-string": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.1.tgz", + "integrity": "sha512-sCuTz6pYom8Rlt4ISPFn6wuFodbKMIHUMv4Qko9P17dpxb7s52KJTmRuZZqHdGmLCK9AOcDare039nRIcfdkEg==", + "requires": { + "sourcemap-codec": "^1.4.1" + } + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -17457,6 +17731,11 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -17828,7 +18107,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz", "integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==", - "dev": true, "requires": { "call-bind": "^1.0.0", "define-properties": "^1.1.3" @@ -18263,6 +18541,39 @@ "sha.js": "^2.4.8" } }, + "pdfkit": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.12.3.tgz", + "integrity": "sha512-+qDLgm2yq6WOKcxTb43lDeo3EtMIDQs0CK1RNqhHC9iT6u0KOmgwAClkYh9xFw2ATbmUZzt4f7KMwDCOfPDluA==", + "requires": { + "crypto-js": "^4.0.0", + "fontkit": "^1.8.1", + "linebreak": "^1.0.2", + "png-js": "^1.0.0" + } + }, + "pdfmake": { + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.72.tgz", + "integrity": "sha512-xZrPS+Safjf1I8ZYtMoXX83E6C6Pd1zFwa168yNTeeJWHclqf1z9DoYajjlY2uviN7gGyxwVZeou39uSk1oh1g==", + "requires": { + "iconv-lite": "^0.6.2", + "linebreak": "^1.0.2", + "pdfkit": "^0.12.0", + "svg-to-pdfkit": "^0.1.8", + "xmldoc": "^1.1.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, "pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -18323,7 +18634,8 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "dev": true, + "optional": true }, "pify": { "version": "2.3.0", @@ -18352,6 +18664,11 @@ "find-up": "^4.0.0" } }, + "png-js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz", + "integrity": "sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g==" + }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -19169,6 +19486,16 @@ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, + "quote-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", + "integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=", + "requires": { + "buffer-equal": "0.0.1", + "minimist": "^1.1.3", + "through2": "^2.0.0" + } + }, "raf": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", @@ -19299,8 +19626,7 @@ "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=", - "dev": true + "integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk=" }, "regenerator-transform": { "version": "0.10.1", @@ -19348,7 +19674,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -19553,6 +19878,14 @@ "lowercase-keys": "^1.0.0" } }, + "restructure": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/restructure/-/restructure-0.5.4.tgz", + "integrity": "sha1-9U591WNZD7NP1r9Vh2EJrsyyjeg=", + "requires": { + "browserify-optional": "^1.0.0" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -19642,6 +19975,20 @@ "ajv-keywords": "^3.5.2" } }, + "scope-analyzer": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/scope-analyzer/-/scope-analyzer-2.1.1.tgz", + "integrity": "sha512-azEAihtQ9mEyZGhfgTJy3IbOWEzeOrYbg7NcYEshPKnKd+LZmC3TNd5dmDxbLBsTG/JVWmCp+vDJ03vJjeXMHg==", + "requires": { + "array-from": "^2.1.1", + "dash-ast": "^1.0.0", + "es6-map": "^0.1.5", + "es6-set": "^0.1.5", + "es6-symbol": "^3.1.1", + "estree-is-function": "^1.0.0", + "get-assigned-identifiers": "^1.1.0" + } + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -19797,6 +20144,11 @@ "safe-buffer": "^5.0.1" } }, + "shallow-copy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/shallow-copy/-/shallow-copy-0.0.1.tgz", + "integrity": "sha1-QV9CcC1z2BAzApLMXuhurhoRoXA=" + }, "shasum-object": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", @@ -20082,6 +20434,11 @@ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "dev": true }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, "spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -20264,6 +20621,14 @@ "integrity": "sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==", "dev": true }, + "static-eval": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.0.tgz", + "integrity": "sha512-agtxZ/kWSsCkI5E4QifRwsaPs0P0JmZV6dkLz6ILYfFYQGn+5plctanRN+IC8dJRiFkyXHrwEE3W9Wmx67uDbw==", + "requires": { + "escodegen": "^1.11.1" + } + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -20322,6 +20687,75 @@ } } }, + "static-module": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/static-module/-/static-module-3.0.4.tgz", + "integrity": "sha512-gb0v0rrgpBkifXCa3yZXxqVmXDVE+ETXj6YlC/jt5VzOnGXR2C15+++eXuMDUYsePnbhf+lwW0pE1UXyOLtGCw==", + "requires": { + "acorn-node": "^1.3.0", + "concat-stream": "~1.6.0", + "convert-source-map": "^1.5.1", + "duplexer2": "~0.1.4", + "escodegen": "^1.11.1", + "has": "^1.0.1", + "magic-string": "0.25.1", + "merge-source-map": "1.0.4", + "object-inspect": "^1.6.0", + "readable-stream": "~2.3.3", + "scope-analyzer": "^2.0.1", + "shallow-copy": "~0.0.1", + "static-eval": "^2.0.5", + "through2": "~2.0.3" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "merge-source-map": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", + "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", + "requires": { + "source-map": "^0.5.6" + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -20577,6 +21011,14 @@ "integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow==", "optional": true }, + "svg-to-pdfkit": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/svg-to-pdfkit/-/svg-to-pdfkit-0.1.8.tgz", + "integrity": "sha512-QItiGZBy5TstGy+q8mjQTMGRlDDOARXLxH+sgVm1n/LYeo0zFcQlcCh8m4zi8QxctrxB9Kue/lStc/RD5iLadQ==", + "requires": { + "pdfkit": ">=0.8.1" + } + }, "svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", @@ -20652,9 +21094,9 @@ } }, "tableexport.jquery.plugin": { - "version": "1.10.21", - "resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.10.21.tgz", - "integrity": "sha512-mLzuFmL1zo1hBjGqdG0Ico92LQOHo7AECHhe+GFyywdTBE6fWX93Ww9pKhWJW3MqzRghJYl4cEGz1a9KjppiUw==", + "version": "1.10.26", + "resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.10.26.tgz", + "integrity": "sha512-e9eZTXeKErYj2euYB130VhFDMvDHO6edkEQkMheu6huTrf7XkOjs93Q/ryeryEtjEfaa//45PfJDui63PGPf9Q==", "requires": { "es6-promise": ">=4.2.4", "file-saver": ">=1.2.0", @@ -20662,6 +21104,7 @@ "jquery": ">=1.9.1", "jspdf": ">=1.3.4", "jspdf-autotable": "2.0.14 || 2.0.17", + "pdfmake": "^0.1.71", "xlsx": ">=0.12.5" } }, @@ -20804,6 +21247,11 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, + "tiny-inflate": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", + "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==" + }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -20904,6 +21352,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -20990,12 +21443,53 @@ "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, + "unicode-properties": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/unicode-properties/-/unicode-properties-1.3.1.tgz", + "integrity": "sha512-nIV3Tf3LcUEZttY/2g4ZJtGXhWwSkuLL+rCu0DIAMbjyVPj+8j5gNVz4T/sVbnQybIsd5SFGkPKg/756OY6jlA==", + "requires": { + "base64-js": "^1.3.0", + "unicode-trie": "^2.0.0" + }, + "dependencies": { + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + }, + "unicode-trie": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-2.0.0.tgz", + "integrity": "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==", + "requires": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + } + } + } + }, "unicode-property-aliases-ecmascript": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, + "unicode-trie": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unicode-trie/-/unicode-trie-1.0.0.tgz", + "integrity": "sha512-v5raLKsobbFbWLMoX9+bChts/VhPPj3XpkNr/HbqkirXR1DPk8eo9IYKyvk0MQZFkaoRsFj2Rmaqgi2rfAZYtA==", + "requires": { + "pako": "^0.2.5", + "tiny-inflate": "^1.0.0" + }, + "dependencies": { + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + } + } + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -22398,9 +22892,9 @@ } }, "xlsx": { - "version": "0.16.9", - "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.16.9.tgz", - "integrity": "sha512-gxi1I3EasYvgCX1vN9pGyq920Ron4NO8PNfhuoA3Hpq6Y8f0ECXiy4OLrK4QZBnj1jx3QD+8Fq5YZ/3mPZ5iXw==", + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.17.0.tgz", + "integrity": "sha512-bZ36FSACiAyjoldey1+7it50PMlDp1pcAJrZKcVZHzKd8BC/z6TQ/QAN8onuqcepifqSznR6uKnjPhaGt6ig9A==", "requires": { "adler-32": "~1.2.0", "cfb": "^1.1.4", @@ -22431,6 +22925,14 @@ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=" }, + "xmldoc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-1.1.2.tgz", + "integrity": "sha512-ruPC/fyPNck2BD1dpz0AZZyrEwMOrWTO5lDdIXS91rs3wtm4j+T8Rp2o+zoOYkkAxJTZRPOSnOGei1egoRmKMQ==", + "requires": { + "sax": "^1.2.1" + } + }, "xmldom": { "version": "0.1.31", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", diff --git a/package.json b/package.json index 064898bb7..13d65dbcf 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "phantomjs": "^2.1.7", "select2": "4.0.13", "sheetjs": "^2.0.0", - "tableexport.jquery.plugin": "^1.10.20", + "tableexport.jquery.plugin": "^1.10.26", "tether": "^1.4.0", "vue-resource": "^1.3.3" } From 3fedcc6766f125cdbb70da6bed251eeb90a73c23 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 7 Aug 2021 21:41:02 +0000 Subject: [PATCH 013/144] fix: upgrade bootstrap-table from 1.18.2 to 1.18.3 Snyk has created this PR to upgrade bootstrap-table from 1.18.2 to 1.18.3. See this package in npm: https://www.npmjs.com/package/bootstrap-table See this project in Snyk: https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 16 ++++++++++------ package.json | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index b0bfa7df2..2a584751b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2713,9 +2713,9 @@ "integrity": "sha1-EQPWvADPv6jPyaJZmrUYxVZD2j8=" }, "bootstrap-table": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.18.2.tgz", - "integrity": "sha512-BShrYY9bcadwxikP5Sd/+tZlbLcYqOBjYm5bdJLu3lRTgXEQ1p937ZNlcCMhIrRhvelUKlSl7EFORnEkSHR7gA==" + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.18.3.tgz", + "integrity": "sha512-/eFLkldDlNFi37qC/d9THfRVxMUGD34E8fQBFtXJLDHLBOVKWDTq7BV+udoP7k3FfCEyhM1jWQnQ0rMQdBv//w==" }, "brace-expansion": { "version": "1.1.11", @@ -11629,7 +11629,8 @@ "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "optional": true }, "pify": { "version": "2.3.0", @@ -14235,6 +14236,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "optional": true, "requires": { "is-extglob": "^2.1.1" } @@ -14248,7 +14250,8 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "optional": true }, "readdirp": { "version": "3.4.0", @@ -18323,7 +18326,8 @@ "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true + "dev": true, + "optional": true }, "pify": { "version": "2.3.0", diff --git a/package.json b/package.json index 064898bb7..ca84cccd5 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "bootstrap-colorpicker": "^2.5.3", "bootstrap-datepicker": "^1.9.0", "bootstrap-less": "^3.3.8", - "bootstrap-table": "^1.18.0", + "bootstrap-table": "^1.18.3", "chart.js": "^2.9.4", "css-loader": "^3.6.0", "ekko-lightbox": "^5.1.1", From 38a544ea4236f6b3a09f62978bdcb06ac626d6f3 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 8 Sep 2021 13:50:52 -0700 Subject: [PATCH 014/144] Updated version branch to master Signed-off-by: snipe --- config/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/version.php b/config/version.php index 068c95074..15fa15b70 100644 --- a/config/version.php +++ b/config/version.php @@ -6,5 +6,5 @@ return array ( 'prerelease_version' => '', 'hash_version' => 'g14a8baeca', 'full_hash' => 'v5.2.0-188-g14a8baeca', - 'branch' => 'develop', + 'branch' => 'master', ); \ No newline at end of file From 4a0c8de82a09de6c8294245f57334b81ca0d4754 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 21 Sep 2021 19:13:09 -0700 Subject: [PATCH 015/144] adds jquery eventlistner to monitor chart.js width and refresh accordingly --- public/css/build/app.css | 6 ++++++ public/css/build/overrides.css | 6 ++++++ public/css/dist/all.css | 12 ++++++++++++ public/mix-manifest.json | 6 +++--- resources/assets/less/overrides.less | 2 +- resources/views/dashboard.blade.php | 14 +++++++++++--- 6 files changed, 39 insertions(+), 7 deletions(-) diff --git a/public/css/build/app.css b/public/css/build/app.css index 437bb21e4..18037c5fb 100644 --- a/public/css/build/app.css +++ b/public/css/build/app.css @@ -857,4 +857,10 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } +.chart-container { + position: relative; + margin: auto; + height: 80vh; + width: 80vw; +} diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index 3a2e2dbdb..afb96a696 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -490,4 +490,10 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } +.chart-container { + position: relative; + margin: auto; + height: 80vh; + width: 80vw; +} diff --git a/public/css/dist/all.css b/public/css/dist/all.css index 5a22019c3..bf6f413e7 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -18118,6 +18118,12 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } +.chart-container { + position: relative; + margin: auto; + height: 80vh; + width: 80vw; +} .select2-container { @@ -19094,4 +19100,10 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } +.chart-container { + position: relative; + margin: auto; + height: 80vh; + width: 80vw; +} diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 1796d19d5..a70c1fe6b 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,8 +1,8 @@ { "/js/build/app.js": "/js/build/app.js?id=8beeabe6e636080bceea", "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=83e39e254b7f9035eddc", - "/css/build/overrides.css": "/css/build/overrides.css?id=b9b59d80509972c3b16a", - "/css/build/app.css": "/css/build/app.css?id=1da91ae0ff24d10b7207", + "/css/build/overrides.css": "/css/build/overrides.css?id=ba5b2e0c743ab27c250d", + "/css/build/app.css": "/css/build/app.css?id=2b6c8fc2299606d50eef", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=65ca7a34198fa16ba846", "/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=83271cb3576583918804", "/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=400089ea82795d45c8dc", @@ -18,7 +18,7 @@ "/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=efda2335fa5243175850", "/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=6a9d0ac448c28b88e5d6", "/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=c24716a423d375902723", - "/css/dist/all.css": "/css/dist/all.css?id=683ab3f90a03310078d5", + "/css/dist/all.css": "/css/dist/all.css?id=8da06c56702777a39c20", "/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f212", "/css/blue@2x.png": "/css/blue@2x.png?id=51135dd4d24f88f5de0b", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced", diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index 73ab8ad1b..c9d66d3bf 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -563,4 +563,4 @@ th.css-accessory > .th-inner::before .form-group.has-error label { color: #a94442; -} \ No newline at end of file +} diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 1e4f70698..377f99ea9 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -418,14 +418,15 @@ // --------------------------- // - ASSET STATUS CHART - // --------------------------- + var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d"); var pieChart = new Chart(pieChartCanvas); var ctx = document.getElementById("statusPieChart"); var pieOptions = { legend: { position: 'top', - responsive: true, - maintainAspectRatio: true, + responsive: true, + maintainAspectRatio: false, } }; @@ -446,7 +447,14 @@ }, error: function (data) { // window.location.reload(true); - } + }, + }); + var last = document.getElementById('statusPieChart').clientWidth; + addEventListener('resize', function() { + var current = document.getElementById('statusPieChart').clientWidth; + if (current != last) location.reload(); + last = current; + }); @endpush From 941cba73b9d8af7547db401c370f03fbdc54dc43 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 21 Sep 2021 19:27:17 -0700 Subject: [PATCH 016/144] removed deadspace and unnecessary css changes --- public/css/build/app.css | 6 ------ public/css/build/overrides.css | 7 +------ public/css/dist/all.css | 13 +------------ public/mix-manifest.json | 6 +++--- resources/assets/less/overrides.less | 2 +- resources/views/dashboard.blade.php | 4 +--- 6 files changed, 7 insertions(+), 31 deletions(-) diff --git a/public/css/build/app.css b/public/css/build/app.css index 18037c5fb..437bb21e4 100644 --- a/public/css/build/app.css +++ b/public/css/build/app.css @@ -857,10 +857,4 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } -.chart-container { - position: relative; - margin: auto; - height: 80vh; - width: 80vw; -} diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index afb96a696..cbe8a1f53 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -490,10 +490,5 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } -.chart-container { - position: relative; - margin: auto; - height: 80vh; - width: 80vw; -} + diff --git a/public/css/dist/all.css b/public/css/dist/all.css index bf6f413e7..d2d68dfe7 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -18118,12 +18118,7 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } -.chart-container { - position: relative; - margin: auto; - height: 80vh; - width: 80vw; -} + .select2-container { @@ -19100,10 +19095,4 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } -.chart-container { - position: relative; - margin: auto; - height: 80vh; - width: 80vw; -} diff --git a/public/mix-manifest.json b/public/mix-manifest.json index a70c1fe6b..1796d19d5 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,8 +1,8 @@ { "/js/build/app.js": "/js/build/app.js?id=8beeabe6e636080bceea", "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=83e39e254b7f9035eddc", - "/css/build/overrides.css": "/css/build/overrides.css?id=ba5b2e0c743ab27c250d", - "/css/build/app.css": "/css/build/app.css?id=2b6c8fc2299606d50eef", + "/css/build/overrides.css": "/css/build/overrides.css?id=b9b59d80509972c3b16a", + "/css/build/app.css": "/css/build/app.css?id=1da91ae0ff24d10b7207", "/css/build/AdminLTE.css": "/css/build/AdminLTE.css?id=65ca7a34198fa16ba846", "/css/dist/skins/skin-orange.css": "/css/dist/skins/skin-orange.css?id=83271cb3576583918804", "/css/dist/skins/skin-orange-dark.css": "/css/dist/skins/skin-orange-dark.css?id=400089ea82795d45c8dc", @@ -18,7 +18,7 @@ "/css/dist/skins/skin-green.css": "/css/dist/skins/skin-green.css?id=efda2335fa5243175850", "/css/dist/skins/skin-contrast.css": "/css/dist/skins/skin-contrast.css?id=6a9d0ac448c28b88e5d6", "/css/dist/skins/skin-red.css": "/css/dist/skins/skin-red.css?id=c24716a423d375902723", - "/css/dist/all.css": "/css/dist/all.css?id=8da06c56702777a39c20", + "/css/dist/all.css": "/css/dist/all.css?id=683ab3f90a03310078d5", "/css/blue.png": "/css/blue.png?id=e83a6c29e04fe851f212", "/css/blue@2x.png": "/css/blue@2x.png?id=51135dd4d24f88f5de0b", "/css/dist/signature-pad.css": "/css/dist/signature-pad.css?id=6a89d3cd901305e66ced", diff --git a/resources/assets/less/overrides.less b/resources/assets/less/overrides.less index c9d66d3bf..73ab8ad1b 100644 --- a/resources/assets/less/overrides.less +++ b/resources/assets/less/overrides.less @@ -563,4 +563,4 @@ th.css-accessory > .th-inner::before .form-group.has-error label { color: #a94442; -} +} \ No newline at end of file diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 377f99ea9..7486464a4 100755 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -418,7 +418,6 @@ // --------------------------- // - ASSET STATUS CHART - // --------------------------- - var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d"); var pieChart = new Chart(pieChartCanvas); var ctx = document.getElementById("statusPieChart"); @@ -426,7 +425,7 @@ legend: { position: 'top', responsive: true, - maintainAspectRatio: false, + maintainAspectRatio: true, } }; @@ -448,7 +447,6 @@ error: function (data) { // window.location.reload(true); }, - }); var last = document.getElementById('statusPieChart').clientWidth; addEventListener('resize', function() { From 160017c720dabf256b7b41ffef6693af4d2ee42e Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 21 Sep 2021 19:28:39 -0700 Subject: [PATCH 017/144] more deadspace --- public/css/build/overrides.css | 2 -- public/css/dist/all.css | 2 -- 2 files changed, 4 deletions(-) diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index cbe8a1f53..94adeae5d 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -490,5 +490,3 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } - - diff --git a/public/css/dist/all.css b/public/css/dist/all.css index d2d68dfe7..d2edb6eab 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -18119,8 +18119,6 @@ th.css-accessory > .th-inner::before { color: #a94442; } - - .select2-container { box-sizing: border-box; display: inline-block; From a6b3aa5f0448fc250b88faa3a1da7b44c895d64d Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 22 Sep 2021 19:04:25 -0700 Subject: [PATCH 018/144] Don't try to delete the file if there is no log entry Signed-off-by: snipe --- app/Http/Controllers/Assets/AssetFilesController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetFilesController.php b/app/Http/Controllers/Assets/AssetFilesController.php index 7cdd075ab..0a010a82d 100644 --- a/app/Http/Controllers/Assets/AssetFilesController.php +++ b/app/Http/Controllers/Assets/AssetFilesController.php @@ -117,13 +117,13 @@ class AssetFilesController extends Controller $this->authorize('update', $asset); $log = Actionlog::find($fileId); if ($log) { - if (Storage::exists($rel_path.'/'.$log->filename)) { - Storage::delete($rel_path.'/'.$log->filename); + if (Storage::exists($rel_path.'/'.$log->filename)) { + Storage::delete($rel_path.'/'.$log->filename); } $log->delete(); return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success')); } - $log->delete(); + return redirect()->back() ->with('success', trans('admin/hardware/message.deletefile.success')); } From 39a702397a0878380722e874f1104ec04b5b20f7 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 22 Sep 2021 19:05:02 -0700 Subject: [PATCH 019/144] Add user permissions message if the user is not an admin or better Signed-off-by: snipe --- resources/views/users/edit.blade.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index e9a50c795..dbc85b446 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -509,6 +509,12 @@ @if (!Auth::user()->isSuperUser())

Only superadmins may grant a user superadmin access.

@endif + + @if (!Auth::user()->hasAccess('admin')) +

Only users with admins rights or greater may grant a user admin access.

+ @else + farts + @endif
From 0f40ba2b34a1ab18371072e41d279bf298270970 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 22 Sep 2021 19:31:49 -0700 Subject: [PATCH 020/144] Check for admin rights before displaying admin permission options Signed-off-by: snipe --- .../partials/forms/edit/permissions-base.blade.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/views/partials/forms/edit/permissions-base.blade.php b/resources/views/partials/forms/edit/permissions-base.blade.php index 00e7c601a..a3d95b2c5 100644 --- a/resources/views/partials/forms/edit/permissions-base.blade.php +++ b/resources/views/partials/forms/edit/permissions-base.blade.php @@ -19,22 +19,31 @@ @if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser())) {{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }} + @elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin'))) + {{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }} @else {{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }} @endif + + ")).appendTo(this.$el); - } else if (this.options.theadClasses) { - this.$header.addClass(this.options.theadClasses); - } - - this._headerTrClasses = []; - this._headerTrStyles = []; - this.$header.find('tr').each(function (i, el) { - var $tr = $__default['default'](el); - var column = []; - $tr.find('th').each(function (i, el) { - var $th = $__default['default'](el); // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not - - if (typeof $th.data('field') !== 'undefined') { - $th.data('field', "".concat($th.data('field'))); - } - - column.push($__default['default'].extend({}, { - title: $th.html(), - class: $th.attr('class'), - titleTooltip: $th.attr('title'), - rowspan: $th.attr('rowspan') ? +$th.attr('rowspan') : undefined, - colspan: $th.attr('colspan') ? +$th.attr('colspan') : undefined - }, $th.data())); - }); - columns.push(column); - - if ($tr.attr('class')) { - _this._headerTrClasses.push($tr.attr('class')); - } - - if ($tr.attr('style')) { - _this._headerTrStyles.push($tr.attr('style')); - } - }); - - if (!Array.isArray(this.options.columns[0])) { - this.options.columns = [this.options.columns]; - } - - this.options.columns = $__default['default'].extend(true, [], columns, this.options.columns); - this.columns = []; - this.fieldsColumnsIndex = []; - Utils.setFieldIndex(this.options.columns); - this.options.columns.forEach(function (columns, i) { - columns.forEach(function (_column, j) { - var column = $__default['default'].extend({}, BootstrapTable.COLUMN_DEFAULTS, _column); - - if (typeof column.fieldIndex !== 'undefined') { - _this.columns[column.fieldIndex] = column; - _this.fieldsColumnsIndex[column.field] = column.fieldIndex; - } - - _this.options.columns[i][j] = column; - }); - }); // if options.data is setting, do not process tbody and tfoot data - - if (!this.options.data.length) { - var htmlData = Utils.trToData(this.columns, this.$el.find('>tbody>tr')); - - if (htmlData.length) { - this.options.data = htmlData; - this.fromHtml = true; - } - } - - if (!(this.options.pagination && this.options.sidePagination !== 'server')) { - this.footerData = Utils.trToData(this.columns, this.$el.find('>tfoot>tr')); - } - - if (this.footerData) { - this.$el.find('tfoot').html(''); - } - - if (!this.options.showFooter || this.options.cardView) { - this.$tableFooter.hide(); - } else { - this.$tableFooter.show(); - } - } - }, { - key: "initHeader", - value: function initHeader() { - var _this2 = this; - - var visibleColumns = {}; - var headerHtml = []; - this.header = { - fields: [], - styles: [], - classes: [], - formatters: [], - detailFormatters: [], - events: [], - sorters: [], - sortNames: [], - cellStyles: [], - searchables: [] - }; - Utils.updateFieldGroup(this.options.columns); - this.options.columns.forEach(function (columns, i) { - var html = []; - html.push("")); - var detailViewTemplate = ''; - - if (i === 0 && Utils.hasDetailViewIcon(_this2.options)) { - var rowspan = _this2.options.columns.length > 1 ? " rowspan=\"".concat(_this2.options.columns.length, "\"") : ''; - detailViewTemplate = ""); - } - - if (detailViewTemplate && _this2.options.detailViewAlign !== 'right') { - html.push(detailViewTemplate); - } - - columns.forEach(function (column, j) { - var class_ = Utils.sprintf(' class="%s"', column['class']); - var unitWidth = column.widthUnit; - var width = parseFloat(column.width); - var halign = Utils.sprintf('text-align: %s; ', column.halign ? column.halign : column.align); - var align = Utils.sprintf('text-align: %s; ', column.align); - var style = Utils.sprintf('vertical-align: %s; ', column.valign); - style += Utils.sprintf('width: %s; ', (column.checkbox || column.radio) && !width ? !column.showSelectTitle ? '36px' : undefined : width ? width + unitWidth : undefined); - - if (typeof column.fieldIndex === 'undefined' && !column.visible) { - return; - } - - var headerStyle = Utils.calculateObjectValue(null, _this2.options.headerStyle, [column]); - var csses = []; - var classes = ''; - - if (headerStyle && headerStyle.css) { - for (var _i = 0, _Object$entries = Object.entries(headerStyle.css); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), - key = _Object$entries$_i[0], - value = _Object$entries$_i[1]; - - csses.push("".concat(key, ": ").concat(value)); - } - } - - if (headerStyle && headerStyle.classes) { - classes = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], headerStyle.classes].join(' ') : headerStyle.classes); - } - - if (typeof column.fieldIndex !== 'undefined') { - _this2.header.fields[column.fieldIndex] = column.field; - _this2.header.styles[column.fieldIndex] = align + style; - _this2.header.classes[column.fieldIndex] = class_; - _this2.header.formatters[column.fieldIndex] = column.formatter; - _this2.header.detailFormatters[column.fieldIndex] = column.detailFormatter; - _this2.header.events[column.fieldIndex] = column.events; - _this2.header.sorters[column.fieldIndex] = column.sorter; - _this2.header.sortNames[column.fieldIndex] = column.sortName; - _this2.header.cellStyles[column.fieldIndex] = column.cellStyle; - _this2.header.searchables[column.fieldIndex] = column.searchable; - - if (!column.visible) { - return; - } - - if (_this2.options.cardView && !column.cardVisible) { - return; - } - - visibleColumns[column.field] = column; - } - - html.push(" 0 ? ' data-not-first-th' : '', '>'); - html.push(Utils.sprintf('
', _this2.options.sortable && column.sortable ? 'sortable both' : '')); - var text = _this2.options.escape ? Utils.escapeHTML(column.title) : column.title; - var title = text; - - if (column.checkbox) { - text = ''; - - if (!_this2.options.singleSelect && _this2.options.checkboxHeader) { - text = ''; - } - - _this2.header.stateField = column.field; - } - - if (column.radio) { - text = ''; - _this2.header.stateField = column.field; - } - - if (!text && column.showSelectTitle) { - text += title; - } - - html.push(text); - html.push('
'); - html.push('
'); - html.push(''); - html.push(''); - }); - - if (detailViewTemplate && _this2.options.detailViewAlign === 'right') { - html.push(detailViewTemplate); - } - - html.push('
'); - - if (html.length > 3) { - headerHtml.push(html.join('')); - } - }); - this.$header.html(headerHtml.join('')); - this.$header.find('th[data-field]').each(function (i, el) { - $__default['default'](el).data(visibleColumns[$__default['default'](el).data('field')]); - }); - this.$container.off('click', '.th-inner').on('click', '.th-inner', function (e) { - var $this = $__default['default'](e.currentTarget); - - if (_this2.options.detailView && !$this.parent().hasClass('bs-checkbox')) { - if ($this.closest('.bootstrap-table')[0] !== _this2.$container[0]) { - return false; - } - } - - if (_this2.options.sortable && $this.parent().data().sortable) { - _this2.onSort(e); - } - }); - this.$header.children().children().off('keypress').on('keypress', function (e) { - if (_this2.options.sortable && $__default['default'](e.currentTarget).data().sortable) { - var code = e.keyCode || e.which; - - if (code === 13) { - // Enter keycode - _this2.onSort(e); - } - } - }); - var resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id')); - $__default['default'](window).off(resizeEvent); - - if (!this.options.showHeader || this.options.cardView) { - this.$header.hide(); - this.$tableHeader.hide(); - this.$tableLoading.css('top', 0); - } else { - this.$header.show(); - this.$tableHeader.show(); - this.$tableLoading.css('top', this.$header.outerHeight() + 1); // Assign the correct sortable arrow - - this.getCaret(); - $__default['default'](window).on(resizeEvent, function () { - return _this2.resetView(); - }); - } - - this.$selectAll = this.$header.find('[name="btSelectAll"]'); - this.$selectAll.off('click').on('click', function (e) { - e.stopPropagation(); - var checked = $__default['default'](e.currentTarget).prop('checked'); - - _this2[checked ? 'checkAll' : 'uncheckAll'](); - - _this2.updateSelected(); - }); - } - }, { - key: "initData", - value: function initData(data, type) { - if (type === 'append') { - this.options.data = this.options.data.concat(data); - } else if (type === 'prepend') { - this.options.data = [].concat(data).concat(this.options.data); - } else { - data = data || Utils.deepCopy(this.options.data); - this.options.data = Array.isArray(data) ? data : data[this.options.dataField]; - } - - this.data = _toConsumableArray(this.options.data); - - if (this.options.sortReset) { - this.unsortedData = _toConsumableArray(this.data); - } - - if (this.options.sidePagination === 'server') { - return; - } - - this.initSort(); - } - }, { - key: "initSort", - value: function initSort() { - var _this3 = this; - - var name = this.options.sortName; - var order = this.options.sortOrder === 'desc' ? -1 : 1; - var index = this.header.fields.indexOf(this.options.sortName); - var timeoutId = 0; - - if (index !== -1) { - if (this.options.sortStable) { - this.data.forEach(function (row, i) { - if (!row.hasOwnProperty('_position')) { - row._position = i; - } - }); - } - - if (this.options.customSort) { - Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]); - } else { - this.data.sort(function (a, b) { - if (_this3.header.sortNames[index]) { - name = _this3.header.sortNames[index]; - } - - var aa = Utils.getItemField(a, name, _this3.options.escape); - var bb = Utils.getItemField(b, name, _this3.options.escape); - var value = Utils.calculateObjectValue(_this3.header, _this3.header.sorters[index], [aa, bb, a, b]); - - if (value !== undefined) { - if (_this3.options.sortStable && value === 0) { - return order * (a._position - b._position); - } - - return order * value; - } - - return Utils.sort(aa, bb, order, _this3.options.sortStable, a._position, b._position); - }); - } - - if (this.options.sortClass !== undefined) { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - _this3.$el.removeClass(_this3.options.sortClass); - - var index = _this3.$header.find("[data-field=\"".concat(_this3.options.sortName, "\"]")).index(); - - _this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass); - }, 250); - } - } else if (this.options.sortReset) { - this.data = _toConsumableArray(this.unsortedData); - } - } - }, { - key: "onSort", - value: function onSort(_ref) { - var type = _ref.type, - currentTarget = _ref.currentTarget; - var $this = type === 'keypress' ? $__default['default'](currentTarget) : $__default['default'](currentTarget).parent(); - var $this_ = this.$header.find('th').eq($this.index()); - this.$header.add(this.$header_).find('span.order').remove(); - - if (this.options.sortName === $this.data('field')) { - var currentSortOrder = this.options.sortOrder; - - if (currentSortOrder === undefined) { - this.options.sortOrder = 'asc'; - } else if (currentSortOrder === 'asc') { - this.options.sortOrder = 'desc'; - } else if (this.options.sortOrder === 'desc') { - this.options.sortOrder = this.options.sortReset ? undefined : 'asc'; - } - - if (this.options.sortOrder === undefined) { - this.options.sortName = undefined; - } - } else { - this.options.sortName = $this.data('field'); - - if (this.options.rememberOrder) { - this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc'; - } else { - this.options.sortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].sortOrder || this.columns[this.fieldsColumnsIndex[$this.data('field')]].order; - } - } - - this.trigger('sort', this.options.sortName, this.options.sortOrder); - $this.add($this_).data('order', this.options.sortOrder); // Assign the correct sortable arrow - - this.getCaret(); - - if (this.options.sidePagination === 'server' && this.options.serverSort) { - this.options.pageNumber = 1; - this.initServer(this.options.silentSort); - return; - } - - this.initSort(); - this.initBody(); - } - }, { - key: "initToolbar", - value: function initToolbar() { - var _this4 = this; - - var opts = this.options; - var html = []; - var timeoutId = 0; - var $keepOpen; - var switchableCount = 0; - - if (this.$toolbar.find('.bs-bars').children().length) { - $__default['default']('body').append($__default['default'](opts.toolbar)); - } - - this.$toolbar.html(''); - - if (typeof opts.toolbar === 'string' || _typeof(opts.toolbar) === 'object') { - $__default['default'](Utils.sprintf('
', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($__default['default'](opts.toolbar)); - } // showColumns, showToggle, showRefresh - - - html = ["
")]; - - if (typeof opts.buttonsOrder === 'string') { - opts.buttonsOrder = opts.buttonsOrder.replace(/\[|\]| |'/g, '').split(','); - } - - this.buttons = Object.assign(this.buttons, { - paginationSwitch: { - text: opts.pagination ? opts.formatPaginationSwitchUp() : opts.formatPaginationSwitchDown(), - icon: opts.pagination ? opts.icons.paginationSwitchDown : opts.icons.paginationSwitchUp, - render: false, - event: this.togglePagination, - attributes: { - 'aria-label': opts.formatPaginationSwitch(), - title: opts.formatPaginationSwitch() - } - }, - refresh: { - text: opts.formatRefresh(), - icon: opts.icons.refresh, - render: false, - event: this.refresh, - attributes: { - 'aria-label': opts.formatRefresh(), - title: opts.formatRefresh() - } - }, - toggle: { - text: opts.formatToggle(), - icon: opts.icons.toggleOff, - render: false, - event: this.toggleView, - attributes: { - 'aria-label': opts.formatToggleOn(), - title: opts.formatToggleOn() - } - }, - fullscreen: { - text: opts.formatFullscreen(), - icon: opts.icons.fullscreen, - render: false, - event: this.toggleFullscreen, - attributes: { - 'aria-label': opts.formatFullscreen(), - title: opts.formatFullscreen() - } - }, - columns: { - render: false, - html: function html() { - var html = []; - html.push("
\n \n ").concat(_this4.constants.html.toolbarDropdown[0])); - - if (opts.showColumnsSearch) { - html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('', _this4.constants.classes.input, opts.formatSearch()))); - html.push(_this4.constants.html.toolbarDropdownSeparator); - } - - if (opts.showColumnsToggleAll) { - var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) { - return !_this4.isSelectionColumn(column); - }).length; - - html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf(' %s', allFieldsVisible ? 'checked="checked"' : '', opts.formatColumnsToggleAll()))); - html.push(_this4.constants.html.toolbarDropdownSeparator); - } - - var visibleColumns = 0; - - _this4.columns.forEach(function (column) { - if (column.visible) { - visibleColumns++; - } - }); - - _this4.columns.forEach(function (column, i) { - if (_this4.isSelectionColumn(column)) { - return; - } - - if (opts.cardView && !column.cardVisible) { - return; - } - - var checked = column.visible ? ' checked="checked"' : ''; - var disabled = visibleColumns <= opts.minimumCountColumns && checked ? ' disabled="disabled"' : ''; - - if (column.switchable) { - html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf(' %s', column.field, i, checked, disabled, column.title))); - switchableCount++; - } - }); - - html.push(_this4.constants.html.toolbarDropdown[1], '
'); - return html.join(''); - } - } - }); - var buttonsHtml = {}; - - for (var _i2 = 0, _Object$entries2 = Object.entries(this.buttons); _i2 < _Object$entries2.length; _i2++) { - var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2), - buttonName = _Object$entries2$_i[0], - buttonConfig = _Object$entries2$_i[1]; - - var buttonHtml = void 0; - - if (buttonConfig.hasOwnProperty('html')) { - if (typeof buttonConfig.html === 'function') { - buttonHtml = buttonConfig.html(); - } else if (typeof buttonConfig.html === 'string') { - buttonHtml = buttonConfig.html; - } - } else { - buttonHtml = "\n ").concat(this.constants.html.pageDropdown[0])]; - pageList.forEach(function (page, i) { - if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows || page === opts.formatAllRows()) { - var active; - - if (allSelected) { - active = page === opts.formatAllRows() ? _this6.constants.classes.dropdownActive : ''; - } else { - active = page === opts.pageSize ? _this6.constants.classes.dropdownActive : ''; - } - - pageNumber.push(Utils.sprintf(_this6.constants.html.pageDropdownItem, active, page)); - } - }); - pageNumber.push("".concat(this.constants.html.pageDropdown[1], "")); - html.push(opts.formatRecordsPerPage(pageNumber.join(''))); - } - - if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) { - html.push('
'); - } - - if (this.paginationParts.includes('pageList')) { - html.push("
"), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', opts.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', opts.formatSRPaginationPreText(), opts.paginationPreText)); - - if (this.totalPages < opts.paginationSuccessivelySize) { - from = 1; - to = this.totalPages; - } else { - from = opts.pageNumber - opts.paginationPagesBySide; - to = from + opts.paginationPagesBySide * 2; - } - - if (opts.pageNumber < opts.paginationSuccessivelySize - 1) { - to = opts.paginationSuccessivelySize; - } - - if (opts.paginationSuccessivelySize > this.totalPages - from) { - from = from - (opts.paginationSuccessivelySize - (this.totalPages - from)) + 1; - } - - if (from < 1) { - from = 1; - } - - if (to > this.totalPages) { - to = this.totalPages; - } - - var middleSize = Math.round(opts.paginationPagesBySide / 2); - - var pageItem = function pageItem(i) { - var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - return Utils.sprintf(_this6.constants.html.paginationItem, classes + (i === opts.pageNumber ? " ".concat(_this6.constants.classes.paginationActive) : ''), opts.formatSRPaginationPageText(i), i); - }; - - if (from > 1) { - var max = opts.paginationPagesBySide; - if (max >= from) max = from - 1; - - for (i = 1; i <= max; i++) { - html.push(pageItem(i)); - } - - if (from - 1 === max + 1) { - i = from - 1; - html.push(pageItem(i)); - } else if (from - 1 > max) { - if (from - opts.paginationPagesBySide * 2 > opts.paginationPagesBySide && opts.paginationUseIntermediate) { - i = Math.round((from - middleSize) / 2 + middleSize); - html.push(pageItem(i, ' page-intermediate')); - } else { - html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-first-separator disabled', '', '...')); - } - } - } - - for (i = from; i <= to; i++) { - html.push(pageItem(i)); - } - - if (this.totalPages > to) { - var min = this.totalPages - (opts.paginationPagesBySide - 1); - if (to >= min) min = to + 1; - - if (to + 1 === min - 1) { - i = to + 1; - html.push(pageItem(i)); - } else if (min > to + 1) { - if (this.totalPages - to > opts.paginationPagesBySide * 2 && opts.paginationUseIntermediate) { - i = Math.round((this.totalPages - middleSize - to) / 2 + to); - html.push(pageItem(i, ' page-intermediate')); - } else { - html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-last-separator disabled', '', '...')); - } - } - - for (i = min; i <= this.totalPages; i++) { - html.push(pageItem(i)); - } - } - - html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-next', opts.formatSRPaginationNextText(), opts.paginationNextText)); - html.push(this.constants.html.pagination[1], '
'); - } - - this.$pagination.html(html.join('')); - var dropupClass = ['bottom', 'both'].includes(opts.paginationVAlign) ? " ".concat(this.constants.classes.dropup) : ''; - this.$pagination.last().find('.page-list > span').addClass(dropupClass); - - if (!opts.onlyInfoPagination) { - $pageList = this.$pagination.find('.page-list a'); - $pre = this.$pagination.find('.page-pre'); - $next = this.$pagination.find('.page-next'); - $number = this.$pagination.find('.page-item').not('.page-next, .page-pre, .page-last-separator, .page-first-separator'); - - if (this.totalPages <= 1) { - this.$pagination.find('div.pagination').hide(); - } - - if (opts.smartDisplay) { - if (pageList.length < 2 || opts.totalRows <= pageList[0]) { - this.$pagination.find('span.page-list').hide(); - } - } // when data is empty, hide the pagination - - - this.$pagination[this.getData().length ? 'show' : 'hide'](); - - if (!opts.paginationLoop) { - if (opts.pageNumber === 1) { - $pre.addClass('disabled'); - } - - if (opts.pageNumber === this.totalPages) { - $next.addClass('disabled'); - } - } - - if (allSelected) { - opts.pageSize = opts.formatAllRows(); - } // removed the events for last and first, onPageNumber executeds the same logic - - - $pageList.off('click').on('click', function (e) { - return _this6.onPageListChange(e); - }); - $pre.off('click').on('click', function (e) { - return _this6.onPagePre(e); - }); - $next.off('click').on('click', function (e) { - return _this6.onPageNext(e); - }); - $number.off('click').on('click', function (e) { - return _this6.onPageNumber(e); - }); - } - } - }, { - key: "updatePagination", - value: function updatePagination(event) { - // Fix #171: IE disabled button can be clicked bug. - if (event && $__default['default'](event.currentTarget).hasClass('disabled')) { - return; - } - - if (!this.options.maintainMetaData) { - this.resetRows(); - } - - this.initPagination(); - this.trigger('page-change', this.options.pageNumber, this.options.pageSize); - - if (this.options.sidePagination === 'server') { - this.initServer(); - } else { - this.initBody(); - } - } - }, { - key: "onPageListChange", - value: function onPageListChange(event) { - event.preventDefault(); - var $this = $__default['default'](event.currentTarget); - $this.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive); - this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text(); - this.$toolbar.find('.page-size').text(this.options.pageSize); - this.updatePagination(event); - return false; - } - }, { - key: "onPagePre", - value: function onPagePre(event) { - event.preventDefault(); - - if (this.options.pageNumber - 1 === 0) { - this.options.pageNumber = this.options.totalPages; - } else { - this.options.pageNumber--; - } - - this.updatePagination(event); - return false; - } - }, { - key: "onPageNext", - value: function onPageNext(event) { - event.preventDefault(); - - if (this.options.pageNumber + 1 > this.options.totalPages) { - this.options.pageNumber = 1; - } else { - this.options.pageNumber++; - } - - this.updatePagination(event); - return false; - } - }, { - key: "onPageNumber", - value: function onPageNumber(event) { - event.preventDefault(); - - if (this.options.pageNumber === +$__default['default'](event.currentTarget).text()) { - return; - } - - this.options.pageNumber = +$__default['default'](event.currentTarget).text(); - this.updatePagination(event); - return false; - } // eslint-disable-next-line no-unused-vars - - }, { - key: "initRow", - value: function initRow(item, i, data, trFragments) { - var _this7 = this; - - var html = []; - var style = {}; - var csses = []; - var data_ = ''; - var attributes = {}; - var htmlAttributes = []; - - if (Utils.findIndex(this.hiddenRows, item) > -1) { - return; - } - - style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style); - - if (style && style.css) { - for (var _i7 = 0, _Object$entries6 = Object.entries(style.css); _i7 < _Object$entries6.length; _i7++) { - var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i7], 2), - key = _Object$entries6$_i[0], - value = _Object$entries6$_i[1]; - - csses.push("".concat(key, ": ").concat(value)); - } - } - - attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes); - - if (attributes) { - for (var _i8 = 0, _Object$entries7 = Object.entries(attributes); _i8 < _Object$entries7.length; _i8++) { - var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2), - _key2 = _Object$entries7$_i[0], - _value = _Object$entries7$_i[1]; - - htmlAttributes.push("".concat(_key2, "=\"").concat(Utils.escapeHTML(_value), "\"")); - } - } - - if (item._data && !Utils.isEmptyObject(item._data)) { - for (var _i9 = 0, _Object$entries8 = Object.entries(item._data); _i9 < _Object$entries8.length; _i9++) { - var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2), - k = _Object$entries8$_i[0], - v = _Object$entries8$_i[1]; - - // ignore data-index - if (k === 'index') { - return; - } - - data_ += " data-".concat(k, "='").concat(_typeof(v) === 'object' ? JSON.stringify(v) : v, "'"); - } - } - - html.push(''); - - if (this.options.cardView) { - html.push("'; - } - - if (detailViewTemplate && this.options.detailViewAlign !== 'right') { - html.push(detailViewTemplate); - } - - this.header.fields.forEach(function (field, j) { - var text = ''; - var value_ = Utils.getItemField(item, field, _this7.options.escape); - var value = ''; - var type = ''; - var cellStyle = {}; - var id_ = ''; - var class_ = _this7.header.classes[j]; - var style_ = ''; - var styleToAdd_ = ''; - var data_ = ''; - var rowspan_ = ''; - var colspan_ = ''; - var title_ = ''; - var column = _this7.columns[j]; - - if ((_this7.fromHtml || _this7.autoMergeCells) && typeof value_ === 'undefined') { - if (!column.checkbox && !column.radio) { - return; - } - } - - if (!column.visible) { - return; - } - - if (_this7.options.cardView && !column.cardVisible) { - return; - } - - if (column.escape) { - value_ = Utils.escapeHTML(value_); - } // Style concat - - - if (csses.concat([_this7.header.styles[j]]).length) { - styleToAdd_ += "".concat(csses.concat([_this7.header.styles[j]]).join('; ')); - } - - if (item["_".concat(field, "_style")]) { - styleToAdd_ += "".concat(item["_".concat(field, "_style")]); - } - - if (styleToAdd_) { - style_ = " style=\"".concat(styleToAdd_, "\""); - } // Style concat - // handle id and class of td - - - if (item["_".concat(field, "_id")]) { - id_ = Utils.sprintf(' id="%s"', item["_".concat(field, "_id")]); - } - - if (item["_".concat(field, "_class")]) { - class_ = Utils.sprintf(' class="%s"', item["_".concat(field, "_class")]); - } - - if (item["_".concat(field, "_rowspan")]) { - rowspan_ = Utils.sprintf(' rowspan="%s"', item["_".concat(field, "_rowspan")]); - } - - if (item["_".concat(field, "_colspan")]) { - colspan_ = Utils.sprintf(' colspan="%s"', item["_".concat(field, "_colspan")]); - } - - if (item["_".concat(field, "_title")]) { - title_ = Utils.sprintf(' title="%s"', item["_".concat(field, "_title")]); - } - - cellStyle = Utils.calculateObjectValue(_this7.header, _this7.header.cellStyles[j], [value_, item, i, field], cellStyle); - - if (cellStyle.classes) { - class_ = " class=\"".concat(cellStyle.classes, "\""); - } - - if (cellStyle.css) { - var csses_ = []; - - for (var _i10 = 0, _Object$entries9 = Object.entries(cellStyle.css); _i10 < _Object$entries9.length; _i10++) { - var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i10], 2), - _key3 = _Object$entries9$_i[0], - _value2 = _Object$entries9$_i[1]; - - csses_.push("".concat(_key3, ": ").concat(_value2)); - } - - style_ = " style=\"".concat(csses_.concat(_this7.header.styles[j]).join('; '), "\""); - } - - value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_); - - if (!(column.checkbox || column.radio)) { - value = typeof value === 'undefined' || value === null ? _this7.options.undefinedText : value; - } - - if (column.searchable && _this7.searchText && _this7.options.searchHighlight) { - var defValue = ''; - var regExp = new RegExp("(".concat(_this7.searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), ")"), 'gim'); - var marker = '$1'; - var isHTML = value && /<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(value); - - if (isHTML) { - // value can contains a HTML tags - var textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent; - var textReplaced = textContent.replace(regExp, marker); - defValue = value.replace(new RegExp("(>\\s*)(".concat(textContent, ")(\\s*)"), 'gm'), "$1".concat(textReplaced, "$3")); - } else { - // but usually not - defValue = value.toString().replace(regExp, marker); - } - - value = Utils.calculateObjectValue(column, column.searchHighlightFormatter, [value, _this7.searchText], defValue); - } - - if (item["_".concat(field, "_data")] && !Utils.isEmptyObject(item["_".concat(field, "_data")])) { - for (var _i11 = 0, _Object$entries10 = Object.entries(item["_".concat(field, "_data")]); _i11 < _Object$entries10.length; _i11++) { - var _Object$entries10$_i = _slicedToArray(_Object$entries10[_i11], 2), - _k = _Object$entries10$_i[0], - _v = _Object$entries10$_i[1]; - - // ignore data-index - if (_k === 'index') { - return; - } - - data_ += " data-".concat(_k, "=\"").concat(_v, "\""); - } - } - - if (column.checkbox || column.radio) { - type = column.checkbox ? 'checkbox' : type; - type = column.radio ? 'radio' : type; - var c = column['class'] || ''; - var isChecked = Utils.isObject(value) && value.hasOwnProperty('checked') ? value.checked : (value === true || value_) && value !== false; - var isDisabled = !column.checkboxEnabled || value && value.disabled; - text = [_this7.options.cardView ? "
") : "
'].join(''); - item[_this7.header.stateField] = value === true || !!value_ || value && value.checked; - } else if (_this7.options.cardView) { - var cardTitle = _this7.options.showHeader ? "").concat(Utils.getFieldTitle(_this7.columns, field), "") : ''; - text = "
".concat(cardTitle, "").concat(value, "
"); - - if (_this7.options.smartDisplay && value === '') { - text = '
'; - } - } else { - text = "").concat(value, ""); - } - - html.push(text); - }); - - if (detailViewTemplate && this.options.detailViewAlign === 'right') { - html.push(detailViewTemplate); - } - - if (this.options.cardView) { - html.push(''); - } - - html.push(''); - return html.join(''); - } - }, { - key: "initBody", - value: function initBody(fixedScroll) { - var _this8 = this; - - var data = this.getData(); - this.trigger('pre-body', data); - this.$body = this.$el.find('>tbody'); - - if (!this.$body.length) { - this.$body = $__default['default']('').appendTo(this.$el); - } // Fix #389 Bootstrap-table-flatJSON is not working - - - if (!this.options.pagination || this.options.sidePagination === 'server') { - this.pageFrom = 1; - this.pageTo = data.length; - } - - var rows = []; - var trFragments = $__default['default'](document.createDocumentFragment()); - var hasTr = false; - this.autoMergeCells = Utils.checkAutoMergeCells(data.slice(this.pageFrom - 1, this.pageTo)); - - for (var i = this.pageFrom - 1; i < this.pageTo; i++) { - var item = data[i]; - var tr = this.initRow(item, i, data, trFragments); - hasTr = hasTr || !!tr; - - if (tr && typeof tr === 'string') { - if (!this.options.virtualScroll) { - trFragments.append(tr); - } else { - rows.push(tr); - } - } - } // show no records - - - if (!hasTr) { - this.$body.html("".concat(Utils.sprintf('', this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options), this.options.formatNoMatches()), "")); - } else if (!this.options.virtualScroll) { - this.$body.html(trFragments); - } else { - if (this.virtualScroll) { - this.virtualScroll.destroy(); - } - - this.virtualScroll = new VirtualScroll({ - rows: rows, - fixedScroll: fixedScroll, - scrollEl: this.$tableBody[0], - contentEl: this.$body[0], - itemHeight: this.options.virtualScrollItemHeight, - callback: function callback() { - _this8.fitHeader(); - - _this8.initBodyEvent(); - } - }); - } - - if (!fixedScroll) { - this.scrollTo(0); - } - - this.initBodyEvent(); - this.updateSelected(); - this.initFooter(); - this.resetView(); - - if (this.options.sidePagination !== 'server') { - this.options.totalRows = data.length; - } - - this.trigger('post-body', data); - } - }, { - key: "initBodyEvent", - value: function initBodyEvent() { - var _this9 = this; - - // click to select by column - this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) { - var $td = $__default['default'](e.currentTarget); - var $tr = $td.parent(); - var $cardViewArr = $__default['default'](e.target).parents('.card-views').children(); - var $cardViewTarget = $__default['default'](e.target).parents('.card-view'); - var rowIndex = $tr.data('index'); - var item = _this9.data[rowIndex]; - var index = _this9.options.cardView ? $cardViewArr.index($cardViewTarget) : $td[0].cellIndex; - - var fields = _this9.getVisibleFields(); - - var field = fields[index - Utils.getDetailViewIndexOffset(_this9.options)]; - var column = _this9.columns[_this9.fieldsColumnsIndex[field]]; - var value = Utils.getItemField(item, field, _this9.options.escape); - - if ($td.find('.detail-icon').length) { - return; - } - - _this9.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td); - - _this9.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field); // if click to select - then trigger the checkbox/radio click - - - if (e.type === 'click' && _this9.options.clickToSelect && column.clickToSelect && !Utils.calculateObjectValue(_this9.options, _this9.options.ignoreClickToSelectOn, [e.target])) { - var $selectItem = $tr.find(Utils.sprintf('[name="%s"]', _this9.options.selectItemName)); - - if ($selectItem.length) { - $selectItem[0].click(); - } - } - - if (e.type === 'click' && _this9.options.detailViewByClick) { - _this9.toggleDetailView(rowIndex, _this9.header.detailFormatters[_this9.fieldsColumnsIndex[field]]); - } - }).off('mousedown').on('mousedown', function (e) { - // https://github.com/jquery/jquery/issues/1741 - _this9.multipleSelectRowCtrlKey = e.ctrlKey || e.metaKey; - _this9.multipleSelectRowShiftKey = e.shiftKey; - }); - this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function (e) { - e.preventDefault(); - - _this9.toggleDetailView($__default['default'](e.currentTarget).parent().parent().data('index')); - - return false; - }); - this.$selectItem = this.$body.find(Utils.sprintf('[name="%s"]', this.options.selectItemName)); - this.$selectItem.off('click').on('click', function (e) { - e.stopImmediatePropagation(); - var $this = $__default['default'](e.currentTarget); - - _this9._toggleCheck($this.prop('checked'), $this.data('index')); - }); - this.header.events.forEach(function (_events, i) { - var events = _events; - - if (!events) { - return; - } // fix bug, if events is defined with namespace - - - if (typeof events === 'string') { - events = Utils.calculateObjectValue(null, events); - } - - var field = _this9.header.fields[i]; - - var fieldIndex = _this9.getVisibleFields().indexOf(field); - - if (fieldIndex === -1) { - return; - } - - fieldIndex += Utils.getDetailViewIndexOffset(_this9.options); - - var _loop2 = function _loop2(key) { - if (!events.hasOwnProperty(key)) { - return "continue"; - } - - var event = events[key]; - - _this9.$body.find('>tr:not(.no-records-found)').each(function (i, tr) { - var $tr = $__default['default'](tr); - var $td = $tr.find(_this9.options.cardView ? '.card-views>.card-view' : '>td').eq(fieldIndex); - var index = key.indexOf(' '); - var name = key.substring(0, index); - var el = key.substring(index + 1); - $td.find(el).off(name).on(name, function (e) { - var index = $tr.data('index'); - var row = _this9.data[index]; - var value = row[field]; - event.apply(_this9, [e, value, row, index]); - }); - }); - }; - - for (var key in events) { - var _ret2 = _loop2(key); - - if (_ret2 === "continue") continue; - } - }); - } - }, { - key: "initServer", - value: function initServer(silent, query, url) { - var _this10 = this; - - var data = {}; - var index = this.header.fields.indexOf(this.options.sortName); - var params = { - searchText: this.searchText, - sortName: this.options.sortName, - sortOrder: this.options.sortOrder - }; - - if (this.header.sortNames[index]) { - params.sortName = this.header.sortNames[index]; - } - - if (this.options.pagination && this.options.sidePagination === 'server') { - params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; - params.pageNumber = this.options.pageNumber; - } - - if (!(url || this.options.url) && !this.options.ajax) { - return; - } - - if (this.options.queryParamsType === 'limit') { - params = { - search: params.searchText, - sort: params.sortName, - order: params.sortOrder - }; - - if (this.options.pagination && this.options.sidePagination === 'server') { - params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1); - params.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize; - - if (params.limit === 0) { - delete params.limit; - } - } - } - - if (this.options.search && this.options.sidePagination === 'server' && this.columns.filter(function (column) { - return !column.searchable; - }).length) { - params.searchable = []; - - var _iterator2 = _createForOfIteratorHelper(this.columns), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var column = _step2.value; - - if (!column.checkbox && column.searchable && (this.options.visibleSearch && column.visible || !this.options.visibleSearch)) { - params.searchable.push(column.field); - } - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - } - - if (!Utils.isEmptyObject(this.filterColumnsPartial)) { - params.filter = JSON.stringify(this.filterColumnsPartial, null); - } - - $__default['default'].extend(params, query || {}); - data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data); // false to stop request - - if (data === false) { - return; - } - - if (!silent) { - this.showLoading(); - } - - var request = $__default['default'].extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), { - type: this.options.method, - url: url || this.options.url, - data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data, - cache: this.options.cache, - contentType: this.options.contentType, - dataType: this.options.dataType, - success: function success(_res, textStatus, jqXHR) { - var res = Utils.calculateObjectValue(_this10.options, _this10.options.responseHandler, [_res, jqXHR], _res); - - _this10.load(res); - - _this10.trigger('load-success', res, jqXHR && jqXHR.status, jqXHR); - - if (!silent) { - _this10.hideLoading(); - } - - if (_this10.options.sidePagination === 'server' && res[_this10.options.totalField] > 0 && !res[_this10.options.dataField].length) { - _this10.updatePagination(); - } - }, - error: function error(jqXHR) { - var data = []; - - if (_this10.options.sidePagination === 'server') { - data = {}; - data[_this10.options.totalField] = 0; - data[_this10.options.dataField] = []; - } - - _this10.load(data); - - _this10.trigger('load-error', jqXHR && jqXHR.status, jqXHR); - - if (!silent) _this10.$tableLoading.hide(); - } - }); - - if (this.options.ajax) { - Utils.calculateObjectValue(this, this.options.ajax, [request], null); - } else { - if (this._xhr && this._xhr.readyState !== 4) { - this._xhr.abort(); - } - - this._xhr = $__default['default'].ajax(request); - } - - return data; - } - }, { - key: "initSearchText", - value: function initSearchText() { - if (this.options.search) { - this.searchText = ''; - - if (this.options.searchText !== '') { - var $search = Utils.getSearchInput(this); - $search.val(this.options.searchText); - this.onSearch({ - currentTarget: $search, - firedByInitSearchText: true - }); - } - } - } - }, { - key: "getCaret", - value: function getCaret() { - var _this11 = this; - - this.$header.find('th').each(function (i, th) { - $__default['default'](th).find('.sortable').removeClass('desc asc').addClass($__default['default'](th).data('field') === _this11.options.sortName ? _this11.options.sortOrder : 'both'); - }); - } - }, { - key: "updateSelected", - value: function updateSelected() { - var checkAll = this.$selectItem.filter(':enabled').length && this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length; - this.$selectAll.add(this.$selectAll_).prop('checked', checkAll); - this.$selectItem.each(function (i, el) { - $__default['default'](el).closest('tr')[$__default['default'](el).prop('checked') ? 'addClass' : 'removeClass']('selected'); - }); - } - }, { - key: "updateRows", - value: function updateRows() { - var _this12 = this; - - this.$selectItem.each(function (i, el) { - _this12.data[$__default['default'](el).data('index')][_this12.header.stateField] = $__default['default'](el).prop('checked'); - }); - } - }, { - key: "resetRows", - value: function resetRows() { - var _iterator3 = _createForOfIteratorHelper(this.data), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var row = _step3.value; - this.$selectAll.prop('checked', false); - this.$selectItem.prop('checked', false); - - if (this.header.stateField) { - row[this.header.stateField] = false; - } - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - - this.initHiddenRows(); - } - }, { - key: "trigger", - value: function trigger(_name) { - var _this$options, _this$options2; - - var name = "".concat(_name, ".bs.table"); - - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key4 = 1; _key4 < _len; _key4++) { - args[_key4 - 1] = arguments[_key4]; - } - - (_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, [].concat(args, [this])); - - this.$el.trigger($__default['default'].Event(name, { - sender: this - }), args); - - (_this$options2 = this.options).onAll.apply(_this$options2, [name].concat([].concat(args, [this]))); - - this.$el.trigger($__default['default'].Event('all.bs.table', { - sender: this - }), [name, args]); - } - }, { - key: "resetHeader", - value: function resetHeader() { - var _this13 = this; - - // fix #61: the hidden table reset header bug. - // fix bug: get $el.css('width') error sometime (height = 500) - clearTimeout(this.timeoutId_); - this.timeoutId_ = setTimeout(function () { - return _this13.fitHeader(); - }, this.$el.is(':hidden') ? 100 : 0); - } - }, { - key: "fitHeader", - value: function fitHeader() { - var _this14 = this; - - if (this.$el.is(':hidden')) { - this.timeoutId_ = setTimeout(function () { - return _this14.fitHeader(); - }, 100); - return; - } - - var fixedBody = this.$tableBody.get(0); - var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; - this.$el.css('margin-top', -this.$header.outerHeight()); - var focused = $__default['default'](':focus'); - - if (focused.length > 0) { - var $th = focused.parents('th'); - - if ($th.length > 0) { - var dataField = $th.attr('data-field'); - - if (dataField !== undefined) { - var $headerTh = this.$header.find("[data-field='".concat(dataField, "']")); - - if ($headerTh.length > 0) { - $headerTh.find(':input').addClass('focus-temp'); - } - } - } - } - - this.$header_ = this.$header.clone(true, true); - this.$selectAll_ = this.$header_.find('[name="btSelectAll"]'); - this.$tableHeader.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).html('').attr('class', this.$el.attr('class')).append(this.$header_); - this.$tableLoading.css('width', this.$el.outerWidth()); - var focusedTemp = $__default['default']('.focus-temp:visible:eq(0)'); - - if (focusedTemp.length > 0) { - focusedTemp.focus(); - this.$header.find('.focus-temp').removeClass('focus-temp'); - } // fix bug: $.data() is not working as expected after $.append() - - - this.$header.find('th[data-field]').each(function (i, el) { - _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', $__default['default'](el).data('field'))).data($__default['default'](el).data()); - }); - var visibleFields = this.getVisibleFields(); - var $ths = this.$header_.find('th'); - var $tr = this.$body.find('>tr:not(.no-records-found,.virtual-scroll-top)').eq(0); - - while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { - $tr = $tr.next(); - } - - var trLength = $tr.find('> *').length; - $tr.find('> *').each(function (i, el) { - var $this = $__default['default'](el); - - if (Utils.hasDetailViewIcon(_this14.options)) { - if (i === 0 && _this14.options.detailViewAlign !== 'right' || i === trLength - 1 && _this14.options.detailViewAlign === 'right') { - var $thDetail = $ths.filter('.detail'); - - var _zoomWidth = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width(); - - $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth); - return; - } - } - - var index = i - Utils.getDetailViewIndexOffset(_this14.options); - - var $th = _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index])); - - if ($th.length > 1) { - $th = $__default['default']($ths[$this[0].cellIndex]); - } - - var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width(); - $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); - }); - this.horizontalScroll(); - this.trigger('post-header'); - } - }, { - key: "initFooter", - value: function initFooter() { - if (!this.options.showFooter || this.options.cardView) { - // do nothing - return; - } - - var data = this.getData(); - var html = []; - var detailTemplate = ''; - - if (Utils.hasDetailViewIcon(this.options)) { - detailTemplate = ''; - } - - if (detailTemplate && this.options.detailViewAlign !== 'right') { - html.push(detailTemplate); - } - - var _iterator4 = _createForOfIteratorHelper(this.columns), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var column = _step4.value; - var falign = ''; - var valign = ''; - var csses = []; - var style = {}; - var class_ = Utils.sprintf(' class="%s"', column['class']); - - if (!column.visible || this.footerData && this.footerData.length > 0 && !(column.field in this.footerData[0])) { - continue; - } - - if (this.options.cardView && !column.cardVisible) { - return; - } - - falign = Utils.sprintf('text-align: %s; ', column.falign ? column.falign : column.align); - valign = Utils.sprintf('vertical-align: %s; ', column.valign); - style = Utils.calculateObjectValue(null, this.options.footerStyle, [column]); - - if (style && style.css) { - for (var _i12 = 0, _Object$entries11 = Object.entries(style.css); _i12 < _Object$entries11.length; _i12++) { - var _Object$entries11$_i = _slicedToArray(_Object$entries11[_i12], 2), - key = _Object$entries11$_i[0], - _value3 = _Object$entries11$_i[1]; - - csses.push("".concat(key, ": ").concat(_value3)); - } - } - - if (style && style.classes) { - class_ = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], style.classes].join(' ') : style.classes); - } - - html.push(' 0) { - colspan = this.footerData[0]["_".concat(column.field, "_colspan")] || 0; - } - - if (colspan) { - html.push(" colspan=\"".concat(colspan, "\" ")); - } - - html.push('>'); - html.push('
'); - var value = ''; - - if (this.footerData && this.footerData.length > 0) { - value = this.footerData[0][column.field] || ''; - } - - html.push(Utils.calculateObjectValue(column, column.footerFormatter, [data, value], value)); - html.push('
'); - html.push('
'); - html.push(''); - html.push(''); - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); - } - - if (detailTemplate && this.options.detailViewAlign === 'right') { - html.push(detailTemplate); - } - - if (!this.options.height && !this.$tableFooter.length) { - this.$el.append('
'); - this.$tableFooter = this.$el.find('tfoot'); - } - - this.$tableFooter.find('tr').html(html.join('')); - this.trigger('post-footer', this.$tableFooter); - } - }, { - key: "fitFooter", - value: function fitFooter() { - var _this15 = this; - - if (this.$el.is(':hidden')) { - setTimeout(function () { - return _this15.fitFooter(); - }, 100); - return; - } - - var fixedBody = this.$tableBody.get(0); - var scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0; - this.$tableFooter.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).attr('class', this.$el.attr('class')); - var $ths = this.$tableFooter.find('th'); - var $tr = this.$body.find('>tr:first-child:not(.no-records-found)'); - $ths.find('.fht-cell').width('auto'); - - while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) { - $tr = $tr.next(); - } - - var trLength = $tr.find('> *').length; - $tr.find('> *').each(function (i, el) { - var $this = $__default['default'](el); - - if (Utils.hasDetailViewIcon(_this15.options)) { - if (i === 0 && _this15.options.detailViewAlign === 'left' || i === trLength - 1 && _this15.options.detailViewAlign === 'right') { - var $thDetail = $ths.filter('.detail'); - - var _zoomWidth2 = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width(); - - $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth2); - return; - } - } - - var $th = $ths.eq(i); - var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width(); - $th.find('.fht-cell').width($this.innerWidth() - zoomWidth); - }); - this.horizontalScroll(); - } - }, { - key: "horizontalScroll", - value: function horizontalScroll() { - var _this16 = this; - - // horizontal scroll event - // TODO: it's probably better improving the layout than binding to scroll event - this.$tableBody.off('scroll').on('scroll', function () { - var scrollLeft = _this16.$tableBody.scrollLeft(); - - if (_this16.options.showHeader && _this16.options.height) { - _this16.$tableHeader.scrollLeft(scrollLeft); - } - - if (_this16.options.showFooter && !_this16.options.cardView) { - _this16.$tableFooter.scrollLeft(scrollLeft); - } - - _this16.trigger('scroll-body', _this16.$tableBody); - }); - } - }, { - key: "getVisibleFields", - value: function getVisibleFields() { - var visibleFields = []; - - var _iterator5 = _createForOfIteratorHelper(this.header.fields), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var field = _step5.value; - var column = this.columns[this.fieldsColumnsIndex[field]]; - - if (!column || !column.visible) { - continue; - } - - visibleFields.push(field); - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); - } - - return visibleFields; - } - }, { - key: "initHiddenRows", - value: function initHiddenRows() { - this.hiddenRows = []; - } // PUBLIC FUNCTION DEFINITION - // ======================= - - }, { - key: "getOptions", - value: function getOptions() { - // deep copy and remove data - var options = $__default['default'].extend({}, this.options); - delete options.data; - return $__default['default'].extend(true, {}, options); - } - }, { - key: "refreshOptions", - value: function refreshOptions(options) { - // If the objects are equivalent then avoid the call of destroy / init methods - if (Utils.compareObjects(this.options, options, true)) { - return; - } - - this.options = $__default['default'].extend(this.options, options); - this.trigger('refresh-options', this.options); - this.destroy(); - this.init(); - } - }, { - key: "getData", - value: function getData(params) { - var _this17 = this; - - var data = this.options.data; - - if ((this.searchText || this.options.customSearch || this.options.sortName !== undefined || this.enableCustomSort || // Fix #4616: this.enableCustomSort is for extensions - !Utils.isEmptyObject(this.filterColumns) || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) { - data = this.data; - } - - if (params && params.useCurrentPage) { - data = data.slice(this.pageFrom - 1, this.pageTo); - } - - if (params && !params.includeHiddenRows) { - var hiddenRows = this.getHiddenRows(); - data = data.filter(function (row) { - return Utils.findIndex(hiddenRows, row) === -1; - }); - } - - if (params && params.formatted) { - data.forEach(function (row) { - for (var _i13 = 0, _Object$entries12 = Object.entries(row); _i13 < _Object$entries12.length; _i13++) { - var _Object$entries12$_i = _slicedToArray(_Object$entries12[_i13], 2), - key = _Object$entries12$_i[0], - value = _Object$entries12$_i[1]; - - var column = _this17.columns[_this17.fieldsColumnsIndex[key]]; - - if (!column) { - return; - } - - row[key] = Utils.calculateObjectValue(column, _this17.header.formatters[column.fieldIndex], [value, row, row.index, column.field], value); - } - }); - } - - return data; - } - }, { - key: "getSelections", - value: function getSelections() { - var _this18 = this; - - return (this.options.maintainMetaData ? this.options.data : this.data).filter(function (row) { - return row[_this18.header.stateField] === true; - }); - } - }, { - key: "load", - value: function load(_data) { - var fixedScroll = false; - var data = _data; // #431: support pagination - - if (this.options.pagination && this.options.sidePagination === 'server') { - this.options.totalRows = data[this.options.totalField]; - this.options.totalNotFiltered = data[this.options.totalNotFilteredField]; - this.footerData = data[this.options.footerField] ? [data[this.options.footerField]] : undefined; - } - - fixedScroll = data.fixedScroll; - data = Array.isArray(data) ? data : data[this.options.dataField]; - this.initData(data); - this.initSearch(); - this.initPagination(); - this.initBody(fixedScroll); - } - }, { - key: "append", - value: function append(data) { - this.initData(data, 'append'); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: "prepend", - value: function prepend(data) { - this.initData(data, 'prepend'); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: "remove", - value: function remove(params) { - var removed = 0; - - for (var i = this.options.data.length - 1; i >= 0; i--) { - var row = this.options.data[i]; - - if (!row.hasOwnProperty(params.field) && params.field !== '$index') { - continue; - } - - if (!row.hasOwnProperty(params.field) && params.field === '$index' && params.values.includes(i) || params.values.includes(row[params.field])) { - removed++; - this.options.data.splice(i, 1); - } - } - - if (!removed) { - return; - } - - if (this.options.sidePagination === 'server') { - this.options.totalRows -= removed; - this.data = _toConsumableArray(this.options.data); - } - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: "removeAll", - value: function removeAll() { - if (this.options.data.length > 0) { - this.options.data.splice(0, this.options.data.length); - this.initSearch(); - this.initPagination(); - this.initBody(true); - } - } - }, { - key: "insertRow", - value: function insertRow(params) { - if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) { - return; - } - - this.options.data.splice(params.index, 0, params.row); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: "updateRow", - value: function updateRow(params) { - var allParams = Array.isArray(params) ? params : [params]; - - var _iterator6 = _createForOfIteratorHelper(allParams), - _step6; - - try { - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - var _params = _step6.value; - - if (!_params.hasOwnProperty('index') || !_params.hasOwnProperty('row')) { - continue; - } - - if (_params.hasOwnProperty('replace') && _params.replace) { - this.options.data[_params.index] = _params.row; - } else { - $__default['default'].extend(this.options.data[_params.index], _params.row); - } - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: "getRowByUniqueId", - value: function getRowByUniqueId(_id) { - var uniqueId = this.options.uniqueId; - var len = this.options.data.length; - var id = _id; - var dataRow = null; - var i; - var row; - var rowUniqueId; - - for (i = len - 1; i >= 0; i--) { - row = this.options.data[i]; - - if (row.hasOwnProperty(uniqueId)) { - // uniqueId is a column - rowUniqueId = row[uniqueId]; - } else if (row._data && row._data.hasOwnProperty(uniqueId)) { - // uniqueId is a row data property - rowUniqueId = row._data[uniqueId]; - } else { - continue; - } - - if (typeof rowUniqueId === 'string') { - id = id.toString(); - } else if (typeof rowUniqueId === 'number') { - if (Number(rowUniqueId) === rowUniqueId && rowUniqueId % 1 === 0) { - id = parseInt(id); - } else if (rowUniqueId === Number(rowUniqueId) && rowUniqueId !== 0) { - id = parseFloat(id); - } - } - - if (rowUniqueId === id) { - dataRow = row; - break; - } - } - - return dataRow; - } - }, { - key: "updateByUniqueId", - value: function updateByUniqueId(params) { - var allParams = Array.isArray(params) ? params : [params]; - - var _iterator7 = _createForOfIteratorHelper(allParams), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var _params2 = _step7.value; - - if (!_params2.hasOwnProperty('id') || !_params2.hasOwnProperty('row')) { - continue; - } - - var rowId = this.options.data.indexOf(this.getRowByUniqueId(_params2.id)); - - if (rowId === -1) { - continue; - } - - if (_params2.hasOwnProperty('replace') && _params2.replace) { - this.options.data[rowId] = _params2.row; - } else { - $__default['default'].extend(this.options.data[rowId], _params2.row); - } - } - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); - } - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - } - }, { - key: "removeByUniqueId", - value: function removeByUniqueId(id) { - var len = this.options.data.length; - var row = this.getRowByUniqueId(id); - - if (row) { - this.options.data.splice(this.options.data.indexOf(row), 1); - } - - if (len === this.options.data.length) { - return; - } - - if (this.options.sidePagination === 'server') { - this.options.totalRows -= 1; - this.data = _toConsumableArray(this.options.data); - } - - this.initSearch(); - this.initPagination(); - this.initBody(true); - } - }, { - key: "updateCell", - value: function updateCell(params) { - if (!params.hasOwnProperty('index') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) { - return; - } - - this.data[params.index][params.field] = params.value; - - if (params.reinit === false) { - return; - } - - this.initSort(); - this.initBody(true); - } - }, { - key: "updateCellByUniqueId", - value: function updateCellByUniqueId(params) { - var _this19 = this; - - var allParams = Array.isArray(params) ? params : [params]; - allParams.forEach(function (_ref6) { - var id = _ref6.id, - field = _ref6.field, - value = _ref6.value; - - var rowId = _this19.options.data.indexOf(_this19.getRowByUniqueId(id)); - - if (rowId === -1) { - return; - } - - _this19.options.data[rowId][field] = value; - }); - - if (params.reinit === false) { - return; - } - - this.initSort(); - this.initBody(true); - } - }, { - key: "showRow", - value: function showRow(params) { - this._toggleRow(params, true); - } - }, { - key: "hideRow", - value: function hideRow(params) { - this._toggleRow(params, false); - } - }, { - key: "_toggleRow", - value: function _toggleRow(params, visible) { - var row; - - if (params.hasOwnProperty('index')) { - row = this.getData()[params.index]; - } else if (params.hasOwnProperty('uniqueId')) { - row = this.getRowByUniqueId(params.uniqueId); - } - - if (!row) { - return; - } - - var index = Utils.findIndex(this.hiddenRows, row); - - if (!visible && index === -1) { - this.hiddenRows.push(row); - } else if (visible && index > -1) { - this.hiddenRows.splice(index, 1); - } - - this.initBody(true); - this.initPagination(); - } - }, { - key: "getHiddenRows", - value: function getHiddenRows(show) { - if (show) { - this.initHiddenRows(); - this.initBody(true); - this.initPagination(); - return; - } - - var data = this.getData(); - var rows = []; - - var _iterator8 = _createForOfIteratorHelper(data), - _step8; - - try { - for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { - var row = _step8.value; - - if (this.hiddenRows.includes(row)) { - rows.push(row); - } - } - } catch (err) { - _iterator8.e(err); - } finally { - _iterator8.f(); - } - - this.hiddenRows = rows; - return rows; - } - }, { - key: "showColumn", - value: function showColumn(field) { - var _this20 = this; - - var fields = Array.isArray(field) ? field : [field]; - fields.forEach(function (field) { - _this20._toggleColumn(_this20.fieldsColumnsIndex[field], true, true); - }); - } - }, { - key: "hideColumn", - value: function hideColumn(field) { - var _this21 = this; - - var fields = Array.isArray(field) ? field : [field]; - fields.forEach(function (field) { - _this21._toggleColumn(_this21.fieldsColumnsIndex[field], false, true); - }); - } - }, { - key: "_toggleColumn", - value: function _toggleColumn(index, checked, needUpdate) { - if (index === -1 || this.columns[index].visible === checked) { - return; - } - - this.columns[index].visible = checked; - this.initHeader(); - this.initSearch(); - this.initPagination(); - this.initBody(); - - if (this.options.showColumns) { - var $items = this.$toolbar.find('.keep-open input:not(".toggle-all")').prop('disabled', false); - - if (needUpdate) { - $items.filter(Utils.sprintf('[value="%s"]', index)).prop('checked', checked); - } - - if ($items.filter(':checked').length <= this.options.minimumCountColumns) { - $items.filter(':checked').prop('disabled', true); - } - } - } - }, { - key: "getVisibleColumns", - value: function getVisibleColumns() { - var _this22 = this; - - return this.columns.filter(function (column) { - return column.visible && !_this22.isSelectionColumn(column); - }); - } - }, { - key: "getHiddenColumns", - value: function getHiddenColumns() { - return this.columns.filter(function (_ref7) { - var visible = _ref7.visible; - return !visible; - }); - } - }, { - key: "isSelectionColumn", - value: function isSelectionColumn(column) { - return column.radio || column.checkbox; - } - }, { - key: "showAllColumns", - value: function showAllColumns() { - this._toggleAllColumns(true); - } - }, { - key: "hideAllColumns", - value: function hideAllColumns() { - this._toggleAllColumns(false); - } - }, { - key: "_toggleAllColumns", - value: function _toggleAllColumns(visible) { - var _this23 = this; - - var _iterator9 = _createForOfIteratorHelper(this.columns.slice().reverse()), - _step9; - - try { - for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { - var column = _step9.value; - - if (column.switchable) { - if (!visible && this.options.showColumns && this.getVisibleColumns().length === this.options.minimumCountColumns) { - continue; - } - - column.visible = visible; - } - } - } catch (err) { - _iterator9.e(err); - } finally { - _iterator9.f(); - } - - this.initHeader(); - this.initSearch(); - this.initPagination(); - this.initBody(); - - if (this.options.showColumns) { - var $items = this.$toolbar.find('.keep-open input[type="checkbox"]:not(".toggle-all")').prop('disabled', false); - - if (visible) { - $items.prop('checked', visible); - } else { - $items.get().reverse().forEach(function (item) { - if ($items.filter(':checked').length > _this23.options.minimumCountColumns) { - $__default['default'](item).prop('checked', visible); - } - }); - } - - if ($items.filter(':checked').length <= this.options.minimumCountColumns) { - $items.filter(':checked').prop('disabled', true); - } - } - } - }, { - key: "mergeCells", - value: function mergeCells(options) { - var row = options.index; - var col = this.getVisibleFields().indexOf(options.field); - var rowspan = options.rowspan || 1; - var colspan = options.colspan || 1; - var i; - var j; - var $tr = this.$body.find('>tr'); - col += Utils.getDetailViewIndexOffset(this.options); - var $td = $tr.eq(row).find('>td').eq(col); - - if (row < 0 || col < 0 || row >= this.data.length) { - return; - } - - for (i = row; i < row + rowspan; i++) { - for (j = col; j < col + colspan; j++) { - $tr.eq(i).find('>td').eq(j).hide(); - } - } - - $td.attr('rowspan', rowspan).attr('colspan', colspan).show(); - } - }, { - key: "checkAll", - value: function checkAll() { - this._toggleCheckAll(true); - } - }, { - key: "uncheckAll", - value: function uncheckAll() { - this._toggleCheckAll(false); - } - }, { - key: "_toggleCheckAll", - value: function _toggleCheckAll(checked) { - var rowsBefore = this.getSelections(); - this.$selectAll.add(this.$selectAll_).prop('checked', checked); - this.$selectItem.filter(':enabled').prop('checked', checked); - this.updateRows(); - this.updateSelected(); - var rowsAfter = this.getSelections(); - - if (checked) { - this.trigger('check-all', rowsAfter, rowsBefore); - return; - } - - this.trigger('uncheck-all', rowsAfter, rowsBefore); - } - }, { - key: "checkInvert", - value: function checkInvert() { - var $items = this.$selectItem.filter(':enabled'); - var checked = $items.filter(':checked'); - $items.each(function (i, el) { - $__default['default'](el).prop('checked', !$__default['default'](el).prop('checked')); - }); - this.updateRows(); - this.updateSelected(); - this.trigger('uncheck-some', checked); - checked = this.getSelections(); - this.trigger('check-some', checked); - } - }, { - key: "check", - value: function check(index) { - this._toggleCheck(true, index); - } - }, { - key: "uncheck", - value: function uncheck(index) { - this._toggleCheck(false, index); - } - }, { - key: "_toggleCheck", - value: function _toggleCheck(checked, index) { - var $el = this.$selectItem.filter("[data-index=\"".concat(index, "\"]")); - var row = this.data[index]; - - if ($el.is(':radio') || this.options.singleSelect || this.options.multipleSelectRow && !this.multipleSelectRowCtrlKey && !this.multipleSelectRowShiftKey) { - var _iterator10 = _createForOfIteratorHelper(this.options.data), - _step10; - - try { - for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { - var r = _step10.value; - r[this.header.stateField] = false; - } - } catch (err) { - _iterator10.e(err); - } finally { - _iterator10.f(); - } - - this.$selectItem.filter(':checked').not($el).prop('checked', false); - } - - row[this.header.stateField] = checked; - - if (this.options.multipleSelectRow) { - if (this.multipleSelectRowShiftKey && this.multipleSelectRowLastSelectedIndex >= 0) { - var _ref8 = this.multipleSelectRowLastSelectedIndex < index ? [this.multipleSelectRowLastSelectedIndex, index] : [index, this.multipleSelectRowLastSelectedIndex], - _ref9 = _slicedToArray(_ref8, 2), - fromIndex = _ref9[0], - toIndex = _ref9[1]; - - for (var i = fromIndex + 1; i < toIndex; i++) { - this.data[i][this.header.stateField] = true; - this.$selectItem.filter("[data-index=\"".concat(i, "\"]")).prop('checked', true); - } - } - - this.multipleSelectRowCtrlKey = false; - this.multipleSelectRowShiftKey = false; - this.multipleSelectRowLastSelectedIndex = checked ? index : -1; - } - - $el.prop('checked', checked); - this.updateSelected(); - this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el); - } - }, { - key: "checkBy", - value: function checkBy(obj) { - this._toggleCheckBy(true, obj); - } - }, { - key: "uncheckBy", - value: function uncheckBy(obj) { - this._toggleCheckBy(false, obj); - } - }, { - key: "_toggleCheckBy", - value: function _toggleCheckBy(checked, obj) { - var _this24 = this; - - if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) { - return; - } - - var rows = []; - this.data.forEach(function (row, i) { - if (!row.hasOwnProperty(obj.field)) { - return false; - } - - if (obj.values.includes(row[obj.field])) { - var $el = _this24.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i)); - - $el = checked ? $el.not(':checked') : $el.filter(':checked'); - - if (!$el.length) { - return; - } - - $el.prop('checked', checked); - row[_this24.header.stateField] = checked; - rows.push(row); - - _this24.trigger(checked ? 'check' : 'uncheck', row, $el); - } - }); - this.updateSelected(); - this.trigger(checked ? 'check-some' : 'uncheck-some', rows); - } - }, { - key: "refresh", - value: function refresh(params) { - if (params && params.url) { - this.options.url = params.url; - } - - if (params && params.pageNumber) { - this.options.pageNumber = params.pageNumber; - } - - if (params && params.pageSize) { - this.options.pageSize = params.pageSize; - } - - this.trigger('refresh', this.initServer(params && params.silent, params && params.query, params && params.url)); - } - }, { - key: "destroy", - value: function destroy() { - this.$el.insertBefore(this.$container); - $__default['default'](this.options.toolbar).insertBefore(this.$el); - this.$container.next().remove(); - this.$container.remove(); - this.$el.html(this.$el_.html()).css('margin-top', '0').attr('class', this.$el_.attr('class') || ''); // reset the class - } - }, { - key: "resetView", - value: function resetView(params) { - var padding = 0; - - if (params && params.height) { - this.options.height = params.height; - } - - this.$selectAll.prop('checked', this.$selectItem.length > 0 && this.$selectItem.length === this.$selectItem.filter(':checked').length); - this.$tableContainer.toggleClass('has-card-view', this.options.cardView); - - if (!this.options.cardView && this.options.showHeader && this.options.height) { - this.$tableHeader.show(); - this.resetHeader(); - padding += this.$header.outerHeight(true) + 1; - } else { - this.$tableHeader.hide(); - this.trigger('post-header'); - } - - if (!this.options.cardView && this.options.showFooter) { - this.$tableFooter.show(); - this.fitFooter(); - - if (this.options.height) { - padding += this.$tableFooter.outerHeight(true); - } - } - - if (this.$container.hasClass('fullscreen')) { - this.$tableContainer.css('height', ''); - this.$tableContainer.css('width', ''); - } else if (this.options.height) { - if (this.$tableBorder) { - this.$tableBorder.css('width', ''); - this.$tableBorder.css('height', ''); - } - - var toolbarHeight = this.$toolbar.outerHeight(true); - var paginationHeight = this.$pagination.outerHeight(true); - var height = this.options.height - toolbarHeight - paginationHeight; - var $bodyTable = this.$tableBody.find('>table'); - var tableHeight = $bodyTable.outerHeight(); - this.$tableContainer.css('height', "".concat(height, "px")); - - if (this.$tableBorder && $bodyTable.is(':visible')) { - var tableBorderHeight = height - tableHeight - 2; - - if (this.$tableBody[0].scrollWidth - this.$tableBody.innerWidth()) { - tableBorderHeight -= Utils.getScrollBarWidth(); - } - - this.$tableBorder.css('width', "".concat($bodyTable.outerWidth(), "px")); - this.$tableBorder.css('height', "".concat(tableBorderHeight, "px")); - } - } - - if (this.options.cardView) { - // remove the element css - this.$el.css('margin-top', '0'); - this.$tableContainer.css('padding-bottom', '0'); - this.$tableFooter.hide(); - } else { - // Assign the correct sortable arrow - this.getCaret(); - this.$tableContainer.css('padding-bottom', "".concat(padding, "px")); - } - - this.trigger('reset-view'); - } - }, { - key: "showLoading", - value: function showLoading() { - this.$tableLoading.toggleClass('open', true); - var fontSize = this.options.loadingFontSize; - - if (this.options.loadingFontSize === 'auto') { - fontSize = this.$tableLoading.width() * 0.04; - fontSize = Math.max(12, fontSize); - fontSize = Math.min(32, fontSize); - fontSize = "".concat(fontSize, "px"); - } - - this.$tableLoading.find('.loading-text').css('font-size', fontSize); - } - }, { - key: "hideLoading", - value: function hideLoading() { - this.$tableLoading.toggleClass('open', false); - } - }, { - key: "togglePagination", - value: function togglePagination() { - this.options.pagination = !this.options.pagination; - var icon = this.options.showButtonIcons ? this.options.pagination ? this.options.icons.paginationSwitchDown : this.options.icons.paginationSwitchUp : ''; - var text = this.options.showButtonText ? this.options.pagination ? this.options.formatPaginationSwitchUp() : this.options.formatPaginationSwitchDown() : ''; - this.$toolbar.find('button[name="paginationSwitch"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)); - this.updatePagination(); - } - }, { - key: "toggleFullscreen", - value: function toggleFullscreen() { - this.$el.closest('.bootstrap-table').toggleClass('fullscreen'); - this.resetView(); - } - }, { - key: "toggleView", - value: function toggleView() { - this.options.cardView = !this.options.cardView; - this.initHeader(); - var icon = this.options.showButtonIcons ? this.options.cardView ? this.options.icons.toggleOn : this.options.icons.toggleOff : ''; - var text = this.options.showButtonText ? this.options.cardView ? this.options.formatToggleOff() : this.options.formatToggleOn() : ''; - this.$toolbar.find('button[name="toggle"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)); - this.initBody(); - this.trigger('toggle', this.options.cardView); - } - }, { - key: "resetSearch", - value: function resetSearch(text) { - var $search = Utils.getSearchInput(this); - $search.val(text || ''); - this.onSearch({ - currentTarget: $search - }); - } - }, { - key: "filterBy", - value: function filterBy(columns, options) { - this.filterOptions = Utils.isEmptyObject(options) ? this.options.filterOptions : $__default['default'].extend(this.options.filterOptions, options); - this.filterColumns = Utils.isEmptyObject(columns) ? {} : columns; - this.options.pageNumber = 1; - this.initSearch(); - this.updatePagination(); - } - }, { - key: "scrollTo", - value: function scrollTo(params) { - var options = { - unit: 'px', - value: 0 - }; - - if (_typeof(params) === 'object') { - options = Object.assign(options, params); - } else if (typeof params === 'string' && params === 'bottom') { - options.value = this.$tableBody[0].scrollHeight; - } else if (typeof params === 'string' || typeof params === 'number') { - options.value = params; - } - - var scrollTo = options.value; - - if (options.unit === 'rows') { - scrollTo = 0; - this.$body.find("> tr:lt(".concat(options.value, ")")).each(function (i, el) { - scrollTo += $__default['default'](el).outerHeight(true); - }); - } - - this.$tableBody.scrollTop(scrollTo); - } - }, { - key: "getScrollPosition", - value: function getScrollPosition() { - return this.$tableBody.scrollTop(); - } - }, { - key: "selectPage", - value: function selectPage(page) { - if (page > 0 && page <= this.options.totalPages) { - this.options.pageNumber = page; - this.updatePagination(); - } - } - }, { - key: "prevPage", - value: function prevPage() { - if (this.options.pageNumber > 1) { - this.options.pageNumber--; - this.updatePagination(); - } - } - }, { - key: "nextPage", - value: function nextPage() { - if (this.options.pageNumber < this.options.totalPages) { - this.options.pageNumber++; - this.updatePagination(); - } - } - }, { - key: "toggleDetailView", - value: function toggleDetailView(index, _columnDetailFormatter) { - var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"]', index)); - - if ($tr.next().is('tr.detail-view')) { - this.collapseRow(index); - } else { - this.expandRow(index, _columnDetailFormatter); - } - - this.resetView(); - } - }, { - key: "expandRow", - value: function expandRow(index, _columnDetailFormatter) { - var row = this.data[index]; - var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index)); - - if ($tr.next().is('tr.detail-view')) { - return; - } - - if (this.options.detailViewIcon) { - $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailClose)); - } - - $tr.after(Utils.sprintf('', $tr.children('td').length)); - var $element = $tr.next().find('td'); - var detailFormatter = _columnDetailFormatter || this.options.detailFormatter; - var content = Utils.calculateObjectValue(this.options, detailFormatter, [index, row, $element], ''); - - if ($element.length === 1) { - $element.append(content); - } - - this.trigger('expand-row', index, row, $element); - } - }, { - key: "expandRowByUniqueId", - value: function expandRowByUniqueId(uniqueId) { - var row = this.getRowByUniqueId(uniqueId); - - if (!row) { - return; - } - - this.expandRow(this.data.indexOf(row)); - } - }, { - key: "collapseRow", - value: function collapseRow(index) { - var row = this.data[index]; - var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index)); - - if (!$tr.next().is('tr.detail-view')) { - return; - } - - if (this.options.detailViewIcon) { - $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen)); - } - - this.trigger('collapse-row', index, row, $tr.next()); - $tr.next().remove(); - } - }, { - key: "collapseRowByUniqueId", - value: function collapseRowByUniqueId(uniqueId) { - var row = this.getRowByUniqueId(uniqueId); - - if (!row) { - return; - } - - this.collapseRow(this.data.indexOf(row)); - } - }, { - key: "expandAllRows", - value: function expandAllRows() { - var trs = this.$body.find('> tr[data-index][data-has-detail-view]'); - - for (var i = 0; i < trs.length; i++) { - this.expandRow($__default['default'](trs[i]).data('index')); - } - } - }, { - key: "collapseAllRows", - value: function collapseAllRows() { - var trs = this.$body.find('> tr[data-index][data-has-detail-view]'); - - for (var i = 0; i < trs.length; i++) { - this.collapseRow($__default['default'](trs[i]).data('index')); - } - } - }, { - key: "updateColumnTitle", - value: function updateColumnTitle(params) { - if (!params.hasOwnProperty('field') || !params.hasOwnProperty('title')) { - return; - } - - this.columns[this.fieldsColumnsIndex[params.field]].title = this.options.escape ? Utils.escapeHTML(params.title) : params.title; - - if (this.columns[this.fieldsColumnsIndex[params.field]].visible) { - this.$header.find('th[data-field]').each(function (i, el) { - if ($__default['default'](el).data('field') === params.field) { - $__default['default']($__default['default'](el).find('.th-inner')[0]).text(params.title); - return false; - } - }); - this.resetView(); - } - } - }, { - key: "updateFormatText", - value: function updateFormatText(formatName, text) { - if (!/^format/.test(formatName) || !this.options[formatName]) { - return; - } - - if (typeof text === 'string') { - this.options[formatName] = function () { - return text; - }; - } else if (typeof text === 'function') { - this.options[formatName] = text; - } - - this.initToolbar(); - this.initPagination(); - this.initBody(); - } - }]); - - return BootstrapTable; - }(); - - BootstrapTable.VERSION = Constants.VERSION; - BootstrapTable.DEFAULTS = Constants.DEFAULTS; - BootstrapTable.LOCALES = Constants.LOCALES; - BootstrapTable.COLUMN_DEFAULTS = Constants.COLUMN_DEFAULTS; - BootstrapTable.METHODS = Constants.METHODS; - BootstrapTable.EVENTS = Constants.EVENTS; // BOOTSTRAP TABLE PLUGIN DEFINITION - // ======================= - - $__default['default'].BootstrapTable = BootstrapTable; - - $__default['default'].fn.bootstrapTable = function (option) { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key5 = 1; _key5 < _len2; _key5++) { - args[_key5 - 1] = arguments[_key5]; - } - - var value; - this.each(function (i, el) { - var data = $__default['default'](el).data('bootstrap.table'); - var options = $__default['default'].extend({}, BootstrapTable.DEFAULTS, $__default['default'](el).data(), _typeof(option) === 'object' && option); - - if (typeof option === 'string') { - var _data2; - - if (!Constants.METHODS.includes(option)) { - throw new Error("Unknown method: ".concat(option)); - } - - if (!data) { - return; - } - - value = (_data2 = data)[option].apply(_data2, args); - - if (option === 'destroy') { - $__default['default'](el).removeData('bootstrap.table'); - } - } - - if (!data) { - data = new $__default['default'].BootstrapTable(el, options); - $__default['default'](el).data('bootstrap.table', data); - data.init(); - } - }); - return typeof value === 'undefined' ? this : value; - }; - - $__default['default'].fn.bootstrapTable.Constructor = BootstrapTable; - $__default['default'].fn.bootstrapTable.theme = Constants.THEME; - $__default['default'].fn.bootstrapTable.VERSION = Constants.VERSION; - $__default['default'].fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS; - $__default['default'].fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS; - $__default['default'].fn.bootstrapTable.events = BootstrapTable.EVENTS; - $__default['default'].fn.bootstrapTable.locales = BootstrapTable.LOCALES; - $__default['default'].fn.bootstrapTable.methods = BootstrapTable.METHODS; - $__default['default'].fn.bootstrapTable.utils = Utils; // BOOTSTRAP TABLE INIT - // ======================= - - $__default['default'](function () { - $__default['default']('[data-toggle="table"]').bootstrapTable(); - }); - - return BootstrapTable; - -}))); - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : - typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); -}(this, (function ($) { 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var $__default = /*#__PURE__*/_interopDefaultLegacy($); - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var check = function (it) { - return it && it.Math == Math && it; - }; - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global_1 = - // eslint-disable-next-line no-undef - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - check(typeof self == 'object' && self) || - check(typeof commonjsGlobal == 'object' && commonjsGlobal) || - // eslint-disable-next-line no-new-func - (function () { return this; })() || Function('return this')(); - - var fails = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } - }; - - // Thank's IE8 for his funny defineProperty - var descriptors = !fails(function () { - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; - }); - - var nativePropertyIsEnumerable = {}.propertyIsEnumerable; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // Nashorn ~ JDK8 bug - var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); - - // `Object.prototype.propertyIsEnumerable` method implementation - // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable - var f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; - } : nativePropertyIsEnumerable; - - var objectPropertyIsEnumerable = { - f: f - }; - - var createPropertyDescriptor = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var toString = {}.toString; - - var classofRaw = function (it) { - return toString.call(it).slice(8, -1); - }; - - var split = ''.split; - - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var indexedObject = fails(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins - return !Object('z').propertyIsEnumerable(0); - }) ? function (it) { - return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); - } : Object; - - // `RequireObjectCoercible` abstract operation - // https://tc39.github.io/ecma262/#sec-requireobjectcoercible - var requireObjectCoercible = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; - }; - - // toObject with fallback for non-array-like ES3 strings - - - - var toIndexedObject = function (it) { - return indexedObject(requireObjectCoercible(it)); - }; - - var isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - // `ToPrimitive` abstract operation - // https://tc39.github.io/ecma262/#sec-toprimitive - // instead of the ES6 spec version, we didn't implement @@toPrimitive case - // and the second argument - flag - preferred type is a string - var toPrimitive = function (input, PREFERRED_STRING) { - if (!isObject(input)) return input; - var fn, val; - if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; - if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - throw TypeError("Can't convert object to primitive value"); - }; - - var hasOwnProperty = {}.hasOwnProperty; - - var has = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - var document$1 = global_1.document; - // typeof document.createElement is 'object' in old IE - var EXISTS = isObject(document$1) && isObject(document$1.createElement); - - var documentCreateElement = function (it) { - return EXISTS ? document$1.createElement(it) : {}; - }; - - // Thank's IE8 for his funny defineProperty - var ie8DomDefine = !descriptors && !fails(function () { - return Object.defineProperty(documentCreateElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; - }); - - var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // `Object.getOwnPropertyDescriptor` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor - var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPrimitive(P, true); - if (ie8DomDefine) try { - return nativeGetOwnPropertyDescriptor(O, P); - } catch (error) { /* empty */ } - if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); - }; - - var objectGetOwnPropertyDescriptor = { - f: f$1 - }; - - var anObject = function (it) { - if (!isObject(it)) { - throw TypeError(String(it) + ' is not an object'); - } return it; - }; - - var nativeDefineProperty = Object.defineProperty; - - // `Object.defineProperty` method - // https://tc39.github.io/ecma262/#sec-object.defineproperty - var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (ie8DomDefine) try { - return nativeDefineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; - }; - - var objectDefineProperty = { - f: f$2 - }; - - var createNonEnumerableProperty = descriptors ? function (object, key, value) { - return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var setGlobal = function (key, value) { - try { - createNonEnumerableProperty(global_1, key, value); - } catch (error) { - global_1[key] = value; - } return value; - }; - - var SHARED = '__core-js_shared__'; - var store = global_1[SHARED] || setGlobal(SHARED, {}); - - var sharedStore = store; - - var functionToString = Function.toString; - - // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper - if (typeof sharedStore.inspectSource != 'function') { - sharedStore.inspectSource = function (it) { - return functionToString.call(it); - }; - } - - var inspectSource = sharedStore.inspectSource; - - var WeakMap = global_1.WeakMap; - - var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); - - var shared = createCommonjsModule(function (module) { - (module.exports = function (key, value) { - return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: '3.8.1', - mode: 'global', - copyright: '© 2020 Denis Pushkarev (zloirock.ru)' - }); - }); - - var id = 0; - var postfix = Math.random(); - - var uid = function (key) { - return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); - }; - - var keys = shared('keys'); - - var sharedKey = function (key) { - return keys[key] || (keys[key] = uid(key)); - }; - - var hiddenKeys = {}; - - var WeakMap$1 = global_1.WeakMap; - var set, get, has$1; - - var enforce = function (it) { - return has$1(it) ? get(it) : set(it, {}); - }; - - var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; - }; - - if (nativeWeakMap) { - var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); - var wmget = store$1.get; - var wmhas = store$1.has; - var wmset = store$1.set; - set = function (it, metadata) { - metadata.facade = it; - wmset.call(store$1, it, metadata); - return metadata; - }; - get = function (it) { - return wmget.call(store$1, it) || {}; - }; - has$1 = function (it) { - return wmhas.call(store$1, it); - }; - } else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - metadata.facade = it; - createNonEnumerableProperty(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return has(it, STATE) ? it[STATE] : {}; - }; - has$1 = function (it) { - return has(it, STATE); - }; - } - - var internalState = { - set: set, - get: get, - has: has$1, - enforce: enforce, - getterFor: getterFor - }; - - var redefine = createCommonjsModule(function (module) { - var getInternalState = internalState.get; - var enforceInternalState = internalState.enforce; - var TEMPLATE = String(String).split('String'); - - (module.exports = function (O, key, value, options) { - var unsafe = options ? !!options.unsafe : false; - var simple = options ? !!options.enumerable : false; - var noTargetGet = options ? !!options.noTargetGet : false; - var state; - if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) { - createNonEnumerableProperty(value, 'name', key); - } - state = enforceInternalState(value); - if (!state.source) { - state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); - } - } - if (O === global_1) { - if (simple) O[key] = value; - else setGlobal(key, value); - return; - } else if (!unsafe) { - delete O[key]; - } else if (!noTargetGet && O[key]) { - simple = true; - } - if (simple) O[key] = value; - else createNonEnumerableProperty(O, key, value); - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, 'toString', function toString() { - return typeof this == 'function' && getInternalState(this).source || inspectSource(this); - }); - }); - - var path = global_1; - - var aFunction = function (variable) { - return typeof variable == 'function' ? variable : undefined; - }; - - var getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) - : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; - }; - - var ceil = Math.ceil; - var floor = Math.floor; - - // `ToInteger` abstract operation - // https://tc39.github.io/ecma262/#sec-tointeger - var toInteger = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); - }; - - var min = Math.min; - - // `ToLength` abstract operation - // https://tc39.github.io/ecma262/#sec-tolength - var toLength = function (argument) { - return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 - }; - - var max = Math.max; - var min$1 = Math.min; - - // Helper for a popular repeating case of the spec: - // Let integer be ? ToInteger(index). - // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). - var toAbsoluteIndex = function (index, length) { - var integer = toInteger(index); - return integer < 0 ? max(integer + length, 0) : min$1(integer, length); - }; - - // `Array.prototype.{ indexOf, includes }` methods implementation - var createMethod = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; - }; - - var arrayIncludes = { - // `Array.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - includes: createMethod(true), - // `Array.prototype.indexOf` method - // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - indexOf: createMethod(false) - }; - - var indexOf = arrayIncludes.indexOf; - - - var objectKeysInternal = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~indexOf(result, key) || result.push(key); - } - return result; - }; - - // IE8- don't enum bug keys - var enumBugKeys = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - - var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); - - // `Object.getOwnPropertyNames` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertynames - var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return objectKeysInternal(O, hiddenKeys$1); - }; - - var objectGetOwnPropertyNames = { - f: f$3 - }; - - var f$4 = Object.getOwnPropertySymbols; - - var objectGetOwnPropertySymbols = { - f: f$4 - }; - - // all object keys, includes non-enumerable and symbols - var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = objectGetOwnPropertyNames.f(anObject(it)); - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; - }; - - var copyConstructorProperties = function (target, source) { - var keys = ownKeys(source); - var defineProperty = objectDefineProperty.f; - var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - }; - - var replacement = /#|\.prototype\./; - - var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : typeof detection == 'function' ? fails(detection) - : !!detection; - }; - - var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); - }; - - var data = isForced.data = {}; - var NATIVE = isForced.NATIVE = 'N'; - var POLYFILL = isForced.POLYFILL = 'P'; - - var isForced_1 = isForced; - - var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; - - - - - - - /* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.noTargetGet - prevent calling a getter on target - */ - var _export = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global_1; - } else if (STATIC) { - target = global_1[TARGET] || setGlobal(TARGET, {}); - } else { - target = (global_1[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.noTargetGet) { - descriptor = getOwnPropertyDescriptor$1(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty === typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - // extend global - redefine(target, key, sourceProperty, options); - } - }; - - // `IsArray` abstract operation - // https://tc39.github.io/ecma262/#sec-isarray - var isArray = Array.isArray || function isArray(arg) { - return classofRaw(arg) == 'Array'; - }; - - // `ToObject` abstract operation - // https://tc39.github.io/ecma262/#sec-toobject - var toObject = function (argument) { - return Object(requireObjectCoercible(argument)); - }; - - var createProperty = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; - }; - - var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { - // Chrome 38 Symbol has incorrect toString conversion - // eslint-disable-next-line no-undef - return !String(Symbol()); - }); - - var useSymbolAsUid = nativeSymbol - // eslint-disable-next-line no-undef - && !Symbol.sham - // eslint-disable-next-line no-undef - && typeof Symbol.iterator == 'symbol'; - - var WellKnownSymbolsStore = shared('wks'); - var Symbol$1 = global_1.Symbol; - var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; - - var wellKnownSymbol = function (name) { - if (!has(WellKnownSymbolsStore, name)) { - if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; - else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; - }; - - var SPECIES = wellKnownSymbol('species'); - - // `ArraySpeciesCreate` abstract operation - // https://tc39.github.io/ecma262/#sec-arrayspeciescreate - var arraySpeciesCreate = function (originalArray, length) { - var C; - if (isArray(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - else if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); - }; - - var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; - - var process = global_1.process; - var versions = process && process.versions; - var v8 = versions && versions.v8; - var match, version; - - if (v8) { - match = v8.split('.'); - version = match[0] + match[1]; - } else if (engineUserAgent) { - match = engineUserAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = engineUserAgent.match(/Chrome\/(\d+)/); - if (match) version = match[1]; - } - } - - var engineV8Version = version && +version; - - var SPECIES$1 = wellKnownSymbol('species'); - - var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return engineV8Version >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES$1] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); - }; - - var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; - var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; - - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/679 - var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; - }); - - var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); - - var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); - }; - - var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; - - // `Array.prototype.concat` method - // https://tc39.github.io/ecma262/#sec-array.prototype.concat - // with adding support of @@isConcatSpreadable and @@species - _export({ target: 'Array', proto: true, forced: FORCED }, { - concat: function concat(arg) { // eslint-disable-line no-unused-vars - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = toLength(E.length); - if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); - } else { - if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - createProperty(A, n++, E); - } - } - A.length = n; - return A; - } - }); - - var aFunction$1 = function (it) { - if (typeof it != 'function') { - throw TypeError(String(it) + ' is not a function'); - } return it; - }; - - // optional / simple context binding - var functionBindContext = function (fn, that, length) { - aFunction$1(fn); - if (that === undefined) return fn; - switch (length) { - case 0: return function () { - return fn.call(that); - }; - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var push = [].push; - - // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation - var createMethod$1 = function (TYPE) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var IS_FILTER_OUT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject($this); - var self = indexedObject(O); - var boundFunction = functionBindContext(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push.call(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push.call(target, value); // filterOut - } - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; - }; - - var arrayIteration = { - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - forEach: createMethod$1(0), - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - map: createMethod$1(1), - // `Array.prototype.filter` method - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - filter: createMethod$1(2), - // `Array.prototype.some` method - // https://tc39.github.io/ecma262/#sec-array.prototype.some - some: createMethod$1(3), - // `Array.prototype.every` method - // https://tc39.github.io/ecma262/#sec-array.prototype.every - every: createMethod$1(4), - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - find: createMethod$1(5), - // `Array.prototype.findIndex` method - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6), - // `Array.prototype.filterOut` method - // https://github.com/tc39/proposal-array-filtering - filterOut: createMethod$1(7) - }; - - var arrayMethodIsStrict = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call,no-throw-literal - method.call(null, argument || function () { throw 1; }, 1); - }); - }; - - var defineProperty = Object.defineProperty; - var cache = {}; - - var thrower = function (it) { throw it; }; - - var arrayMethodUsesToLength = function (METHOD_NAME, options) { - if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; - if (!options) options = {}; - var method = [][METHOD_NAME]; - var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; - var argument0 = has(options, 0) ? options[0] : thrower; - var argument1 = has(options, 1) ? options[1] : undefined; - - return cache[METHOD_NAME] = !!method && !fails(function () { - if (ACCESSORS && !descriptors) return true; - var O = { length: -1 }; - - if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower }); - else O[1] = 1; - - method.call(O, argument0, argument1); - }); - }; - - var $forEach = arrayIteration.forEach; - - - - var STRICT_METHOD = arrayMethodIsStrict('forEach'); - var USES_TO_LENGTH = arrayMethodUsesToLength('forEach'); - - // `Array.prototype.forEach` method implementation - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } : [].forEach; - - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, { - forEach: arrayForEach - }); - - // `Object.keys` method - // https://tc39.github.io/ecma262/#sec-object.keys - var objectKeys = Object.keys || function keys(O) { - return objectKeysInternal(O, enumBugKeys); - }; - - // `Object.defineProperties` method - // https://tc39.github.io/ecma262/#sec-object.defineproperties - var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); - return O; - }; - - var html = getBuiltIn('document', 'documentElement'); - - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO = sharedKey('IE_PROTO'); - - var EmptyConstructor = function () { /* empty */ }; - - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; - }; - - // Create object with fake `null` prototype: use ActiveX Object with cleared prototype - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; - }; - - // Create object with fake `null` prototype: use iframe Object with cleared prototype - var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - - // Check for document.domain and active x support - // No need to use active x approach when document.domain is not set - // see https://github.com/es-shims/es5-shim/issues/150 - // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 - // avoid IE GC bug - var activeXDocument; - var NullProtoObject = function () { - try { - /* global ActiveXObject */ - activeXDocument = document.domain && new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; - - hiddenKeys[IE_PROTO] = true; - - // `Object.create` method - // https://tc39.github.io/ecma262/#sec-object.create - var objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : objectDefineProperties(result, Properties); - }; - - var UNSCOPABLES = wellKnownSymbol('unscopables'); - var ArrayPrototype = Array.prototype; - - // Array.prototype[@@unscopables] - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - if (ArrayPrototype[UNSCOPABLES] == undefined) { - objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { - configurable: true, - value: objectCreate(null) - }); - } - - // add a key to Array.prototype[@@unscopables] - var addToUnscopables = function (key) { - ArrayPrototype[UNSCOPABLES][key] = true; - }; - - var $includes = arrayIncludes.includes; - - - - var USES_TO_LENGTH$1 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); - - // `Array.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - _export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$1 }, { - includes: function includes(el /* , fromIndex = 0 */) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables('includes'); - - var MATCH = wellKnownSymbol('match'); - - // `IsRegExp` abstract operation - // https://tc39.github.io/ecma262/#sec-isregexp - var isRegexp = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); - }; - - var notARegexp = function (it) { - if (isRegexp(it)) { - throw TypeError("The method doesn't accept regular expressions"); - } return it; - }; - - var MATCH$1 = wellKnownSymbol('match'); - - var correctIsRegexpLogic = function (METHOD_NAME) { - var regexp = /./; - try { - '/./'[METHOD_NAME](regexp); - } catch (error1) { - try { - regexp[MATCH$1] = false; - return '/./'[METHOD_NAME](regexp); - } catch (error2) { /* empty */ } - } return false; - }; - - // `String.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-string.prototype.includes - _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { - includes: function includes(searchString /* , position = 0 */) { - return !!~String(requireObjectCoercible(this)) - .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // iterable DOM collections - // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods - var domIterables = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 - }; - - for (var COLLECTION_NAME in domIterables) { - var Collection = global_1[COLLECTION_NAME]; - var CollectionPrototype = Collection && Collection.prototype; - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { - createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); - } catch (error) { - CollectionPrototype.forEach = arrayForEach; - } - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return _possibleConstructorReturn(this, result); - }; - } - - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - - return object; - } - - function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - - return _get(target, property, receiver || target); - } - - /** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @update zhixin wen - */ - - var debounce = function debounce(func, wait) { - var timeout = 0; - return function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var later = function later() { - timeout = 0; - func.apply(void 0, args); - }; - - clearTimeout(timeout); - timeout = setTimeout(later, wait); - }; - }; - - $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { - mobileResponsive: false, - minWidth: 562, - minHeight: undefined, - heightThreshold: 100, - // just slightly larger than mobile chrome's auto-hiding toolbar - checkOnInit: true, - columnsHidden: [] - }); - - $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { - _inherits(_class, _$$BootstrapTable); - - var _super = _createSuper(_class); - - function _class() { - _classCallCheck(this, _class); - - return _super.apply(this, arguments); - } - - _createClass(_class, [{ - key: "init", - value: function init() { - var _get2, - _this = this; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args)); - - if (!this.options.mobileResponsive || !this.options.minWidth) { - return; - } - - if (this.options.minWidth < 100 && this.options.resizable) { - console.warn('The minWidth when the resizable extension is active should be greater or equal than 100'); - this.options.minWidth = 100; - } - - var old = { - width: $__default['default'](window).width(), - height: $__default['default'](window).height() - }; - $__default['default'](window).on('resize orientationchange', debounce(function () { - // reset view if height has only changed by at least the threshold. - var width = $__default['default'](window).width(); - var height = $__default['default'](window).height(); - var $activeElement = $__default['default'](document.activeElement); - - if ($activeElement.length && ['INPUT', 'SELECT', 'TEXTAREA'].includes($activeElement.prop('nodeName'))) { - return; - } - - if (Math.abs(old.height - height) > _this.options.heightThreshold || old.width !== width) { - _this.changeView(width, height); - - old = { - width: width, - height: height - }; - } - }, 200)); - - if (this.options.checkOnInit) { - var width = $__default['default'](window).width(); - var height = $__default['default'](window).height(); - this.changeView(width, height); - old = { - width: width, - height: height - }; - } - } - }, { - key: "conditionCardView", - value: function conditionCardView() { - this.changeTableView(false); - this.showHideColumns(false); - } - }, { - key: "conditionFullView", - value: function conditionFullView() { - this.changeTableView(true); - this.showHideColumns(true); - } - }, { - key: "changeTableView", - value: function changeTableView(cardViewState) { - this.options.cardView = cardViewState; - this.toggleView(); - } - }, { - key: "showHideColumns", - value: function showHideColumns(checked) { - var _this2 = this; - - if (this.options.columnsHidden.length > 0) { - this.columns.forEach(function (column) { - if (_this2.options.columnsHidden.includes(column.field)) { - if (column.visible !== checked) { - _this2._toggleColumn(_this2.fieldsColumnsIndex[column.field], checked, true); - } - } - }); - } - } - }, { - key: "changeView", - value: function changeView(width, height) { - if (this.options.minHeight) { - if (width <= this.options.minWidth && height <= this.options.minHeight) { - this.conditionCardView(); - } else if (width > this.options.minWidth && height > this.options.minHeight) { - this.conditionFullView(); - } - } else if (width <= this.options.minWidth) { - this.conditionCardView(); - } else if (width > this.options.minWidth) { - this.conditionFullView(); - } - - this.resetView(); - } - }]); - - return _class; - }($__default['default'].BootstrapTable); - -}))); - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : - typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); -}(this, (function ($) { 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var $__default = /*#__PURE__*/_interopDefaultLegacy($); - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var check = function (it) { - return it && it.Math == Math && it; - }; - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global_1 = - // eslint-disable-next-line no-undef - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - check(typeof self == 'object' && self) || - check(typeof commonjsGlobal == 'object' && commonjsGlobal) || - // eslint-disable-next-line no-new-func - (function () { return this; })() || Function('return this')(); - - var fails = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } - }; - - // Thank's IE8 for his funny defineProperty - var descriptors = !fails(function () { - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; - }); - - var nativePropertyIsEnumerable = {}.propertyIsEnumerable; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // Nashorn ~ JDK8 bug - var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); - - // `Object.prototype.propertyIsEnumerable` method implementation - // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable - var f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; - } : nativePropertyIsEnumerable; - - var objectPropertyIsEnumerable = { - f: f - }; - - var createPropertyDescriptor = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var toString = {}.toString; - - var classofRaw = function (it) { - return toString.call(it).slice(8, -1); - }; - - var split = ''.split; - - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var indexedObject = fails(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins - return !Object('z').propertyIsEnumerable(0); - }) ? function (it) { - return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); - } : Object; - - // `RequireObjectCoercible` abstract operation - // https://tc39.github.io/ecma262/#sec-requireobjectcoercible - var requireObjectCoercible = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; - }; - - // toObject with fallback for non-array-like ES3 strings - - - - var toIndexedObject = function (it) { - return indexedObject(requireObjectCoercible(it)); - }; - - var isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - // `ToPrimitive` abstract operation - // https://tc39.github.io/ecma262/#sec-toprimitive - // instead of the ES6 spec version, we didn't implement @@toPrimitive case - // and the second argument - flag - preferred type is a string - var toPrimitive = function (input, PREFERRED_STRING) { - if (!isObject(input)) return input; - var fn, val; - if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; - if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - throw TypeError("Can't convert object to primitive value"); - }; - - var hasOwnProperty = {}.hasOwnProperty; - - var has = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - var document$1 = global_1.document; - // typeof document.createElement is 'object' in old IE - var EXISTS = isObject(document$1) && isObject(document$1.createElement); - - var documentCreateElement = function (it) { - return EXISTS ? document$1.createElement(it) : {}; - }; - - // Thank's IE8 for his funny defineProperty - var ie8DomDefine = !descriptors && !fails(function () { - return Object.defineProperty(documentCreateElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; - }); - - var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // `Object.getOwnPropertyDescriptor` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor - var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPrimitive(P, true); - if (ie8DomDefine) try { - return nativeGetOwnPropertyDescriptor(O, P); - } catch (error) { /* empty */ } - if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); - }; - - var objectGetOwnPropertyDescriptor = { - f: f$1 - }; - - var anObject = function (it) { - if (!isObject(it)) { - throw TypeError(String(it) + ' is not an object'); - } return it; - }; - - var nativeDefineProperty = Object.defineProperty; - - // `Object.defineProperty` method - // https://tc39.github.io/ecma262/#sec-object.defineproperty - var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (ie8DomDefine) try { - return nativeDefineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; - }; - - var objectDefineProperty = { - f: f$2 - }; - - var createNonEnumerableProperty = descriptors ? function (object, key, value) { - return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var setGlobal = function (key, value) { - try { - createNonEnumerableProperty(global_1, key, value); - } catch (error) { - global_1[key] = value; - } return value; - }; - - var SHARED = '__core-js_shared__'; - var store = global_1[SHARED] || setGlobal(SHARED, {}); - - var sharedStore = store; - - var functionToString = Function.toString; - - // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper - if (typeof sharedStore.inspectSource != 'function') { - sharedStore.inspectSource = function (it) { - return functionToString.call(it); - }; - } - - var inspectSource = sharedStore.inspectSource; - - var WeakMap = global_1.WeakMap; - - var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); - - var shared = createCommonjsModule(function (module) { - (module.exports = function (key, value) { - return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: '3.8.1', - mode: 'global', - copyright: '© 2020 Denis Pushkarev (zloirock.ru)' - }); - }); - - var id = 0; - var postfix = Math.random(); - - var uid = function (key) { - return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); - }; - - var keys = shared('keys'); - - var sharedKey = function (key) { - return keys[key] || (keys[key] = uid(key)); - }; - - var hiddenKeys = {}; - - var WeakMap$1 = global_1.WeakMap; - var set, get, has$1; - - var enforce = function (it) { - return has$1(it) ? get(it) : set(it, {}); - }; - - var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; - }; - - if (nativeWeakMap) { - var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); - var wmget = store$1.get; - var wmhas = store$1.has; - var wmset = store$1.set; - set = function (it, metadata) { - metadata.facade = it; - wmset.call(store$1, it, metadata); - return metadata; - }; - get = function (it) { - return wmget.call(store$1, it) || {}; - }; - has$1 = function (it) { - return wmhas.call(store$1, it); - }; - } else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - metadata.facade = it; - createNonEnumerableProperty(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return has(it, STATE) ? it[STATE] : {}; - }; - has$1 = function (it) { - return has(it, STATE); - }; - } - - var internalState = { - set: set, - get: get, - has: has$1, - enforce: enforce, - getterFor: getterFor - }; - - var redefine = createCommonjsModule(function (module) { - var getInternalState = internalState.get; - var enforceInternalState = internalState.enforce; - var TEMPLATE = String(String).split('String'); - - (module.exports = function (O, key, value, options) { - var unsafe = options ? !!options.unsafe : false; - var simple = options ? !!options.enumerable : false; - var noTargetGet = options ? !!options.noTargetGet : false; - var state; - if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) { - createNonEnumerableProperty(value, 'name', key); - } - state = enforceInternalState(value); - if (!state.source) { - state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); - } - } - if (O === global_1) { - if (simple) O[key] = value; - else setGlobal(key, value); - return; - } else if (!unsafe) { - delete O[key]; - } else if (!noTargetGet && O[key]) { - simple = true; - } - if (simple) O[key] = value; - else createNonEnumerableProperty(O, key, value); - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, 'toString', function toString() { - return typeof this == 'function' && getInternalState(this).source || inspectSource(this); - }); - }); - - var path = global_1; - - var aFunction = function (variable) { - return typeof variable == 'function' ? variable : undefined; - }; - - var getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) - : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; - }; - - var ceil = Math.ceil; - var floor = Math.floor; - - // `ToInteger` abstract operation - // https://tc39.github.io/ecma262/#sec-tointeger - var toInteger = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); - }; - - var min = Math.min; - - // `ToLength` abstract operation - // https://tc39.github.io/ecma262/#sec-tolength - var toLength = function (argument) { - return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 - }; - - var max = Math.max; - var min$1 = Math.min; - - // Helper for a popular repeating case of the spec: - // Let integer be ? ToInteger(index). - // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). - var toAbsoluteIndex = function (index, length) { - var integer = toInteger(index); - return integer < 0 ? max(integer + length, 0) : min$1(integer, length); - }; - - // `Array.prototype.{ indexOf, includes }` methods implementation - var createMethod = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; - }; - - var arrayIncludes = { - // `Array.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - includes: createMethod(true), - // `Array.prototype.indexOf` method - // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - indexOf: createMethod(false) - }; - - var indexOf = arrayIncludes.indexOf; - - - var objectKeysInternal = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~indexOf(result, key) || result.push(key); - } - return result; - }; - - // IE8- don't enum bug keys - var enumBugKeys = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - - var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); - - // `Object.getOwnPropertyNames` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertynames - var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return objectKeysInternal(O, hiddenKeys$1); - }; - - var objectGetOwnPropertyNames = { - f: f$3 - }; - - var f$4 = Object.getOwnPropertySymbols; - - var objectGetOwnPropertySymbols = { - f: f$4 - }; - - // all object keys, includes non-enumerable and symbols - var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = objectGetOwnPropertyNames.f(anObject(it)); - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; - }; - - var copyConstructorProperties = function (target, source) { - var keys = ownKeys(source); - var defineProperty = objectDefineProperty.f; - var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - }; - - var replacement = /#|\.prototype\./; - - var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : typeof detection == 'function' ? fails(detection) - : !!detection; - }; - - var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); - }; - - var data = isForced.data = {}; - var NATIVE = isForced.NATIVE = 'N'; - var POLYFILL = isForced.POLYFILL = 'P'; - - var isForced_1 = isForced; - - var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; - - - - - - - /* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.noTargetGet - prevent calling a getter on target - */ - var _export = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global_1; - } else if (STATIC) { - target = global_1[TARGET] || setGlobal(TARGET, {}); - } else { - target = (global_1[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.noTargetGet) { - descriptor = getOwnPropertyDescriptor$1(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty === typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - // extend global - redefine(target, key, sourceProperty, options); - } - }; - - // `IsArray` abstract operation - // https://tc39.github.io/ecma262/#sec-isarray - var isArray = Array.isArray || function isArray(arg) { - return classofRaw(arg) == 'Array'; - }; - - // `ToObject` abstract operation - // https://tc39.github.io/ecma262/#sec-toobject - var toObject = function (argument) { - return Object(requireObjectCoercible(argument)); - }; - - var createProperty = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; - }; - - var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { - // Chrome 38 Symbol has incorrect toString conversion - // eslint-disable-next-line no-undef - return !String(Symbol()); - }); - - var useSymbolAsUid = nativeSymbol - // eslint-disable-next-line no-undef - && !Symbol.sham - // eslint-disable-next-line no-undef - && typeof Symbol.iterator == 'symbol'; - - var WellKnownSymbolsStore = shared('wks'); - var Symbol$1 = global_1.Symbol; - var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; - - var wellKnownSymbol = function (name) { - if (!has(WellKnownSymbolsStore, name)) { - if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; - else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; - }; - - var SPECIES = wellKnownSymbol('species'); - - // `ArraySpeciesCreate` abstract operation - // https://tc39.github.io/ecma262/#sec-arrayspeciescreate - var arraySpeciesCreate = function (originalArray, length) { - var C; - if (isArray(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - else if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); - }; - - var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; - - var process = global_1.process; - var versions = process && process.versions; - var v8 = versions && versions.v8; - var match, version; - - if (v8) { - match = v8.split('.'); - version = match[0] + match[1]; - } else if (engineUserAgent) { - match = engineUserAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = engineUserAgent.match(/Chrome\/(\d+)/); - if (match) version = match[1]; - } - } - - var engineV8Version = version && +version; - - var SPECIES$1 = wellKnownSymbol('species'); - - var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return engineV8Version >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES$1] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); - }; - - var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; - var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; - - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/679 - var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; - }); - - var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); - - var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); - }; - - var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; - - // `Array.prototype.concat` method - // https://tc39.github.io/ecma262/#sec-array.prototype.concat - // with adding support of @@isConcatSpreadable and @@species - _export({ target: 'Array', proto: true, forced: FORCED }, { - concat: function concat(arg) { // eslint-disable-line no-unused-vars - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = toLength(E.length); - if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); - } else { - if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - createProperty(A, n++, E); - } - } - A.length = n; - return A; - } - }); - - var aFunction$1 = function (it) { - if (typeof it != 'function') { - throw TypeError(String(it) + ' is not a function'); - } return it; - }; - - // optional / simple context binding - var functionBindContext = function (fn, that, length) { - aFunction$1(fn); - if (that === undefined) return fn; - switch (length) { - case 0: return function () { - return fn.call(that); - }; - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var push = [].push; - - // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation - var createMethod$1 = function (TYPE) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var IS_FILTER_OUT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject($this); - var self = indexedObject(O); - var boundFunction = functionBindContext(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push.call(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push.call(target, value); // filterOut - } - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; - }; - - var arrayIteration = { - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - forEach: createMethod$1(0), - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - map: createMethod$1(1), - // `Array.prototype.filter` method - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - filter: createMethod$1(2), - // `Array.prototype.some` method - // https://tc39.github.io/ecma262/#sec-array.prototype.some - some: createMethod$1(3), - // `Array.prototype.every` method - // https://tc39.github.io/ecma262/#sec-array.prototype.every - every: createMethod$1(4), - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - find: createMethod$1(5), - // `Array.prototype.findIndex` method - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6), - // `Array.prototype.filterOut` method - // https://github.com/tc39/proposal-array-filtering - filterOut: createMethod$1(7) - }; - - // `Object.keys` method - // https://tc39.github.io/ecma262/#sec-object.keys - var objectKeys = Object.keys || function keys(O) { - return objectKeysInternal(O, enumBugKeys); - }; - - // `Object.defineProperties` method - // https://tc39.github.io/ecma262/#sec-object.defineproperties - var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); - return O; - }; - - var html = getBuiltIn('document', 'documentElement'); - - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO = sharedKey('IE_PROTO'); - - var EmptyConstructor = function () { /* empty */ }; - - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; - }; - - // Create object with fake `null` prototype: use ActiveX Object with cleared prototype - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; - }; - - // Create object with fake `null` prototype: use iframe Object with cleared prototype - var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - - // Check for document.domain and active x support - // No need to use active x approach when document.domain is not set - // see https://github.com/es-shims/es5-shim/issues/150 - // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 - // avoid IE GC bug - var activeXDocument; - var NullProtoObject = function () { - try { - /* global ActiveXObject */ - activeXDocument = document.domain && new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; - - hiddenKeys[IE_PROTO] = true; - - // `Object.create` method - // https://tc39.github.io/ecma262/#sec-object.create - var objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : objectDefineProperties(result, Properties); - }; - - var UNSCOPABLES = wellKnownSymbol('unscopables'); - var ArrayPrototype = Array.prototype; - - // Array.prototype[@@unscopables] - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - if (ArrayPrototype[UNSCOPABLES] == undefined) { - objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { - configurable: true, - value: objectCreate(null) - }); - } - - // add a key to Array.prototype[@@unscopables] - var addToUnscopables = function (key) { - ArrayPrototype[UNSCOPABLES][key] = true; - }; - - var defineProperty = Object.defineProperty; - var cache = {}; - - var thrower = function (it) { throw it; }; - - var arrayMethodUsesToLength = function (METHOD_NAME, options) { - if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; - if (!options) options = {}; - var method = [][METHOD_NAME]; - var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; - var argument0 = has(options, 0) ? options[0] : thrower; - var argument1 = has(options, 1) ? options[1] : undefined; - - return cache[METHOD_NAME] = !!method && !fails(function () { - if (ACCESSORS && !descriptors) return true; - var O = { length: -1 }; - - if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower }); - else O[1] = 1; - - method.call(O, argument0, argument1); - }); - }; - - var $find = arrayIteration.find; - - - - var FIND = 'find'; - var SKIPS_HOLES = true; - - var USES_TO_LENGTH = arrayMethodUsesToLength(FIND); - - // Shouldn't skip holes - if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); - - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - _export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables(FIND); - - var arrayMethodIsStrict = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call,no-throw-literal - method.call(null, argument || function () { throw 1; }, 1); - }); - }; - - var $forEach = arrayIteration.forEach; - - - - var STRICT_METHOD = arrayMethodIsStrict('forEach'); - var USES_TO_LENGTH$1 = arrayMethodUsesToLength('forEach'); - - // `Array.prototype.forEach` method implementation - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$1) ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } : [].forEach; - - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, { - forEach: arrayForEach - }); - - var nativeJoin = [].join; - - var ES3_STRINGS = indexedObject != Object; - var STRICT_METHOD$1 = arrayMethodIsStrict('join', ','); - - // `Array.prototype.join` method - // https://tc39.github.io/ecma262/#sec-array.prototype.join - _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, { - join: function join(separator) { - return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); - } - }); - - var $map = arrayIteration.map; - - - - var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); - // FF49- issue - var USES_TO_LENGTH$2 = arrayMethodUsesToLength('map'); - - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$2 }, { - map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice'); - var USES_TO_LENGTH$3 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 }); - - var SPECIES$2 = wellKnownSymbol('species'); - var nativeSlice = [].slice; - var max$1 = Math.max; - - // `Array.prototype.slice` method - // https://tc39.github.io/ecma262/#sec-array.prototype.slice - // fallback for not array-like ES3 strings and DOM objects - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, { - slice: function slice(start, end) { - var O = toIndexedObject(this); - var length = toLength(O.length); - var k = toAbsoluteIndex(start, length); - var fin = toAbsoluteIndex(end === undefined ? length : end, length); - // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible - var Constructor, result, n; - if (isArray(O)) { - Constructor = O.constructor; - // cross-realm fallback - if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { - Constructor = undefined; - } else if (isObject(Constructor)) { - Constructor = Constructor[SPECIES$2]; - if (Constructor === null) Constructor = undefined; - } - if (Constructor === Array || Constructor === undefined) { - return nativeSlice.call(O, k, fin); - } - } - result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0)); - for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); - result.length = n; - return result; - } - }); - - var nativeAssign = Object.assign; - var defineProperty$1 = Object.defineProperty; - - // `Object.assign` method - // https://tc39.github.io/ecma262/#sec-object.assign - var objectAssign = !nativeAssign || fails(function () { - // should have correct order of operations (Edge bug) - if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', { - enumerable: true, - get: function () { - defineProperty$1(this, 'b', { - value: 3, - enumerable: false - }); - } - }), { b: 2 })).b !== 1) return true; - // should work with symbols and should have deterministic property order (V8 bug) - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var symbol = Symbol(); - var alphabet = 'abcdefghijklmnopqrst'; - A[symbol] = 7; - alphabet.split('').forEach(function (chr) { B[chr] = chr; }); - return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; - }) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var argumentsLength = arguments.length; - var index = 1; - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - var propertyIsEnumerable = objectPropertyIsEnumerable.f; - while (argumentsLength > index) { - var S = indexedObject(arguments[index++]); - var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - key = keys[j++]; - if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; - } - } return T; - } : nativeAssign; - - // `Object.assign` method - // https://tc39.github.io/ecma262/#sec-object.assign - _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { - assign: objectAssign - }); - - // `RegExp.prototype.flags` getter implementation - // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags - var regexpFlags = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.dotAll) result += 's'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; - }; - - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, - // so we use an intermediate function. - function RE(s, f) { - return RegExp(s, f); - } - - var UNSUPPORTED_Y = fails(function () { - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError - var re = RE('a', 'y'); - re.lastIndex = 2; - return re.exec('abcd') != null; - }); - - var BROKEN_CARET = fails(function () { - // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 - var re = RE('^r', 'gy'); - re.lastIndex = 2; - return re.exec('str') != null; - }); - - var regexpStickyHelpers = { - UNSUPPORTED_Y: UNSUPPORTED_Y, - BROKEN_CARET: BROKEN_CARET - }; - - var nativeExec = RegExp.prototype.exec; - // This always refers to the native implementation, because the - // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, - // which loads this file before patching the method. - var nativeReplace = String.prototype.replace; - - var patchedExec = nativeExec; - - var UPDATES_LAST_INDEX_WRONG = (function () { - var re1 = /a/; - var re2 = /b*/g; - nativeExec.call(re1, 'a'); - nativeExec.call(re2, 'a'); - return re1.lastIndex !== 0 || re2.lastIndex !== 0; - })(); - - var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET; - - // nonparticipating capturing group, copied from es5-shim's String#split patch. - var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - - var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1; - - if (PATCH) { - patchedExec = function exec(str) { - var re = this; - var lastIndex, reCopy, match, i; - var sticky = UNSUPPORTED_Y$1 && re.sticky; - var flags = regexpFlags.call(re); - var source = re.source; - var charsAdded = 0; - var strCopy = str; - - if (sticky) { - flags = flags.replace('y', ''); - if (flags.indexOf('g') === -1) { - flags += 'g'; - } - - strCopy = String(str).slice(re.lastIndex); - // Support anchored sticky behavior. - if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { - source = '(?: ' + source + ')'; - strCopy = ' ' + strCopy; - charsAdded++; - } - // ^(? + rx + ) is needed, in combination with some str slicing, to - // simulate the 'y' flag. - reCopy = new RegExp('^(?:' + source + ')', flags); - } - - if (NPCG_INCLUDED) { - reCopy = new RegExp('^' + source + '$(?!\\s)', flags); - } - if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; - - match = nativeExec.call(sticky ? reCopy : re, strCopy); - - if (sticky) { - if (match) { - match.input = match.input.slice(charsAdded); - match[0] = match[0].slice(charsAdded); - match.index = re.lastIndex; - re.lastIndex += match[0].length; - } else re.lastIndex = 0; - } else if (UPDATES_LAST_INDEX_WRONG && match) { - re.lastIndex = re.global ? match.index + match[0].length : lastIndex; - } - if (NPCG_INCLUDED && match && match.length > 1) { - // Fix browsers whose `exec` methods don't consistently return `undefined` - // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ - nativeReplace.call(match[0], reCopy, function () { - for (i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) match[i] = undefined; - } - }); - } - - return match; - }; - } - - var regexpExec = patchedExec; - - _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { - exec: regexpExec - }); - - // TODO: Remove from `core-js@4` since it's moved to entry points - - - - - - - - var SPECIES$3 = wellKnownSymbol('species'); - - var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { - // #replace needs built-in support for named groups. - // #match works fine because it just return the exec results, even if it has - // a "grops" property. - var re = /./; - re.exec = function () { - var result = []; - result.groups = { a: '7' }; - return result; - }; - return ''.replace(re, '$') !== '7'; - }); - - // IE <= 11 replaces $0 with the whole match, as if it was $& - // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 - var REPLACE_KEEPS_$0 = (function () { - return 'a'.replace(/./, '$0') === '$0'; - })(); - - var REPLACE = wellKnownSymbol('replace'); - // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { - if (/./[REPLACE]) { - return /./[REPLACE]('a', '$0') === ''; - } - return false; - })(); - - // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec - // Weex JS has frozen built-in prototypes, so use try / catch wrapper - var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { - var re = /(?:)/; - var originalExec = re.exec; - re.exec = function () { return originalExec.apply(this, arguments); }; - var result = 'ab'.split(re); - return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; - }); - - var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { - var SYMBOL = wellKnownSymbol(KEY); - - var DELEGATES_TO_SYMBOL = !fails(function () { - // String methods call symbol-named RegEp methods - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - }); - - var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { - // Symbol-named RegExp methods call .exec - var execCalled = false; - var re = /a/; - - if (KEY === 'split') { - // We can't use real regex here since it causes deoptimization - // and serious performance degradation in V8 - // https://github.com/zloirock/core-js/issues/306 - re = {}; - // RegExp[@@split] doesn't call the regex's exec method, but first creates - // a new one. We need to return the patched regex when creating the new one. - re.constructor = {}; - re.constructor[SPECIES$3] = function () { return re; }; - re.flags = ''; - re[SYMBOL] = /./[SYMBOL]; - } - - re.exec = function () { execCalled = true; return null; }; - - re[SYMBOL](''); - return !execCalled; - }); - - if ( - !DELEGATES_TO_SYMBOL || - !DELEGATES_TO_EXEC || - (KEY === 'replace' && !( - REPLACE_SUPPORTS_NAMED_GROUPS && - REPLACE_KEEPS_$0 && - !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - )) || - (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) - ) { - var nativeRegExpMethod = /./[SYMBOL]; - var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { - if (regexp.exec === regexpExec) { - if (DELEGATES_TO_SYMBOL && !forceStringMethod) { - // The native String method already delegates to @@method (this - // polyfilled function), leasing to infinite recursion. - // We avoid it by directly calling the native @@method method. - return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; - } - return { done: true, value: nativeMethod.call(str, regexp, arg2) }; - } - return { done: false }; - }, { - REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, - REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - }); - var stringMethod = methods[0]; - var regexMethod = methods[1]; - - redefine(String.prototype, KEY, stringMethod); - redefine(RegExp.prototype, SYMBOL, length == 2 - // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) - // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function (string, arg) { return regexMethod.call(string, this, arg); } - // 21.2.5.6 RegExp.prototype[@@match](string) - // 21.2.5.9 RegExp.prototype[@@search](string) - : function (string) { return regexMethod.call(string, this); } - ); - } - - if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); - }; - - // `String.prototype.{ codePointAt, at }` methods implementation - var createMethod$2 = function (CONVERT_TO_STRING) { - return function ($this, pos) { - var S = String(requireObjectCoercible($this)); - var position = toInteger(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = S.charCodeAt(position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING ? S.charAt(position) : first - : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; - }; - }; - - var stringMultibyte = { - // `String.prototype.codePointAt` method - // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat - codeAt: createMethod$2(false), - // `String.prototype.at` method - // https://github.com/mathiasbynens/String.prototype.at - charAt: createMethod$2(true) - }; - - var charAt = stringMultibyte.charAt; - - // `AdvanceStringIndex` abstract operation - // https://tc39.github.io/ecma262/#sec-advancestringindex - var advanceStringIndex = function (S, index, unicode) { - return index + (unicode ? charAt(S, index).length : 1); - }; - - // `RegExpExec` abstract operation - // https://tc39.github.io/ecma262/#sec-regexpexec - var regexpExecAbstract = function (R, S) { - var exec = R.exec; - if (typeof exec === 'function') { - var result = exec.call(R, S); - if (typeof result !== 'object') { - throw TypeError('RegExp exec method returned something other than an Object or null'); - } - return result; - } - - if (classofRaw(R) !== 'RegExp') { - throw TypeError('RegExp#exec called on incompatible receiver'); - } - - return regexpExec.call(R, S); - }; - - var max$2 = Math.max; - var min$2 = Math.min; - var floor$1 = Math.floor; - var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g; - var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g; - - var maybeToString = function (it) { - return it === undefined ? it : String(it); - }; - - // @@replace logic - fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; - var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; - var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; - - return [ - // `String.prototype.replace` method - // https://tc39.github.io/ecma262/#sec-string.prototype.replace - function replace(searchValue, replaceValue) { - var O = requireObjectCoercible(this); - var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; - return replacer !== undefined - ? replacer.call(searchValue, O, replaceValue) - : nativeReplace.call(String(O), searchValue, replaceValue); - }, - // `RegExp.prototype[@@replace]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace - function (regexp, replaceValue) { - if ( - (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || - (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) - ) { - var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); - if (res.done) return res.value; - } - - var rx = anObject(regexp); - var S = String(this); - - var functionalReplace = typeof replaceValue === 'function'; - if (!functionalReplace) replaceValue = String(replaceValue); - - var global = rx.global; - if (global) { - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - } - var results = []; - while (true) { - var result = regexpExecAbstract(rx, S); - if (result === null) break; - - results.push(result); - if (!global) break; - - var matchStr = String(result[0]); - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - } - - var accumulatedResult = ''; - var nextSourcePosition = 0; - for (var i = 0; i < results.length; i++) { - result = results[i]; - - var matched = String(result[0]); - var position = max$2(min$2(toInteger(result.index), S.length), 0); - var captures = []; - // NOTE: This is equivalent to - // captures = result.slice(1).map(maybeToString) - // but for some reason `nativeSlice.call(result, 1, result.length)` (called in - // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and - // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. - for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); - var namedCaptures = result.groups; - if (functionalReplace) { - var replacerArgs = [matched].concat(captures, position, S); - if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); - var replacement = String(replaceValue.apply(undefined, replacerArgs)); - } else { - replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); - } - if (position >= nextSourcePosition) { - accumulatedResult += S.slice(nextSourcePosition, position) + replacement; - nextSourcePosition = position + matched.length; - } - } - return accumulatedResult + S.slice(nextSourcePosition); - } - ]; - - // https://tc39.github.io/ecma262/#sec-getsubstitution - function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { - var tailPos = position + matched.length; - var m = captures.length; - var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; - if (namedCaptures !== undefined) { - namedCaptures = toObject(namedCaptures); - symbols = SUBSTITUTION_SYMBOLS; - } - return nativeReplace.call(replacement, symbols, function (match, ch) { - var capture; - switch (ch.charAt(0)) { - case '$': return '$'; - case '&': return matched; - case '`': return str.slice(0, position); - case "'": return str.slice(tailPos); - case '<': - capture = namedCaptures[ch.slice(1, -1)]; - break; - default: // \d\d? - var n = +ch; - if (n === 0) return match; - if (n > m) { - var f = floor$1(n / 10); - if (f === 0) return match; - if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); - return match; - } - capture = captures[n - 1]; - } - return capture === undefined ? '' : capture; - }); - } - }); - - var MATCH = wellKnownSymbol('match'); - - // `IsRegExp` abstract operation - // https://tc39.github.io/ecma262/#sec-isregexp - var isRegexp = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); - }; - - var SPECIES$4 = wellKnownSymbol('species'); - - // `SpeciesConstructor` abstract operation - // https://tc39.github.io/ecma262/#sec-speciesconstructor - var speciesConstructor = function (O, defaultConstructor) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES$4]) == undefined ? defaultConstructor : aFunction$1(S); - }; - - var arrayPush = [].push; - var min$3 = Math.min; - var MAX_UINT32 = 0xFFFFFFFF; - - // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError - var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); - - // @@split logic - fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { - var internalSplit; - if ( - 'abbc'.split(/(b)*/)[1] == 'c' || - 'test'.split(/(?:)/, -1).length != 4 || - 'ab'.split(/(?:ab)*/).length != 2 || - '.'.split(/(.?)(.?)/).length != 4 || - '.'.split(/()()/).length > 1 || - ''.split(/.?/).length - ) { - // based on es5-shim implementation, need to rework it - internalSplit = function (separator, limit) { - var string = String(requireObjectCoercible(this)); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (separator === undefined) return [string]; - // If `separator` is not a regex, use native split - if (!isRegexp(separator)) { - return nativeSplit.call(string, separator, lim); - } - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''); - var lastLastIndex = 0; - // Make `global` and avoid `lastIndex` issues by working with a copy - var separatorCopy = new RegExp(separator.source, flags + 'g'); - var match, lastIndex, lastLength; - while (match = regexpExec.call(separatorCopy, string)) { - lastIndex = separatorCopy.lastIndex; - if (lastIndex > lastLastIndex) { - output.push(string.slice(lastLastIndex, match.index)); - if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); - lastLength = match[0].length; - lastLastIndex = lastIndex; - if (output.length >= lim) break; - } - if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop - } - if (lastLastIndex === string.length) { - if (lastLength || !separatorCopy.test('')) output.push(''); - } else output.push(string.slice(lastLastIndex)); - return output.length > lim ? output.slice(0, lim) : output; - }; - // Chakra, V8 - } else if ('0'.split(undefined, 0).length) { - internalSplit = function (separator, limit) { - return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); - }; - } else internalSplit = nativeSplit; - - return [ - // `String.prototype.split` method - // https://tc39.github.io/ecma262/#sec-string.prototype.split - function split(separator, limit) { - var O = requireObjectCoercible(this); - var splitter = separator == undefined ? undefined : separator[SPLIT]; - return splitter !== undefined - ? splitter.call(separator, O, limit) - : internalSplit.call(String(O), separator, limit); - }, - // `RegExp.prototype[@@split]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split - // - // NOTE: This cannot be properly polyfilled in engines that don't support - // the 'y' flag. - function (regexp, limit) { - var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - var C = speciesConstructor(rx, RegExp); - - var unicodeMatching = rx.unicode; - var flags = (rx.ignoreCase ? 'i' : '') + - (rx.multiline ? 'm' : '') + - (rx.unicode ? 'u' : '') + - (SUPPORTS_Y ? 'y' : 'g'); - - // ^(? + rx + ) is needed, in combination with some S slicing, to - // simulate the 'y' flag. - var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; - var p = 0; - var q = 0; - var A = []; - while (q < S.length) { - splitter.lastIndex = SUPPORTS_Y ? q : 0; - var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q)); - var e; - if ( - z === null || - (e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p - ) { - q = advanceStringIndex(S, q, unicodeMatching); - } else { - A.push(S.slice(p, q)); - if (A.length === lim) return A; - for (var i = 1; i <= z.length - 1; i++) { - A.push(z[i]); - if (A.length === lim) return A; - } - q = p = e; - } - } - A.push(S.slice(p)); - return A; - } - ]; - }, !SUPPORTS_Y); - - // iterable DOM collections - // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods - var domIterables = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 - }; - - for (var COLLECTION_NAME in domIterables) { - var Collection = global_1[COLLECTION_NAME]; - var CollectionPrototype = Collection && Collection.prototype; - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { - createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); - } catch (error) { - CollectionPrototype.forEach = arrayForEach; - } - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return _possibleConstructorReturn(this, result); - }; - } - - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - - return object; - } - - function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - - return _get(target, property, receiver || target); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - - /** - * @author zhixin wen - * extensions: https://github.com/hhurz/tableExport.jquery.plugin - */ - - var Utils = $__default['default'].fn.bootstrapTable.utils; - var TYPE_NAME = { - json: 'JSON', - xml: 'XML', - png: 'PNG', - csv: 'CSV', - txt: 'TXT', - sql: 'SQL', - doc: 'MS-Word', - excel: 'MS-Excel', - xlsx: 'MS-Excel (OpenXML)', - powerpoint: 'MS-Powerpoint', - pdf: 'PDF' - }; - $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { - showExport: false, - exportDataType: 'basic', - // basic, all, selected - exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'], - exportOptions: { - onCellHtmlData: function onCellHtmlData(cell, rowIndex, colIndex, htmlData) { - if (cell.is('th')) { - return cell.find('.th-inner').text(); - } - - return htmlData; - } - }, - exportFooter: false - }); - $__default['default'].extend($__default['default'].fn.bootstrapTable.columnDefaults, { - forceExport: false, - forceHide: false - }); - $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, { - export: { - bootstrap3: 'glyphicon-export icon-share', - materialize: 'file_download', - 'bootstrap-table': 'icon-download' - }[$__default['default'].fn.bootstrapTable.theme] || 'fa-download' - }); - $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, { - formatExport: function formatExport() { - return 'Export data'; - } - }); - $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales); - $__default['default'].fn.bootstrapTable.methods.push('exportTable'); - $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { - // eslint-disable-next-line no-unused-vars - onExportSaved: function onExportSaved(exportedRows) { - return false; - } - }); - $__default['default'].extend($__default['default'].fn.bootstrapTable.Constructor.EVENTS, { - 'export-saved.bs.table': 'onExportSaved' - }); - - $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { - _inherits(_class, _$$BootstrapTable); - - var _super = _createSuper(_class); - - function _class() { - _classCallCheck(this, _class); - - return _super.apply(this, arguments); - } - - _createClass(_class, [{ - key: "initToolbar", - value: function initToolbar() { - var _get2, - _this = this; - - var o = this.options; - var exportTypes = o.exportTypes; - this.showToolbar = this.showToolbar || o.showExport; - - if (this.options.showExport) { - if (typeof exportTypes === 'string') { - var types = exportTypes.slice(1, -1).replace(/ /g, '').split(','); - exportTypes = types.map(function (t) { - return t.slice(1, -1); - }); - } - - this.$export = this.$toolbar.find('>.columns div.export'); - - if (this.$export.length) { - this.updateExportButton(); - return; - } - - this.buttons = Object.assign(this.buttons, { - export: { - html: exportTypes.length === 1 ? "\n
\n \n
\n ") : "\n
\n \n
\n ") - } - }); - } - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args)); - - this.$export = this.$toolbar.find('>.columns div.export'); - - if (!this.options.showExport) { - return; - } - - var $menu = $__default['default'](this.constants.html.toolbarDropdown.join('')); - var $items = this.$export; - - if (exportTypes.length > 1) { - this.$export.append($menu); // themes support - - if ($menu.children().length) { - $menu = $menu.children().eq(0); - } - - var _iterator = _createForOfIteratorHelper(exportTypes), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var type = _step.value; - - if (TYPE_NAME.hasOwnProperty(type)) { - var $item = $__default['default'](Utils.sprintf(this.constants.html.pageDropdownItem, '', TYPE_NAME[type])); - $item.attr('data-type', type); - $menu.append($item); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - - $items = $menu.children(); - } - - this.updateExportButton(); - $items.click(function (e) { - e.preventDefault(); - var type = $__default['default'](e.currentTarget).data('type'); - var exportOptions = { - type: type, - escape: false - }; - - _this.exportTable(exportOptions); - }); - this.handleToolbar(); - } - }, { - key: "handleToolbar", - value: function handleToolbar() { - if (!this.$export) { - return; - } - - if (_get(_getPrototypeOf(_class.prototype), "handleToolbar", this)) { - _get(_getPrototypeOf(_class.prototype), "handleToolbar", this).call(this); - } - } - }, { - key: "exportTable", - value: function exportTable(options) { - var _this2 = this; - - var o = this.options; - var stateField = this.header.stateField; - var isCardView = o.cardView; - - var doExport = function doExport(callback) { - if (stateField) { - _this2.hideColumn(stateField); - } - - if (isCardView) { - _this2.toggleView(); - } - - _this2.columns.forEach(function (row) { - if (row.forceHide) { - _this2.hideColumn(row.field); - } - }); - - var data = _this2.getData(); - - if (o.detailView && o.detailViewIcon) { - var detailViewIndex = o.detailViewAlign === 'left' ? 0 : _this2.getVisibleFields().length + Utils.getDetailViewIndexOffset(_this2.options); - o.exportOptions.ignoreColumn = [detailViewIndex].concat(o.exportOptions.ignoreColumn || []); - } - - if (o.exportFooter) { - var $footerRow = _this2.$tableFooter.find('tr').first(); - - var footerData = {}; - var footerHtml = []; - $__default['default'].each($footerRow.children(), function (index, footerCell) { - var footerCellHtml = $__default['default'](footerCell).children('.th-inner').first().html(); - footerData[_this2.columns[index].field] = footerCellHtml === ' ' ? null : footerCellHtml; // grab footer cell text into cell index-based array - - footerHtml.push(footerCellHtml); - }); - - _this2.$body.append(_this2.$body.children().last()[0].outerHTML); - - var $lastTableRow = _this2.$body.children().last(); - - $__default['default'].each($lastTableRow.children(), function (index, lastTableRowCell) { - $__default['default'](lastTableRowCell).html(footerHtml[index]); - }); - } - - var hiddenColumns = _this2.getHiddenColumns(); - - hiddenColumns.forEach(function (row) { - if (row.forceExport) { - _this2.showColumn(row.field); - } - }); - - if (typeof o.exportOptions.fileName === 'function') { - options.fileName = o.exportOptions.fileName(); - } - - _this2.$el.tableExport($__default['default'].extend({ - onAfterSaveToFile: function onAfterSaveToFile() { - if (o.exportFooter) { - _this2.load(data); - } - - if (stateField) { - _this2.showColumn(stateField); - } - - if (isCardView) { - _this2.toggleView(); - } - - hiddenColumns.forEach(function (row) { - if (row.forceExport) { - _this2.hideColumn(row.field); - } - }); - - _this2.columns.forEach(function (row) { - if (row.forceHide) { - _this2.showColumn(row.field); - } - }); - - if (callback) callback(); - } - }, o.exportOptions, options)); - }; - - if (o.exportDataType === 'all' && o.pagination) { - var eventName = o.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table'; - var virtualScroll = this.options.virtualScroll; - this.$el.one(eventName, function () { - setTimeout(function () { - doExport(function () { - _this2.options.virtualScroll = virtualScroll; - - _this2.togglePagination(); - }); - }, 0); - }); - this.options.virtualScroll = false; - this.togglePagination(); - this.trigger('export-saved', this.getData()); - } else if (o.exportDataType === 'selected') { - var data = this.getData(); - var selectedData = this.getSelections(); - var pagination = o.pagination; - - if (!selectedData.length) { - return; - } - - if (o.sidePagination === 'server') { - data = _defineProperty({ - total: o.totalRows - }, this.options.dataField, data); - selectedData = _defineProperty({ - total: selectedData.length - }, this.options.dataField, selectedData); - } - - this.load(selectedData); - - if (pagination) { - this.togglePagination(); - } - - doExport(function () { - if (pagination) { - _this2.togglePagination(); - } - - _this2.load(data); - }); - this.trigger('export-saved', selectedData); - } else { - doExport(); - this.trigger('export-saved', this.getData(true)); - } - } - }, { - key: "updateSelected", - value: function updateSelected() { - _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this); - - this.updateExportButton(); - } - }, { - key: "updateExportButton", - value: function updateExportButton() { - if (this.options.exportDataType === 'selected') { - this.$export.find('> button').prop('disabled', !this.getSelections().length); - } - } - }]); - - return _class; - }($__default['default'].BootstrapTable); - -}))); - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) : - typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery)); -}(this, (function ($) { 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var $__default = /*#__PURE__*/_interopDefaultLegacy($); - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var check = function (it) { - return it && it.Math == Math && it; - }; - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global_1 = - // eslint-disable-next-line no-undef - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - check(typeof self == 'object' && self) || - check(typeof commonjsGlobal == 'object' && commonjsGlobal) || - // eslint-disable-next-line no-new-func - (function () { return this; })() || Function('return this')(); - - var fails = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } - }; - - // Thank's IE8 for his funny defineProperty - var descriptors = !fails(function () { - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; - }); - - var nativePropertyIsEnumerable = {}.propertyIsEnumerable; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // Nashorn ~ JDK8 bug - var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); - - // `Object.prototype.propertyIsEnumerable` method implementation - // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable - var f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; - } : nativePropertyIsEnumerable; - - var objectPropertyIsEnumerable = { - f: f - }; - - var createPropertyDescriptor = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var toString = {}.toString; - - var classofRaw = function (it) { - return toString.call(it).slice(8, -1); - }; - - var split = ''.split; - - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var indexedObject = fails(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins - return !Object('z').propertyIsEnumerable(0); - }) ? function (it) { - return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); - } : Object; - - // `RequireObjectCoercible` abstract operation - // https://tc39.github.io/ecma262/#sec-requireobjectcoercible - var requireObjectCoercible = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; - }; - - // toObject with fallback for non-array-like ES3 strings - - - - var toIndexedObject = function (it) { - return indexedObject(requireObjectCoercible(it)); - }; - - var isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - // `ToPrimitive` abstract operation - // https://tc39.github.io/ecma262/#sec-toprimitive - // instead of the ES6 spec version, we didn't implement @@toPrimitive case - // and the second argument - flag - preferred type is a string - var toPrimitive = function (input, PREFERRED_STRING) { - if (!isObject(input)) return input; - var fn, val; - if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; - if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - throw TypeError("Can't convert object to primitive value"); - }; - - var hasOwnProperty = {}.hasOwnProperty; - - var has = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - var document$1 = global_1.document; - // typeof document.createElement is 'object' in old IE - var EXISTS = isObject(document$1) && isObject(document$1.createElement); - - var documentCreateElement = function (it) { - return EXISTS ? document$1.createElement(it) : {}; - }; - - // Thank's IE8 for his funny defineProperty - var ie8DomDefine = !descriptors && !fails(function () { - return Object.defineProperty(documentCreateElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; - }); - - var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // `Object.getOwnPropertyDescriptor` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor - var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPrimitive(P, true); - if (ie8DomDefine) try { - return nativeGetOwnPropertyDescriptor(O, P); - } catch (error) { /* empty */ } - if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); - }; - - var objectGetOwnPropertyDescriptor = { - f: f$1 - }; - - var anObject = function (it) { - if (!isObject(it)) { - throw TypeError(String(it) + ' is not an object'); - } return it; - }; - - var nativeDefineProperty = Object.defineProperty; - - // `Object.defineProperty` method - // https://tc39.github.io/ecma262/#sec-object.defineproperty - var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (ie8DomDefine) try { - return nativeDefineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; - }; - - var objectDefineProperty = { - f: f$2 - }; - - var createNonEnumerableProperty = descriptors ? function (object, key, value) { - return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var setGlobal = function (key, value) { - try { - createNonEnumerableProperty(global_1, key, value); - } catch (error) { - global_1[key] = value; - } return value; - }; - - var SHARED = '__core-js_shared__'; - var store = global_1[SHARED] || setGlobal(SHARED, {}); - - var sharedStore = store; - - var functionToString = Function.toString; - - // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper - if (typeof sharedStore.inspectSource != 'function') { - sharedStore.inspectSource = function (it) { - return functionToString.call(it); - }; - } - - var inspectSource = sharedStore.inspectSource; - - var WeakMap = global_1.WeakMap; - - var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); - - var shared = createCommonjsModule(function (module) { - (module.exports = function (key, value) { - return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: '3.8.1', - mode: 'global', - copyright: '© 2020 Denis Pushkarev (zloirock.ru)' - }); - }); - - var id = 0; - var postfix = Math.random(); - - var uid = function (key) { - return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); - }; - - var keys = shared('keys'); - - var sharedKey = function (key) { - return keys[key] || (keys[key] = uid(key)); - }; - - var hiddenKeys = {}; - - var WeakMap$1 = global_1.WeakMap; - var set, get, has$1; - - var enforce = function (it) { - return has$1(it) ? get(it) : set(it, {}); - }; - - var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; - }; - - if (nativeWeakMap) { - var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); - var wmget = store$1.get; - var wmhas = store$1.has; - var wmset = store$1.set; - set = function (it, metadata) { - metadata.facade = it; - wmset.call(store$1, it, metadata); - return metadata; - }; - get = function (it) { - return wmget.call(store$1, it) || {}; - }; - has$1 = function (it) { - return wmhas.call(store$1, it); - }; - } else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - metadata.facade = it; - createNonEnumerableProperty(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return has(it, STATE) ? it[STATE] : {}; - }; - has$1 = function (it) { - return has(it, STATE); - }; - } - - var internalState = { - set: set, - get: get, - has: has$1, - enforce: enforce, - getterFor: getterFor - }; - - var redefine = createCommonjsModule(function (module) { - var getInternalState = internalState.get; - var enforceInternalState = internalState.enforce; - var TEMPLATE = String(String).split('String'); - - (module.exports = function (O, key, value, options) { - var unsafe = options ? !!options.unsafe : false; - var simple = options ? !!options.enumerable : false; - var noTargetGet = options ? !!options.noTargetGet : false; - var state; - if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) { - createNonEnumerableProperty(value, 'name', key); - } - state = enforceInternalState(value); - if (!state.source) { - state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); - } - } - if (O === global_1) { - if (simple) O[key] = value; - else setGlobal(key, value); - return; - } else if (!unsafe) { - delete O[key]; - } else if (!noTargetGet && O[key]) { - simple = true; - } - if (simple) O[key] = value; - else createNonEnumerableProperty(O, key, value); - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, 'toString', function toString() { - return typeof this == 'function' && getInternalState(this).source || inspectSource(this); - }); - }); - - var path = global_1; - - var aFunction = function (variable) { - return typeof variable == 'function' ? variable : undefined; - }; - - var getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) - : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; - }; - - var ceil = Math.ceil; - var floor = Math.floor; - - // `ToInteger` abstract operation - // https://tc39.github.io/ecma262/#sec-tointeger - var toInteger = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); - }; - - var min = Math.min; - - // `ToLength` abstract operation - // https://tc39.github.io/ecma262/#sec-tolength - var toLength = function (argument) { - return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 - }; - - var max = Math.max; - var min$1 = Math.min; - - // Helper for a popular repeating case of the spec: - // Let integer be ? ToInteger(index). - // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). - var toAbsoluteIndex = function (index, length) { - var integer = toInteger(index); - return integer < 0 ? max(integer + length, 0) : min$1(integer, length); - }; - - // `Array.prototype.{ indexOf, includes }` methods implementation - var createMethod = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; - }; - - var arrayIncludes = { - // `Array.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - includes: createMethod(true), - // `Array.prototype.indexOf` method - // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - indexOf: createMethod(false) - }; - - var indexOf = arrayIncludes.indexOf; - - - var objectKeysInternal = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~indexOf(result, key) || result.push(key); - } - return result; - }; - - // IE8- don't enum bug keys - var enumBugKeys = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - - var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); - - // `Object.getOwnPropertyNames` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertynames - var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return objectKeysInternal(O, hiddenKeys$1); - }; - - var objectGetOwnPropertyNames = { - f: f$3 - }; - - var f$4 = Object.getOwnPropertySymbols; - - var objectGetOwnPropertySymbols = { - f: f$4 - }; - - // all object keys, includes non-enumerable and symbols - var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = objectGetOwnPropertyNames.f(anObject(it)); - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; - }; - - var copyConstructorProperties = function (target, source) { - var keys = ownKeys(source); - var defineProperty = objectDefineProperty.f; - var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - }; - - var replacement = /#|\.prototype\./; - - var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : typeof detection == 'function' ? fails(detection) - : !!detection; - }; - - var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); - }; - - var data = isForced.data = {}; - var NATIVE = isForced.NATIVE = 'N'; - var POLYFILL = isForced.POLYFILL = 'P'; - - var isForced_1 = isForced; - - var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; - - - - - - - /* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.noTargetGet - prevent calling a getter on target - */ - var _export = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global_1; - } else if (STATIC) { - target = global_1[TARGET] || setGlobal(TARGET, {}); - } else { - target = (global_1[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.noTargetGet) { - descriptor = getOwnPropertyDescriptor$1(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty === typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - // extend global - redefine(target, key, sourceProperty, options); - } - }; - - // `IsArray` abstract operation - // https://tc39.github.io/ecma262/#sec-isarray - var isArray = Array.isArray || function isArray(arg) { - return classofRaw(arg) == 'Array'; - }; - - // `ToObject` abstract operation - // https://tc39.github.io/ecma262/#sec-toobject - var toObject = function (argument) { - return Object(requireObjectCoercible(argument)); - }; - - var createProperty = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; - }; - - var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { - // Chrome 38 Symbol has incorrect toString conversion - // eslint-disable-next-line no-undef - return !String(Symbol()); - }); - - var useSymbolAsUid = nativeSymbol - // eslint-disable-next-line no-undef - && !Symbol.sham - // eslint-disable-next-line no-undef - && typeof Symbol.iterator == 'symbol'; - - var WellKnownSymbolsStore = shared('wks'); - var Symbol$1 = global_1.Symbol; - var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; - - var wellKnownSymbol = function (name) { - if (!has(WellKnownSymbolsStore, name)) { - if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; - else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; - }; - - var SPECIES = wellKnownSymbol('species'); - - // `ArraySpeciesCreate` abstract operation - // https://tc39.github.io/ecma262/#sec-arrayspeciescreate - var arraySpeciesCreate = function (originalArray, length) { - var C; - if (isArray(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - else if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); - }; - - var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; - - var process = global_1.process; - var versions = process && process.versions; - var v8 = versions && versions.v8; - var match, version; - - if (v8) { - match = v8.split('.'); - version = match[0] + match[1]; - } else if (engineUserAgent) { - match = engineUserAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = engineUserAgent.match(/Chrome\/(\d+)/); - if (match) version = match[1]; - } - } - - var engineV8Version = version && +version; - - var SPECIES$1 = wellKnownSymbol('species'); - - var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return engineV8Version >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES$1] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); - }; - - var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; - var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; - - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/679 - var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; - }); - - var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); - - var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); - }; - - var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; - - // `Array.prototype.concat` method - // https://tc39.github.io/ecma262/#sec-array.prototype.concat - // with adding support of @@isConcatSpreadable and @@species - _export({ target: 'Array', proto: true, forced: FORCED }, { - concat: function concat(arg) { // eslint-disable-line no-unused-vars - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = toLength(E.length); - if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); - } else { - if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - createProperty(A, n++, E); - } - } - A.length = n; - return A; - } - }); - - var aFunction$1 = function (it) { - if (typeof it != 'function') { - throw TypeError(String(it) + ' is not a function'); - } return it; - }; - - // optional / simple context binding - var functionBindContext = function (fn, that, length) { - aFunction$1(fn); - if (that === undefined) return fn; - switch (length) { - case 0: return function () { - return fn.call(that); - }; - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var push = [].push; - - // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation - var createMethod$1 = function (TYPE) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var IS_FILTER_OUT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject($this); - var self = indexedObject(O); - var boundFunction = functionBindContext(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push.call(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push.call(target, value); // filterOut - } - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; - }; - - var arrayIteration = { - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - forEach: createMethod$1(0), - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - map: createMethod$1(1), - // `Array.prototype.filter` method - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - filter: createMethod$1(2), - // `Array.prototype.some` method - // https://tc39.github.io/ecma262/#sec-array.prototype.some - some: createMethod$1(3), - // `Array.prototype.every` method - // https://tc39.github.io/ecma262/#sec-array.prototype.every - every: createMethod$1(4), - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - find: createMethod$1(5), - // `Array.prototype.findIndex` method - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6), - // `Array.prototype.filterOut` method - // https://github.com/tc39/proposal-array-filtering - filterOut: createMethod$1(7) - }; - - var defineProperty = Object.defineProperty; - var cache = {}; - - var thrower = function (it) { throw it; }; - - var arrayMethodUsesToLength = function (METHOD_NAME, options) { - if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; - if (!options) options = {}; - var method = [][METHOD_NAME]; - var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; - var argument0 = has(options, 0) ? options[0] : thrower; - var argument1 = has(options, 1) ? options[1] : undefined; - - return cache[METHOD_NAME] = !!method && !fails(function () { - if (ACCESSORS && !descriptors) return true; - var O = { length: -1 }; - - if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower }); - else O[1] = 1; - - method.call(O, argument0, argument1); - }); - }; - - var $filter = arrayIteration.filter; - - - - var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); - // Edge 14- issue - var USES_TO_LENGTH = arrayMethodUsesToLength('filter'); - - // `Array.prototype.filter` method - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // `Object.keys` method - // https://tc39.github.io/ecma262/#sec-object.keys - var objectKeys = Object.keys || function keys(O) { - return objectKeysInternal(O, enumBugKeys); - }; - - // `Object.defineProperties` method - // https://tc39.github.io/ecma262/#sec-object.defineproperties - var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); - return O; - }; - - var html = getBuiltIn('document', 'documentElement'); - - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO = sharedKey('IE_PROTO'); - - var EmptyConstructor = function () { /* empty */ }; - - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; - }; - - // Create object with fake `null` prototype: use ActiveX Object with cleared prototype - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; - }; - - // Create object with fake `null` prototype: use iframe Object with cleared prototype - var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - - // Check for document.domain and active x support - // No need to use active x approach when document.domain is not set - // see https://github.com/es-shims/es5-shim/issues/150 - // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 - // avoid IE GC bug - var activeXDocument; - var NullProtoObject = function () { - try { - /* global ActiveXObject */ - activeXDocument = document.domain && new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; - - hiddenKeys[IE_PROTO] = true; - - // `Object.create` method - // https://tc39.github.io/ecma262/#sec-object.create - var objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : objectDefineProperties(result, Properties); - }; - - var UNSCOPABLES = wellKnownSymbol('unscopables'); - var ArrayPrototype = Array.prototype; - - // Array.prototype[@@unscopables] - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - if (ArrayPrototype[UNSCOPABLES] == undefined) { - objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { - configurable: true, - value: objectCreate(null) - }); - } - - // add a key to Array.prototype[@@unscopables] - var addToUnscopables = function (key) { - ArrayPrototype[UNSCOPABLES][key] = true; - }; - - var $find = arrayIteration.find; - - - - var FIND = 'find'; - var SKIPS_HOLES = true; - - var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND); - - // Shouldn't skip holes - if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); - - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - _export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables(FIND); - - var arrayMethodIsStrict = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call,no-throw-literal - method.call(null, argument || function () { throw 1; }, 1); - }); - }; - - var $forEach = arrayIteration.forEach; - - - - var STRICT_METHOD = arrayMethodIsStrict('forEach'); - var USES_TO_LENGTH$2 = arrayMethodUsesToLength('forEach'); - - // `Array.prototype.forEach` method implementation - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$2) ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } : [].forEach; - - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, { - forEach: arrayForEach - }); - - var nativeJoin = [].join; - - var ES3_STRINGS = indexedObject != Object; - var STRICT_METHOD$1 = arrayMethodIsStrict('join', ','); - - // `Array.prototype.join` method - // https://tc39.github.io/ecma262/#sec-array.prototype.join - _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, { - join: function join(separator) { - return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); - } - }); - - var $map = arrayIteration.map; - - - - var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map'); - // FF49- issue - var USES_TO_LENGTH$3 = arrayMethodUsesToLength('map'); - - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, { - map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - var test = {}; - - test[TO_STRING_TAG] = 'z'; - - var toStringTagSupport = String(test) === '[object z]'; - - var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); - // ES3 wrong here - var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; - - // fallback for IE11 Script Access Denied error - var tryGet = function (it, key) { - try { - return it[key]; - } catch (error) { /* empty */ } - }; - - // getting tag from ES6+ `Object.prototype.toString` - var classof = toStringTagSupport ? classofRaw : function (it) { - var O, tag, result; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag - // builtinTag case - : CORRECT_ARGUMENTS ? classofRaw(O) - // ES3 arguments fallback - : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; - }; - - // `Object.prototype.toString` method implementation - // https://tc39.github.io/ecma262/#sec-object.prototype.tostring - var objectToString = toStringTagSupport ? {}.toString : function toString() { - return '[object ' + classof(this) + ']'; - }; - - // `Object.prototype.toString` method - // https://tc39.github.io/ecma262/#sec-object.prototype.tostring - if (!toStringTagSupport) { - redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); - } - - // `RegExp.prototype.flags` getter implementation - // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags - var regexpFlags = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.dotAll) result += 's'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; - }; - - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, - // so we use an intermediate function. - function RE(s, f) { - return RegExp(s, f); - } - - var UNSUPPORTED_Y = fails(function () { - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError - var re = RE('a', 'y'); - re.lastIndex = 2; - return re.exec('abcd') != null; - }); - - var BROKEN_CARET = fails(function () { - // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 - var re = RE('^r', 'gy'); - re.lastIndex = 2; - return re.exec('str') != null; - }); - - var regexpStickyHelpers = { - UNSUPPORTED_Y: UNSUPPORTED_Y, - BROKEN_CARET: BROKEN_CARET - }; - - var nativeExec = RegExp.prototype.exec; - // This always refers to the native implementation, because the - // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, - // which loads this file before patching the method. - var nativeReplace = String.prototype.replace; - - var patchedExec = nativeExec; - - var UPDATES_LAST_INDEX_WRONG = (function () { - var re1 = /a/; - var re2 = /b*/g; - nativeExec.call(re1, 'a'); - nativeExec.call(re2, 'a'); - return re1.lastIndex !== 0 || re2.lastIndex !== 0; - })(); - - var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET; - - // nonparticipating capturing group, copied from es5-shim's String#split patch. - var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - - var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1; - - if (PATCH) { - patchedExec = function exec(str) { - var re = this; - var lastIndex, reCopy, match, i; - var sticky = UNSUPPORTED_Y$1 && re.sticky; - var flags = regexpFlags.call(re); - var source = re.source; - var charsAdded = 0; - var strCopy = str; - - if (sticky) { - flags = flags.replace('y', ''); - if (flags.indexOf('g') === -1) { - flags += 'g'; - } - - strCopy = String(str).slice(re.lastIndex); - // Support anchored sticky behavior. - if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { - source = '(?: ' + source + ')'; - strCopy = ' ' + strCopy; - charsAdded++; - } - // ^(? + rx + ) is needed, in combination with some str slicing, to - // simulate the 'y' flag. - reCopy = new RegExp('^(?:' + source + ')', flags); - } - - if (NPCG_INCLUDED) { - reCopy = new RegExp('^' + source + '$(?!\\s)', flags); - } - if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; - - match = nativeExec.call(sticky ? reCopy : re, strCopy); - - if (sticky) { - if (match) { - match.input = match.input.slice(charsAdded); - match[0] = match[0].slice(charsAdded); - match.index = re.lastIndex; - re.lastIndex += match[0].length; - } else re.lastIndex = 0; - } else if (UPDATES_LAST_INDEX_WRONG && match) { - re.lastIndex = re.global ? match.index + match[0].length : lastIndex; - } - if (NPCG_INCLUDED && match && match.length > 1) { - // Fix browsers whose `exec` methods don't consistently return `undefined` - // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ - nativeReplace.call(match[0], reCopy, function () { - for (i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) match[i] = undefined; - } - }); - } - - return match; - }; - } - - var regexpExec = patchedExec; - - _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { - exec: regexpExec - }); - - var TO_STRING = 'toString'; - var RegExpPrototype = RegExp.prototype; - var nativeToString = RegExpPrototype[TO_STRING]; - - var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); - // FF44- RegExp#toString has a wrong name - var INCORRECT_NAME = nativeToString.name != TO_STRING; - - // `RegExp.prototype.toString` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring - if (NOT_GENERIC || INCORRECT_NAME) { - redefine(RegExp.prototype, TO_STRING, function toString() { - var R = anObject(this); - var p = String(R.source); - var rf = R.flags; - var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf); - return '/' + p + '/' + f; - }, { unsafe: true }); - } - - // TODO: Remove from `core-js@4` since it's moved to entry points - - - - - - - - var SPECIES$2 = wellKnownSymbol('species'); - - var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { - // #replace needs built-in support for named groups. - // #match works fine because it just return the exec results, even if it has - // a "grops" property. - var re = /./; - re.exec = function () { - var result = []; - result.groups = { a: '7' }; - return result; - }; - return ''.replace(re, '$
') !== '7'; - }); - - // IE <= 11 replaces $0 with the whole match, as if it was $& - // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 - var REPLACE_KEEPS_$0 = (function () { - return 'a'.replace(/./, '$0') === '$0'; - })(); - - var REPLACE = wellKnownSymbol('replace'); - // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { - if (/./[REPLACE]) { - return /./[REPLACE]('a', '$0') === ''; - } - return false; - })(); - - // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec - // Weex JS has frozen built-in prototypes, so use try / catch wrapper - var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { - var re = /(?:)/; - var originalExec = re.exec; - re.exec = function () { return originalExec.apply(this, arguments); }; - var result = 'ab'.split(re); - return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; - }); - - var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { - var SYMBOL = wellKnownSymbol(KEY); - - var DELEGATES_TO_SYMBOL = !fails(function () { - // String methods call symbol-named RegEp methods - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - }); - - var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { - // Symbol-named RegExp methods call .exec - var execCalled = false; - var re = /a/; - - if (KEY === 'split') { - // We can't use real regex here since it causes deoptimization - // and serious performance degradation in V8 - // https://github.com/zloirock/core-js/issues/306 - re = {}; - // RegExp[@@split] doesn't call the regex's exec method, but first creates - // a new one. We need to return the patched regex when creating the new one. - re.constructor = {}; - re.constructor[SPECIES$2] = function () { return re; }; - re.flags = ''; - re[SYMBOL] = /./[SYMBOL]; - } - - re.exec = function () { execCalled = true; return null; }; - - re[SYMBOL](''); - return !execCalled; - }); - - if ( - !DELEGATES_TO_SYMBOL || - !DELEGATES_TO_EXEC || - (KEY === 'replace' && !( - REPLACE_SUPPORTS_NAMED_GROUPS && - REPLACE_KEEPS_$0 && - !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - )) || - (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) - ) { - var nativeRegExpMethod = /./[SYMBOL]; - var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { - if (regexp.exec === regexpExec) { - if (DELEGATES_TO_SYMBOL && !forceStringMethod) { - // The native String method already delegates to @@method (this - // polyfilled function), leasing to infinite recursion. - // We avoid it by directly calling the native @@method method. - return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; - } - return { done: true, value: nativeMethod.call(str, regexp, arg2) }; - } - return { done: false }; - }, { - REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, - REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - }); - var stringMethod = methods[0]; - var regexMethod = methods[1]; - - redefine(String.prototype, KEY, stringMethod); - redefine(RegExp.prototype, SYMBOL, length == 2 - // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) - // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function (string, arg) { return regexMethod.call(string, this, arg); } - // 21.2.5.6 RegExp.prototype[@@match](string) - // 21.2.5.9 RegExp.prototype[@@search](string) - : function (string) { return regexMethod.call(string, this); } - ); - } - - if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); - }; - - // `String.prototype.{ codePointAt, at }` methods implementation - var createMethod$2 = function (CONVERT_TO_STRING) { - return function ($this, pos) { - var S = String(requireObjectCoercible($this)); - var position = toInteger(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = S.charCodeAt(position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING ? S.charAt(position) : first - : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; - }; - }; - - var stringMultibyte = { - // `String.prototype.codePointAt` method - // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat - codeAt: createMethod$2(false), - // `String.prototype.at` method - // https://github.com/mathiasbynens/String.prototype.at - charAt: createMethod$2(true) - }; - - var charAt = stringMultibyte.charAt; - - // `AdvanceStringIndex` abstract operation - // https://tc39.github.io/ecma262/#sec-advancestringindex - var advanceStringIndex = function (S, index, unicode) { - return index + (unicode ? charAt(S, index).length : 1); - }; - - // `RegExpExec` abstract operation - // https://tc39.github.io/ecma262/#sec-regexpexec - var regexpExecAbstract = function (R, S) { - var exec = R.exec; - if (typeof exec === 'function') { - var result = exec.call(R, S); - if (typeof result !== 'object') { - throw TypeError('RegExp exec method returned something other than an Object or null'); - } - return result; - } - - if (classofRaw(R) !== 'RegExp') { - throw TypeError('RegExp#exec called on incompatible receiver'); - } - - return regexpExec.call(R, S); - }; - - var max$1 = Math.max; - var min$2 = Math.min; - var floor$1 = Math.floor; - var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g; - var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g; - - var maybeToString = function (it) { - return it === undefined ? it : String(it); - }; - - // @@replace logic - fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; - var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; - var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; - - return [ - // `String.prototype.replace` method - // https://tc39.github.io/ecma262/#sec-string.prototype.replace - function replace(searchValue, replaceValue) { - var O = requireObjectCoercible(this); - var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; - return replacer !== undefined - ? replacer.call(searchValue, O, replaceValue) - : nativeReplace.call(String(O), searchValue, replaceValue); - }, - // `RegExp.prototype[@@replace]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace - function (regexp, replaceValue) { - if ( - (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || - (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) - ) { - var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); - if (res.done) return res.value; - } - - var rx = anObject(regexp); - var S = String(this); - - var functionalReplace = typeof replaceValue === 'function'; - if (!functionalReplace) replaceValue = String(replaceValue); - - var global = rx.global; - if (global) { - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - } - var results = []; - while (true) { - var result = regexpExecAbstract(rx, S); - if (result === null) break; - - results.push(result); - if (!global) break; - - var matchStr = String(result[0]); - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - } - - var accumulatedResult = ''; - var nextSourcePosition = 0; - for (var i = 0; i < results.length; i++) { - result = results[i]; - - var matched = String(result[0]); - var position = max$1(min$2(toInteger(result.index), S.length), 0); - var captures = []; - // NOTE: This is equivalent to - // captures = result.slice(1).map(maybeToString) - // but for some reason `nativeSlice.call(result, 1, result.length)` (called in - // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and - // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. - for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); - var namedCaptures = result.groups; - if (functionalReplace) { - var replacerArgs = [matched].concat(captures, position, S); - if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); - var replacement = String(replaceValue.apply(undefined, replacerArgs)); - } else { - replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); - } - if (position >= nextSourcePosition) { - accumulatedResult += S.slice(nextSourcePosition, position) + replacement; - nextSourcePosition = position + matched.length; - } - } - return accumulatedResult + S.slice(nextSourcePosition); - } - ]; - - // https://tc39.github.io/ecma262/#sec-getsubstitution - function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { - var tailPos = position + matched.length; - var m = captures.length; - var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; - if (namedCaptures !== undefined) { - namedCaptures = toObject(namedCaptures); - symbols = SUBSTITUTION_SYMBOLS; - } - return nativeReplace.call(replacement, symbols, function (match, ch) { - var capture; - switch (ch.charAt(0)) { - case '$': return '$'; - case '&': return matched; - case '`': return str.slice(0, position); - case "'": return str.slice(tailPos); - case '<': - capture = namedCaptures[ch.slice(1, -1)]; - break; - default: // \d\d? - var n = +ch; - if (n === 0) return match; - if (n > m) { - var f = floor$1(n / 10); - if (f === 0) return match; - if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); - return match; - } - capture = captures[n - 1]; - } - return capture === undefined ? '' : capture; - }); - } - }); - - // `SameValue` abstract operation - // https://tc39.github.io/ecma262/#sec-samevalue - var sameValue = Object.is || function is(x, y) { - // eslint-disable-next-line no-self-compare - return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; - }; - - // @@search logic - fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) { - return [ - // `String.prototype.search` method - // https://tc39.github.io/ecma262/#sec-string.prototype.search - function search(regexp) { - var O = requireObjectCoercible(this); - var searcher = regexp == undefined ? undefined : regexp[SEARCH]; - return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); - }, - // `RegExp.prototype[@@search]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search - function (regexp) { - var res = maybeCallNative(nativeSearch, regexp, this); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - - var previousLastIndex = rx.lastIndex; - if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; - var result = regexpExecAbstract(rx, S); - if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; - return result === null ? -1 : result.index; - } - ]; - }); - - var MATCH = wellKnownSymbol('match'); - - // `IsRegExp` abstract operation - // https://tc39.github.io/ecma262/#sec-isregexp - var isRegexp = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); - }; - - var SPECIES$3 = wellKnownSymbol('species'); - - // `SpeciesConstructor` abstract operation - // https://tc39.github.io/ecma262/#sec-speciesconstructor - var speciesConstructor = function (O, defaultConstructor) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aFunction$1(S); - }; - - var arrayPush = [].push; - var min$3 = Math.min; - var MAX_UINT32 = 0xFFFFFFFF; - - // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError - var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); - - // @@split logic - fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { - var internalSplit; - if ( - 'abbc'.split(/(b)*/)[1] == 'c' || - 'test'.split(/(?:)/, -1).length != 4 || - 'ab'.split(/(?:ab)*/).length != 2 || - '.'.split(/(.?)(.?)/).length != 4 || - '.'.split(/()()/).length > 1 || - ''.split(/.?/).length - ) { - // based on es5-shim implementation, need to rework it - internalSplit = function (separator, limit) { - var string = String(requireObjectCoercible(this)); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (separator === undefined) return [string]; - // If `separator` is not a regex, use native split - if (!isRegexp(separator)) { - return nativeSplit.call(string, separator, lim); - } - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''); - var lastLastIndex = 0; - // Make `global` and avoid `lastIndex` issues by working with a copy - var separatorCopy = new RegExp(separator.source, flags + 'g'); - var match, lastIndex, lastLength; - while (match = regexpExec.call(separatorCopy, string)) { - lastIndex = separatorCopy.lastIndex; - if (lastIndex > lastLastIndex) { - output.push(string.slice(lastLastIndex, match.index)); - if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); - lastLength = match[0].length; - lastLastIndex = lastIndex; - if (output.length >= lim) break; - } - if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop - } - if (lastLastIndex === string.length) { - if (lastLength || !separatorCopy.test('')) output.push(''); - } else output.push(string.slice(lastLastIndex)); - return output.length > lim ? output.slice(0, lim) : output; - }; - // Chakra, V8 - } else if ('0'.split(undefined, 0).length) { - internalSplit = function (separator, limit) { - return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); - }; - } else internalSplit = nativeSplit; - - return [ - // `String.prototype.split` method - // https://tc39.github.io/ecma262/#sec-string.prototype.split - function split(separator, limit) { - var O = requireObjectCoercible(this); - var splitter = separator == undefined ? undefined : separator[SPLIT]; - return splitter !== undefined - ? splitter.call(separator, O, limit) - : internalSplit.call(String(O), separator, limit); - }, - // `RegExp.prototype[@@split]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split - // - // NOTE: This cannot be properly polyfilled in engines that don't support - // the 'y' flag. - function (regexp, limit) { - var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - var C = speciesConstructor(rx, RegExp); - - var unicodeMatching = rx.unicode; - var flags = (rx.ignoreCase ? 'i' : '') + - (rx.multiline ? 'm' : '') + - (rx.unicode ? 'u' : '') + - (SUPPORTS_Y ? 'y' : 'g'); - - // ^(? + rx + ) is needed, in combination with some S slicing, to - // simulate the 'y' flag. - var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; - var p = 0; - var q = 0; - var A = []; - while (q < S.length) { - splitter.lastIndex = SUPPORTS_Y ? q : 0; - var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q)); - var e; - if ( - z === null || - (e = min$3(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p - ) { - q = advanceStringIndex(S, q, unicodeMatching); - } else { - A.push(S.slice(p, q)); - if (A.length === lim) return A; - for (var i = 1; i <= z.length - 1; i++) { - A.push(z[i]); - if (A.length === lim) return A; - } - q = p = e; - } - } - A.push(S.slice(p)); - return A; - } - ]; - }, !SUPPORTS_Y); - - // iterable DOM collections - // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods - var domIterables = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 - }; - - for (var COLLECTION_NAME in domIterables) { - var Collection = global_1[COLLECTION_NAME]; - var CollectionPrototype = Collection && Collection.prototype; - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { - createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); - } catch (error) { - CollectionPrototype.forEach = arrayForEach; - } - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - - return _possibleConstructorReturn(this, result); - }; - } - - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - - return object; - } - - function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - - return _get(target, property, receiver || target); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - - /** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @update zhixin wen - */ - - var Utils = $__default['default'].fn.bootstrapTable.utils; - var UtilsCookie = { - cookieIds: { - sortOrder: 'bs.table.sortOrder', - sortName: 'bs.table.sortName', - pageNumber: 'bs.table.pageNumber', - pageList: 'bs.table.pageList', - columns: 'bs.table.columns', - searchText: 'bs.table.searchText', - reorderColumns: 'bs.table.reorderColumns', - filterControl: 'bs.table.filterControl', - filterBy: 'bs.table.filterBy' - }, - getCurrentHeader: function getCurrentHeader(that) { - var header = that.$header; - - if (that.options.height) { - header = that.$tableHeader; - } - - return header; - }, - getCurrentSearchControls: function getCurrentSearchControls(that) { - var searchControls = 'select, input'; - - if (that.options.height) { - searchControls = 'table select, table input'; - } - - return searchControls; - }, - cookieEnabled: function cookieEnabled() { - return !!navigator.cookieEnabled; - }, - inArrayCookiesEnabled: function inArrayCookiesEnabled(cookieName, cookiesEnabled) { - var index = -1; - - for (var i = 0; i < cookiesEnabled.length; i++) { - if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) { - index = i; - break; - } - } - - return index; - }, - setCookie: function setCookie(that, cookieName, cookieValue) { - if (!that.options.cookie || !UtilsCookie.cookieEnabled() || that.options.cookieIdTable === '') { - return; - } - - if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) { - return; - } - - cookieName = "".concat(that.options.cookieIdTable, ".").concat(cookieName); - - switch (that.options.cookieStorage) { - case 'cookieStorage': - document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join(''); - break; - - case 'localStorage': - localStorage.setItem(cookieName, cookieValue); - break; - - case 'sessionStorage': - sessionStorage.setItem(cookieName, cookieValue); - break; - - case 'customStorage': - if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) { - throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete'); - } - - Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], ''); - break; - - default: - return false; - } - - return true; - }, - getCookie: function getCookie(that, tableName, cookieName) { - if (!cookieName) { - return null; - } - - if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) { - return null; - } - - cookieName = "".concat(tableName, ".").concat(cookieName); - - switch (that.options.cookieStorage) { - case 'cookieStorage': - var value = "; ".concat(document.cookie); - var parts = value.split("; ".concat(cookieName, "=")); - return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null; - - case 'localStorage': - return localStorage.getItem(cookieName); - - case 'sessionStorage': - return sessionStorage.getItem(cookieName); - - case 'customStorage': - if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) { - throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete'); - } - - return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], ''); - - default: - return null; - } - }, - deleteCookie: function deleteCookie(that, tableName, cookieName) { - cookieName = "".concat(tableName, ".").concat(cookieName); - - switch (that.options.cookieStorage) { - case 'cookieStorage': - document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join(''); - break; - - case 'localStorage': - localStorage.removeItem(cookieName); - break; - - case 'sessionStorage': - sessionStorage.removeItem(cookieName); - break; - - case 'customStorage': - if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) { - throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete'); - } - - Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], ''); - break; - - default: - return false; - } - - return true; - }, - calculateExpiration: function calculateExpiration(cookieExpire) { - var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y - - cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number - - switch (time.toLowerCase()) { - case 's': - cookieExpire = +cookieExpire; - break; - - case 'mi': - cookieExpire *= 60; - break; - - case 'h': - cookieExpire = cookieExpire * 60 * 60; - break; - - case 'd': - cookieExpire = cookieExpire * 24 * 60 * 60; - break; - - case 'm': - cookieExpire = cookieExpire * 30 * 24 * 60 * 60; - break; - - case 'y': - cookieExpire = cookieExpire * 365 * 24 * 60 * 60; - break; - - default: - cookieExpire = undefined; - break; - } - - if (!cookieExpire) { - return ''; - } - - var d = new Date(); - d.setTime(d.getTime() + cookieExpire * 1000); - return d.toGMTString(); - }, - initCookieFilters: function initCookieFilters(bootstrapTable) { - setTimeout(function () { - var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, UtilsCookie.cookieIds.filterControl)); - - if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) { - var cachedFilters = {}; - var header = UtilsCookie.getCurrentHeader(bootstrapTable); - var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable); - - var applyCookieFilters = function applyCookieFilters(element, filteredCookies) { - filteredCookies.forEach(function (cookie) { - if (cookie.text === '' || element.type === 'radio' && element.value.toString() !== cookie.text.toString()) { - return; - } - - if (element.tagName === 'INPUT' && element.type === 'radio' && element.value.toString() === cookie.text.toString()) { - element.checked = true; - cachedFilters[cookie.field] = cookie.text; - } else if (element.tagName === 'INPUT') { - element.value = cookie.text; - cachedFilters[cookie.field] = cookie.text; - } else if (element.tagName === 'SELECT' && bootstrapTable.options.filterControlContainer) { - element.value = cookie.text; - cachedFilters[cookie.field] = cookie.text; - } else if (cookie.text !== '' && element.tagName === 'SELECT') { - for (var i = 0; i < element.length; i++) { - var currentElement = element[i]; - - if (currentElement.value === cookie.text) { - currentElement.selected = true; - return; - } - } - - var option = document.createElement('option'); - option.value = cookie.text; - option.text = cookie.text; - element.add(option, element[1]); - element.selectedIndex = 1; - cachedFilters[cookie.field] = cookie.text; - } - }); - }; - - var filterContainer = header; - - if (bootstrapTable.options.filterControlContainer) { - filterContainer = $__default['default']("".concat(bootstrapTable.options.filterControlContainer)); - } - - filterContainer.find(searchControls).each(function () { - var field = $__default['default'](this).closest('[data-field]').data('field'); - var filteredCookies = parsedCookieFilters.filter(function (cookie) { - return cookie.field === field; - }); - applyCookieFilters(this, filteredCookies); - }); - bootstrapTable.initColumnSearch(cachedFilters); - bootstrapTable.options.filterControlValuesLoaded = true; - bootstrapTable.initServer(); - } - }, 250); - } - }; - $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, { - cookie: false, - cookieExpire: '2h', - cookiePath: null, - cookieDomain: null, - cookieSecure: null, - cookieSameSite: 'Lax', - cookieIdTable: '', - cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.columns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns'], - cookieStorage: 'cookieStorage', - // localStorage, sessionStorage, customStorage - cookieCustomStorageGet: null, - cookieCustomStorageSet: null, - cookieCustomStorageDelete: null, - // internal variable - filterControls: [], - filterControlValuesLoaded: false - }); - $__default['default'].fn.bootstrapTable.methods.push('getCookies'); - $__default['default'].fn.bootstrapTable.methods.push('deleteCookie'); - $__default['default'].extend($__default['default'].fn.bootstrapTable.utils, { - setCookie: UtilsCookie.setCookie, - getCookie: UtilsCookie.getCookie - }); - - $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) { - _inherits(_class, _$$BootstrapTable); - - var _super = _createSuper(_class); - - function _class() { - _classCallCheck(this, _class); - - return _super.apply(this, arguments); - } - - _createClass(_class, [{ - key: "init", - value: function init() { - if (this.options.cookie) { - // FilterBy logic - var filterByCookieValue = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.filterBy); - - if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) { - throw new Error('The cookie value of filterBy must be a json!'); - } - - var filterByCookie = {}; - - try { - filterByCookie = JSON.parse(filterByCookieValue); - } catch (e) { - throw new Error('Could not parse the json of the filterBy cookie!'); - } - - this.filterColumns = filterByCookie ? filterByCookie : {}; // FilterControl logic - - this.options.filterControls = []; - this.options.filterControlValuesLoaded = false; - this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled; - - if (this.options.filterControl) { - var that = this; - this.$el.on('column-search.bs.table', function (e, field, text) { - var isNewField = true; - - for (var i = 0; i < that.options.filterControls.length; i++) { - if (that.options.filterControls[i].field === field) { - that.options.filterControls[i].text = text; - isNewField = false; - break; - } - } - - if (isNewField) { - that.options.filterControls.push({ - field: field, - text: text - }); - } - - UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that.options.filterControls)); - }).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that)); - } - } - - _get(_getPrototypeOf(_class.prototype), "init", this).call(this); - } - }, { - key: "initServer", - value: function initServer() { - var _get2; - - if (this.options.cookie && this.options.filterControl && !this.options.filterControlValuesLoaded) { - var cookie = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.filterControl)); - - if (cookie) { - return; - } - } - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - (_get2 = _get(_getPrototypeOf(_class.prototype), "initServer", this)).call.apply(_get2, [this].concat(args)); - } - }, { - key: "initTable", - value: function initTable() { - var _get3; - - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - (_get3 = _get(_getPrototypeOf(_class.prototype), "initTable", this)).call.apply(_get3, [this].concat(args)); - - this.initCookie(); - } - }, { - key: "onSort", - value: function onSort() { - var _get4; - - for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - args[_key3] = arguments[_key3]; - } - - (_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args)); - - if (this.options.sortName === undefined || this.options.sortOrder === undefined) { - UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortName); - UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortOrder); - return; - } - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder); - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName); - } - }, { - key: "onPageNumber", - value: function onPageNumber() { - var _get5; - - for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - args[_key4] = arguments[_key4]; - } - - (_get5 = _get(_getPrototypeOf(_class.prototype), "onPageNumber", this)).call.apply(_get5, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); - } - }, { - key: "onPageListChange", - value: function onPageListChange() { - var _get6; - - for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - args[_key5] = arguments[_key5]; - } - - (_get6 = _get(_getPrototypeOf(_class.prototype), "onPageListChange", this)).call.apply(_get6, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize); - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); - } - }, { - key: "onPagePre", - value: function onPagePre() { - var _get7; - - for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { - args[_key6] = arguments[_key6]; - } - - (_get7 = _get(_getPrototypeOf(_class.prototype), "onPagePre", this)).call.apply(_get7, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); - } - }, { - key: "onPageNext", - value: function onPageNext() { - var _get8; - - for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { - args[_key7] = arguments[_key7]; - } - - (_get8 = _get(_getPrototypeOf(_class.prototype), "onPageNext", this)).call.apply(_get8, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); - } - }, { - key: "_toggleColumn", - value: function _toggleColumn() { - var _get9; - - for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { - args[_key8] = arguments[_key8]; - } - - (_get9 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get9, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(this.getVisibleColumns().map(function (column) { - return column.field; - }))); - } - }, { - key: "_toggleAllColumns", - value: function _toggleAllColumns() { - var _get10; - - for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { - args[_key9] = arguments[_key9]; - } - - (_get10 = _get(_getPrototypeOf(_class.prototype), "_toggleAllColumns", this)).call.apply(_get10, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(this.getVisibleColumns().map(function (column) { - return column.field; - }))); - } - }, { - key: "selectPage", - value: function selectPage(page) { - _get(_getPrototypeOf(_class.prototype), "selectPage", this).call(this, page); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page); - } - }, { - key: "onSearch", - value: function onSearch(event) { - _get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event); - - if (this.options.search) { - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText); - } - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber); - } - }, { - key: "initHeader", - value: function initHeader() { - var _get11; - - if (this.options.reorderableColumns) { - this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.reorderColumns)); - } - - for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) { - args[_key10] = arguments[_key10]; - } - - (_get11 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get11, [this].concat(args)); - } - }, { - key: "persistReorderColumnsState", - value: function persistReorderColumnsState(that) { - UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder)); - } - }, { - key: "filterBy", - value: function filterBy() { - var _get12; - - for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) { - args[_key11] = arguments[_key11]; - } - - (_get12 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get12, [this].concat(args)); - - UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns)); - } - }, { - key: "initCookie", - value: function initCookie() { - var _this = this; - - if (!this.options.cookie) { - return; - } - - if (this.options.cookieIdTable === '' || this.options.cookieExpire === '' || !UtilsCookie.cookieEnabled()) { - console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.'); - this.options.cookie = false; // Make sure that the cookie extension is disabled - - return; - } - - var sortOrderCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortOrder); - var sortOrderNameCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.sortName); - var pageNumberCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageNumber); - var pageListCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.pageList); - var searchTextCookie = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.searchText); - var columnsCookieValue = UtilsCookie.getCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds.columns); - - if (typeof columnsCookieValue === 'boolean' && !columnsCookieValue) { - throw new Error('The cookie value of filterBy must be a json!'); - } - - var columnsCookie = {}; - - try { - columnsCookie = JSON.parse(columnsCookieValue); - } catch (e) { - throw new Error('Could not parse the json of the columns cookie!', columnsCookieValue); - } // sortOrder - - - this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; // sortName - - this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName; // pageNumber - - this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber; // pageSize - - this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize; // searchText - - this.options.searchText = searchTextCookie ? searchTextCookie : ''; - - if (columnsCookie) { - var _iterator = _createForOfIteratorHelper(this.columns), - _step; - - try { - var _loop = function _loop() { - var column = _step.value; - column.visible = columnsCookie.filter(function (columnField) { - if (_this.isSelectionColumn(column)) { - return true; - } - /** - * This is needed for the old saved cookies or the table will show no columns! - * It can be removed in 2-3 Versions Later!! - * TODO: Remove this part some versions later e.g. 1.17.3 - */ - - - if (columnField instanceof Object) { - return columnField.field === column.field; - } - - return columnField === column.field; - }).length > 0 || !column.switchable; - }; - - for (_iterator.s(); !(_step = _iterator.n()).done;) { - _loop(); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - } - }, { - key: "getCookies", - value: function getCookies() { - var bootstrapTable = this; - var cookies = {}; - $__default['default'].each(UtilsCookie.cookieIds, function (key, value) { - cookies[key] = UtilsCookie.getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value); - - if (key === 'columns') { - cookies[key] = JSON.parse(cookies[key]); - } - }); - return cookies; - } - }, { - key: "deleteCookie", - value: function deleteCookie(cookieName) { - if (cookieName === '' || !UtilsCookie.cookieEnabled()) { - return; - } - - UtilsCookie.deleteCookie(this, this.options.cookieIdTable, UtilsCookie.cookieIds[cookieName]); - } - }]); - - return _class; - }($__default['default'].BootstrapTable); - -}))); - -jQuery.base64 = (function($) { - - // private property - var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - - // private method for UTF-8 encoding - function utf8Encode(string) { - string = string.replace(/\r\n/g,"\n"); - var utftext = ""; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - return utftext; - } - - function encode(input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = utf8Encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - keyStr.charAt(enc1) + keyStr.charAt(enc2) + - keyStr.charAt(enc3) + keyStr.charAt(enc4); - } - return output; - } - - return { - encode: function (str) { - return encode(str); - } - }; - -}(jQuery)); -/** - * @preserve tableExport.jquery.plugin - * - * Version 1.10.21 - * - * Copyright (c) 2015-2020 hhurz, https://github.com/hhurz/tableExport.jquery.plugin - * - * Based on https://github.com/kayalshri/tableExport.jquery.plugin - * - * Licensed under the MIT License - **/ - -'use strict'; - -(function ($) { - $.fn.tableExport = function (options) { - var defaults = { - csvEnclosure: '"', - csvSeparator: ',', - csvUseBOM: true, - date: { - html: 'dd/mm/yyyy' // Date format used in html source. Supported placeholders: dd, mm, yy, yyyy and a arbitrary single separator character - }, - displayTableName: false, // Deprecated - escape: false, // Deprecated - exportHiddenCells: false, // true = speed up export of large tables with hidden cells (hidden cells will be exported !) - fileName: 'tableExport', - htmlContent: false, - htmlHyperlink: 'content', // Export the 'content' or the 'href' link of tags unless onCellHtmlHyperlink is not defined - ignoreColumn: [], - ignoreRow: [], - jsonScope: 'all', // One of 'head', 'data', 'all' - jspdf: { // jsPDF / jsPDF-AutoTable related options - orientation: 'p', - unit: 'pt', - format: 'a4', // One of jsPDF page formats or 'bestfit' for automatic paper format selection - margins: {left: 20, right: 10, top: 10, bottom: 10}, - onDocCreated: null, - autotable: { - styles: { - cellPadding: 2, - rowHeight: 12, - fontSize: 8, - fillColor: 255, // Color value or 'inherit' to use css background-color from html table - textColor: 50, // Color value or 'inherit' to use css color from html table - fontStyle: 'normal', // 'normal', 'bold', 'italic', 'bolditalic' or 'inherit' to use css font-weight and font-style from html table - overflow: 'ellipsize', // 'visible', 'hidden', 'ellipsize' or 'linebreak' - halign: 'inherit', // 'left', 'center', 'right' or 'inherit' to use css horizontal cell alignment from html table - valign: 'middle' // 'top', 'middle', or 'bottom' - }, - headerStyles: { - fillColor: [52, 73, 94], - textColor: 255, - fontStyle: 'bold', - halign: 'inherit', // 'left', 'center', 'right' or 'inherit' to use css horizontal header cell alignment from html table - valign: 'middle' // 'top', 'middle', or 'bottom' - }, - alternateRowStyles: { - fillColor: 245 - }, - tableExport: { - doc: null, // jsPDF doc object. If set, an already created doc object will be used to export to - onAfterAutotable: null, - onBeforeAutotable: null, - onAutotableText: null, - onTable: null, - outputImages: true - } - } - }, - mso: { // MS Excel and MS Word related options - fileFormat: 'xlshtml', // 'xlshtml' = Excel 2000 html format - // 'xmlss' = XML Spreadsheet 2003 file format (XMLSS) - // 'xlsx' = Excel 2007 Office Open XML format - onMsoNumberFormat: null, // Excel 2000 html format only. See readme.md for more information about msonumberformat - pageFormat: 'a4', // Page format used for page orientation - pageOrientation: 'portrait', // portrait, landscape (xlshtml format only) - rtl: false, // true = Set worksheet option 'DisplayRightToLeft' - styles: [], // E.g. ['border-bottom', 'border-top', 'border-left', 'border-right'] - worksheetName: '', - xslx: { // Specific Excel 2007 XML format settings: - formatId: { // XLSX format (id) used to format excel cells. See readme.md: data-tableexport-xlsxformatid - date: 14, // formatId or format string (e.g. 'm/d/yy') or function(cell, row, col) {return formatId} - numbers: 2 // formatId or format string (e.g. '\"T\"\ #0.00') or function(cell, row, col) {return formatId} - } - } - }, - numbers: { - html: { - decimalMark: '.', // Decimal mark in html source - thousandsSeparator: ',' // Thousands separator in html source - }, - output: { // Set 'output: false' to keep number format of html source in resulting output - decimalMark: '.', // Decimal mark in resulting output - thousandsSeparator: ',' // Thousands separator in resulting output - } - }, - onAfterSaveToFile: null, // function(data, fileName) - onBeforeSaveToFile: null, // saveIt = function(data, fileName, type, charset, encoding): Return false to abort save process - onCellData: null, // Text to export = function($cell, row, col, href, cellText, cellType) - onCellHtmlData: null, // Text to export = function($cell, row, col, htmlContent) - onCellHtmlHyperlink: null, // Text to export = function($cell, row, col, href, cellText) - onIgnoreRow: null, // ignoreRow = function($tr, row): Return true to prevent export of the row - onTableExportBegin: null, // function() - called when export starts - onTableExportEnd: null, // function() - called when export ends - outputMode: 'file', // 'file', 'string', 'base64' or 'window' (experimental) - pdfmake: { - enabled: false, // true: Use pdfmake as pdf producer instead of jspdf and jspdf-autotable - docDefinition: { - pageSize: 'A4', // 4A0,2A0,A{0-10},B{0-10},C{0-10},RA{0-4},SRA{0-4},EXECUTIVE,FOLIO,LEGAL,LETTER,TABLOID - pageOrientation: 'portrait', // 'portrait' or 'landscape' - styles: { - header: { - background: '#34495E', - color: '#FFFFFF', - bold: true, - alignment: 'center', - fillColor: '#34495E' - }, - alternateRow: { - fillColor: '#f5f5f5' - } - }, - defaultStyle: { - color: '#505050', - fontSize: 8, - font: 'Roboto' // Default font is 'Roboto' (needs vfs_fonts.js to be included) - } // For an arabic font include mirza_fonts.js instead of vfs_fonts.js - }, // For a chinese font include either gbsn00lp_fonts.js or ZCOOLXiaoWei_fonts.js instead of vfs_fonts.js - fonts: {} - }, - preserve: { - leadingWS: false, // preserve leading white spaces - trailingWS: false // preserve trailing white spaces - }, - preventInjection: true, // Prepend a single quote to cell strings that start with =,+,- or @ to prevent formula injection - sql: { - tableEnclosure: '`', // If table name or column names contain any characters except letters, numbers, and - columnEnclosure: '`' // underscores, usually the name must be delimited by enclosing it in back quotes (`) - }, - tbodySelector: 'tr', - tfootSelector: 'tr', // Set empty ('') to prevent export of tfoot rows - theadSelector: 'tr', - tableName: 'Table', - type: 'csv' // Export format: 'csv', 'tsv', 'txt', 'sql', 'json', 'xml', 'excel', 'doc', 'png' or 'pdf' - }; - - var pageFormats = { // Size in pt of various paper formats. Adopted from jsPDF. - '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.40, 209.76], - 'a9': [104.88, 147.40], 'a10': [73.70, 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.90, 708.66], - 'b6': [354.33, 498.90], '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], - 'dl': [311.81, 623.62], - 'letter': [612, 792], 'government-letter': [576, 756], 'legal': [612, 1008], - 'junior-legal': [576, 360], 'ledger': [1224, 792], 'tabloid': [792, 1224], - 'credit-card': [153, 243] - }; - var FONT_ROW_RATIO = 1.15; - var el = this; - var DownloadEvt = null; - var $hrows = []; - var $rows = []; - var rowIndex = 0; - var trData = ''; - var colNames = []; - var ranges = []; - var blob; - var $hiddenTableElements = []; - var checkCellVisibilty = false; - - $.extend(true, defaults, options); - - // Adopt deprecated options - if (defaults.type === 'xlsx') { - defaults.mso.fileFormat = defaults.type; - defaults.type = 'excel'; - } - if (typeof defaults.excelFileFormat !== 'undefined' && defaults.mso.fileFormat === 'undefined') - defaults.mso.fileFormat = defaults.excelFileFormat; - if (typeof defaults.excelPageFormat !== 'undefined' && defaults.mso.pageFormat === 'undefined') - defaults.mso.pageFormat = defaults.excelPageFormat; - if (typeof defaults.excelPageOrientation !== 'undefined' && defaults.mso.pageOrientation === 'undefined') - defaults.mso.pageOrientation = defaults.excelPageOrientation; - if (typeof defaults.excelRTL !== 'undefined' && defaults.mso.rtl === 'undefined') - defaults.mso.rtl = defaults.excelRTL; - if (typeof defaults.excelstyles !== 'undefined' && defaults.mso.styles === 'undefined') - defaults.mso.styles = defaults.excelstyles; - if (typeof defaults.onMsoNumberFormat !== 'undefined' && defaults.mso.onMsoNumberFormat === 'undefined') - defaults.mso.onMsoNumberFormat = defaults.onMsoNumberFormat; - if (typeof defaults.worksheetName !== 'undefined' && defaults.mso.worksheetName === 'undefined') - defaults.mso.worksheetName = defaults.worksheetName; - - // Check values of some options - defaults.mso.pageOrientation = (defaults.mso.pageOrientation.substr(0, 1) === 'l') ? 'landscape' : 'portrait'; - defaults.date.html = defaults.date.html || ''; - - if (defaults.date.html.length) { - var patt = []; - patt['dd'] = '(3[01]|[12][0-9]|0?[1-9])'; - patt['mm'] = '(1[012]|0?[1-9])'; - patt['yyyy'] = '((?:1[6-9]|2[0-2])\\d{2})'; - patt['yy'] = '(\\d{2})'; - - var separator = defaults.date.html.match(/[^a-zA-Z0-9]/)[0]; - var formatItems = defaults.date.html.toLowerCase().split(separator); - defaults.date.regex = '^\\s*'; - defaults.date.regex += patt[formatItems[0]]; - defaults.date.regex += '(.)'; // separator group - defaults.date.regex += patt[formatItems[1]]; - defaults.date.regex += '\\2'; // identical separator group - defaults.date.regex += patt[formatItems[2]]; - defaults.date.regex += '\\s*$'; - // e.g. '^\\s*(3[01]|[12][0-9]|0?[1-9])(.)(1[012]|0?[1-9])\\2((?:1[6-9]|2[0-2])\\d{2})\\s*$' - - defaults.date.pattern = new RegExp(defaults.date.regex, 'g'); - var f = formatItems.indexOf('dd') + 1; - defaults.date.match_d = f + (f > 1 ? 1 : 0); - f = formatItems.indexOf('mm') + 1; - defaults.date.match_m = f + (f > 1 ? 1 : 0); - f = (formatItems.indexOf('yyyy') >= 0 ? formatItems.indexOf('yyyy') : formatItems.indexOf('yy')) + 1; - defaults.date.match_y = f + (f > 1 ? 1 : 0); - } - - colNames = GetColumnNames(el); - - if (typeof defaults.onTableExportBegin === 'function') - defaults.onTableExportBegin(); - - if (defaults.type === 'csv' || defaults.type === 'tsv' || defaults.type === 'txt') { - - var csvData = ''; - var rowlength = 0; - ranges = []; - rowIndex = 0; - - var csvString = function (cell, rowIndex, colIndex) { - var result = ''; - - if (cell !== null) { - var dataString = parseString(cell, rowIndex, colIndex); - - var csvValue = (dataString === null || dataString === '') ? '' : dataString.toString(); - - if (defaults.type === 'tsv') { - if (dataString instanceof Date) - dataString.toLocaleString(); - - // According to http://www.iana.org/assignments/media-types/text/tab-separated-values - // are fields that contain tabs not allowable in tsv encoding - result = replaceAll(csvValue, '\t', ' '); - } else { - // Takes a string and encapsulates it (by default in double-quotes) if it - // contains the csv field separator, spaces, or linebreaks. - if (dataString instanceof Date) - result = defaults.csvEnclosure + dataString.toLocaleString() + defaults.csvEnclosure; - else { - result = preventInjection(csvValue); - result = replaceAll(result, defaults.csvEnclosure, defaults.csvEnclosure + defaults.csvEnclosure); - - if (result.indexOf(defaults.csvSeparator) >= 0 || /[\r\n ]/g.test(result)) - result = defaults.csvEnclosure + result + defaults.csvEnclosure; - } - } - } - - return result; - }; - - var CollectCsvData = function ($rows, rowselector, length) { - - $rows.each(function () { - trData = ''; - ForEachVisibleCell(this, rowselector, rowIndex, length + $rows.length, - function (cell, row, col) { - trData += csvString(cell, row, col) + (defaults.type === 'tsv' ? '\t' : defaults.csvSeparator); - }); - trData = $.trim(trData).substring(0, trData.length - 1); - if (trData.length > 0) { - - if (csvData.length > 0) - csvData += '\n'; - - csvData += trData; - } - rowIndex++; - }); - - return $rows.length; - }; - - rowlength += CollectCsvData($(el).find('thead').first().find(defaults.theadSelector), 'th,td', rowlength); - findTableElements($(el), 'tbody').each(function () { - rowlength += CollectCsvData(findTableElements($(this), defaults.tbodySelector), 'td,th', rowlength); - }); - if (defaults.tfootSelector.length) - CollectCsvData($(el).find('tfoot').first().find(defaults.tfootSelector), 'td,th', rowlength); - - csvData += '\n'; - - //output - if (defaults.outputMode === 'string') - return csvData; - - if (defaults.outputMode === 'base64') - return base64encode(csvData); - - if (defaults.outputMode === 'window') { - downloadFile(false, 'data:text/' + (defaults.type === 'csv' ? 'csv' : 'plain') + ';charset=utf-8,', csvData); - return; - } - - saveToFile(csvData, - defaults.fileName + '.' + defaults.type, - 'text/' + (defaults.type === 'csv' ? 'csv' : 'plain'), - 'utf-8', - '', - (defaults.type === 'csv' && defaults.csvUseBOM)); - - } else if (defaults.type === 'sql') { - - // Header - rowIndex = 0; - ranges = []; - var tdData = 'INSERT INTO ' + defaults.sql.tableEnclosure + defaults.tableName + defaults.sql.tableEnclosure + ' ('; - $hrows = collectHeadRows($(el)); - $($hrows).each(function () { - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - var colName = parseString(cell, row, col) || ''; - if (colName.indexOf(defaults.sql.columnEnclosure) > -1) - colName = replaceAll(colName.toString(), defaults.sql.columnEnclosure, defaults.sql.columnEnclosure + defaults.sql.columnEnclosure); - tdData += defaults.sql.columnEnclosure + colName + defaults.sql.columnEnclosure + ','; - }); - rowIndex++; - tdData = $.trim(tdData).substring(0, tdData.length - 1); - }); - tdData += ') VALUES '; - - // Data - $rows = collectRows($(el)); - $($rows).each(function () { - trData = ''; - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - var dataString = parseString(cell, row, col) || ''; - if (dataString.indexOf('\'') > -1) - dataString = replaceAll(dataString.toString(), '\'', '\'\''); - trData += '\'' + dataString + '\','; - }); - if (trData.length > 3) { - tdData += '(' + trData; - tdData = $.trim(tdData).substring(0, tdData.length - 1); - tdData += '),'; - } - rowIndex++; - }); - - tdData = $.trim(tdData).substring(0, tdData.length - 1); - tdData += ';'; - - // Output - if (defaults.outputMode === 'string') - return tdData; - - if (defaults.outputMode === 'base64') - return base64encode(tdData); - - saveToFile(tdData, defaults.fileName + '.sql', 'application/sql', 'utf-8', '', false); - - } else if (defaults.type === 'json') { - var jsonHeaderArray = []; - ranges = []; - $hrows = collectHeadRows($(el)); - $($hrows).each(function () { - var jsonArrayTd = []; - - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - jsonArrayTd.push(parseString(cell, row, col)); - }); - jsonHeaderArray.push(jsonArrayTd); - }); - - // Data - var jsonArray = []; - - $rows = collectRows($(el)); - $($rows).each(function () { - var jsonObjectTd = {}; - var colIndex = 0; - - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - if (jsonHeaderArray.length) { - jsonObjectTd[jsonHeaderArray[jsonHeaderArray.length - 1][colIndex]] = parseString(cell, row, col); - } else { - jsonObjectTd[colIndex] = parseString(cell, row, col); - } - colIndex++; - }); - if ($.isEmptyObject(jsonObjectTd) === false) - jsonArray.push(jsonObjectTd); - - rowIndex++; - }); - - var sdata; - - if (defaults.jsonScope === 'head') - sdata = JSON.stringify(jsonHeaderArray); - else if (defaults.jsonScope === 'data') - sdata = JSON.stringify(jsonArray); - else // all - sdata = JSON.stringify({header: jsonHeaderArray, data: jsonArray}); - - if (defaults.outputMode === 'string') - return sdata; - - if (defaults.outputMode === 'base64') - return base64encode(sdata); - - saveToFile(sdata, defaults.fileName + '.json', 'application/json', 'utf-8', 'base64', false); - - } else if (defaults.type === 'xml') { - rowIndex = 0; - ranges = []; - var xml = ''; - xml += ''; - - // Header - $hrows = collectHeadRows($(el)); - $($hrows).each(function () { - - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - xml += '' + parseString(cell, row, col) + ''; - }); - rowIndex++; - }); - xml += ''; - - // Data - var rowCount = 1; - - $rows = collectRows($(el)); - $($rows).each(function () { - var colCount = 1; - trData = ''; - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - trData += '' + parseString(cell, row, col) + ''; - colCount++; - }); - if (trData.length > 0 && trData !== '') { - xml += '' + trData + ''; - rowCount++; - } - - rowIndex++; - }); - xml += ''; - - // Output - if (defaults.outputMode === 'string') - return xml; - - if (defaults.outputMode === 'base64') - return base64encode(xml); - - saveToFile(xml, defaults.fileName + '.xml', 'application/xml', 'utf-8', 'base64', false); - } else if (defaults.type === 'excel' && defaults.mso.fileFormat === 'xmlss') { - var docDatas = []; - var docNames = []; - - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var $table = $(this); - - var ssName = ''; - if (typeof defaults.mso.worksheetName === 'string' && defaults.mso.worksheetName.length) - ssName = defaults.mso.worksheetName + ' ' + (docNames.length + 1); - else if (typeof defaults.mso.worksheetName[docNames.length] !== 'undefined') - ssName = defaults.mso.worksheetName[docNames.length]; - if (!ssName.length) - ssName = $table.find('caption').text() || ''; - if (!ssName.length) - ssName = 'Table ' + (docNames.length + 1); - ssName = $.trim(ssName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31)); - - docNames.push($('
').text(ssName).html()); - - if (defaults.exportHiddenCells === false) { - $hiddenTableElements = $table.find('tr, th, td').filter(':hidden'); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - rowIndex = 0; - colNames = GetColumnNames(this); - docData = '
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser())) {{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }} + @elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin'))) + {{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }} @else {{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']']) }} @endif - + @if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser())) {{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled",'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }} + @elseif (($localPermission['permission'] == 'admin') && (!Auth::user()->hasAccess('admin'))) + {{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled",'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }} @else {{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit", 'class'=>'minimal', 'aria-label'=> 'permission['.$localPermission['permission'].']'] ) }} @endif From 7dfab3a6e2c36457ab6ecdffd4d2cc54d8b65d5e Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 23 Sep 2021 15:02:39 -0500 Subject: [PATCH 021/144] Change the condition to 'bigger or equal' instead of just 'bigger than' in ComponentsController checkout api --- app/Http/Controllers/Api/ComponentsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ComponentsController.php b/app/Http/Controllers/Api/ComponentsController.php index ccd23570e..2bf6becb2 100644 --- a/app/Http/Controllers/Api/ComponentsController.php +++ b/app/Http/Controllers/Api/ComponentsController.php @@ -220,7 +220,7 @@ class ComponentsController extends Controller $this->authorize('checkout', $component); - if ($component->numRemaining() > $request->get('assigned_qty')) { + if ($component->numRemaining() >= $request->get('assigned_qty')) { if (!$asset = Asset::find($request->input('assigned_to'))) { return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist'))); From d0f284129adc49e96d6de1d0f6fa32cef0f089f2 Mon Sep 17 00:00:00 2001 From: Sam <1631095+takuy@users.noreply.github.com> Date: Thu, 23 Sep 2021 20:12:45 -0400 Subject: [PATCH 022/144] Update expected field for response list The existing code to handle the "enter key" / auto selections broke at some point. It was expecting results to be in an "items" list, not a "results" list. This should close #9928 hopefully. Tested locally. --- resources/assets/js/snipeit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index 91fbfbe22..a7f3f2668 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -296,11 +296,11 @@ $(document).ready(function () { }); // makes sure we're not selecting the same thing twice for multiples - var filteredResponse = response.items.filter(function(item) { + var filteredResponse = response.results.filter(function(item) { return currentlySelected.indexOf(+item.id) < 0; }); - var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.items[0]; + var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.results[0]; if(first && first.id) { first.selected = true; @@ -558,4 +558,4 @@ $(document).ready(function () { }); }; -})(jQuery); \ No newline at end of file +})(jQuery); From 6e270c0ed2fb725a0fee9369c9cc85cd7c18d2fc Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 23 Sep 2021 17:23:17 -0700 Subject: [PATCH 023/144] Include created_at in pivot Signed-off-by: snipe --- app/Models/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index fa506de7d..bff0134a0 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -376,7 +376,7 @@ class Asset extends Depreciable */ public function components() { - return $this->belongsToMany('\App\Models\Component', 'components_assets', 'asset_id', 'component_id')->withPivot('id', 'assigned_qty')->withTrashed(); + return $this->belongsToMany('\App\Models\Component', 'components_assets', 'asset_id', 'component_id')->withPivot('id', 'assigned_qty', 'created_at')->withTrashed(); } From 3b7ce0091c3cf8277e91eea88a552425c4d359a1 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 23 Sep 2021 17:23:53 -0700 Subject: [PATCH 024/144] Load components in the assets API if components=true in API request Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 31 +++++++++++++------ app/Http/Controllers/Api/UsersController.php | 4 +-- app/Http/Transformers/AssetsTransformer.php | 22 +++++++++++++ 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 7a333e708..a4321cf0c 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -118,7 +118,7 @@ class AssetsController extends Controller ->with('location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo', 'model.category', 'model.manufacturer', 'model.fieldset','supplier'); - + // These are used by the API to query against specific ID numbers. // They are also used by the individual searches on detail pages like // locations, etc. @@ -270,7 +270,7 @@ class AssetsController extends Controller $assets->TextSearch($request->input('search')); } - + // This is kinda gross, but we need to do this because the Bootstrap Tables // API passes custom field ordering as custom_fields.fieldname, and we have to strip // that out to let the default sorter below order them correctly on the assets table. @@ -319,12 +319,25 @@ class AssetsController extends Controller $total = $assets->count(); $assets = $assets->skip($offset)->take($limit)->get(); + + + /** + * Include additional associated relationships + */ + if ($request->input('components')) { + $assets->load(['components' => function ($query) { + $query->orderBy('created_at', 'desc'); + }]); + } + + + /** * Here we're just determining which Transformer (via $transformer) to use based on the * variables we set earlier on in this method - we default to AssetsTransformer. */ - return (new $transformer)->transformAssets($assets, $total); + return (new $transformer)->transformAssets($assets, $total, $request); } @@ -336,11 +349,11 @@ class AssetsController extends Controller * @since [v4.2.1] * @return JsonResponse */ - public function showByTag($tag) + public function showByTag(Request $request, $tag) { if ($asset = Asset::with('assetstatus')->with('assignedTo')->where('asset_tag',$tag)->first()) { $this->authorize('view', $asset); - return (new AssetsTransformer)->transformAsset($asset); + return (new AssetsTransformer)->transformAsset($asset, $request); } return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200); @@ -354,7 +367,7 @@ class AssetsController extends Controller * @since [v4.2.1] * @return JsonResponse */ - public function showBySerial($serial) + public function showBySerial(Request $request, $serial) { $this->authorize('index', Asset::class); if ($assets = Asset::with('assetstatus')->with('assignedTo') @@ -374,17 +387,17 @@ class AssetsController extends Controller * @since [v4.0] * @return JsonResponse */ - public function show($id) + public function show(Request $request, $id) { if ($asset = Asset::with('assetstatus')->with('assignedTo')->withTrashed() ->withCount('checkins as checkins_count', 'checkouts as checkouts_count', 'userRequests as user_requests_count')->findOrFail($id)) { $this->authorize('view', $asset); - return (new AssetsTransformer)->transformAsset($asset); + return (new AssetsTransformer)->transformAsset($asset, $request->input('components') ); } } - public function licenses($id) + public function licenses(Request $request, $id) { $this->authorize('view', Asset::class); $this->authorize('view', License::class); diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 689348046..e1ba5461d 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -440,12 +440,12 @@ class UsersController extends Controller * @param $userId * @return string JSON */ - public function assets($id) + public function assets(Request $request, $id) { $this->authorize('view', User::class); $this->authorize('view', Asset::class); $assets = Asset::where('assigned_to', '=', $id)->where('assigned_type', '=', User::class)->with('model')->get(); - return (new AssetsTransformer)->transformAssets($assets, $assets->count()); + return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request); } /** diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index 400a5dd11..43949db0c 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -134,6 +134,28 @@ class AssetsTransformer } + + if (request('components')=='true') { + + if ($asset->components) { + $array['components'] = []; + + foreach ($asset->components as $component) { + $array['components'][] = [ + [ + 'id' => $component->id, + 'name' => $component->name, + 'qty' => $component->pivot->assigned_qty, + 'price_cost' => $component->purchase_cost, + 'purchase_total' => $component->purchase_cost * $component->pivot->assigned_qty, + 'checkout_date' => Helper::getFormattedDateObject($component->pivot->created_at, 'datetime') , + ] + ]; + } + } + + } + $array += $permissions_array; return $array; } From 2f9582ee5c18213fdb81b6ae25679c984618e888 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 23 Sep 2021 17:31:19 -0700 Subject: [PATCH 025/144] Switched to loadMissing for performance Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index a4321cf0c..57f94fa10 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -325,7 +325,7 @@ class AssetsController extends Controller * Include additional associated relationships */ if ($request->input('components')) { - $assets->load(['components' => function ($query) { + $assets->loadMissing(['components' => function ($query) { $query->orderBy('created_at', 'desc'); }]); } From fedf51dda464f47dc33e1c993d8519d0771c06b3 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 23 Sep 2021 18:29:47 -0700 Subject: [PATCH 026/144] Fixed typo Signed-off-by: snipe --- resources/views/users/edit.blade.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index dbc85b446..a76c1cffa 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -511,9 +511,7 @@ @endif @if (!Auth::user()->hasAccess('admin')) -

Only users with admins rights or greater may grant a user admin access.

- @else - farts +

Only users with admins rights or greater may grant a user admin access.

@endif From d069d032fcb2300b1241991095a3f6bead957b8d Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 23 Sep 2021 18:59:13 -0700 Subject: [PATCH 027/144] Updated JS asset Signed-off-by: snipe --- public/js/dist/bootstrap-table.js | 19889 +--------------------------- 1 file changed, 1 insertion(+), 19888 deletions(-) diff --git a/public/js/dist/bootstrap-table.js b/public/js/dist/bootstrap-table.js index 2c7f4ef86..520c059c2 100644 --- a/public/js/dist/bootstrap-table.js +++ b/public/js/dist/bootstrap-table.js @@ -1,19888 +1 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : - typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BootstrapTable = factory(global.jQuery)); -}(this, (function ($) { 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var $__default = /*#__PURE__*/_interopDefaultLegacy($); - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var check = function (it) { - return it && it.Math == Math && it; - }; - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global_1 = - // eslint-disable-next-line no-undef - check(typeof globalThis == 'object' && globalThis) || - check(typeof window == 'object' && window) || - check(typeof self == 'object' && self) || - check(typeof commonjsGlobal == 'object' && commonjsGlobal) || - // eslint-disable-next-line no-new-func - (function () { return this; })() || Function('return this')(); - - var fails = function (exec) { - try { - return !!exec(); - } catch (error) { - return true; - } - }; - - // Thank's IE8 for his funny defineProperty - var descriptors = !fails(function () { - return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; - }); - - var nativePropertyIsEnumerable = {}.propertyIsEnumerable; - var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // Nashorn ~ JDK8 bug - var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); - - // `Object.prototype.propertyIsEnumerable` method implementation - // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable - var f = NASHORN_BUG ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; - } : nativePropertyIsEnumerable; - - var objectPropertyIsEnumerable = { - f: f - }; - - var createPropertyDescriptor = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var toString = {}.toString; - - var classofRaw = function (it) { - return toString.call(it).slice(8, -1); - }; - - var split = ''.split; - - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var indexedObject = fails(function () { - // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 - // eslint-disable-next-line no-prototype-builtins - return !Object('z').propertyIsEnumerable(0); - }) ? function (it) { - return classofRaw(it) == 'String' ? split.call(it, '') : Object(it); - } : Object; - - // `RequireObjectCoercible` abstract operation - // https://tc39.github.io/ecma262/#sec-requireobjectcoercible - var requireObjectCoercible = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; - }; - - // toObject with fallback for non-array-like ES3 strings - - - - var toIndexedObject = function (it) { - return indexedObject(requireObjectCoercible(it)); - }; - - var isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - // `ToPrimitive` abstract operation - // https://tc39.github.io/ecma262/#sec-toprimitive - // instead of the ES6 spec version, we didn't implement @@toPrimitive case - // and the second argument - flag - preferred type is a string - var toPrimitive = function (input, PREFERRED_STRING) { - if (!isObject(input)) return input; - var fn, val; - if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val; - if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val; - throw TypeError("Can't convert object to primitive value"); - }; - - var hasOwnProperty = {}.hasOwnProperty; - - var has = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - var document$1 = global_1.document; - // typeof document.createElement is 'object' in old IE - var EXISTS = isObject(document$1) && isObject(document$1.createElement); - - var documentCreateElement = function (it) { - return EXISTS ? document$1.createElement(it) : {}; - }; - - // Thank's IE8 for his funny defineProperty - var ie8DomDefine = !descriptors && !fails(function () { - return Object.defineProperty(documentCreateElement('div'), 'a', { - get: function () { return 7; } - }).a != 7; - }); - - var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - - // `Object.getOwnPropertyDescriptor` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor - var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { - O = toIndexedObject(O); - P = toPrimitive(P, true); - if (ie8DomDefine) try { - return nativeGetOwnPropertyDescriptor(O, P); - } catch (error) { /* empty */ } - if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]); - }; - - var objectGetOwnPropertyDescriptor = { - f: f$1 - }; - - var anObject = function (it) { - if (!isObject(it)) { - throw TypeError(String(it) + ' is not an object'); - } return it; - }; - - var nativeDefineProperty = Object.defineProperty; - - // `Object.defineProperty` method - // https://tc39.github.io/ecma262/#sec-object.defineproperty - var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (ie8DomDefine) try { - return nativeDefineProperty(O, P, Attributes); - } catch (error) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; - }; - - var objectDefineProperty = { - f: f$2 - }; - - var createNonEnumerableProperty = descriptors ? function (object, key, value) { - return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var setGlobal = function (key, value) { - try { - createNonEnumerableProperty(global_1, key, value); - } catch (error) { - global_1[key] = value; - } return value; - }; - - var SHARED = '__core-js_shared__'; - var store = global_1[SHARED] || setGlobal(SHARED, {}); - - var sharedStore = store; - - var functionToString = Function.toString; - - // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper - if (typeof sharedStore.inspectSource != 'function') { - sharedStore.inspectSource = function (it) { - return functionToString.call(it); - }; - } - - var inspectSource = sharedStore.inspectSource; - - var WeakMap = global_1.WeakMap; - - var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); - - var shared = createCommonjsModule(function (module) { - (module.exports = function (key, value) { - return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: '3.8.1', - mode: 'global', - copyright: '© 2020 Denis Pushkarev (zloirock.ru)' - }); - }); - - var id = 0; - var postfix = Math.random(); - - var uid = function (key) { - return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); - }; - - var keys = shared('keys'); - - var sharedKey = function (key) { - return keys[key] || (keys[key] = uid(key)); - }; - - var hiddenKeys = {}; - - var WeakMap$1 = global_1.WeakMap; - var set, get, has$1; - - var enforce = function (it) { - return has$1(it) ? get(it) : set(it, {}); - }; - - var getterFor = function (TYPE) { - return function (it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - } return state; - }; - }; - - if (nativeWeakMap) { - var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1()); - var wmget = store$1.get; - var wmhas = store$1.has; - var wmset = store$1.set; - set = function (it, metadata) { - metadata.facade = it; - wmset.call(store$1, it, metadata); - return metadata; - }; - get = function (it) { - return wmget.call(store$1, it) || {}; - }; - has$1 = function (it) { - return wmhas.call(store$1, it); - }; - } else { - var STATE = sharedKey('state'); - hiddenKeys[STATE] = true; - set = function (it, metadata) { - metadata.facade = it; - createNonEnumerableProperty(it, STATE, metadata); - return metadata; - }; - get = function (it) { - return has(it, STATE) ? it[STATE] : {}; - }; - has$1 = function (it) { - return has(it, STATE); - }; - } - - var internalState = { - set: set, - get: get, - has: has$1, - enforce: enforce, - getterFor: getterFor - }; - - var redefine = createCommonjsModule(function (module) { - var getInternalState = internalState.get; - var enforceInternalState = internalState.enforce; - var TEMPLATE = String(String).split('String'); - - (module.exports = function (O, key, value, options) { - var unsafe = options ? !!options.unsafe : false; - var simple = options ? !!options.enumerable : false; - var noTargetGet = options ? !!options.noTargetGet : false; - var state; - if (typeof value == 'function') { - if (typeof key == 'string' && !has(value, 'name')) { - createNonEnumerableProperty(value, 'name', key); - } - state = enforceInternalState(value); - if (!state.source) { - state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); - } - } - if (O === global_1) { - if (simple) O[key] = value; - else setGlobal(key, value); - return; - } else if (!unsafe) { - delete O[key]; - } else if (!noTargetGet && O[key]) { - simple = true; - } - if (simple) O[key] = value; - else createNonEnumerableProperty(O, key, value); - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, 'toString', function toString() { - return typeof this == 'function' && getInternalState(this).source || inspectSource(this); - }); - }); - - var path = global_1; - - var aFunction = function (variable) { - return typeof variable == 'function' ? variable : undefined; - }; - - var getBuiltIn = function (namespace, method) { - return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) - : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method]; - }; - - var ceil = Math.ceil; - var floor = Math.floor; - - // `ToInteger` abstract operation - // https://tc39.github.io/ecma262/#sec-tointeger - var toInteger = function (argument) { - return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); - }; - - var min = Math.min; - - // `ToLength` abstract operation - // https://tc39.github.io/ecma262/#sec-tolength - var toLength = function (argument) { - return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 - }; - - var max = Math.max; - var min$1 = Math.min; - - // Helper for a popular repeating case of the spec: - // Let integer be ? ToInteger(index). - // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). - var toAbsoluteIndex = function (index, length) { - var integer = toInteger(index); - return integer < 0 ? max(integer + length, 0) : min$1(integer, length); - }; - - // `Array.prototype.{ indexOf, includes }` methods implementation - var createMethod = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIndexedObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) { - if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; - }; - - var arrayIncludes = { - // `Array.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - includes: createMethod(true), - // `Array.prototype.indexOf` method - // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - indexOf: createMethod(false) - }; - - var indexOf = arrayIncludes.indexOf; - - - var objectKeysInternal = function (object, names) { - var O = toIndexedObject(object); - var i = 0; - var result = []; - var key; - for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~indexOf(result, key) || result.push(key); - } - return result; - }; - - // IE8- don't enum bug keys - var enumBugKeys = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - - var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); - - // `Object.getOwnPropertyNames` method - // https://tc39.github.io/ecma262/#sec-object.getownpropertynames - var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return objectKeysInternal(O, hiddenKeys$1); - }; - - var objectGetOwnPropertyNames = { - f: f$3 - }; - - var f$4 = Object.getOwnPropertySymbols; - - var objectGetOwnPropertySymbols = { - f: f$4 - }; - - // all object keys, includes non-enumerable and symbols - var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { - var keys = objectGetOwnPropertyNames.f(anObject(it)); - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; - }; - - var copyConstructorProperties = function (target, source) { - var keys = ownKeys(source); - var defineProperty = objectDefineProperty.f; - var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - }; - - var replacement = /#|\.prototype\./; - - var isForced = function (feature, detection) { - var value = data[normalize(feature)]; - return value == POLYFILL ? true - : value == NATIVE ? false - : typeof detection == 'function' ? fails(detection) - : !!detection; - }; - - var normalize = isForced.normalize = function (string) { - return String(string).replace(replacement, '.').toLowerCase(); - }; - - var data = isForced.data = {}; - var NATIVE = isForced.NATIVE = 'N'; - var POLYFILL = isForced.POLYFILL = 'P'; - - var isForced_1 = isForced; - - var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f; - - - - - - - /* - options.target - name of the target object - options.global - target is the global object - options.stat - export as static methods of target - options.proto - export as prototype methods of target - options.real - real prototype method for the `pure` version - options.forced - export even if the native feature is available - options.bind - bind methods to the target, required for the `pure` version - options.wrap - wrap constructors to preventing global pollution, required for the `pure` version - options.unsafe - use the simple assignment of property instead of delete + defineProperty - options.sham - add a flag to not completely full polyfills - options.enumerable - export as enumerable property - options.noTargetGet - prevent calling a getter on target - */ - var _export = function (options, source) { - var TARGET = options.target; - var GLOBAL = options.global; - var STATIC = options.stat; - var FORCED, target, key, targetProperty, sourceProperty, descriptor; - if (GLOBAL) { - target = global_1; - } else if (STATIC) { - target = global_1[TARGET] || setGlobal(TARGET, {}); - } else { - target = (global_1[TARGET] || {}).prototype; - } - if (target) for (key in source) { - sourceProperty = source[key]; - if (options.noTargetGet) { - descriptor = getOwnPropertyDescriptor$1(target, key); - targetProperty = descriptor && descriptor.value; - } else targetProperty = target[key]; - FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); - // contained in target - if (!FORCED && targetProperty !== undefined) { - if (typeof sourceProperty === typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - // add a flag to not completely full polyfills - if (options.sham || (targetProperty && targetProperty.sham)) { - createNonEnumerableProperty(sourceProperty, 'sham', true); - } - // extend global - redefine(target, key, sourceProperty, options); - } - }; - - // `IsArray` abstract operation - // https://tc39.github.io/ecma262/#sec-isarray - var isArray = Array.isArray || function isArray(arg) { - return classofRaw(arg) == 'Array'; - }; - - // `ToObject` abstract operation - // https://tc39.github.io/ecma262/#sec-toobject - var toObject = function (argument) { - return Object(requireObjectCoercible(argument)); - }; - - var createProperty = function (object, key, value) { - var propertyKey = toPrimitive(key); - if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value)); - else object[propertyKey] = value; - }; - - var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { - // Chrome 38 Symbol has incorrect toString conversion - // eslint-disable-next-line no-undef - return !String(Symbol()); - }); - - var useSymbolAsUid = nativeSymbol - // eslint-disable-next-line no-undef - && !Symbol.sham - // eslint-disable-next-line no-undef - && typeof Symbol.iterator == 'symbol'; - - var WellKnownSymbolsStore = shared('wks'); - var Symbol$1 = global_1.Symbol; - var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid; - - var wellKnownSymbol = function (name) { - if (!has(WellKnownSymbolsStore, name)) { - if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name]; - else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); - } return WellKnownSymbolsStore[name]; - }; - - var SPECIES = wellKnownSymbol('species'); - - // `ArraySpeciesCreate` abstract operation - // https://tc39.github.io/ecma262/#sec-arrayspeciescreate - var arraySpeciesCreate = function (originalArray, length) { - var C; - if (isArray(originalArray)) { - C = originalArray.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - else if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return new (C === undefined ? Array : C)(length === 0 ? 0 : length); - }; - - var engineUserAgent = getBuiltIn('navigator', 'userAgent') || ''; - - var process = global_1.process; - var versions = process && process.versions; - var v8 = versions && versions.v8; - var match, version; - - if (v8) { - match = v8.split('.'); - version = match[0] + match[1]; - } else if (engineUserAgent) { - match = engineUserAgent.match(/Edge\/(\d+)/); - if (!match || match[1] >= 74) { - match = engineUserAgent.match(/Chrome\/(\d+)/); - if (match) version = match[1]; - } - } - - var engineV8Version = version && +version; - - var SPECIES$1 = wellKnownSymbol('species'); - - var arrayMethodHasSpeciesSupport = function (METHOD_NAME) { - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/677 - return engineV8Version >= 51 || !fails(function () { - var array = []; - var constructor = array.constructor = {}; - constructor[SPECIES$1] = function () { - return { foo: 1 }; - }; - return array[METHOD_NAME](Boolean).foo !== 1; - }); - }; - - var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); - var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; - var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; - - // We can't use this feature detection in V8 since it causes - // deoptimization and serious performance degradation - // https://github.com/zloirock/core-js/issues/679 - var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () { - var array = []; - array[IS_CONCAT_SPREADABLE] = false; - return array.concat()[0] !== array; - }); - - var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); - - var isConcatSpreadable = function (O) { - if (!isObject(O)) return false; - var spreadable = O[IS_CONCAT_SPREADABLE]; - return spreadable !== undefined ? !!spreadable : isArray(O); - }; - - var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; - - // `Array.prototype.concat` method - // https://tc39.github.io/ecma262/#sec-array.prototype.concat - // with adding support of @@isConcatSpreadable and @@species - _export({ target: 'Array', proto: true, forced: FORCED }, { - concat: function concat(arg) { // eslint-disable-line no-unused-vars - var O = toObject(this); - var A = arraySpeciesCreate(O, 0); - var n = 0; - var i, k, length, len, E; - for (i = -1, length = arguments.length; i < length; i++) { - E = i === -1 ? O : arguments[i]; - if (isConcatSpreadable(E)) { - len = toLength(E.length); - if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); - } else { - if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); - createProperty(A, n++, E); - } - } - A.length = n; - return A; - } - }); - - var aFunction$1 = function (it) { - if (typeof it != 'function') { - throw TypeError(String(it) + ' is not a function'); - } return it; - }; - - // optional / simple context binding - var functionBindContext = function (fn, that, length) { - aFunction$1(fn); - if (that === undefined) return fn; - switch (length) { - case 0: return function () { - return fn.call(that); - }; - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var push = [].push; - - // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation - var createMethod$1 = function (TYPE) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var IS_FILTER_OUT = TYPE == 7; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - return function ($this, callbackfn, that, specificCreate) { - var O = toObject($this); - var self = indexedObject(O); - var boundFunction = functionBindContext(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var create = specificCreate || arraySpeciesCreate; - var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined; - var value, result; - for (;length > index; index++) if (NO_HOLES || index in self) { - value = self[index]; - result = boundFunction(value, index, O); - if (TYPE) { - if (IS_MAP) target[index] = result; // map - else if (result) switch (TYPE) { - case 3: return true; // some - case 5: return value; // find - case 6: return index; // findIndex - case 2: push.call(target, value); // filter - } else switch (TYPE) { - case 4: return false; // every - case 7: push.call(target, value); // filterOut - } - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; - }; - - var arrayIteration = { - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - forEach: createMethod$1(0), - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - map: createMethod$1(1), - // `Array.prototype.filter` method - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - filter: createMethod$1(2), - // `Array.prototype.some` method - // https://tc39.github.io/ecma262/#sec-array.prototype.some - some: createMethod$1(3), - // `Array.prototype.every` method - // https://tc39.github.io/ecma262/#sec-array.prototype.every - every: createMethod$1(4), - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - find: createMethod$1(5), - // `Array.prototype.findIndex` method - // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex - findIndex: createMethod$1(6), - // `Array.prototype.filterOut` method - // https://github.com/tc39/proposal-array-filtering - filterOut: createMethod$1(7) - }; - - var defineProperty = Object.defineProperty; - var cache = {}; - - var thrower = function (it) { throw it; }; - - var arrayMethodUsesToLength = function (METHOD_NAME, options) { - if (has(cache, METHOD_NAME)) return cache[METHOD_NAME]; - if (!options) options = {}; - var method = [][METHOD_NAME]; - var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false; - var argument0 = has(options, 0) ? options[0] : thrower; - var argument1 = has(options, 1) ? options[1] : undefined; - - return cache[METHOD_NAME] = !!method && !fails(function () { - if (ACCESSORS && !descriptors) return true; - var O = { length: -1 }; - - if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower }); - else O[1] = 1; - - method.call(O, argument0, argument1); - }); - }; - - var $filter = arrayIteration.filter; - - - - var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); - // Edge 14- issue - var USES_TO_LENGTH = arrayMethodUsesToLength('filter'); - - // `Array.prototype.filter` method - // https://tc39.github.io/ecma262/#sec-array.prototype.filter - // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, { - filter: function filter(callbackfn /* , thisArg */) { - return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // `Object.keys` method - // https://tc39.github.io/ecma262/#sec-object.keys - var objectKeys = Object.keys || function keys(O) { - return objectKeysInternal(O, enumBugKeys); - }; - - // `Object.defineProperties` method - // https://tc39.github.io/ecma262/#sec-object.defineproperties - var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = objectKeys(Properties); - var length = keys.length; - var index = 0; - var key; - while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]); - return O; - }; - - var html = getBuiltIn('document', 'documentElement'); - - var GT = '>'; - var LT = '<'; - var PROTOTYPE = 'prototype'; - var SCRIPT = 'script'; - var IE_PROTO = sharedKey('IE_PROTO'); - - var EmptyConstructor = function () { /* empty */ }; - - var scriptTag = function (content) { - return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; - }; - - // Create object with fake `null` prototype: use ActiveX Object with cleared prototype - var NullProtoObjectViaActiveX = function (activeXDocument) { - activeXDocument.write(scriptTag('')); - activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - activeXDocument = null; // avoid memory leak - return temp; - }; - - // Create object with fake `null` prototype: use iframe Object with cleared prototype - var NullProtoObjectViaIFrame = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = documentCreateElement('iframe'); - var JS = 'java' + SCRIPT + ':'; - var iframeDocument; - iframe.style.display = 'none'; - html.appendChild(iframe); - // https://github.com/zloirock/core-js/issues/475 - iframe.src = String(JS); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(scriptTag('document.F=Object')); - iframeDocument.close(); - return iframeDocument.F; - }; - - // Check for document.domain and active x support - // No need to use active x approach when document.domain is not set - // see https://github.com/es-shims/es5-shim/issues/150 - // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 - // avoid IE GC bug - var activeXDocument; - var NullProtoObject = function () { - try { - /* global ActiveXObject */ - activeXDocument = document.domain && new ActiveXObject('htmlfile'); - } catch (error) { /* ignore */ } - NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); - var length = enumBugKeys.length; - while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; - return NullProtoObject(); - }; - - hiddenKeys[IE_PROTO] = true; - - // `Object.create` method - // https://tc39.github.io/ecma262/#sec-object.create - var objectCreate = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - EmptyConstructor[PROTOTYPE] = anObject(O); - result = new EmptyConstructor(); - EmptyConstructor[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = NullProtoObject(); - return Properties === undefined ? result : objectDefineProperties(result, Properties); - }; - - var UNSCOPABLES = wellKnownSymbol('unscopables'); - var ArrayPrototype = Array.prototype; - - // Array.prototype[@@unscopables] - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - if (ArrayPrototype[UNSCOPABLES] == undefined) { - objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, { - configurable: true, - value: objectCreate(null) - }); - } - - // add a key to Array.prototype[@@unscopables] - var addToUnscopables = function (key) { - ArrayPrototype[UNSCOPABLES][key] = true; - }; - - var $find = arrayIteration.find; - - - - var FIND = 'find'; - var SKIPS_HOLES = true; - - var USES_TO_LENGTH$1 = arrayMethodUsesToLength(FIND); - - // Shouldn't skip holes - if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; }); - - // `Array.prototype.find` method - // https://tc39.github.io/ecma262/#sec-array.prototype.find - _export({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH$1 }, { - find: function find(callbackfn /* , that = undefined */) { - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables(FIND); - - var $findIndex = arrayIteration.findIndex; - - - - var FIND_INDEX = 'findIndex'; - var SKIPS_HOLES$1 = true; - - var USES_TO_LENGTH$2 = arrayMethodUsesToLength(FIND_INDEX); - - // Shouldn't skip holes - if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES$1 = false; }); - - // `Array.prototype.findIndex` method - // https://tc39.github.io/ecma262/#sec-array.prototype.findindex - _export({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 || !USES_TO_LENGTH$2 }, { - findIndex: function findIndex(callbackfn /* , that = undefined */) { - return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables(FIND_INDEX); - - var arrayMethodIsStrict = function (METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return !!method && fails(function () { - // eslint-disable-next-line no-useless-call,no-throw-literal - method.call(null, argument || function () { throw 1; }, 1); - }); - }; - - var $forEach = arrayIteration.forEach; - - - - var STRICT_METHOD = arrayMethodIsStrict('forEach'); - var USES_TO_LENGTH$3 = arrayMethodUsesToLength('forEach'); - - // `Array.prototype.forEach` method implementation - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$3) ? function forEach(callbackfn /* , thisArg */) { - return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } : [].forEach; - - // `Array.prototype.forEach` method - // https://tc39.github.io/ecma262/#sec-array.prototype.foreach - _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, { - forEach: arrayForEach - }); - - var $includes = arrayIncludes.includes; - - - - var USES_TO_LENGTH$4 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); - - // `Array.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-array.prototype.includes - _export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$4 }, { - includes: function includes(el /* , fromIndex = 0 */) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables('includes'); - - var $indexOf = arrayIncludes.indexOf; - - - - var nativeIndexOf = [].indexOf; - - var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0; - var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf'); - var USES_TO_LENGTH$5 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 }); - - // `Array.prototype.indexOf` method - // https://tc39.github.io/ecma262/#sec-array.prototype.indexof - _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$5 }, { - indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { - return NEGATIVE_ZERO - // convert -0 to +0 - ? nativeIndexOf.apply(this, arguments) || 0 - : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - var correctPrototypeGetter = !fails(function () { - function F() { /* empty */ } - F.prototype.constructor = null; - return Object.getPrototypeOf(new F()) !== F.prototype; - }); - - var IE_PROTO$1 = sharedKey('IE_PROTO'); - var ObjectPrototype = Object.prototype; - - // `Object.getPrototypeOf` method - // https://tc39.github.io/ecma262/#sec-object.getprototypeof - var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) { - O = toObject(O); - if (has(O, IE_PROTO$1)) return O[IE_PROTO$1]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectPrototype : null; - }; - - var ITERATOR = wellKnownSymbol('iterator'); - var BUGGY_SAFARI_ITERATORS = false; - - var returnThis = function () { return this; }; - - // `%IteratorPrototype%` object - // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object - var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; - - if ([].keys) { - arrayIterator = [].keys(); - // Safari 8 has buggy iterators w/o `next` - if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; - else { - PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)); - if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; - } - } - - if (IteratorPrototype == undefined) IteratorPrototype = {}; - - // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() - if ( !has(IteratorPrototype, ITERATOR)) { - createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); - } - - var iteratorsCore = { - IteratorPrototype: IteratorPrototype, - BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS - }; - - var defineProperty$1 = objectDefineProperty.f; - - - - var TO_STRING_TAG = wellKnownSymbol('toStringTag'); - - var setToStringTag = function (it, TAG, STATIC) { - if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { - defineProperty$1(it, TO_STRING_TAG, { configurable: true, value: TAG }); - } - }; - - var IteratorPrototype$1 = iteratorsCore.IteratorPrototype; - - var createIteratorConstructor = function (IteratorConstructor, NAME, next) { - var TO_STRING_TAG = NAME + ' Iterator'; - IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) }); - setToStringTag(IteratorConstructor, TO_STRING_TAG, false); - return IteratorConstructor; - }; - - var aPossiblePrototype = function (it) { - if (!isObject(it) && it !== null) { - throw TypeError("Can't set " + String(it) + ' as a prototype'); - } return it; - }; - - // `Object.setPrototypeOf` method - // https://tc39.github.io/ecma262/#sec-object.setprototypeof - // Works with __proto__ only. Old v8 can't work with null proto objects. - /* eslint-disable no-proto */ - var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () { - var CORRECT_SETTER = false; - var test = {}; - var setter; - try { - setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; - setter.call(test, []); - CORRECT_SETTER = test instanceof Array; - } catch (error) { /* empty */ } - return function setPrototypeOf(O, proto) { - anObject(O); - aPossiblePrototype(proto); - if (CORRECT_SETTER) setter.call(O, proto); - else O.__proto__ = proto; - return O; - }; - }() : undefined); - - var IteratorPrototype$2 = iteratorsCore.IteratorPrototype; - var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS; - var ITERATOR$1 = wellKnownSymbol('iterator'); - var KEYS = 'keys'; - var VALUES = 'values'; - var ENTRIES = 'entries'; - - var returnThis$1 = function () { return this; }; - - var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { - createIteratorConstructor(IteratorConstructor, NAME, next); - - var getIterationMethod = function (KIND) { - if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS$1 && KIND in IterablePrototype) return IterablePrototype[KIND]; - switch (KIND) { - case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; - case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; - case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; - } return function () { return new IteratorConstructor(this); }; - }; - - var TO_STRING_TAG = NAME + ' Iterator'; - var INCORRECT_VALUES_NAME = false; - var IterablePrototype = Iterable.prototype; - var nativeIterator = IterablePrototype[ITERATOR$1] - || IterablePrototype['@@iterator'] - || DEFAULT && IterablePrototype[DEFAULT]; - var defaultIterator = !BUGGY_SAFARI_ITERATORS$1 && nativeIterator || getIterationMethod(DEFAULT); - var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; - var CurrentIteratorPrototype, methods, KEY; - - // fix native - if (anyNativeIterator) { - CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable())); - if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) { - if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) { - if (objectSetPrototypeOf) { - objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2); - } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') { - createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis$1); - } - } - // Set @@toStringTag to native iterators - setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true); - } - } - - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { - INCORRECT_VALUES_NAME = true; - defaultIterator = function values() { return nativeIterator.call(this); }; - } - - // define iterator - if ( IterablePrototype[ITERATOR$1] !== defaultIterator) { - createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator); - } - - // export additional methods - if (DEFAULT) { - methods = { - values: getIterationMethod(VALUES), - keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), - entries: getIterationMethod(ENTRIES) - }; - if (FORCED) for (KEY in methods) { - if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { - redefine(IterablePrototype, KEY, methods[KEY]); - } - } else _export({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME }, methods); - } - - return methods; - }; - - var ARRAY_ITERATOR = 'Array Iterator'; - var setInternalState = internalState.set; - var getInternalState = internalState.getterFor(ARRAY_ITERATOR); - - // `Array.prototype.entries` method - // https://tc39.github.io/ecma262/#sec-array.prototype.entries - // `Array.prototype.keys` method - // https://tc39.github.io/ecma262/#sec-array.prototype.keys - // `Array.prototype.values` method - // https://tc39.github.io/ecma262/#sec-array.prototype.values - // `Array.prototype[@@iterator]` method - // https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator - // `CreateArrayIterator` internal method - // https://tc39.github.io/ecma262/#sec-createarrayiterator - var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) { - setInternalState(this, { - type: ARRAY_ITERATOR, - target: toIndexedObject(iterated), // target - index: 0, // next index - kind: kind // kind - }); - // `%ArrayIteratorPrototype%.next` method - // https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next - }, function () { - var state = getInternalState(this); - var target = state.target; - var kind = state.kind; - var index = state.index++; - if (!target || index >= target.length) { - state.target = undefined; - return { value: undefined, done: true }; - } - if (kind == 'keys') return { value: index, done: false }; - if (kind == 'values') return { value: target[index], done: false }; - return { value: [index, target[index]], done: false }; - }, 'values'); - - // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables - addToUnscopables('keys'); - addToUnscopables('values'); - addToUnscopables('entries'); - - var nativeJoin = [].join; - - var ES3_STRINGS = indexedObject != Object; - var STRICT_METHOD$2 = arrayMethodIsStrict('join', ','); - - // `Array.prototype.join` method - // https://tc39.github.io/ecma262/#sec-array.prototype.join - _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, { - join: function join(separator) { - return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator); - } - }); - - var $map = arrayIteration.map; - - - - var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('map'); - // FF49- issue - var USES_TO_LENGTH$6 = arrayMethodUsesToLength('map'); - - // `Array.prototype.map` method - // https://tc39.github.io/ecma262/#sec-array.prototype.map - // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$6 }, { - map: function map(callbackfn /* , thisArg */) { - return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } - }); - - var nativeReverse = [].reverse; - var test = [1, 2]; - - // `Array.prototype.reverse` method - // https://tc39.github.io/ecma262/#sec-array.prototype.reverse - // fix for Safari 12.0 bug - // https://bugs.webkit.org/show_bug.cgi?id=188794 - _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, { - reverse: function reverse() { - // eslint-disable-next-line no-self-assign - if (isArray(this)) this.length = this.length; - return nativeReverse.call(this); - } - }); - - var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice'); - var USES_TO_LENGTH$7 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 }); - - var SPECIES$2 = wellKnownSymbol('species'); - var nativeSlice = [].slice; - var max$1 = Math.max; - - // `Array.prototype.slice` method - // https://tc39.github.io/ecma262/#sec-array.prototype.slice - // fallback for not array-like ES3 strings and DOM objects - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$7 }, { - slice: function slice(start, end) { - var O = toIndexedObject(this); - var length = toLength(O.length); - var k = toAbsoluteIndex(start, length); - var fin = toAbsoluteIndex(end === undefined ? length : end, length); - // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible - var Constructor, result, n; - if (isArray(O)) { - Constructor = O.constructor; - // cross-realm fallback - if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) { - Constructor = undefined; - } else if (isObject(Constructor)) { - Constructor = Constructor[SPECIES$2]; - if (Constructor === null) Constructor = undefined; - } - if (Constructor === Array || Constructor === undefined) { - return nativeSlice.call(O, k, fin); - } - } - result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0)); - for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); - result.length = n; - return result; - } - }); - - var test$1 = []; - var nativeSort = test$1.sort; - - // IE8- - var FAILS_ON_UNDEFINED = fails(function () { - test$1.sort(undefined); - }); - // V8 bug - var FAILS_ON_NULL = fails(function () { - test$1.sort(null); - }); - // Old WebKit - var STRICT_METHOD$3 = arrayMethodIsStrict('sort'); - - var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$3; - - // `Array.prototype.sort` method - // https://tc39.github.io/ecma262/#sec-array.prototype.sort - _export({ target: 'Array', proto: true, forced: FORCED$1 }, { - sort: function sort(comparefn) { - return comparefn === undefined - ? nativeSort.call(toObject(this)) - : nativeSort.call(toObject(this), aFunction$1(comparefn)); - } - }); - - var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice'); - var USES_TO_LENGTH$8 = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 }); - - var max$2 = Math.max; - var min$2 = Math.min; - var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF; - var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; - - // `Array.prototype.splice` method - // https://tc39.github.io/ecma262/#sec-array.prototype.splice - // with adding support of @@species - _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$8 }, { - splice: function splice(start, deleteCount /* , ...items */) { - var O = toObject(this); - var len = toLength(O.length); - var actualStart = toAbsoluteIndex(start, len); - var argumentsLength = arguments.length; - var insertCount, actualDeleteCount, A, k, from, to; - if (argumentsLength === 0) { - insertCount = actualDeleteCount = 0; - } else if (argumentsLength === 1) { - insertCount = 0; - actualDeleteCount = len - actualStart; - } else { - insertCount = argumentsLength - 2; - actualDeleteCount = min$2(max$2(toInteger(deleteCount), 0), len - actualStart); - } - if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) { - throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); - } - A = arraySpeciesCreate(O, actualDeleteCount); - for (k = 0; k < actualDeleteCount; k++) { - from = actualStart + k; - if (from in O) createProperty(A, k, O[from]); - } - A.length = actualDeleteCount; - if (insertCount < actualDeleteCount) { - for (k = actualStart; k < len - actualDeleteCount; k++) { - from = k + actualDeleteCount; - to = k + insertCount; - if (from in O) O[to] = O[from]; - else delete O[to]; - } - for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; - } else if (insertCount > actualDeleteCount) { - for (k = len - actualDeleteCount; k > actualStart; k--) { - from = k + actualDeleteCount - 1; - to = k + insertCount - 1; - if (from in O) O[to] = O[from]; - else delete O[to]; - } - } - for (k = 0; k < insertCount; k++) { - O[k + actualStart] = arguments[k + 2]; - } - O.length = len - actualDeleteCount + insertCount; - return A; - } - }); - - // makes subclassing work correct for wrapped built-ins - var inheritIfRequired = function ($this, dummy, Wrapper) { - var NewTarget, NewTargetPrototype; - if ( - // it can work only with native `setPrototypeOf` - objectSetPrototypeOf && - // we haven't completely correct pre-ES6 way for getting `new.target`, so use this - typeof (NewTarget = dummy.constructor) == 'function' && - NewTarget !== Wrapper && - isObject(NewTargetPrototype = NewTarget.prototype) && - NewTargetPrototype !== Wrapper.prototype - ) objectSetPrototypeOf($this, NewTargetPrototype); - return $this; - }; - - // a string of all valid unicode whitespaces - // eslint-disable-next-line max-len - var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - - var whitespace = '[' + whitespaces + ']'; - var ltrim = RegExp('^' + whitespace + whitespace + '*'); - var rtrim = RegExp(whitespace + whitespace + '*$'); - - // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation - var createMethod$2 = function (TYPE) { - return function ($this) { - var string = String(requireObjectCoercible($this)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; - }; - }; - - var stringTrim = { - // `String.prototype.{ trimLeft, trimStart }` methods - // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart - start: createMethod$2(1), - // `String.prototype.{ trimRight, trimEnd }` methods - // https://tc39.github.io/ecma262/#sec-string.prototype.trimend - end: createMethod$2(2), - // `String.prototype.trim` method - // https://tc39.github.io/ecma262/#sec-string.prototype.trim - trim: createMethod$2(3) - }; - - var getOwnPropertyNames = objectGetOwnPropertyNames.f; - var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f; - var defineProperty$2 = objectDefineProperty.f; - var trim = stringTrim.trim; - - var NUMBER = 'Number'; - var NativeNumber = global_1[NUMBER]; - var NumberPrototype = NativeNumber.prototype; - - // Opera ~12 has broken Object#toString - var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER; - - // `ToNumber` abstract operation - // https://tc39.github.io/ecma262/#sec-tonumber - var toNumber = function (argument) { - var it = toPrimitive(argument, false); - var first, third, radix, maxCode, digits, length, index, code; - if (typeof it == 'string' && it.length > 2) { - it = trim(it); - first = it.charCodeAt(0); - if (first === 43 || first === 45) { - third = it.charCodeAt(2); - if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix - } else if (first === 48) { - switch (it.charCodeAt(1)) { - case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i - case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i - default: return +it; - } - digits = it.slice(2); - length = digits.length; - for (index = 0; index < length; index++) { - code = digits.charCodeAt(index); - // parseInt parses a string to a first unavailable symbol - // but ToNumber should return NaN if a string contains unavailable symbols - if (code < 48 || code > maxCode) return NaN; - } return parseInt(digits, radix); - } - } return +it; - }; - - // `Number` constructor - // https://tc39.github.io/ecma262/#sec-number-constructor - if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { - var NumberWrapper = function Number(value) { - var it = arguments.length < 1 ? 0 : value; - var dummy = this; - return dummy instanceof NumberWrapper - // check on 1..constructor(foo) case - && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER) - ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it); - }; - for (var keys$1 = descriptors ? getOwnPropertyNames(NativeNumber) : ( - // ES3: - 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + - // ES2015 (in case, if modules with ES2015 Number statics required before): - 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + - 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' + - // ESNext - 'fromString,range' - ).split(','), j = 0, key; keys$1.length > j; j++) { - if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) { - defineProperty$2(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key)); - } - } - NumberWrapper.prototype = NumberPrototype; - NumberPrototype.constructor = NumberWrapper; - redefine(global_1, NUMBER, NumberWrapper); - } - - var nativeAssign = Object.assign; - var defineProperty$3 = Object.defineProperty; - - // `Object.assign` method - // https://tc39.github.io/ecma262/#sec-object.assign - var objectAssign = !nativeAssign || fails(function () { - // should have correct order of operations (Edge bug) - if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$3({}, 'a', { - enumerable: true, - get: function () { - defineProperty$3(this, 'b', { - value: 3, - enumerable: false - }); - } - }), { b: 2 })).b !== 1) return true; - // should work with symbols and should have deterministic property order (V8 bug) - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var symbol = Symbol(); - var alphabet = 'abcdefghijklmnopqrst'; - A[symbol] = 7; - alphabet.split('').forEach(function (chr) { B[chr] = chr; }); - return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet; - }) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var argumentsLength = arguments.length; - var index = 1; - var getOwnPropertySymbols = objectGetOwnPropertySymbols.f; - var propertyIsEnumerable = objectPropertyIsEnumerable.f; - while (argumentsLength > index) { - var S = indexedObject(arguments[index++]); - var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - key = keys[j++]; - if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key]; - } - } return T; - } : nativeAssign; - - // `Object.assign` method - // https://tc39.github.io/ecma262/#sec-object.assign - _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, { - assign: objectAssign - }); - - var propertyIsEnumerable = objectPropertyIsEnumerable.f; - - // `Object.{ entries, values }` methods implementation - var createMethod$3 = function (TO_ENTRIES) { - return function (it) { - var O = toIndexedObject(it); - var keys = objectKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) { - key = keys[i++]; - if (!descriptors || propertyIsEnumerable.call(O, key)) { - result.push(TO_ENTRIES ? [key, O[key]] : O[key]); - } - } - return result; - }; - }; - - var objectToArray = { - // `Object.entries` method - // https://tc39.github.io/ecma262/#sec-object.entries - entries: createMethod$3(true), - // `Object.values` method - // https://tc39.github.io/ecma262/#sec-object.values - values: createMethod$3(false) - }; - - var $entries = objectToArray.entries; - - // `Object.entries` method - // https://tc39.github.io/ecma262/#sec-object.entries - _export({ target: 'Object', stat: true }, { - entries: function entries(O) { - return $entries(O); - } - }); - - var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag'); - var test$2 = {}; - - test$2[TO_STRING_TAG$1] = 'z'; - - var toStringTagSupport = String(test$2) === '[object z]'; - - var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag'); - // ES3 wrong here - var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; - - // fallback for IE11 Script Access Denied error - var tryGet = function (it, key) { - try { - return it[key]; - } catch (error) { /* empty */ } - }; - - // getting tag from ES6+ `Object.prototype.toString` - var classof = toStringTagSupport ? classofRaw : function (it) { - var O, tag, result; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$2)) == 'string' ? tag - // builtinTag case - : CORRECT_ARGUMENTS ? classofRaw(O) - // ES3 arguments fallback - : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; - }; - - // `Object.prototype.toString` method implementation - // https://tc39.github.io/ecma262/#sec-object.prototype.tostring - var objectToString = toStringTagSupport ? {}.toString : function toString() { - return '[object ' + classof(this) + ']'; - }; - - // `Object.prototype.toString` method - // https://tc39.github.io/ecma262/#sec-object.prototype.tostring - if (!toStringTagSupport) { - redefine(Object.prototype, 'toString', objectToString, { unsafe: true }); - } - - var trim$1 = stringTrim.trim; - - - var $parseFloat = global_1.parseFloat; - var FORCED$2 = 1 / $parseFloat(whitespaces + '-0') !== -Infinity; - - // `parseFloat` method - // https://tc39.github.io/ecma262/#sec-parsefloat-string - var numberParseFloat = FORCED$2 ? function parseFloat(string) { - var trimmedString = trim$1(String(string)); - var result = $parseFloat(trimmedString); - return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result; - } : $parseFloat; - - // `parseFloat` method - // https://tc39.github.io/ecma262/#sec-parsefloat-string - _export({ global: true, forced: parseFloat != numberParseFloat }, { - parseFloat: numberParseFloat - }); - - var trim$2 = stringTrim.trim; - - - var $parseInt = global_1.parseInt; - var hex = /^[+-]?0[Xx]/; - var FORCED$3 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22; - - // `parseInt` method - // https://tc39.github.io/ecma262/#sec-parseint-string-radix - var numberParseInt = FORCED$3 ? function parseInt(string, radix) { - var S = trim$2(String(string)); - return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10)); - } : $parseInt; - - // `parseInt` method - // https://tc39.github.io/ecma262/#sec-parseint-string-radix - _export({ global: true, forced: parseInt != numberParseInt }, { - parseInt: numberParseInt - }); - - var MATCH = wellKnownSymbol('match'); - - // `IsRegExp` abstract operation - // https://tc39.github.io/ecma262/#sec-isregexp - var isRegexp = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp'); - }; - - // `RegExp.prototype.flags` getter implementation - // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags - var regexpFlags = function () { - var that = anObject(this); - var result = ''; - if (that.global) result += 'g'; - if (that.ignoreCase) result += 'i'; - if (that.multiline) result += 'm'; - if (that.dotAll) result += 's'; - if (that.unicode) result += 'u'; - if (that.sticky) result += 'y'; - return result; - }; - - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError, - // so we use an intermediate function. - function RE(s, f) { - return RegExp(s, f); - } - - var UNSUPPORTED_Y = fails(function () { - // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError - var re = RE('a', 'y'); - re.lastIndex = 2; - return re.exec('abcd') != null; - }); - - var BROKEN_CARET = fails(function () { - // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 - var re = RE('^r', 'gy'); - re.lastIndex = 2; - return re.exec('str') != null; - }); - - var regexpStickyHelpers = { - UNSUPPORTED_Y: UNSUPPORTED_Y, - BROKEN_CARET: BROKEN_CARET - }; - - var SPECIES$3 = wellKnownSymbol('species'); - - var setSpecies = function (CONSTRUCTOR_NAME) { - var Constructor = getBuiltIn(CONSTRUCTOR_NAME); - var defineProperty = objectDefineProperty.f; - - if (descriptors && Constructor && !Constructor[SPECIES$3]) { - defineProperty(Constructor, SPECIES$3, { - configurable: true, - get: function () { return this; } - }); - } - }; - - var defineProperty$4 = objectDefineProperty.f; - var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f; - - - - - - var setInternalState$1 = internalState.set; - - - - var MATCH$1 = wellKnownSymbol('match'); - var NativeRegExp = global_1.RegExp; - var RegExpPrototype = NativeRegExp.prototype; - var re1 = /a/g; - var re2 = /a/g; - - // "new" should create a new object, old webkit bug - var CORRECT_NEW = new NativeRegExp(re1) !== re1; - - var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y; - - var FORCED$4 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y$1 || fails(function () { - re2[MATCH$1] = false; - // RegExp constructor can alter flags and IsRegExp works correct with @@match - return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i'; - }))); - - // `RegExp` constructor - // https://tc39.github.io/ecma262/#sec-regexp-constructor - if (FORCED$4) { - var RegExpWrapper = function RegExp(pattern, flags) { - var thisIsRegExp = this instanceof RegExpWrapper; - var patternIsRegExp = isRegexp(pattern); - var flagsAreUndefined = flags === undefined; - var sticky; - - if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) { - return pattern; - } - - if (CORRECT_NEW) { - if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source; - } else if (pattern instanceof RegExpWrapper) { - if (flagsAreUndefined) flags = regexpFlags.call(pattern); - pattern = pattern.source; - } - - if (UNSUPPORTED_Y$1) { - sticky = !!flags && flags.indexOf('y') > -1; - if (sticky) flags = flags.replace(/y/g, ''); - } - - var result = inheritIfRequired( - CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags), - thisIsRegExp ? this : RegExpPrototype, - RegExpWrapper - ); - - if (UNSUPPORTED_Y$1 && sticky) setInternalState$1(result, { sticky: sticky }); - - return result; - }; - var proxy = function (key) { - key in RegExpWrapper || defineProperty$4(RegExpWrapper, key, { - configurable: true, - get: function () { return NativeRegExp[key]; }, - set: function (it) { NativeRegExp[key] = it; } - }); - }; - var keys$2 = getOwnPropertyNames$1(NativeRegExp); - var index = 0; - while (keys$2.length > index) proxy(keys$2[index++]); - RegExpPrototype.constructor = RegExpWrapper; - RegExpWrapper.prototype = RegExpPrototype; - redefine(global_1, 'RegExp', RegExpWrapper); - } - - // https://tc39.github.io/ecma262/#sec-get-regexp-@@species - setSpecies('RegExp'); - - var nativeExec = RegExp.prototype.exec; - // This always refers to the native implementation, because the - // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, - // which loads this file before patching the method. - var nativeReplace = String.prototype.replace; - - var patchedExec = nativeExec; - - var UPDATES_LAST_INDEX_WRONG = (function () { - var re1 = /a/; - var re2 = /b*/g; - nativeExec.call(re1, 'a'); - nativeExec.call(re2, 'a'); - return re1.lastIndex !== 0 || re2.lastIndex !== 0; - })(); - - var UNSUPPORTED_Y$2 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET; - - // nonparticipating capturing group, copied from es5-shim's String#split patch. - var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; - - var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2; - - if (PATCH) { - patchedExec = function exec(str) { - var re = this; - var lastIndex, reCopy, match, i; - var sticky = UNSUPPORTED_Y$2 && re.sticky; - var flags = regexpFlags.call(re); - var source = re.source; - var charsAdded = 0; - var strCopy = str; - - if (sticky) { - flags = flags.replace('y', ''); - if (flags.indexOf('g') === -1) { - flags += 'g'; - } - - strCopy = String(str).slice(re.lastIndex); - // Support anchored sticky behavior. - if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) { - source = '(?: ' + source + ')'; - strCopy = ' ' + strCopy; - charsAdded++; - } - // ^(? + rx + ) is needed, in combination with some str slicing, to - // simulate the 'y' flag. - reCopy = new RegExp('^(?:' + source + ')', flags); - } - - if (NPCG_INCLUDED) { - reCopy = new RegExp('^' + source + '$(?!\\s)', flags); - } - if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; - - match = nativeExec.call(sticky ? reCopy : re, strCopy); - - if (sticky) { - if (match) { - match.input = match.input.slice(charsAdded); - match[0] = match[0].slice(charsAdded); - match.index = re.lastIndex; - re.lastIndex += match[0].length; - } else re.lastIndex = 0; - } else if (UPDATES_LAST_INDEX_WRONG && match) { - re.lastIndex = re.global ? match.index + match[0].length : lastIndex; - } - if (NPCG_INCLUDED && match && match.length > 1) { - // Fix browsers whose `exec` methods don't consistently return `undefined` - // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ - nativeReplace.call(match[0], reCopy, function () { - for (i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) match[i] = undefined; - } - }); - } - - return match; - }; - } - - var regexpExec = patchedExec; - - _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, { - exec: regexpExec - }); - - var TO_STRING = 'toString'; - var RegExpPrototype$1 = RegExp.prototype; - var nativeToString = RegExpPrototype$1[TO_STRING]; - - var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); - // FF44- RegExp#toString has a wrong name - var INCORRECT_NAME = nativeToString.name != TO_STRING; - - // `RegExp.prototype.toString` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring - if (NOT_GENERIC || INCORRECT_NAME) { - redefine(RegExp.prototype, TO_STRING, function toString() { - var R = anObject(this); - var p = String(R.source); - var rf = R.flags; - var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$1) ? regexpFlags.call(R) : rf); - return '/' + p + '/' + f; - }, { unsafe: true }); - } - - var notARegexp = function (it) { - if (isRegexp(it)) { - throw TypeError("The method doesn't accept regular expressions"); - } return it; - }; - - var MATCH$2 = wellKnownSymbol('match'); - - var correctIsRegexpLogic = function (METHOD_NAME) { - var regexp = /./; - try { - '/./'[METHOD_NAME](regexp); - } catch (error1) { - try { - regexp[MATCH$2] = false; - return '/./'[METHOD_NAME](regexp); - } catch (error2) { /* empty */ } - } return false; - }; - - // `String.prototype.includes` method - // https://tc39.github.io/ecma262/#sec-string.prototype.includes - _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, { - includes: function includes(searchString /* , position = 0 */) { - return !!~String(requireObjectCoercible(this)) - .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined); - } - }); - - // TODO: Remove from `core-js@4` since it's moved to entry points - - - - - - - - var SPECIES$4 = wellKnownSymbol('species'); - - var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { - // #replace needs built-in support for named groups. - // #match works fine because it just return the exec results, even if it has - // a "grops" property. - var re = /./; - re.exec = function () { - var result = []; - result.groups = { a: '7' }; - return result; - }; - return ''.replace(re, '$') !== '7'; - }); - - // IE <= 11 replaces $0 with the whole match, as if it was $& - // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 - var REPLACE_KEEPS_$0 = (function () { - return 'a'.replace(/./, '$0') === '$0'; - })(); - - var REPLACE = wellKnownSymbol('replace'); - // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { - if (/./[REPLACE]) { - return /./[REPLACE]('a', '$0') === ''; - } - return false; - })(); - - // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec - // Weex JS has frozen built-in prototypes, so use try / catch wrapper - var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { - var re = /(?:)/; - var originalExec = re.exec; - re.exec = function () { return originalExec.apply(this, arguments); }; - var result = 'ab'.split(re); - return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; - }); - - var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) { - var SYMBOL = wellKnownSymbol(KEY); - - var DELEGATES_TO_SYMBOL = !fails(function () { - // String methods call symbol-named RegEp methods - var O = {}; - O[SYMBOL] = function () { return 7; }; - return ''[KEY](O) != 7; - }); - - var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { - // Symbol-named RegExp methods call .exec - var execCalled = false; - var re = /a/; - - if (KEY === 'split') { - // We can't use real regex here since it causes deoptimization - // and serious performance degradation in V8 - // https://github.com/zloirock/core-js/issues/306 - re = {}; - // RegExp[@@split] doesn't call the regex's exec method, but first creates - // a new one. We need to return the patched regex when creating the new one. - re.constructor = {}; - re.constructor[SPECIES$4] = function () { return re; }; - re.flags = ''; - re[SYMBOL] = /./[SYMBOL]; - } - - re.exec = function () { execCalled = true; return null; }; - - re[SYMBOL](''); - return !execCalled; - }); - - if ( - !DELEGATES_TO_SYMBOL || - !DELEGATES_TO_EXEC || - (KEY === 'replace' && !( - REPLACE_SUPPORTS_NAMED_GROUPS && - REPLACE_KEEPS_$0 && - !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - )) || - (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) - ) { - var nativeRegExpMethod = /./[SYMBOL]; - var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { - if (regexp.exec === regexpExec) { - if (DELEGATES_TO_SYMBOL && !forceStringMethod) { - // The native String method already delegates to @@method (this - // polyfilled function), leasing to infinite recursion. - // We avoid it by directly calling the native @@method method. - return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; - } - return { done: true, value: nativeMethod.call(str, regexp, arg2) }; - } - return { done: false }; - }, { - REPLACE_KEEPS_$0: REPLACE_KEEPS_$0, - REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE - }); - var stringMethod = methods[0]; - var regexMethod = methods[1]; - - redefine(String.prototype, KEY, stringMethod); - redefine(RegExp.prototype, SYMBOL, length == 2 - // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) - // 21.2.5.11 RegExp.prototype[@@split](string, limit) - ? function (string, arg) { return regexMethod.call(string, this, arg); } - // 21.2.5.6 RegExp.prototype[@@match](string) - // 21.2.5.9 RegExp.prototype[@@search](string) - : function (string) { return regexMethod.call(string, this); } - ); - } - - if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true); - }; - - // `String.prototype.{ codePointAt, at }` methods implementation - var createMethod$4 = function (CONVERT_TO_STRING) { - return function ($this, pos) { - var S = String(requireObjectCoercible($this)); - var position = toInteger(pos); - var size = S.length; - var first, second; - if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; - first = S.charCodeAt(position); - return first < 0xD800 || first > 0xDBFF || position + 1 === size - || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF - ? CONVERT_TO_STRING ? S.charAt(position) : first - : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; - }; - }; - - var stringMultibyte = { - // `String.prototype.codePointAt` method - // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat - codeAt: createMethod$4(false), - // `String.prototype.at` method - // https://github.com/mathiasbynens/String.prototype.at - charAt: createMethod$4(true) - }; - - var charAt = stringMultibyte.charAt; - - // `AdvanceStringIndex` abstract operation - // https://tc39.github.io/ecma262/#sec-advancestringindex - var advanceStringIndex = function (S, index, unicode) { - return index + (unicode ? charAt(S, index).length : 1); - }; - - // `RegExpExec` abstract operation - // https://tc39.github.io/ecma262/#sec-regexpexec - var regexpExecAbstract = function (R, S) { - var exec = R.exec; - if (typeof exec === 'function') { - var result = exec.call(R, S); - if (typeof result !== 'object') { - throw TypeError('RegExp exec method returned something other than an Object or null'); - } - return result; - } - - if (classofRaw(R) !== 'RegExp') { - throw TypeError('RegExp#exec called on incompatible receiver'); - } - - return regexpExec.call(R, S); - }; - - var max$3 = Math.max; - var min$3 = Math.min; - var floor$1 = Math.floor; - var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g; - var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g; - - var maybeToString = function (it) { - return it === undefined ? it : String(it); - }; - - // @@replace logic - fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) { - var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE; - var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0; - var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; - - return [ - // `String.prototype.replace` method - // https://tc39.github.io/ecma262/#sec-string.prototype.replace - function replace(searchValue, replaceValue) { - var O = requireObjectCoercible(this); - var replacer = searchValue == undefined ? undefined : searchValue[REPLACE]; - return replacer !== undefined - ? replacer.call(searchValue, O, replaceValue) - : nativeReplace.call(String(O), searchValue, replaceValue); - }, - // `RegExp.prototype[@@replace]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace - function (regexp, replaceValue) { - if ( - (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) || - (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1) - ) { - var res = maybeCallNative(nativeReplace, regexp, this, replaceValue); - if (res.done) return res.value; - } - - var rx = anObject(regexp); - var S = String(this); - - var functionalReplace = typeof replaceValue === 'function'; - if (!functionalReplace) replaceValue = String(replaceValue); - - var global = rx.global; - if (global) { - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - } - var results = []; - while (true) { - var result = regexpExecAbstract(rx, S); - if (result === null) break; - - results.push(result); - if (!global) break; - - var matchStr = String(result[0]); - if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); - } - - var accumulatedResult = ''; - var nextSourcePosition = 0; - for (var i = 0; i < results.length; i++) { - result = results[i]; - - var matched = String(result[0]); - var position = max$3(min$3(toInteger(result.index), S.length), 0); - var captures = []; - // NOTE: This is equivalent to - // captures = result.slice(1).map(maybeToString) - // but for some reason `nativeSlice.call(result, 1, result.length)` (called in - // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and - // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. - for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); - var namedCaptures = result.groups; - if (functionalReplace) { - var replacerArgs = [matched].concat(captures, position, S); - if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); - var replacement = String(replaceValue.apply(undefined, replacerArgs)); - } else { - replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); - } - if (position >= nextSourcePosition) { - accumulatedResult += S.slice(nextSourcePosition, position) + replacement; - nextSourcePosition = position + matched.length; - } - } - return accumulatedResult + S.slice(nextSourcePosition); - } - ]; - - // https://tc39.github.io/ecma262/#sec-getsubstitution - function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { - var tailPos = position + matched.length; - var m = captures.length; - var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; - if (namedCaptures !== undefined) { - namedCaptures = toObject(namedCaptures); - symbols = SUBSTITUTION_SYMBOLS; - } - return nativeReplace.call(replacement, symbols, function (match, ch) { - var capture; - switch (ch.charAt(0)) { - case '$': return '$'; - case '&': return matched; - case '`': return str.slice(0, position); - case "'": return str.slice(tailPos); - case '<': - capture = namedCaptures[ch.slice(1, -1)]; - break; - default: // \d\d? - var n = +ch; - if (n === 0) return match; - if (n > m) { - var f = floor$1(n / 10); - if (f === 0) return match; - if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); - return match; - } - capture = captures[n - 1]; - } - return capture === undefined ? '' : capture; - }); - } - }); - - // `SameValue` abstract operation - // https://tc39.github.io/ecma262/#sec-samevalue - var sameValue = Object.is || function is(x, y) { - // eslint-disable-next-line no-self-compare - return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; - }; - - // @@search logic - fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) { - return [ - // `String.prototype.search` method - // https://tc39.github.io/ecma262/#sec-string.prototype.search - function search(regexp) { - var O = requireObjectCoercible(this); - var searcher = regexp == undefined ? undefined : regexp[SEARCH]; - return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); - }, - // `RegExp.prototype[@@search]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search - function (regexp) { - var res = maybeCallNative(nativeSearch, regexp, this); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - - var previousLastIndex = rx.lastIndex; - if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; - var result = regexpExecAbstract(rx, S); - if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; - return result === null ? -1 : result.index; - } - ]; - }); - - var SPECIES$5 = wellKnownSymbol('species'); - - // `SpeciesConstructor` abstract operation - // https://tc39.github.io/ecma262/#sec-speciesconstructor - var speciesConstructor = function (O, defaultConstructor) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES$5]) == undefined ? defaultConstructor : aFunction$1(S); - }; - - var arrayPush = [].push; - var min$4 = Math.min; - var MAX_UINT32 = 0xFFFFFFFF; - - // babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError - var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); }); - - // @@split logic - fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) { - var internalSplit; - if ( - 'abbc'.split(/(b)*/)[1] == 'c' || - 'test'.split(/(?:)/, -1).length != 4 || - 'ab'.split(/(?:ab)*/).length != 2 || - '.'.split(/(.?)(.?)/).length != 4 || - '.'.split(/()()/).length > 1 || - ''.split(/.?/).length - ) { - // based on es5-shim implementation, need to rework it - internalSplit = function (separator, limit) { - var string = String(requireObjectCoercible(this)); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (separator === undefined) return [string]; - // If `separator` is not a regex, use native split - if (!isRegexp(separator)) { - return nativeSplit.call(string, separator, lim); - } - var output = []; - var flags = (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''); - var lastLastIndex = 0; - // Make `global` and avoid `lastIndex` issues by working with a copy - var separatorCopy = new RegExp(separator.source, flags + 'g'); - var match, lastIndex, lastLength; - while (match = regexpExec.call(separatorCopy, string)) { - lastIndex = separatorCopy.lastIndex; - if (lastIndex > lastLastIndex) { - output.push(string.slice(lastLastIndex, match.index)); - if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1)); - lastLength = match[0].length; - lastLastIndex = lastIndex; - if (output.length >= lim) break; - } - if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop - } - if (lastLastIndex === string.length) { - if (lastLength || !separatorCopy.test('')) output.push(''); - } else output.push(string.slice(lastLastIndex)); - return output.length > lim ? output.slice(0, lim) : output; - }; - // Chakra, V8 - } else if ('0'.split(undefined, 0).length) { - internalSplit = function (separator, limit) { - return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit); - }; - } else internalSplit = nativeSplit; - - return [ - // `String.prototype.split` method - // https://tc39.github.io/ecma262/#sec-string.prototype.split - function split(separator, limit) { - var O = requireObjectCoercible(this); - var splitter = separator == undefined ? undefined : separator[SPLIT]; - return splitter !== undefined - ? splitter.call(separator, O, limit) - : internalSplit.call(String(O), separator, limit); - }, - // `RegExp.prototype[@@split]` method - // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split - // - // NOTE: This cannot be properly polyfilled in engines that don't support - // the 'y' flag. - function (regexp, limit) { - var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit); - if (res.done) return res.value; - - var rx = anObject(regexp); - var S = String(this); - var C = speciesConstructor(rx, RegExp); - - var unicodeMatching = rx.unicode; - var flags = (rx.ignoreCase ? 'i' : '') + - (rx.multiline ? 'm' : '') + - (rx.unicode ? 'u' : '') + - (SUPPORTS_Y ? 'y' : 'g'); - - // ^(? + rx + ) is needed, in combination with some S slicing, to - // simulate the 'y' flag. - var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); - var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; - if (lim === 0) return []; - if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : []; - var p = 0; - var q = 0; - var A = []; - while (q < S.length) { - splitter.lastIndex = SUPPORTS_Y ? q : 0; - var z = regexpExecAbstract(splitter, SUPPORTS_Y ? S : S.slice(q)); - var e; - if ( - z === null || - (e = min$4(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p - ) { - q = advanceStringIndex(S, q, unicodeMatching); - } else { - A.push(S.slice(p, q)); - if (A.length === lim) return A; - for (var i = 1; i <= z.length - 1; i++) { - A.push(z[i]); - if (A.length === lim) return A; - } - q = p = e; - } - } - A.push(S.slice(p)); - return A; - } - ]; - }, !SUPPORTS_Y); - - var non = '\u200B\u0085\u180E'; - - // check that a method works with the correct list - // of whitespaces and has a correct name - var stringTrimForced = function (METHOD_NAME) { - return fails(function () { - return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME; - }); - }; - - var $trim = stringTrim.trim; - - - // `String.prototype.trim` method - // https://tc39.github.io/ecma262/#sec-string.prototype.trim - _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, { - trim: function trim() { - return $trim(this); - } - }); - - // iterable DOM collections - // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods - var domIterables = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 - }; - - for (var COLLECTION_NAME in domIterables) { - var Collection = global_1[COLLECTION_NAME]; - var CollectionPrototype = Collection && Collection.prototype; - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try { - createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach); - } catch (error) { - CollectionPrototype.forEach = arrayForEach; - } - } - - var ITERATOR$2 = wellKnownSymbol('iterator'); - var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag'); - var ArrayValues = es_array_iterator.values; - - for (var COLLECTION_NAME$1 in domIterables) { - var Collection$1 = global_1[COLLECTION_NAME$1]; - var CollectionPrototype$1 = Collection$1 && Collection$1.prototype; - if (CollectionPrototype$1) { - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype$1[ITERATOR$2] !== ArrayValues) try { - createNonEnumerableProperty(CollectionPrototype$1, ITERATOR$2, ArrayValues); - } catch (error) { - CollectionPrototype$1[ITERATOR$2] = ArrayValues; - } - if (!CollectionPrototype$1[TO_STRING_TAG$3]) { - createNonEnumerableProperty(CollectionPrototype$1, TO_STRING_TAG$3, COLLECTION_NAME$1); - } - if (domIterables[COLLECTION_NAME$1]) for (var METHOD_NAME in es_array_iterator) { - // some Chrome versions have non-configurable methods on DOMTokenList - if (CollectionPrototype$1[METHOD_NAME] !== es_array_iterator[METHOD_NAME]) try { - createNonEnumerableProperty(CollectionPrototype$1, METHOD_NAME, es_array_iterator[METHOD_NAME]); - } catch (error) { - CollectionPrototype$1[METHOD_NAME] = es_array_iterator[METHOD_NAME]; - } - } - } - } - - function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - } - - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); - } - - function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - - /* eslint-disable no-unused-vars */ - - var VERSION = '1.18.2'; - var bootstrapVersion = 4; - - try { - var rawVersion = $__default['default'].fn.dropdown.Constructor.VERSION; // Only try to parse VERSION if it is defined. - // It is undefined in older versions of Bootstrap (tested with 3.1.1). - - if (rawVersion !== undefined) { - bootstrapVersion = parseInt(rawVersion, 10); - } - } catch (e) {// ignore - } - - try { - // eslint-disable-next-line no-undef - var _rawVersion = bootstrap.Tooltip.VERSION; - - if (_rawVersion !== undefined) { - bootstrapVersion = parseInt(_rawVersion, 10); - } - } catch (e) {// ignore - } - - var CONSTANTS = { - 3: { - iconsPrefix: 'glyphicon', - icons: { - paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down', - paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up', - refresh: 'glyphicon-refresh icon-refresh', - toggleOff: 'glyphicon-list-alt icon-list-alt', - toggleOn: 'glyphicon-list-alt icon-list-alt', - columns: 'glyphicon-th icon-th', - detailOpen: 'glyphicon-plus icon-plus', - detailClose: 'glyphicon-minus icon-minus', - fullscreen: 'glyphicon-fullscreen', - search: 'glyphicon-search', - clearSearch: 'glyphicon-trash' - }, - classes: { - buttonsPrefix: 'btn', - buttons: 'default', - buttonsGroup: 'btn-group', - buttonsDropdown: 'btn-group', - pull: 'pull', - inputGroup: 'input-group', - inputPrefix: 'input-', - input: 'form-control', - paginationDropdown: 'btn-group dropdown', - dropup: 'dropup', - dropdownActive: 'active', - paginationActive: 'active', - buttonActive: 'active' - }, - html: { - toolbarDropdown: [''], - toolbarDropdownItem: '', - toolbarDropdownSeparator: '
  • ', - pageDropdown: [''], - pageDropdownItem: '
    ', - dropdownCaret: '', - pagination: ['
      ', '
    '], - paginationItem: '
  • %s
  • ', - icon: '', - inputGroup: '
    %s%s
    ', - searchInput: '', - searchButton: '', - searchClearButton: '' - } - }, - 4: { - iconsPrefix: 'fa', - icons: { - paginationSwitchDown: 'fa-caret-square-down', - paginationSwitchUp: 'fa-caret-square-up', - refresh: 'fa-sync', - toggleOff: 'fa-toggle-off', - toggleOn: 'fa-toggle-on', - columns: 'fa-th-list', - detailOpen: 'fa-plus', - detailClose: 'fa-minus', - fullscreen: 'fa-arrows-alt', - search: 'fa-search', - clearSearch: 'fa-trash' - }, - classes: { - buttonsPrefix: 'btn', - buttons: 'secondary', - buttonsGroup: 'btn-group', - buttonsDropdown: 'btn-group', - pull: 'float', - inputGroup: 'btn-group', - inputPrefix: 'form-control-', - input: 'form-control', - paginationDropdown: 'btn-group dropdown', - dropup: 'dropup', - dropdownActive: 'active', - paginationActive: 'active', - buttonActive: 'active' - }, - html: { - toolbarDropdown: [''], - toolbarDropdownItem: '', - pageDropdown: [''], - pageDropdownItem: '%s', - toolbarDropdownSeparator: '', - dropdownCaret: '', - pagination: ['
      ', '
    '], - paginationItem: '
  • %s
  • ', - icon: '', - inputGroup: '
    %s
    %s
    ', - searchInput: '', - searchButton: '', - searchClearButton: '' - } - }, - 5: { - iconsPrefix: 'fa', - icons: { - paginationSwitchDown: 'fa-caret-square-down', - paginationSwitchUp: 'fa-caret-square-up', - refresh: 'fa-sync', - toggleOff: 'fa-toggle-off', - toggleOn: 'fa-toggle-on', - columns: 'fa-th-list', - detailOpen: 'fa-plus', - detailClose: 'fa-minus', - fullscreen: 'fa-arrows-alt', - search: 'fa-search', - clearSearch: 'fa-trash' - }, - classes: { - buttonsPrefix: 'btn', - buttons: 'secondary', - buttonsGroup: 'btn-group', - buttonsDropdown: 'btn-group', - pull: 'float', - inputGroup: 'btn-group', - inputPrefix: 'form-control-', - input: 'form-control', - paginationDropdown: 'btn-group dropdown', - dropup: 'dropup', - dropdownActive: 'active', - paginationActive: 'active', - buttonActive: 'active' - }, - html: { - dataToggle: 'data-bs-toggle', - toolbarDropdown: [''], - toolbarDropdownItem: '', - pageDropdown: [''], - pageDropdownItem: '%s', - toolbarDropdownSeparator: '', - dropdownCaret: '', - pagination: ['
      ', '
    '], - paginationItem: '
  • %s
  • ', - icon: '', - inputGroup: '
    %s
    %s
    ', - searchInput: '', - searchButton: '', - searchClearButton: '' - } - } - }[bootstrapVersion]; - var DEFAULTS = { - height: undefined, - classes: 'table table-bordered table-hover', - buttons: {}, - theadClasses: '', - headerStyle: function headerStyle(column) { - return {}; - }, - rowStyle: function rowStyle(row, index) { - return {}; - }, - rowAttributes: function rowAttributes(row, index) { - return {}; - }, - undefinedText: '-', - locale: undefined, - virtualScroll: false, - virtualScrollItemHeight: undefined, - sortable: true, - sortClass: undefined, - silentSort: true, - sortName: undefined, - sortOrder: undefined, - sortReset: false, - sortStable: false, - rememberOrder: false, - serverSort: true, - customSort: undefined, - columns: [[]], - data: [], - url: undefined, - method: 'get', - cache: true, - contentType: 'application/json', - dataType: 'json', - ajax: undefined, - ajaxOptions: {}, - queryParams: function queryParams(params) { - return params; - }, - queryParamsType: 'limit', - // 'limit', undefined - responseHandler: function responseHandler(res) { - return res; - }, - totalField: 'total', - totalNotFilteredField: 'totalNotFiltered', - dataField: 'rows', - footerField: 'footer', - pagination: false, - paginationParts: ['pageInfo', 'pageSize', 'pageList'], - showExtendedPagination: false, - paginationLoop: true, - sidePagination: 'client', - // client or server - totalRows: 0, - totalNotFiltered: 0, - pageNumber: 1, - pageSize: 10, - pageList: [10, 25, 50, 100], - paginationHAlign: 'right', - // right, left - paginationVAlign: 'bottom', - // bottom, top, both - paginationDetailHAlign: 'left', - // right, left - paginationPreText: '‹', - paginationNextText: '›', - paginationSuccessivelySize: 5, - // Maximum successively number of pages in a row - paginationPagesBySide: 1, - // Number of pages on each side (right, left) of the current page. - paginationUseIntermediate: false, - // Calculate intermediate pages for quick access - search: false, - searchHighlight: false, - searchOnEnterKey: false, - strictSearch: false, - searchSelector: false, - visibleSearch: false, - showButtonIcons: true, - showButtonText: false, - showSearchButton: false, - showSearchClearButton: false, - trimOnSearch: true, - searchAlign: 'right', - searchTimeOut: 500, - searchText: '', - customSearch: undefined, - showHeader: true, - showFooter: false, - footerStyle: function footerStyle(column) { - return {}; - }, - searchAccentNeutralise: false, - showColumns: false, - showColumnsToggleAll: false, - showColumnsSearch: false, - minimumCountColumns: 1, - showPaginationSwitch: false, - showRefresh: false, - showToggle: false, - showFullscreen: false, - smartDisplay: true, - escape: false, - filterOptions: { - filterAlgorithm: 'and' - }, - idField: undefined, - selectItemName: 'btSelectItem', - clickToSelect: false, - ignoreClickToSelectOn: function ignoreClickToSelectOn(_ref) { - var tagName = _ref.tagName; - return ['A', 'BUTTON'].includes(tagName); - }, - singleSelect: false, - checkboxHeader: true, - maintainMetaData: false, - multipleSelectRow: false, - uniqueId: undefined, - cardView: false, - detailView: false, - detailViewIcon: true, - detailViewByClick: false, - detailViewAlign: 'left', - detailFormatter: function detailFormatter(index, row) { - return ''; - }, - detailFilter: function detailFilter(index, row) { - return true; - }, - toolbar: undefined, - toolbarAlign: 'left', - buttonsToolbar: undefined, - buttonsAlign: 'right', - buttonsOrder: ['paginationSwitch', 'refresh', 'toggle', 'fullscreen', 'columns'], - buttonsPrefix: CONSTANTS.classes.buttonsPrefix, - buttonsClass: CONSTANTS.classes.buttons, - icons: CONSTANTS.icons, - iconSize: undefined, - iconsPrefix: CONSTANTS.iconsPrefix, - // glyphicon or fa(font-awesome) - loadingFontSize: 'auto', - loadingTemplate: function loadingTemplate(loadingMessage) { - return "\n ".concat(loadingMessage, "\n \n \n "); - }, - onAll: function onAll(name, args) { - return false; - }, - onClickCell: function onClickCell(field, value, row, $element) { - return false; - }, - onDblClickCell: function onDblClickCell(field, value, row, $element) { - return false; - }, - onClickRow: function onClickRow(item, $element) { - return false; - }, - onDblClickRow: function onDblClickRow(item, $element) { - return false; - }, - onSort: function onSort(name, order) { - return false; - }, - onCheck: function onCheck(row) { - return false; - }, - onUncheck: function onUncheck(row) { - return false; - }, - onCheckAll: function onCheckAll(rows) { - return false; - }, - onUncheckAll: function onUncheckAll(rows) { - return false; - }, - onCheckSome: function onCheckSome(rows) { - return false; - }, - onUncheckSome: function onUncheckSome(rows) { - return false; - }, - onLoadSuccess: function onLoadSuccess(data) { - return false; - }, - onLoadError: function onLoadError(status) { - return false; - }, - onColumnSwitch: function onColumnSwitch(field, checked) { - return false; - }, - onPageChange: function onPageChange(number, size) { - return false; - }, - onSearch: function onSearch(text) { - return false; - }, - onToggle: function onToggle(cardView) { - return false; - }, - onPreBody: function onPreBody(data) { - return false; - }, - onPostBody: function onPostBody() { - return false; - }, - onPostHeader: function onPostHeader() { - return false; - }, - onPostFooter: function onPostFooter() { - return false; - }, - onExpandRow: function onExpandRow(index, row, $detail) { - return false; - }, - onCollapseRow: function onCollapseRow(index, row) { - return false; - }, - onRefreshOptions: function onRefreshOptions(options) { - return false; - }, - onRefresh: function onRefresh(params) { - return false; - }, - onResetView: function onResetView() { - return false; - }, - onScrollBody: function onScrollBody() { - return false; - } - }; - var EN = { - formatLoadingMessage: function formatLoadingMessage() { - return 'Loading, please wait'; - }, - formatRecordsPerPage: function formatRecordsPerPage(pageNumber) { - return "".concat(pageNumber, " rows per page"); - }, - formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) { - if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) { - return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows (filtered from ").concat(totalNotFiltered, " total rows)"); - } - - return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows"); - }, - formatSRPaginationPreText: function formatSRPaginationPreText() { - return 'previous page'; - }, - formatSRPaginationPageText: function formatSRPaginationPageText(page) { - return "to page ".concat(page); - }, - formatSRPaginationNextText: function formatSRPaginationNextText() { - return 'next page'; - }, - formatDetailPagination: function formatDetailPagination(totalRows) { - return "Showing ".concat(totalRows, " rows"); - }, - formatSearch: function formatSearch() { - return 'Search'; - }, - formatClearSearch: function formatClearSearch() { - return 'Clear Search'; - }, - formatNoMatches: function formatNoMatches() { - return 'No matching records found'; - }, - formatPaginationSwitch: function formatPaginationSwitch() { - return 'Hide/Show pagination'; - }, - formatPaginationSwitchDown: function formatPaginationSwitchDown() { - return 'Show pagination'; - }, - formatPaginationSwitchUp: function formatPaginationSwitchUp() { - return 'Hide pagination'; - }, - formatRefresh: function formatRefresh() { - return 'Refresh'; - }, - formatToggle: function formatToggle() { - return 'Toggle'; - }, - formatToggleOn: function formatToggleOn() { - return 'Show card view'; - }, - formatToggleOff: function formatToggleOff() { - return 'Hide card view'; - }, - formatColumns: function formatColumns() { - return 'Columns'; - }, - formatColumnsToggleAll: function formatColumnsToggleAll() { - return 'Toggle all'; - }, - formatFullscreen: function formatFullscreen() { - return 'Fullscreen'; - }, - formatAllRows: function formatAllRows() { - return 'All'; - } - }; - var COLUMN_DEFAULTS = { - field: undefined, - title: undefined, - titleTooltip: undefined, - class: undefined, - width: undefined, - widthUnit: 'px', - rowspan: undefined, - colspan: undefined, - align: undefined, - // left, right, center - halign: undefined, - // left, right, center - falign: undefined, - // left, right, center - valign: undefined, - // top, middle, bottom - cellStyle: undefined, - radio: false, - checkbox: false, - checkboxEnabled: true, - clickToSelect: true, - showSelectTitle: false, - sortable: false, - sortName: undefined, - order: 'asc', - // asc, desc - sorter: undefined, - visible: true, - switchable: true, - cardVisible: true, - searchable: true, - formatter: undefined, - footerFormatter: undefined, - detailFormatter: undefined, - searchFormatter: true, - searchHighlightFormatter: false, - escape: false, - events: undefined - }; - var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandRowByUniqueId', 'collapseRowByUniqueId', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText']; - var EVENTS = { - 'all.bs.table': 'onAll', - 'click-row.bs.table': 'onClickRow', - 'dbl-click-row.bs.table': 'onDblClickRow', - 'click-cell.bs.table': 'onClickCell', - 'dbl-click-cell.bs.table': 'onDblClickCell', - 'sort.bs.table': 'onSort', - 'check.bs.table': 'onCheck', - 'uncheck.bs.table': 'onUncheck', - 'check-all.bs.table': 'onCheckAll', - 'uncheck-all.bs.table': 'onUncheckAll', - 'check-some.bs.table': 'onCheckSome', - 'uncheck-some.bs.table': 'onUncheckSome', - 'load-success.bs.table': 'onLoadSuccess', - 'load-error.bs.table': 'onLoadError', - 'column-switch.bs.table': 'onColumnSwitch', - 'page-change.bs.table': 'onPageChange', - 'search.bs.table': 'onSearch', - 'toggle.bs.table': 'onToggle', - 'pre-body.bs.table': 'onPreBody', - 'post-body.bs.table': 'onPostBody', - 'post-header.bs.table': 'onPostHeader', - 'post-footer.bs.table': 'onPostFooter', - 'expand-row.bs.table': 'onExpandRow', - 'collapse-row.bs.table': 'onCollapseRow', - 'refresh-options.bs.table': 'onRefreshOptions', - 'reset-view.bs.table': 'onResetView', - 'refresh.bs.table': 'onRefresh', - 'scroll-body.bs.table': 'onScrollBody' - }; - Object.assign(DEFAULTS, EN); - var Constants = { - VERSION: VERSION, - THEME: "bootstrap".concat(bootstrapVersion), - CONSTANTS: CONSTANTS, - DEFAULTS: DEFAULTS, - COLUMN_DEFAULTS: COLUMN_DEFAULTS, - METHODS: METHODS, - EVENTS: EVENTS, - LOCALES: { - en: EN, - 'en-US': EN - } - }; - - var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); }); - - // `Object.keys` method - // https://tc39.github.io/ecma262/#sec-object.keys - _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { - keys: function keys(it) { - return objectKeys(toObject(it)); - } - }); - - var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f; - - - - - - - var nativeEndsWith = ''.endsWith; - var min$5 = Math.min; - - var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('endsWith'); - // https://github.com/zloirock/core-js/pull/702 - var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () { - var descriptor = getOwnPropertyDescriptor$3(String.prototype, 'endsWith'); - return descriptor && !descriptor.writable; - }(); - - // `String.prototype.endsWith` method - // https://tc39.github.io/ecma262/#sec-string.prototype.endswith - _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { - endsWith: function endsWith(searchString /* , endPosition = @length */) { - var that = String(requireObjectCoercible(this)); - notARegexp(searchString); - var endPosition = arguments.length > 1 ? arguments[1] : undefined; - var len = toLength(that.length); - var end = endPosition === undefined ? len : min$5(toLength(endPosition), len); - var search = String(searchString); - return nativeEndsWith - ? nativeEndsWith.call(that, search, end) - : that.slice(end - search.length, end) === search; - } - }); - - var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f; - - - - - - - var nativeStartsWith = ''.startsWith; - var min$6 = Math.min; - - var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('startsWith'); - // https://github.com/zloirock/core-js/pull/702 - var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () { - var descriptor = getOwnPropertyDescriptor$4(String.prototype, 'startsWith'); - return descriptor && !descriptor.writable; - }(); - - // `String.prototype.startsWith` method - // https://tc39.github.io/ecma262/#sec-string.prototype.startswith - _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, { - startsWith: function startsWith(searchString /* , position = 0 */) { - var that = String(requireObjectCoercible(this)); - notARegexp(searchString); - var index = toLength(min$6(arguments.length > 1 ? arguments[1] : undefined, that.length)); - var search = String(searchString); - return nativeStartsWith - ? nativeStartsWith.call(that, search, index) - : that.slice(index, index + search.length) === search; - } - }); - - var Utils = { - getSearchInput: function getSearchInput(that) { - if (typeof that.options.searchSelector === 'string') { - return $__default['default'](that.options.searchSelector); - } - - return that.$toolbar.find('.search input'); - }, - // it only does '%s', and return '' when arguments are undefined - sprintf: function sprintf(_str) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var flag = true; - var i = 0; - - var str = _str.replace(/%s/g, function () { - var arg = args[i++]; - - if (typeof arg === 'undefined') { - flag = false; - return ''; - } - - return arg; - }); - - return flag ? str : ''; - }, - isObject: function isObject(val) { - return val instanceof Object && !Array.isArray(val); - }, - isEmptyObject: function isEmptyObject() { - var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - return Object.entries(obj).length === 0 && obj.constructor === Object; - }, - isNumeric: function isNumeric(n) { - return !isNaN(parseFloat(n)) && isFinite(n); - }, - getFieldTitle: function getFieldTitle(list, value) { - var _iterator = _createForOfIteratorHelper(list), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var item = _step.value; - - if (item.field === value) { - return item.title; - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - - return ''; - }, - setFieldIndex: function setFieldIndex(columns) { - var totalCol = 0; - var flag = []; - - var _iterator2 = _createForOfIteratorHelper(columns[0]), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var column = _step2.value; - totalCol += column.colspan || 1; - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - - for (var i = 0; i < columns.length; i++) { - flag[i] = []; - - for (var j = 0; j < totalCol; j++) { - flag[i][j] = false; - } - } - - for (var _i = 0; _i < columns.length; _i++) { - var _iterator3 = _createForOfIteratorHelper(columns[_i]), - _step3; - - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { - var r = _step3.value; - var rowspan = r.rowspan || 1; - var colspan = r.colspan || 1; - - var index = flag[_i].indexOf(false); - - r.colspanIndex = index; - - if (colspan === 1) { - r.fieldIndex = index; // when field is undefined, use index instead - - if (typeof r.field === 'undefined') { - r.field = index; - } - } else { - r.colspanGroup = r.colspan; - } - - for (var _j = 0; _j < rowspan; _j++) { - for (var k = 0; k < colspan; k++) { - flag[_i + _j][index + k] = true; - } - } - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - } - }, - normalizeAccent: function normalizeAccent(value) { - if (typeof value !== 'string') { - return value; - } - - return value.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); - }, - updateFieldGroup: function updateFieldGroup(columns) { - var _ref; - - var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns)); - - var _iterator4 = _createForOfIteratorHelper(columns), - _step4; - - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { - var c = _step4.value; - - var _iterator5 = _createForOfIteratorHelper(c), - _step5; - - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { - var r = _step5.value; - - if (r.colspanGroup > 1) { - var colspan = 0; - - var _loop = function _loop(i) { - var column = allColumns.find(function (col) { - return col.fieldIndex === i; - }); - - if (column.visible) { - colspan++; - } - }; - - for (var i = r.colspanIndex; i < r.colspanIndex + r.colspanGroup; i++) { - _loop(i); - } - - r.colspan = colspan; - r.visible = colspan > 0; - } - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); - } - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); - } - }, - getScrollBarWidth: function getScrollBarWidth() { - if (this.cachedWidth === undefined) { - var $inner = $__default['default']('
    ').addClass('fixed-table-scroll-inner'); - var $outer = $__default['default']('
    ').addClass('fixed-table-scroll-outer'); - $outer.append($inner); - $__default['default']('body').append($outer); - var w1 = $inner[0].offsetWidth; - $outer.css('overflow', 'scroll'); - var w2 = $inner[0].offsetWidth; - - if (w1 === w2) { - w2 = $outer[0].clientWidth; - } - - $outer.remove(); - this.cachedWidth = w1 - w2; - } - - return this.cachedWidth; - }, - calculateObjectValue: function calculateObjectValue(self, name, args, defaultValue) { - var func = name; - - if (typeof name === 'string') { - // support obj.func1.func2 - var names = name.split('.'); - - if (names.length > 1) { - func = window; - - var _iterator6 = _createForOfIteratorHelper(names), - _step6; - - try { - for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { - var f = _step6.value; - func = func[f]; - } - } catch (err) { - _iterator6.e(err); - } finally { - _iterator6.f(); - } - } else { - func = window[name]; - } - } - - if (func !== null && _typeof(func) === 'object') { - return func; - } - - if (typeof func === 'function') { - return func.apply(self, args || []); - } - - if (!func && typeof name === 'string' && this.sprintf.apply(this, [name].concat(_toConsumableArray(args)))) { - return this.sprintf.apply(this, [name].concat(_toConsumableArray(args))); - } - - return defaultValue; - }, - compareObjects: function compareObjects(objectA, objectB, compareLength) { - var aKeys = Object.keys(objectA); - var bKeys = Object.keys(objectB); - - if (compareLength && aKeys.length !== bKeys.length) { - return false; - } - - for (var _i2 = 0, _aKeys = aKeys; _i2 < _aKeys.length; _i2++) { - var key = _aKeys[_i2]; - - if (bKeys.includes(key) && objectA[key] !== objectB[key]) { - return false; - } - } - - return true; - }, - escapeHTML: function escapeHTML(text) { - if (typeof text === 'string') { - return text.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/`/g, '`'); - } - - return text; - }, - unescapeHTML: function unescapeHTML(text) { - if (typeof text === 'string') { - return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '\'').replace(/`/g, '`'); - } - - return text; - }, - getRealDataAttr: function getRealDataAttr(dataAttr) { - for (var _i3 = 0, _Object$entries = Object.entries(dataAttr); _i3 < _Object$entries.length; _i3++) { - var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2), - attr = _Object$entries$_i[0], - value = _Object$entries$_i[1]; - - var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase(); - - if (auxAttr !== attr) { - dataAttr[auxAttr] = value; - delete dataAttr[attr]; - } - } - - return dataAttr; - }, - getItemField: function getItemField(item, field, escape) { - var value = item; - - if (typeof field !== 'string' || item.hasOwnProperty(field)) { - return escape ? this.escapeHTML(item[field]) : item[field]; - } - - var props = field.split('.'); - - var _iterator7 = _createForOfIteratorHelper(props), - _step7; - - try { - for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { - var p = _step7.value; - value = value && value[p]; - } - } catch (err) { - _iterator7.e(err); - } finally { - _iterator7.f(); - } - - return escape ? this.escapeHTML(value) : value; - }, - isIEBrowser: function isIEBrowser() { - return navigator.userAgent.includes('MSIE ') || /Trident.*rv:11\./.test(navigator.userAgent); - }, - findIndex: function findIndex(items, item) { - var _iterator8 = _createForOfIteratorHelper(items), - _step8; - - try { - for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { - var it = _step8.value; - - if (JSON.stringify(it) === JSON.stringify(item)) { - return items.indexOf(it); - } - } - } catch (err) { - _iterator8.e(err); - } finally { - _iterator8.f(); - } - - return -1; - }, - trToData: function trToData(columns, $els) { - var _this = this; - - var data = []; - var m = []; - $els.each(function (y, el) { - var $el = $__default['default'](el); - var row = {}; // save tr's id, class and data-* attributes - - row._id = $el.attr('id'); - row._class = $el.attr('class'); - row._data = _this.getRealDataAttr($el.data()); - row._style = $el.attr('style'); - $el.find('>td,>th').each(function (_x, el) { - var $el = $__default['default'](el); - var cspan = +$el.attr('colspan') || 1; - var rspan = +$el.attr('rowspan') || 1; - var x = _x; // skip already occupied cells in current row - - for (; m[y] && m[y][x]; x++) {// ignore - } // mark matrix elements occupied by current cell with true - - - for (var tx = x; tx < x + cspan; tx++) { - for (var ty = y; ty < y + rspan; ty++) { - if (!m[ty]) { - // fill missing rows - m[ty] = []; - } - - m[ty][tx] = true; - } - } - - var field = columns[x].field; - row[field] = $el.html().trim(); // save td's id, class and data-* attributes - - row["_".concat(field, "_id")] = $el.attr('id'); - row["_".concat(field, "_class")] = $el.attr('class'); - row["_".concat(field, "_rowspan")] = $el.attr('rowspan'); - row["_".concat(field, "_colspan")] = $el.attr('colspan'); - row["_".concat(field, "_title")] = $el.attr('title'); - row["_".concat(field, "_data")] = _this.getRealDataAttr($el.data()); - row["_".concat(field, "_style")] = $el.attr('style'); - }); - data.push(row); - }); - return data; - }, - sort: function sort(a, b, order, sortStable, aPosition, bPosition) { - if (a === undefined || a === null) { - a = ''; - } - - if (b === undefined || b === null) { - b = ''; - } - - if (sortStable && a === b) { - a = aPosition; - b = bPosition; - } // If both values are numeric, do a numeric comparison - - - if (this.isNumeric(a) && this.isNumeric(b)) { - // Convert numerical values form string to float. - a = parseFloat(a); - b = parseFloat(b); - - if (a < b) { - return order * -1; - } - - if (a > b) { - return order; - } - - return 0; - } - - if (a === b) { - return 0; - } // If value is not a string, convert to string - - - if (typeof a !== 'string') { - a = a.toString(); - } - - if (a.localeCompare(b) === -1) { - return order * -1; - } - - return order; - }, - getEventName: function getEventName(eventPrefix) { - var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000)); - return "".concat(eventPrefix, "-").concat(id); - }, - hasDetailViewIcon: function hasDetailViewIcon(options) { - return options.detailView && options.detailViewIcon && !options.cardView; - }, - getDetailViewIndexOffset: function getDetailViewIndexOffset(options) { - return this.hasDetailViewIcon(options) && options.detailViewAlign !== 'right' ? 1 : 0; - }, - checkAutoMergeCells: function checkAutoMergeCells(data) { - var _iterator9 = _createForOfIteratorHelper(data), - _step9; - - try { - for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { - var row = _step9.value; - - for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) { - var key = _Object$keys[_i4]; - - if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) { - return true; - } - } - } - } catch (err) { - _iterator9.e(err); - } finally { - _iterator9.f(); - } - - return false; - }, - deepCopy: function deepCopy(arg) { - if (arg === undefined) { - return arg; - } - - return $__default['default'].extend(true, Array.isArray(arg) ? [] : {}, arg); - } - }; - - var BLOCK_ROWS = 50; - var CLUSTER_BLOCKS = 4; - - var VirtualScroll = /*#__PURE__*/function () { - function VirtualScroll(options) { - var _this = this; - - _classCallCheck(this, VirtualScroll); - - this.rows = options.rows; - this.scrollEl = options.scrollEl; - this.contentEl = options.contentEl; - this.callback = options.callback; - this.itemHeight = options.itemHeight; - this.cache = {}; - this.scrollTop = this.scrollEl.scrollTop; - this.initDOM(this.rows, options.fixedScroll); - this.scrollEl.scrollTop = this.scrollTop; - this.lastCluster = 0; - - var onScroll = function onScroll() { - if (_this.lastCluster !== (_this.lastCluster = _this.getNum())) { - _this.initDOM(_this.rows); - - _this.callback(); - } - }; - - this.scrollEl.addEventListener('scroll', onScroll, false); - - this.destroy = function () { - _this.contentEl.innerHtml = ''; - - _this.scrollEl.removeEventListener('scroll', onScroll, false); - }; - } - - _createClass(VirtualScroll, [{ - key: "initDOM", - value: function initDOM(rows, fixedScroll) { - if (typeof this.clusterHeight === 'undefined') { - this.cache.scrollTop = this.scrollEl.scrollTop; - this.cache.data = this.contentEl.innerHTML = rows[0] + rows[0] + rows[0]; - this.getRowsHeight(rows); - } - - var data = this.initData(rows, this.getNum(fixedScroll)); - var thisRows = data.rows.join(''); - var dataChanged = this.checkChanges('data', thisRows); - var topOffsetChanged = this.checkChanges('top', data.topOffset); - var bottomOffsetChanged = this.checkChanges('bottom', data.bottomOffset); - var html = []; - - if (dataChanged && topOffsetChanged) { - if (data.topOffset) { - html.push(this.getExtra('top', data.topOffset)); - } - - html.push(thisRows); - - if (data.bottomOffset) { - html.push(this.getExtra('bottom', data.bottomOffset)); - } - - this.contentEl.innerHTML = html.join(''); - - if (fixedScroll) { - this.contentEl.scrollTop = this.cache.scrollTop; - } - } else if (bottomOffsetChanged) { - this.contentEl.lastChild.style.height = "".concat(data.bottomOffset, "px"); - } - } - }, { - key: "getRowsHeight", - value: function getRowsHeight() { - if (typeof this.itemHeight === 'undefined') { - var nodes = this.contentEl.children; - var node = nodes[Math.floor(nodes.length / 2)]; - this.itemHeight = node.offsetHeight; - } - - this.blockHeight = this.itemHeight * BLOCK_ROWS; - this.clusterRows = BLOCK_ROWS * CLUSTER_BLOCKS; - this.clusterHeight = this.blockHeight * CLUSTER_BLOCKS; - } - }, { - key: "getNum", - value: function getNum(fixedScroll) { - this.scrollTop = fixedScroll ? this.cache.scrollTop : this.scrollEl.scrollTop; - return Math.floor(this.scrollTop / (this.clusterHeight - this.blockHeight)) || 0; - } - }, { - key: "initData", - value: function initData(rows, num) { - if (rows.length < BLOCK_ROWS) { - return { - topOffset: 0, - bottomOffset: 0, - rowsAbove: 0, - rows: rows - }; - } - - var start = Math.max((this.clusterRows - BLOCK_ROWS) * num, 0); - var end = start + this.clusterRows; - var topOffset = Math.max(start * this.itemHeight, 0); - var bottomOffset = Math.max((rows.length - end) * this.itemHeight, 0); - var thisRows = []; - var rowsAbove = start; - - if (topOffset < 1) { - rowsAbove++; - } - - for (var i = start; i < end; i++) { - rows[i] && thisRows.push(rows[i]); - } - - return { - topOffset: topOffset, - bottomOffset: bottomOffset, - rowsAbove: rowsAbove, - rows: thisRows - }; - } - }, { - key: "checkChanges", - value: function checkChanges(type, value) { - var changed = value !== this.cache[type]; - this.cache[type] = value; - return changed; - } - }, { - key: "getExtra", - value: function getExtra(className, height) { - var tag = document.createElement('tr'); - tag.className = "virtual-scroll-".concat(className); - - if (height) { - tag.style.height = "".concat(height, "px"); - } - - return tag.outerHTML; - } - }]); - - return VirtualScroll; - }(); - - var BootstrapTable = /*#__PURE__*/function () { - function BootstrapTable(el, options) { - _classCallCheck(this, BootstrapTable); - - this.options = options; - this.$el = $__default['default'](el); - this.$el_ = this.$el.clone(); - this.timeoutId_ = 0; - this.timeoutFooter_ = 0; - } - - _createClass(BootstrapTable, [{ - key: "init", - value: function init() { - this.initConstants(); - this.initLocale(); - this.initContainer(); - this.initTable(); - this.initHeader(); - this.initData(); - this.initHiddenRows(); - this.initToolbar(); - this.initPagination(); - this.initBody(); - this.initSearchText(); - this.initServer(); - } - }, { - key: "initConstants", - value: function initConstants() { - var opts = this.options; - this.constants = Constants.CONSTANTS; - this.constants.theme = $__default['default'].fn.bootstrapTable.theme; - this.constants.dataToggle = this.constants.html.dataToggle || 'data-toggle'; - var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : ''; - this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim(); - this.buttons = Utils.calculateObjectValue(this, opts.buttons, [], {}); - - if (_typeof(this.buttons) !== 'object') { - this.buttons = {}; - } - - if (typeof opts.icons === 'string') { - opts.icons = Utils.calculateObjectValue(null, opts.icons); - } - } - }, { - key: "initLocale", - value: function initLocale() { - if (this.options.locale) { - var locales = $__default['default'].fn.bootstrapTable.locales; - var parts = this.options.locale.split(/-|_/); - parts[0] = parts[0].toLowerCase(); - - if (parts[1]) { - parts[1] = parts[1].toUpperCase(); - } - - if (locales[this.options.locale]) { - $__default['default'].extend(this.options, locales[this.options.locale]); - } else if (locales[parts.join('-')]) { - $__default['default'].extend(this.options, locales[parts.join('-')]); - } else if (locales[parts[0]]) { - $__default['default'].extend(this.options, locales[parts[0]]); - } - } - } - }, { - key: "initContainer", - value: function initContainer() { - var topPagination = ['top', 'both'].includes(this.options.paginationVAlign) ? '
    ' : ''; - var bottomPagination = ['bottom', 'both'].includes(this.options.paginationVAlign) ? '
    ' : ''; - var loadingTemplate = Utils.calculateObjectValue(this.options, this.options.loadingTemplate, [this.options.formatLoadingMessage()]); - this.$container = $__default['default']("\n
    \n
    \n ").concat(topPagination, "\n
    \n
    \n
    \n
    \n ").concat(loadingTemplate, "\n
    \n
    \n
    \n
    \n ").concat(bottomPagination, "\n
    \n ")); - this.$container.insertAfter(this.$el); - this.$tableContainer = this.$container.find('.fixed-table-container'); - this.$tableHeader = this.$container.find('.fixed-table-header'); - this.$tableBody = this.$container.find('.fixed-table-body'); - this.$tableLoading = this.$container.find('.fixed-table-loading'); - this.$tableFooter = this.$el.find('tfoot'); // checking if custom table-toolbar exists or not - - if (this.options.buttonsToolbar) { - this.$toolbar = $__default['default']('body').find(this.options.buttonsToolbar); - } else { - this.$toolbar = this.$container.find('.fixed-table-toolbar'); - } - - this.$pagination = this.$container.find('.fixed-table-pagination'); - this.$tableBody.append(this.$el); - this.$container.after('
    '); - this.$el.addClass(this.options.classes); - this.$tableLoading.addClass(this.options.classes); - - if (this.options.height) { - this.$tableContainer.addClass('fixed-height'); - - if (this.options.showFooter) { - this.$tableContainer.addClass('has-footer'); - } - - if (this.options.classes.split(' ').includes('table-bordered')) { - this.$tableBody.append('
    '); - this.$tableBorder = this.$tableBody.find('.fixed-table-border'); - this.$tableLoading.addClass('fixed-table-border'); - } - - this.$tableFooter = this.$container.find('.fixed-table-footer'); - } - } - }, { - key: "initTable", - value: function initTable() { - var _this = this; - - var columns = []; - this.$header = this.$el.find('>thead'); - - if (!this.$header.length) { - this.$header = $__default['default']("
    \n
    \n
    ")); - } - - var detailViewTemplate = ''; - - if (Utils.hasDetailViewIcon(this.options)) { - detailViewTemplate = '
    '; - - if (Utils.calculateObjectValue(null, this.options.detailFilter, [i, item])) { - detailViewTemplate += "\n \n ".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen), "\n \n "); - } - - detailViewTemplate += '"), ""), _this7.header.formatters[j] && typeof value === 'string' ? value : '', _this7.options.cardView ? '' : '
    %s
    \r'; - - function CollectXmlssData ($rows, rowselector, length) { - var spans = []; - - $($rows).each(function () { - var ssIndex = 0; - var nCols = 0; - trData = ''; - - ForEachVisibleCell(this, 'td,th', rowIndex, length + $rows.length, - function (cell, row, col) { - if (cell !== null) { - var style = ''; - var data = parseString(cell, row, col); - var type = 'String'; - - if (jQuery.isNumeric(data) !== false) { - type = 'Number'; - } else { - var number = parsePercent(data); - if (number !== false) { - data = number; - type = 'Number'; - style += ' ss:StyleID="pct1"'; - } - } - - if (type !== 'Number') - data = data.replace(/\n/g, '
    '); - - var colspan = getColspan(cell); - var rowspan = getRowspan(cell); - - // Skip spans - $.each(spans, function () { - var range = this; - if (rowIndex >= range.s.r && rowIndex <= range.e.r && nCols >= range.s.c && nCols <= range.e.c) { - for (var i = 0; i <= range.e.c - range.s.c; ++i) { - nCols++; - ssIndex++; - } - } - }); - - // Handle Row Span - if (rowspan || colspan) { - rowspan = rowspan || 1; - colspan = colspan || 1; - spans.push({ - s: {r: rowIndex, c: nCols}, - e: {r: rowIndex + rowspan - 1, c: nCols + colspan - 1} - }); - } - - // Handle Colspan - if (colspan > 1) { - style += ' ss:MergeAcross="' + (colspan - 1) + '"'; - nCols += (colspan - 1); - } - - if (rowspan > 1) { - style += ' ss:MergeDown="' + (rowspan - 1) + '" ss:StyleID="rsp1"'; - } - - if (ssIndex > 0) { - style += ' ss:Index="' + (nCols + 1) + '"'; - ssIndex = 0; - } - - trData += '' + - $('
    ').text(data).html() + - '\r'; - nCols++; - } - }); - if (trData.length > 0) - docData += '\r' + trData + '\r'; - rowIndex++; - }); - - return $rows.length; - } - - var rowLength = CollectXmlssData(collectHeadRows($table), 'th,td', 0); - CollectXmlssData(collectRows($table), 'td,th', rowLength); - - docData += '
    \r'; - docDatas.push(docData); - }); - - var count = {}; - var firstOccurences = {}; - var item, itemCount; - for (var n = 0, c = docNames.length; n < c; n++) { - item = docNames[n]; - itemCount = count[item]; - itemCount = count[item] = (itemCount == null ? 1 : itemCount + 1); - - if (itemCount === 2) - docNames[firstOccurences[item]] = docNames[firstOccurences[item]].substring(0, 29) + '-1'; - if (count[item] > 1) - docNames[n] = docNames[n].substring(0, 29) + '-' + count[item]; - else - firstOccurences[item] = n; - } - - var CreationDate = new Date().toISOString(); - var xmlssDocFile = '\r' + - '\r' + - '\r' + - '\r' + - ' ' + CreationDate + '\r' + - '\r' + - '\r' + - ' \r' + - '\r' + - '\r' + - ' 9000\r' + - ' 13860\r' + - ' 0\r' + - ' 0\r' + - ' False\r' + - ' False\r' + - '\r' + - '\r' + - ' \r' + - ' \r' + - ' \r' + - '\r'; - - for (var j = 0; j < docDatas.length; j++) { - xmlssDocFile += '\r' + - docDatas[j]; - if (defaults.mso.rtl) { - xmlssDocFile += '\r' + - '\r' + - '\r'; - } else - xmlssDocFile += '\r'; - xmlssDocFile += '\r'; - } - - xmlssDocFile += '\r'; - - if (defaults.outputMode === 'string') - return xmlssDocFile; - - if (defaults.outputMode === 'base64') - return base64encode(xmlssDocFile); - - saveToFile(xmlssDocFile, defaults.fileName + '.xml', 'application/xml', 'utf-8', 'base64', false); - } else if (defaults.type === 'excel' && defaults.mso.fileFormat === 'xlsx') { - - var sheetNames = []; - var workbook = XLSX.utils.book_new(); - - // Multiple worksheets and .xlsx file extension #202 - - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var $table = $(this); - var ws = xlsxTableToSheet(this); - - var sheetName = ''; - if (typeof defaults.mso.worksheetName === 'string' && defaults.mso.worksheetName.length) - sheetName = defaults.mso.worksheetName + ' ' + (sheetNames.length + 1); - else if (typeof defaults.mso.worksheetName[sheetNames.length] !== 'undefined') - sheetName = defaults.mso.worksheetName[sheetNames.length]; - if (!sheetName.length) - sheetName = $table.find('caption').text() || ''; - if (!sheetName.length) - sheetName = 'Table ' + (sheetNames.length + 1); - sheetName = $.trim(sheetName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31)); - - sheetNames.push(sheetName); - XLSX.utils.book_append_sheet(workbook, ws, sheetName); - }); - - // add worksheet to workbook - var wbout = XLSX.write(workbook, {type: 'binary', bookType: defaults.mso.fileFormat, bookSST: false}); - - saveToFile(xlsxWorkbookToArrayBuffer(wbout), - defaults.fileName + '.' + defaults.mso.fileFormat, - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'UTF-8', '', false); - } else if (defaults.type === 'excel' || defaults.type === 'xls' || defaults.type === 'word' || defaults.type === 'doc') { - - var MSDocType = (defaults.type === 'excel' || defaults.type === 'xls') ? 'excel' : 'word'; - var MSDocExt = (MSDocType === 'excel') ? 'xls' : 'doc'; - var MSDocSchema = 'xmlns:x="urn:schemas-microsoft-com:office:' + MSDocType + '"'; - var docData = ''; - var docName = ''; - - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var $table = $(this); - - if (docName === '') { - docName = defaults.mso.worksheetName || $table.find('caption').text() || 'Table'; - docName = $.trim(docName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31)); - } - - if (defaults.exportHiddenCells === false) { - $hiddenTableElements = $table.find('tr, th, td').filter(':hidden'); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - rowIndex = 0; - ranges = []; - colNames = GetColumnNames(this); - - // Header - docData += ''; - $hrows = collectHeadRows($table); - $($hrows).each(function () { - var $row = $(this); - trData = ''; - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - if (cell !== null) { - var thstyle = ''; - - trData += ' 0) - trData += ' colspan="' + tdcolspan + '"'; - - var tdrowspan = getRowspan(cell); - if (tdrowspan > 0) - trData += ' rowspan="' + tdrowspan + '"'; - - trData += '>' + parseString(cell, row, col) + ''; - } - }); - if (trData.length > 0) - docData += '' + trData + ''; - rowIndex++; - }); - docData += ''; - - // Data - $rows = collectRows($table); - $($rows).each(function () { - var $row = $(this); - trData = ''; - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - if (cell !== null) { - var tdvalue = parseString(cell, row, col); - var tdstyle = ''; - var tdcss = $(cell).attr('data-tableexport-msonumberformat'); - - if (typeof tdcss === 'undefined' && typeof defaults.mso.onMsoNumberFormat === 'function') - tdcss = defaults.mso.onMsoNumberFormat(cell, row, col); - - if (typeof tdcss !== 'undefined' && tdcss !== '') - tdstyle = 'style="mso-number-format:\'' + tdcss + '\''; - - if (defaults.mso.styles.length) { - var cellstyles = document.defaultView.getComputedStyle(cell, null); - var rowstyles = document.defaultView.getComputedStyle($row[0], null); - - for (var cssStyle in defaults.mso.styles) { - tdcss = cellstyles[defaults.mso.styles[cssStyle]]; - if (tdcss === '') - tdcss = rowstyles[defaults.mso.styles[cssStyle]]; - - if (tdcss !== '' && tdcss !== '0px none rgb(0, 0, 0)' && tdcss !== 'rgba(0, 0, 0, 0)') { - tdstyle += (tdstyle === '') ? 'style="' : ';'; - tdstyle += defaults.mso.styles[cssStyle] + ':' + tdcss; - } - } - } - - trData += ' 0) - trData += ' colspan="' + tdcolspan + '"'; - - var tdrowspan = getRowspan(cell); - if (tdrowspan > 0) - trData += ' rowspan="' + tdrowspan + '"'; - - if (typeof tdvalue === 'string' && tdvalue !== '') { - tdvalue = preventInjection(tdvalue); - tdvalue = tdvalue.replace(/\n/g, '
    '); - } - - trData += '>' + tdvalue + ''; - } - }); - if (trData.length > 0) - docData += '
    ' + trData + ''; - rowIndex++; - }); - - if (defaults.displayTableName) - docData += ''; - - docData += '
    ' + parseString($('

    ' + defaults.tableName + '

    ')) + '
    '; - }); - - //noinspection XmlUnusedNamespaceDeclaration - var docFile = ''; - docFile += ''; - docFile += ''; - if (MSDocType === 'excel') { - docFile += ''; - } - docFile += ''; - docFile += ''; - docFile += ''; - docFile += '
    '; - docFile += docData; - docFile += '
    '; - docFile += ''; - docFile += ''; - - if (defaults.outputMode === 'string') - return docFile; - - if (defaults.outputMode === 'base64') - return base64encode(docFile); - - saveToFile(docFile, defaults.fileName + '.' + MSDocExt, 'application/vnd.ms-' + MSDocType, '', 'base64', false); - } else if (defaults.type === 'png') { - html2canvas($(el)[0]).then( - function (canvas) { - - var image = canvas.toDataURL(); - var byteString = atob(image.substring(22)); // remove data stuff - var buffer = new ArrayBuffer(byteString.length); - var intArray = new Uint8Array(buffer); - - for (var i = 0; i < byteString.length; i++) - intArray[i] = byteString.charCodeAt(i); - - if (defaults.outputMode === 'string') - return byteString; - - if (defaults.outputMode === 'base64') - return base64encode(image); - - if (defaults.outputMode === 'window') { - window.open(image); - return; - } - - saveToFile(buffer, defaults.fileName + '.png', 'image/png', '', '', false); - }); - - } else if (defaults.type === 'pdf') { - - if (defaults.pdfmake.enabled === true) { - // pdf output using pdfmake - // https://github.com/bpampuch/pdfmake - - var docDefinition = { - content: [] - }; - - $.extend(true, docDefinition, defaults.pdfmake.docDefinition); - - ranges = []; - - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var $table = $(this); - - var widths = []; - var body = []; - rowIndex = 0; - - /** - * @return {number} - */ - var CollectPdfmakeData = function ($rows, colselector, length) { - var rlength = 0; - - $($rows).each(function () { - var r = []; - - ForEachVisibleCell(this, colselector, rowIndex, length, - function (cell, row, col) { - var cellContent; - - if (typeof cell !== 'undefined' && cell !== null) { - var colspan = getColspan(cell); - var rowspan = getRowspan(cell); - - cellContent = {text: parseString(cell, row, col) || ' '}; - - if (colspan > 1 || rowspan > 1) { - cellContent['colSpan'] = colspan || 1; - cellContent['rowSpan'] = rowspan || 1; - } - } - else - cellContent = {text: ' '}; - - if (colselector.indexOf('th') >= 0) - cellContent['style'] = 'header'; - - r.push(cellContent); - }); - - for (var i = r.length; i < length; i++) - r.push(''); - - if (r.length) - body.push(r); - - if (rlength < r.length) - rlength = r.length; - - rowIndex++; - }); - - return rlength; - }; - - $hrows = collectHeadRows($table); - - var colcount = CollectPdfmakeData($hrows, 'th,td', $hrows.length); - - for (var i = widths.length; i < colcount; i++) - widths.push('*'); - - // Data - $rows = collectRows($table); - - colcount = CollectPdfmakeData($rows, 'td', $hrows.length + $rows.length); - - for (var i = widths.length; i < colcount; i++) - widths.push('*'); - - docDefinition.content.push({ table: { - headerRows: $hrows.length ? $hrows.length : null, - widths: widths, - body: body - }, - layout: { - layout: 'noBorders', - hLineStyle: function (i, node) { return 0; }, - vLineWidth: function (i, node) { return 0; }, - hLineColor: function (i, node) { return i < node.table.headerRows ? - defaults.pdfmake.docDefinition.styles.header.background : - defaults.pdfmake.docDefinition.styles.alternateRow.fillColor; }, - vLineColor: function (i, node) { return i < node.table.headerRows ? - defaults.pdfmake.docDefinition.styles.header.background : - defaults.pdfmake.docDefinition.styles.alternateRow.fillColor; }, - fillColor: function (rowIndex, node, columnIndex) { return (rowIndex % 2 === 0) ? - defaults.pdfmake.docDefinition.styles.alternateRow.fillColor : - null; } - }, - pageBreak: docDefinition.content.length ? "before" : undefined - }); - }); // ...for each table - - if (typeof pdfMake !== 'undefined' && typeof pdfMake.createPdf !== 'undefined') { - - pdfMake.fonts = { - Roboto: { - normal: 'Roboto-Regular.ttf', - bold: 'Roboto-Medium.ttf', - italics: 'Roboto-Italic.ttf', - bolditalics: 'Roboto-MediumItalic.ttf' - } - }; - - if (pdfMake.vfs.hasOwnProperty ('Mirza-Regular.ttf')) { - defaults.pdfmake.docDefinition.defaultStyle.font = 'Mirza'; - $.extend(true, pdfMake.fonts, {Mirza: {normal: 'Mirza-Regular.ttf', - bold: 'Mirza-Bold.ttf', - italics: 'Mirza-Medium.ttf', - bolditalics: 'Mirza-SemiBold.ttf' - }}); - } - else if (pdfMake.vfs.hasOwnProperty ('gbsn00lp.ttf')) { - defaults.pdfmake.docDefinition.defaultStyle.font = 'gbsn00lp'; - $.extend(true, pdfMake.fonts, {gbsn00lp: {normal: 'gbsn00lp.ttf', - bold: 'gbsn00lp.ttf', - italics: 'gbsn00lp.ttf', - bolditalics: 'gbsn00lp.ttf' - }}); - } - else if (pdfMake.vfs.hasOwnProperty ('ZCOOLXiaoWei-Regular.ttf')) { - defaults.pdfmake.docDefinition.defaultStyle.font = 'ZCOOLXiaoWei'; - $.extend(true, pdfMake.fonts, {ZCOOLXiaoWei: {normal: 'ZCOOLXiaoWei-Regular.ttf', - bold: 'ZCOOLXiaoWei-Regular.ttf', - italics: 'ZCOOLXiaoWei-Regular.ttf', - bolditalics: 'ZCOOLXiaoWei-Regular.ttf' - }}); - } - - $.extend(true, pdfMake.fonts, defaults.pdfmake.fonts); - - pdfMake.createPdf(docDefinition).getBuffer(function (buffer) { - saveToFile(buffer, defaults.fileName + '.pdf', 'application/pdf', '', '', false); - }); - } - } else if (defaults.jspdf.autotable === false) { - // pdf output using jsPDF's core html support - - var addHtmlOptions = { - dim: { - w: getPropertyUnitValue($(el).first().get(0), 'width', 'mm'), - h: getPropertyUnitValue($(el).first().get(0), 'height', 'mm') - }, - pagesplit: false - }; - - var doc = new jsPDF(defaults.jspdf.orientation, defaults.jspdf.unit, defaults.jspdf.format); - doc.addHTML($(el).first(), - defaults.jspdf.margins.left, - defaults.jspdf.margins.top, - addHtmlOptions, - function () { - jsPdfOutput(doc, false); - }); - //delete doc; - } else { - // pdf output using jsPDF AutoTable plugin - // https://github.com/simonbengtsson/jsPDF-AutoTable - - var teOptions = defaults.jspdf.autotable.tableExport; - - // When setting jspdf.format to 'bestfit' tableExport tries to choose - // the minimum required paper format and orientation in which the table - // (or tables in multitable mode) completely fits without column adjustment - if (typeof defaults.jspdf.format === 'string' && defaults.jspdf.format.toLowerCase() === 'bestfit') { - var rk = '', ro = ''; - var mw = 0; - - $(el).each(function () { - if (isVisible($(this))) { - var w = getPropertyUnitValue($(this).get(0), 'width', 'pt'); - - if (w > mw) { - if (w > pageFormats.a0[0]) { - rk = 'a0'; - ro = 'l'; - } - for (var key in pageFormats) { - if (pageFormats.hasOwnProperty(key)) { - if (pageFormats[key][1] > w) { - rk = key; - ro = 'l'; - if (pageFormats[key][0] > w) - ro = 'p'; - } - } - } - mw = w; - } - } - }); - defaults.jspdf.format = (rk === '' ? 'a4' : rk); - defaults.jspdf.orientation = (ro === '' ? 'w' : ro); - } - - // The jsPDF doc object is stored in defaults.jspdf.autotable.tableExport, - // thus it can be accessed from any callback function - if (teOptions.doc == null) { - teOptions.doc = new jsPDF(defaults.jspdf.orientation, - defaults.jspdf.unit, - defaults.jspdf.format); - teOptions.wScaleFactor = 1; - teOptions.hScaleFactor = 1; - - if (typeof defaults.jspdf.onDocCreated === 'function') - defaults.jspdf.onDocCreated(teOptions.doc); - } - - if (teOptions.outputImages === true) - teOptions.images = {}; - - if (typeof teOptions.images !== 'undefined') { - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var rowCount = 0; - ranges = []; - - if (defaults.exportHiddenCells === false) { - $hiddenTableElements = $(this).find('tr, th, td').filter(':hidden'); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - $hrows = collectHeadRows($(this)); - $rows = collectRows($(this)); - - $($rows).each(function () { - ForEachVisibleCell(this, 'td,th', $hrows.length + rowCount, $hrows.length + $rows.length, - function (cell) { - collectImages(cell, $(cell).children(), teOptions); - }); - rowCount++; - }); - }); - - $hrows = []; - $rows = []; - } - - loadImages(teOptions, function () { - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var colKey; - rowIndex = 0; - ranges = []; - - if (defaults.exportHiddenCells === false) { - $hiddenTableElements = $(this).find('tr, th, td').filter(':hidden'); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - colNames = GetColumnNames(this); - - teOptions.columns = []; - teOptions.rows = []; - teOptions.teCells = {}; - - // onTable: optional callback function for every matching table that can be used - // to modify the tableExport options or to skip the output of a particular table - // if the table selector targets multiple tables - if (typeof teOptions.onTable === 'function') - if (teOptions.onTable($(this), defaults) === false) - return true; // continue to next iteration step (table) - - // each table works with an own copy of AutoTable options - defaults.jspdf.autotable.tableExport = null; // avoid deep recursion error - var atOptions = $.extend(true, {}, defaults.jspdf.autotable); - defaults.jspdf.autotable.tableExport = teOptions; - - atOptions.margin = {}; - $.extend(true, atOptions.margin, defaults.jspdf.margins); - atOptions.tableExport = teOptions; - - // Fix jsPDF Autotable's row height calculation - if (typeof atOptions.beforePageContent !== 'function') { - atOptions.beforePageContent = function (data) { - if (data.pageCount === 1) { - var all = data.table.rows.concat(data.table.headerRow); - $.each(all, function () { - var row = this; - if (row.height > 0) { - row.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize; - data.table.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize; - } - }); - } - }; - } - - if (typeof atOptions.createdHeaderCell !== 'function') { - // apply some original css styles to pdf header cells - atOptions.createdHeaderCell = function (cell, data) { - - // jsPDF AutoTable plugin v2.0.14 fix: each cell needs its own styles object - cell.styles = $.extend({}, data.row.styles); - - if (typeof teOptions.columns [data.column.dataKey] !== 'undefined') { - var col = teOptions.columns [data.column.dataKey]; - - if (typeof col.rect !== 'undefined') { - var rh; - - cell.contentWidth = col.rect.width; - - if (typeof teOptions.heightRatio === 'undefined' || teOptions.heightRatio === 0) { - if (data.row.raw [data.column.dataKey].rowspan) - rh = data.row.raw [data.column.dataKey].rect.height / data.row.raw [data.column.dataKey].rowspan; - else - rh = data.row.raw [data.column.dataKey].rect.height; - - teOptions.heightRatio = cell.styles.rowHeight / rh; - } - - rh = data.row.raw [data.column.dataKey].rect.height * teOptions.heightRatio; - if (rh > cell.styles.rowHeight) - cell.styles.rowHeight = rh; - } - - cell.styles.halign = (atOptions.headerStyles.halign === 'inherit') ? 'center' : atOptions.headerStyles.halign; - cell.styles.valign = atOptions.headerStyles.valign; - - if (typeof col.style !== 'undefined' && col.style.hidden !== true) { - if (atOptions.headerStyles.halign === 'inherit') - cell.styles.halign = col.style.align; - if (atOptions.styles.fillColor === 'inherit') - cell.styles.fillColor = col.style.bcolor; - if (atOptions.styles.textColor === 'inherit') - cell.styles.textColor = col.style.color; - if (atOptions.styles.fontStyle === 'inherit') - cell.styles.fontStyle = col.style.fstyle; - } - } - }; - } - - if (typeof atOptions.createdCell !== 'function') { - // apply some original css styles to pdf table cells - atOptions.createdCell = function (cell, data) { - var tecell = teOptions.teCells [data.row.index + ':' + data.column.dataKey]; - - cell.styles.halign = (atOptions.styles.halign === 'inherit') ? 'center' : atOptions.styles.halign; - cell.styles.valign = atOptions.styles.valign; - - if (typeof tecell !== 'undefined' && typeof tecell.style !== 'undefined' && tecell.style.hidden !== true) { - if (atOptions.styles.halign === 'inherit') - cell.styles.halign = tecell.style.align; - if (atOptions.styles.fillColor === 'inherit') - cell.styles.fillColor = tecell.style.bcolor; - if (atOptions.styles.textColor === 'inherit') - cell.styles.textColor = tecell.style.color; - if (atOptions.styles.fontStyle === 'inherit') - cell.styles.fontStyle = tecell.style.fstyle; - } - }; - } - - if (typeof atOptions.drawHeaderCell !== 'function') { - atOptions.drawHeaderCell = function (cell, data) { - var colopt = teOptions.columns [data.column.dataKey]; - - if ((colopt.style.hasOwnProperty('hidden') !== true || colopt.style.hidden !== true) && - colopt.rowIndex >= 0) - return prepareAutoTableText(cell, data, colopt); - else - return false; // cell is hidden - }; - } - - if (typeof atOptions.drawCell !== 'function') { - atOptions.drawCell = function (cell, data) { - var tecell = teOptions.teCells [data.row.index + ':' + data.column.dataKey]; - var draw2canvas = (typeof tecell !== 'undefined' && tecell.isCanvas); - - if (draw2canvas !== true) { - if (prepareAutoTableText(cell, data, tecell)) { - - teOptions.doc.rect(cell.x, cell.y, cell.width, cell.height, cell.styles.fillStyle); - - if (typeof tecell !== 'undefined' && - (typeof tecell.hasUserDefText === 'undefined' || tecell.hasUserDefText !== true) && - typeof tecell.elements !== 'undefined' && tecell.elements.length) { - - var hScale = cell.height / tecell.rect.height; - if (hScale > teOptions.hScaleFactor) - teOptions.hScaleFactor = hScale; - teOptions.wScaleFactor = cell.width / tecell.rect.width; - - var ySave = cell.textPos.y; - drawAutotableElements(cell, tecell.elements, teOptions); - cell.textPos.y = ySave; - - drawAutotableText(cell, tecell.elements, teOptions); - } else - drawAutotableText(cell, {}, teOptions); - } - } else { - var container = tecell.elements[0]; - var imgId = $(container).attr('data-tableexport-canvas'); - var r = container.getBoundingClientRect(); - - cell.width = r.width * teOptions.wScaleFactor; - cell.height = r.height * teOptions.hScaleFactor; - data.row.height = cell.height; - - jsPdfDrawImage(cell, container, imgId, teOptions); - } - return false; - }; - } - - // collect header and data rows - teOptions.headerrows = []; - $hrows = collectHeadRows($(this)); - $($hrows).each(function () { - colKey = 0; - teOptions.headerrows[rowIndex] = []; - - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - var obj = getCellStyles(cell); - obj.title = parseString(cell, row, col); - obj.key = colKey++; - obj.rowIndex = rowIndex; - teOptions.headerrows[rowIndex].push(obj); - }); - rowIndex++; - }); - - if (rowIndex > 0) { - // iterate through last row - var lastrow = rowIndex - 1; - while (lastrow >= 0) { - $.each(teOptions.headerrows[lastrow], function () { - var obj = this; - - if (lastrow > 0 && this.rect === null) - obj = teOptions.headerrows[lastrow - 1][this.key]; - - if (obj !== null && obj.rowIndex >= 0 && - (obj.style.hasOwnProperty('hidden') !== true || obj.style.hidden !== true)) - teOptions.columns.push(obj); - }); - - lastrow = (teOptions.columns.length > 0) ? -1 : lastrow - 1; - } - } - - var rowCount = 0; - $rows = []; - $rows = collectRows($(this)); - $($rows).each(function () { - var rowData = []; - colKey = 0; - - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - var obj; - - if (typeof teOptions.columns[colKey] === 'undefined') { - // jsPDF-Autotable needs columns. Thus define hidden ones for tables without thead - obj = { - title: '', - key: colKey, - style: { - hidden: true - } - }; - teOptions.columns.push(obj); - } - - rowData.push(parseString(cell, row, col)); - - if (typeof cell !== 'undefined' && cell !== null) { - obj = getCellStyles(cell); - obj.isCanvas = cell.hasAttribute('data-tableexport-canvas'); - obj.elements = obj.isCanvas ? $(cell) : $(cell).children(); - - if(typeof $(cell).data('teUserDefText') !== 'undefined') - obj.hasUserDefText = true; - - teOptions.teCells [rowCount + ':' + colKey++] = obj; - } else { - obj = $.extend(true, {}, teOptions.teCells [rowCount + ':' + (colKey - 1)]); - obj.colspan = -1; - teOptions.teCells [rowCount + ':' + colKey++] = obj; - } - }); - if (rowData.length) { - teOptions.rows.push(rowData); - rowCount++; - } - rowIndex++; - }); - - // onBeforeAutotable: optional callback function before calling - // jsPDF AutoTable that can be used to modify the AutoTable options - if (typeof teOptions.onBeforeAutotable === 'function') - teOptions.onBeforeAutotable($(this), teOptions.columns, teOptions.rows, atOptions); - - teOptions.doc.autoTable(teOptions.columns, teOptions.rows, atOptions); - - // onAfterAutotable: optional callback function after returning - // from jsPDF AutoTable that can be used to modify the AutoTable options - if (typeof teOptions.onAfterAutotable === 'function') - teOptions.onAfterAutotable($(this), atOptions); - - // set the start position for the next table (in case there is one) - defaults.jspdf.autotable.startY = teOptions.doc.autoTableEndPosY() + atOptions.margin.top; - - }); - - jsPdfOutput(teOptions.doc, (typeof teOptions.images !== 'undefined' && jQuery.isEmptyObject(teOptions.images) === false)); - - if (typeof teOptions.headerrows !== 'undefined') - teOptions.headerrows.length = 0; - if (typeof teOptions.columns !== 'undefined') - teOptions.columns.length = 0; - if (typeof teOptions.rows !== 'undefined') - teOptions.rows.length = 0; - delete teOptions.doc; - teOptions.doc = null; - }); - } - } - - function collectHeadRows ($table) { - var result = []; - findTableElements($table, 'thead').each(function () { - result.push.apply(result, findTableElements($(this), defaults.theadSelector).toArray()); - }); - return result; - } - - function collectRows ($table) { - var result = []; - findTableElements($table, 'tbody').each(function () { - result.push.apply(result, findTableElements($(this), defaults.tbodySelector).toArray()); - }); - if (defaults.tfootSelector.length) { - findTableElements($table, 'tfoot').each(function () { - result.push.apply(result, findTableElements($(this), defaults.tfootSelector).toArray()); - }); - } - return result; - } - - function findTableElements ($parent, selector) { - var parentSelector = $parent[0].tagName; - var parentLevel = $parent.parents(parentSelector).length; - return $parent.find(selector).filter(function () { - return parentLevel === $(this).closest(parentSelector).parents(parentSelector).length; - }); - } - - function GetColumnNames (table) { - var result = []; - var maxCols = 0; - var row = 0; - var col = 0; - $(table).find('thead').first().find('th').each(function (index, el) { - var hasDataField = $(el).attr('data-field') !== undefined; - if (typeof el.parentNode.rowIndex !== 'undefined' && row !== el.parentNode.rowIndex) { - row = el.parentNode.rowIndex; - col = 0; - maxCols = 0; - } - var colSpan = getColspan(el); - maxCols += (colSpan ? colSpan : 1); - while (col < maxCols) { - result[col] = (hasDataField ? $(el).attr('data-field') : col.toString()); - col++; - } - }); - return result; - } - - function isVisible ($element) { - var isRow = typeof $element[0].rowIndex !== 'undefined'; - var isCell = isRow === false && typeof $element[0].cellIndex !== 'undefined'; - var isElementVisible = (isCell || isRow) ? isTableElementVisible($element) : $element.is(':visible'); - var tableexportDisplay = $element.attr('data-tableexport-display'); - - if (isCell && tableexportDisplay !== 'none' && tableexportDisplay !== 'always') { - $element = $($element[0].parentNode); - isRow = typeof $element[0].rowIndex !== 'undefined'; - tableexportDisplay = $element.attr('data-tableexport-display'); - } - if (isRow && tableexportDisplay !== 'none' && tableexportDisplay !== 'always') { - tableexportDisplay = $element.closest('table').attr('data-tableexport-display'); - } - - return tableexportDisplay !== 'none' && (isElementVisible === true || tableexportDisplay === 'always'); - } - - function isTableElementVisible ($element) { - var hiddenEls = []; - - if (checkCellVisibilty) { - hiddenEls = $hiddenTableElements.filter(function () { - var found = false; - - if (this.nodeType === $element[0].nodeType) { - if (typeof this.rowIndex !== 'undefined' && this.rowIndex === $element[0].rowIndex) - found = true; - else if (typeof this.cellIndex !== 'undefined' && this.cellIndex === $element[0].cellIndex && - typeof this.parentNode.rowIndex !== 'undefined' && - typeof $element[0].parentNode.rowIndex !== 'undefined' && - this.parentNode.rowIndex === $element[0].parentNode.rowIndex) - found = true; - } - return found; - }); - } - return (checkCellVisibilty === false || hiddenEls.length === 0); - } - - function isColumnIgnored ($cell, rowLength, colIndex) { - var result = false; - - if (isVisible($cell)) { - if (defaults.ignoreColumn.length > 0) { - if ($.inArray(colIndex, defaults.ignoreColumn) !== -1 || - $.inArray(colIndex - rowLength, defaults.ignoreColumn) !== -1 || - (colNames.length > colIndex && typeof colNames[colIndex] !== 'undefined' && - $.inArray(colNames[colIndex], defaults.ignoreColumn) !== -1)) - result = true; - } - } else - result = true; - - return result; - } - - function ForEachVisibleCell (tableRow, selector, rowIndex, rowCount, cellcallback) { - if (typeof (cellcallback) === 'function') { - var ignoreRow = false; - - if (typeof defaults.onIgnoreRow === 'function') - ignoreRow = defaults.onIgnoreRow($(tableRow), rowIndex); - - if (ignoreRow === false && - (defaults.ignoreRow.length === 0 || - ($.inArray(rowIndex, defaults.ignoreRow) === -1 && - $.inArray(rowIndex - rowCount, defaults.ignoreRow) === -1)) && - isVisible($(tableRow))) { - - var $cells = findTableElements($(tableRow), selector); - var cellsCount = $cells.length; - var colCount = 0; - var colIndex = 0; - - $cells.each(function () { - var $cell = $(this); - var colspan = getColspan(this); - var rowspan = getRowspan(this); - var c; - - // Skip ranges - $.each(ranges, function () { - var range = this; - if (rowIndex > range.s.r && rowIndex <= range.e.r && colCount >= range.s.c && colCount <= range.e.c) { - for (c = 0; c <= range.e.c - range.s.c; ++c) { - cellsCount++; - colIndex++; - cellcallback(null, rowIndex, colCount++); - } - } - }); - - // Handle span's - if (rowspan || colspan) { - rowspan = rowspan || 1; - colspan = colspan || 1; - ranges.push({ - s: {r: rowIndex, c: colCount}, - e: {r: rowIndex + rowspan - 1, c: colCount + colspan - 1} - }); - } - - if (isColumnIgnored($cell, cellsCount, colIndex++) === false) { - // Handle value - cellcallback(this, rowIndex, colCount++); - } - - // Handle colspan - if (colspan > 1) { - for (c = 0; c < colspan - 1; ++c) { - colIndex++; - cellcallback(null, rowIndex, colCount++); - } - } - }); - - // Skip ranges - $.each(ranges, function () { - var range = this; - if (rowIndex >= range.s.r && rowIndex <= range.e.r && colCount >= range.s.c && colCount <= range.e.c) { - for (c = 0; c <= range.e.c - range.s.c; ++c) { - cellcallback(null, rowIndex, colCount++); - } - } - }); - } - } - } - - function jsPdfDrawImage (cell, container, imgId, teOptions) { - if (typeof teOptions.images !== 'undefined') { - var image = teOptions.images[imgId]; - - if (typeof image !== 'undefined') { - var r = container.getBoundingClientRect(); - var arCell = cell.width / cell.height; - var arImg = r.width / r.height; - var imgWidth = cell.width; - var imgHeight = cell.height; - var px2pt = 0.264583 * 72 / 25.4; - var uy = 0; - - if (arImg <= arCell) { - imgHeight = Math.min(cell.height, r.height); - imgWidth = r.width * imgHeight / r.height; - } else if (arImg > arCell) { - imgWidth = Math.min(cell.width, r.width); - imgHeight = r.height * imgWidth / r.width; - } - - imgWidth *= px2pt; - imgHeight *= px2pt; - - if (imgHeight < cell.height) - uy = (cell.height - imgHeight) / 2; - - try { - teOptions.doc.addImage(image.src, cell.textPos.x, cell.y + uy, imgWidth, imgHeight); - } catch (e) { - // TODO: IE -> convert png to jpeg - } - cell.textPos.x += imgWidth; - } - } - } - - function jsPdfOutput (doc, hasimages) { - if (defaults.outputMode === 'string') - return doc.output(); - - if (defaults.outputMode === 'base64') - return base64encode(doc.output()); - - if (defaults.outputMode === 'window') { - window.URL = window.URL || window.webkitURL; - window.open(window.URL.createObjectURL(doc.output('blob'))); - return; - } - - try { - var blob = doc.output('blob'); - saveAs(blob, defaults.fileName + '.pdf'); - } catch (e) { - downloadFile(defaults.fileName + '.pdf', - 'data:application/pdf' + (hasimages ? '' : ';base64') + ',', - hasimages ? doc.output('blob') : doc.output()); - } - } - - function prepareAutoTableText (cell, data, cellopt) { - var cs = 0; - if (typeof cellopt !== 'undefined') - cs = cellopt.colspan; - - if (cs >= 0) { - // colspan handling - var cellWidth = cell.width; - var textPosX = cell.textPos.x; - var i = data.table.columns.indexOf(data.column); - - for (var c = 1; c < cs; c++) { - var column = data.table.columns[i + c]; - cellWidth += column.width; - } - - if (cs > 1) { - if (cell.styles.halign === 'right') - textPosX = cell.textPos.x + cellWidth - cell.width; - else if (cell.styles.halign === 'center') - textPosX = cell.textPos.x + (cellWidth - cell.width) / 2; - } - - cell.width = cellWidth; - cell.textPos.x = textPosX; - - if (typeof cellopt !== 'undefined' && cellopt.rowspan > 1) - cell.height = cell.height * cellopt.rowspan; - - // fix jsPDF's calculation of text position - if (cell.styles.valign === 'middle' || cell.styles.valign === 'bottom') { - var splittedText = typeof cell.text === 'string' ? cell.text.split(/\r\n|\r|\n/g) : cell.text; - var lineCount = splittedText.length || 1; - if (lineCount > 2) - cell.textPos.y -= ((2 - FONT_ROW_RATIO) / 2 * data.row.styles.fontSize) * (lineCount - 2) / 3; - } - return true; - } else - return false; // cell is hidden (colspan = -1), don't draw it - } - - function collectImages (cell, elements, teOptions) { - if (typeof cell !== 'undefined' && cell !== null) { - - if (cell.hasAttribute('data-tableexport-canvas')) { - var imgId = new Date().getTime(); - $(cell).attr('data-tableexport-canvas', imgId); - - teOptions.images[imgId] = { - url: '[data-tableexport-canvas="' + imgId + '"]', - src: null - }; - } else if (elements !== 'undefined' && elements != null) { - elements.each(function () { - if ($(this).is('img')) { - var imgId = strHashCode(this.src); - teOptions.images[imgId] = { - url: this.src, - src: this.src - }; - } - collectImages(cell, $(this).children(), teOptions); - }); - } - } - } - - function loadImages (teOptions, callback) { - var imageCount = 0; - var pendingCount = 0; - - function done () { - callback(imageCount); - } - - function loadImage (image) { - if (image.url) { - if (!image.src) { - var $imgContainer = $(image.url); - if ($imgContainer.length) { - imageCount = ++pendingCount; - - html2canvas($imgContainer[0]).then(function (canvas) { - image.src = canvas.toDataURL('image/png'); - if (!--pendingCount) - done(); - }); - } - } else { - var img = new Image(); - imageCount = ++pendingCount; - img.crossOrigin = 'Anonymous'; - img.onerror = img.onload = function () { - if (img.complete) { - - if (img.src.indexOf('data:image/') === 0) { - img.width = image.width || img.width || 0; - img.height = image.height || img.height || 0; - } - - if (img.width + img.height) { - var canvas = document.createElement('canvas'); - var ctx = canvas.getContext('2d'); - - canvas.width = img.width; - canvas.height = img.height; - ctx.drawImage(img, 0, 0); - - image.src = canvas.toDataURL('image/png'); - } - } - if (!--pendingCount) - done(); - }; - img.src = image.url; - } - } - } - - if (typeof teOptions.images !== 'undefined') { - for (var i in teOptions.images) - if (teOptions.images.hasOwnProperty(i)) - loadImage(teOptions.images[i]); - } - - return pendingCount || done(); - } - - function drawAutotableElements (cell, elements, teOptions) { - elements.each(function () { - if ($(this).is('div')) { - var bcolor = rgb2array(getStyle(this, 'background-color'), [255, 255, 255]); - var lcolor = rgb2array(getStyle(this, 'border-top-color'), [0, 0, 0]); - var lwidth = getPropertyUnitValue(this, 'border-top-width', defaults.jspdf.unit); - - var r = this.getBoundingClientRect(); - var ux = this.offsetLeft * teOptions.wScaleFactor; - var uy = this.offsetTop * teOptions.hScaleFactor; - var uw = r.width * teOptions.wScaleFactor; - var uh = r.height * teOptions.hScaleFactor; - - teOptions.doc.setDrawColor.apply(undefined, lcolor); - teOptions.doc.setFillColor.apply(undefined, bcolor); - teOptions.doc.setLineWidth(lwidth); - teOptions.doc.rect(cell.x + ux, cell.y + uy, uw, uh, lwidth ? 'FD' : 'F'); - } else if ($(this).is('img')) { - var imgId = strHashCode(this.src); - jsPdfDrawImage(cell, this, imgId, teOptions); - } - - drawAutotableElements(cell, $(this).children(), teOptions); - }); - } - - function drawAutotableText (cell, texttags, teOptions) { - if (typeof teOptions.onAutotableText === 'function') { - teOptions.onAutotableText(teOptions.doc, cell, texttags); - } else { - var x = cell.textPos.x; - var y = cell.textPos.y; - var style = {halign: cell.styles.halign, valign: cell.styles.valign}; - - if (texttags.length) { - var tag = texttags[0]; - while (tag.previousSibling) - tag = tag.previousSibling; - - var b = false, i = false; - - while (tag) { - var txt = tag.innerText || tag.textContent || ''; - var leadingspace = (txt.length && txt[0] === ' ') ? ' ' : ''; - var trailingspace = (txt.length > 1 && txt[txt.length - 1] === ' ') ? ' ' : ''; - - if (defaults.preserve.leadingWS !== true) - txt = leadingspace + trimLeft(txt); - if (defaults.preserve.trailingWS !== true) - txt = trimRight(txt) + trailingspace; - - if ($(tag).is('br')) { - x = cell.textPos.x; - y += teOptions.doc.internal.getFontSize(); - } - - if ($(tag).is('b')) - b = true; - else if ($(tag).is('i')) - i = true; - - if (b || i) - teOptions.doc.setFontType((b && i) ? 'bolditalic' : b ? 'bold' : 'italic'); - - var w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize(); - - if (w) { - if (cell.styles.overflow === 'linebreak' && - x > cell.textPos.x && (x + w) > (cell.textPos.x + cell.width)) { - var chars = '.,!%*;:=-'; - if (chars.indexOf(txt.charAt(0)) >= 0) { - var s = txt.charAt(0); - w = teOptions.doc.getStringUnitWidth(s) * teOptions.doc.internal.getFontSize(); - if ((x + w) <= (cell.textPos.x + cell.width)) { - teOptions.doc.autoTableText(s, x, y, style); - txt = txt.substring(1, txt.length); - } - w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize(); - } - x = cell.textPos.x; - y += teOptions.doc.internal.getFontSize(); - } - - if (cell.styles.overflow !== 'visible') { - while (txt.length && (x + w) > (cell.textPos.x + cell.width)) { - txt = txt.substring(0, txt.length - 1); - w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize(); - } - } - - teOptions.doc.autoTableText(txt, x, y, style); - x += w; - } - - if (b || i) { - if ($(tag).is('b')) - b = false; - else if ($(tag).is('i')) - i = false; - - teOptions.doc.setFontType((!b && !i) ? 'normal' : b ? 'bold' : 'italic'); - } - - tag = tag.nextSibling; - } - cell.textPos.x = x; - cell.textPos.y = y; - } else { - teOptions.doc.autoTableText(cell.text, cell.textPos.x, cell.textPos.y, style); - } - } - } - - function escapeRegExp (string) { - return string == null ? '' : string.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'); - } - - function replaceAll (string, find, replace) { - return string == null ? '' : string.toString().replace(new RegExp(escapeRegExp(find), 'g'), replace); - } - - function trimLeft (string) { - return string == null ? '' : string.toString().replace(/^\s+/, ''); - } - - function trimRight (string) { - return string == null ? '' : string.toString().replace(/\s+$/, ''); - } - - function parseDateUTC (s) { - if (defaults.date.html.length === 0) - return false; - - defaults.date.pattern.lastIndex = 0; - - var match = defaults.date.pattern.exec(s); - if (match == null) - return false; - - var y = +match[defaults.date.match_y]; - if (y < 0 || y > 8099) return false; - var m = match[defaults.date.match_m] * 1; - var d = match[defaults.date.match_d] * 1; - if (!isFinite(d)) return false; - - var o = new Date(y, m - 1, d, 0, 0, 0); - if (o.getFullYear() === y && o.getMonth() === (m - 1) && o.getDate() === d) - return new Date(Date.UTC(y, m - 1, d, 0, 0, 0)); - else - return false; - } - - function parseNumber (value) { - value = value || '0'; - if ('' !== defaults.numbers.html.thousandsSeparator) - value = replaceAll(value, defaults.numbers.html.thousandsSeparator, ''); - if ('.' !== defaults.numbers.html.decimalMark) - value = replaceAll(value, defaults.numbers.html.decimalMark, '.'); - - return typeof value === 'number' || jQuery.isNumeric(value) !== false ? value : false; - } - - function parsePercent (value) { - if (value.indexOf('%') > -1) { - value = parseNumber(value.replace(/%/g, '')); - if (value !== false) - value = value / 100; - } else - value = false; - return value; - } - - function parseString (cell, rowIndex, colIndex, cellInfo) { - var result = ''; - var cellType = 'text'; - - if (cell !== null) { - var $cell = $(cell); - var htmlData; - - $cell.removeData('teUserDefText'); - - if ($cell[0].hasAttribute('data-tableexport-canvas')) { - htmlData = ''; - } else if ($cell[0].hasAttribute('data-tableexport-value')) { - htmlData = $cell.attr('data-tableexport-value'); - htmlData = htmlData ? htmlData + '' : ''; - $cell.data('teUserDefText', 1); - } else { - htmlData = $cell.html(); - - if (typeof defaults.onCellHtmlData === 'function') { - htmlData = defaults.onCellHtmlData($cell, rowIndex, colIndex, htmlData); - $cell.data('teUserDefText', 1); - } - else if (htmlData !== '') { - var html = $.parseHTML(htmlData); - var inputidx = 0; - var selectidx = 0; - - htmlData = ''; - $.each(html, function () { - if ($(this).is('input')) { - htmlData += $cell.find('input').eq(inputidx++).val(); - } - else if ($(this).is('select')) { - htmlData += $cell.find('select option:selected').eq(selectidx++).text(); - } - else if ($(this).is('br')) { - htmlData += '
    '; - } - else { - if (typeof $(this).html() === 'undefined') - htmlData += $(this).text(); - else if (jQuery().bootstrapTable === undefined || - ($(this).hasClass('fht-cell') === false && // BT 4 - $(this).hasClass('filterControl') === false && - $cell.parents('.detail-view').length === 0)) - htmlData += $(this).html(); - - if ($(this).is('a')) { - var href = $cell.find('a').attr('href') || ''; - if (typeof defaults.onCellHtmlHyperlink === 'function') - result += defaults.onCellHtmlHyperlink($cell, rowIndex, colIndex, href, htmlData); - else if (defaults.htmlHyperlink === 'href') - result += href; - else // 'content' - result += htmlData; - htmlData = ''; - } - } - }); - } - } - - if (htmlData && htmlData !== '' && defaults.htmlContent === true) { - result = $.trim(htmlData); - } else if (htmlData && htmlData !== '') { - var cellFormat = $cell.attr('data-tableexport-cellformat'); - - if (cellFormat !== '') { - var text = htmlData.replace(/\n/g, '\u2028').replace(/(<\s*br([^>]*)>)/gi, '\u2060'); - var obj = $('
    ').html(text).contents(); - var number = false; - text = ''; - - $.each(obj.text().split('\u2028'), function (i, v) { - if (i > 0) - text += ' '; - - if (defaults.preserve.leadingWS !== true) - v = trimLeft(v); - text += (defaults.preserve.trailingWS !== true) ? trimRight(v) : v; - }); - - $.each(text.split('\u2060'), function (i, v) { - if (i > 0) - result += '\n'; - - if (defaults.preserve.leadingWS !== true) - v = trimLeft(v); - if (defaults.preserve.trailingWS !== true) - v = trimRight(v); - result += v.replace(/\u00AD/g, ''); // remove soft hyphens - }); - - result = result.replace(/\u00A0/g, ' '); // replace nbsp's with spaces - - if (defaults.type === 'json' || - (defaults.type === 'excel' && defaults.mso.fileFormat === 'xmlss') || - defaults.numbers.output === false) { - number = parseNumber(result); - - if (number !== false) { - cellType = 'number'; - result = Number(number); - } - } else if (defaults.numbers.html.decimalMark !== defaults.numbers.output.decimalMark || - defaults.numbers.html.thousandsSeparator !== defaults.numbers.output.thousandsSeparator) { - number = parseNumber(result); - - if (number !== false) { - var frac = ('' + number.substr(number < 0 ? 1 : 0)).split('.'); - if (frac.length === 1) - frac[1] = ''; - var mod = frac[0].length > 3 ? frac[0].length % 3 : 0; - - cellType = 'number'; - result = (number < 0 ? '-' : '') + - (defaults.numbers.output.thousandsSeparator ? ((mod ? frac[0].substr(0, mod) + defaults.numbers.output.thousandsSeparator : '') + frac[0].substr(mod).replace(/(\d{3})(?=\d)/g, '$1' + defaults.numbers.output.thousandsSeparator)) : frac[0]) + - (frac[1].length ? defaults.numbers.output.decimalMark + frac[1] : ''); - } - } - } else - result = htmlData; - } - - if (defaults.escape === true) { - //noinspection JSDeprecatedSymbols - result = escape(result); - } - - if (typeof defaults.onCellData === 'function') { - result = defaults.onCellData($cell, rowIndex, colIndex, result, cellType); - $cell.data('teUserDefText', 1); - } - } - - if (cellInfo !== undefined) - cellInfo.type = cellType; - - return result; - } - - function preventInjection (str) { - if (str.length > 0 && defaults.preventInjection === true) { - var chars = '=+-@'; - if (chars.indexOf(str.charAt(0)) >= 0) - return ('\'' + str); - } - return str; - } - - //noinspection JSUnusedLocalSymbols - function hyphenate (a, b, c) { - return b + '-' + c.toLowerCase(); - } - - function rgb2array (rgb_string, default_result) { - var re = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/; - var bits = re.exec(rgb_string); - var result = default_result; - if (bits) - result = [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])]; - return result; - } - - function getCellStyles (cell) { - var a = getStyle(cell, 'text-align'); - var fw = getStyle(cell, 'font-weight'); - var fs = getStyle(cell, 'font-style'); - var f = ''; - if (a === 'start') - a = getStyle(cell, 'direction') === 'rtl' ? 'right' : 'left'; - if (fw >= 700) - f = 'bold'; - if (fs === 'italic') - f += fs; - if (f === '') - f = 'normal'; - - var result = { - style: { - align: a, - bcolor: rgb2array(getStyle(cell, 'background-color'), [255, 255, 255]), - color: rgb2array(getStyle(cell, 'color'), [0, 0, 0]), - fstyle: f - }, - colspan: getColspan(cell), - rowspan: getRowspan(cell) - }; - - if (cell !== null) { - var r = cell.getBoundingClientRect(); - result.rect = { - width: r.width, - height: r.height - }; - } - - return result; - } - - function getColspan (cell) { - var result = $(cell).attr('data-tableexport-colspan'); - if (typeof result === 'undefined' && $(cell).is('[colspan]')) - result = $(cell).attr('colspan'); - - return (parseInt(result) || 0); - } - - function getRowspan (cell) { - var result = $(cell).attr('data-tableexport-rowspan'); - if (typeof result === 'undefined' && $(cell).is('[rowspan]')) - result = $(cell).attr('rowspan'); - - return (parseInt(result) || 0); - } - - // get computed style property - function getStyle (target, prop) { - try { - if (window.getComputedStyle) { // gecko and webkit - prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel - return window.getComputedStyle(target, null).getPropertyValue(prop); - } - if (target.currentStyle) { // ie - return target.currentStyle[prop]; - } - return target.style[prop]; - } catch (e) { - } - return ''; - } - - function getUnitValue (parent, value, unit) { - var baseline = 100; // any number serves - - var temp = document.createElement('div'); // create temporary element - temp.style.overflow = 'hidden'; // in case baseline is set too low - temp.style.visibility = 'hidden'; // no need to show it - - parent.appendChild(temp); // insert it into the parent for em, ex and % - - temp.style.width = baseline + unit; - var factor = baseline / temp.offsetWidth; - - parent.removeChild(temp); // clean up - - return (value * factor); - } - - function getPropertyUnitValue (target, prop, unit) { - var value = getStyle(target, prop); // get the computed style value - - var numeric = value.match(/\d+/); // get the numeric component - if (numeric !== null) { - numeric = numeric[0]; // get the string - - return getUnitValue(target.parentElement, numeric, unit); - } - return 0; - } - - function xlsxWorkbookToArrayBuffer (s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for (var i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF; - return buf; - } - - function xlsxTableToSheet (table) { - var ws = ({}); - var rows = table.getElementsByTagName('tr'); - var sheetRows = 10000000; - var range = {s: {r: 0, c: 0}, e: {r: 0, c: 0}}; - var merges = [], midx = 0; - var rowinfo = []; - var _R = 0, R = 0, _C, C, RS, CS; - var elt; - var ssfTable = XLSX.SSF.get_table(); - - for (; _R < rows.length && R < sheetRows; ++_R) { - var row = rows[_R]; - - var ignoreRow = false; - if (typeof defaults.onIgnoreRow === 'function') - ignoreRow = defaults.onIgnoreRow($(row), _R); - - if (ignoreRow === true || - (defaults.ignoreRow.length !== 0 && - ($.inArray(_R, defaults.ignoreRow) !== -1 || - $.inArray(_R - rows.length, defaults.ignoreRow) !== -1)) || - isVisible($(row)) === false) { - continue; - } - - var elts = (row.children); - var _CLength = 0; - for (_C = 0; _C < elts.length; ++_C) { - elt = elts[_C]; - CS = +getColspan(elt) || 1; - _CLength += CS; - } - - var CSOffset = 0; - for (_C = C = 0; _C < elts.length; ++_C) { - elt = elts[_C]; - CS = +getColspan(elt) || 1; - - var col = _C + CSOffset; - if (isColumnIgnored($(elt), _CLength, col + (col < C ? C - col : 0))) - continue; - CSOffset += CS - 1; - - for (midx = 0; midx < merges.length; ++midx) { - var m = merges[midx]; - if (m.s.c == C && m.s.r <= R && R <= m.e.r) { - C = m.e.c + 1; - midx = -1; - } - } - - if ((RS = +getRowspan(elt)) > 0 || CS > 1) - merges.push({s: {r: R, c: C}, e: {r: R + (RS || 1) - 1, c: C + CS - 1}}); - - var cellInfo = {type: ''}; - var v = parseString(elt, _R, _C + CSOffset, cellInfo); - var o = {t: 's', v: v}; - var _t = ''; - var cellFormat = $(elt).attr('data-tableexport-cellformat'); - - if (cellFormat !== '') { - var ssfId = parseInt($(elt).attr('data-tableexport-xlsxformatid') || 0); - - if (ssfId === 0 && - typeof defaults.mso.xslx.formatId.numbers === 'function') - ssfId = defaults.mso.xslx.formatId.numbers($(elt), _R, _C + CSOffset); - - if (ssfId === 0 && - typeof defaults.mso.xslx.formatId.date === 'function') - ssfId = defaults.mso.xslx.formatId.date($(elt), _R, _C + CSOffset); - - if (ssfId === 49 || ssfId === '@') - _t = 's'; - else if (cellInfo.type === 'number' || - (ssfId > 0 && ssfId < 14) || (ssfId > 36 && ssfId < 41) || ssfId === 48) - _t = 'n'; - else if (cellInfo.type === 'date' || - (ssfId > 13 && ssfId < 37) || (ssfId > 44 && ssfId < 48) || ssfId === 56) - _t = 'd'; - } else - _t = 's'; - - if (v != null) { - var vd; - - if (v.length === 0) - o.t = 'z'; - else if (v.trim().length === 0 || _t === 's') { - } - else if (cellInfo.type === 'function') - o = {f: v}; - else if (v === 'TRUE') - o = {t: 'b', v: true}; - else if (v === 'FALSE') - o = {t: 'b', v: false}; - else if (_t === '' && $(elt).find('a').length) { - v = defaults.htmlHyperlink !== 'href' ? v : ''; - o = {f: '=HYPERLINK("' + $(elt).find('a').attr('href') + (v.length ? '","' + v : '') + '")'}; - } - else if (_t === 'n' || isFinite(xlsxToNumber(v, defaults.numbers.output))) { // yes, defaults.numbers.output is right - var vn = xlsxToNumber(v, defaults.numbers.output); - if (ssfId === 0 && typeof defaults.mso.xslx.formatId.numbers !== 'function') - ssfId = defaults.mso.xslx.formatId.numbers; - if (isFinite(vn) || isFinite(v)) - o = { - t: 'n', - v: (isFinite(vn) ? vn : v), - z: (typeof ssfId === 'string') ? ssfId : (ssfId in ssfTable ? ssfTable[ssfId] : '0.00') - }; - } - else if ((vd = parseDateUTC(v)) !== false || _t === 'd') { - if (ssfId === 0 && typeof defaults.mso.xslx.formatId.date !== 'function') - ssfId = defaults.mso.xslx.formatId.date; - o = { - t: 'd', - v: (vd !== false ? vd : v), - z: (typeof ssfId === 'string') ? ssfId : (ssfId in ssfTable ? ssfTable[ssfId] : 'm/d/yy') - }; - } - } - ws[xlsxEncodeCell({c: C, r: R})] = o; - if (range.e.c < C) - range.e.c = C; - C += CS; - } - ++R; - } - if (merges.length) ws['!merges'] = merges; - if (rowinfo.length) ws['!rows'] = rowinfo; - range.e.r = R - 1; - ws['!ref'] = xlsxEncodeRange(range); - if (R >= sheetRows) - ws['!fullref'] = xlsxEncodeRange((range.e.r = rows.length - _R + R - 1, range)); - return ws; - } - - function xlsxEncodeRow (row) { return '' + (row + 1); } - - function xlsxEncodeCol (col) { - var s = ''; - for (++col; col; col = Math.floor((col - 1) / 26)) s = String.fromCharCode(((col - 1) % 26) + 65) + s; - return s; - } - - function xlsxEncodeCell (cell) { return xlsxEncodeCol(cell.c) + xlsxEncodeRow(cell.r); } - - function xlsxEncodeRange (cs, ce) { - if (typeof ce === 'undefined' || typeof ce === 'number') { - return xlsxEncodeRange(cs.s, cs.e); - } - if (typeof cs !== 'string') cs = xlsxEncodeCell((cs)); - if (typeof ce !== 'string') ce = xlsxEncodeCell((ce)); - return cs === ce ? cs : cs + ':' + ce; - } - - function xlsxToNumber (s, numbersFormat) { - var v = Number(s); - if (isFinite(v)) return v; - var wt = 1; - var ss = s; - if ('' !== numbersFormat.thousandsSeparator) - ss = ss.replace(new RegExp('([\\d])' + numbersFormat.thousandsSeparator + '([\\d])', 'g'), '$1$2'); - if ('.' !== numbersFormat.decimalMark) - ss = ss.replace(new RegExp('([\\d])' + numbersFormat.decimalMark + '([\\d])', 'g'), '$1.$2'); - ss = ss.replace(/[$]/g, '').replace(/[%]/g, function () { - wt *= 100; - return ''; - }); - if (isFinite(v = Number(ss))) return v / wt; - ss = ss.replace(/[(](.*)[)]/, function ($$, $1) { - wt = -wt; - return $1; - }); - if (isFinite(v = Number(ss))) return v / wt; - return v; - } - - function strHashCode (str) { - var hash = 0, i, chr, len; - if (str.length === 0) return hash; - for (i = 0, len = str.length; i < len; i++) { - chr = str.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; // Convert to 32bit integer - } - return hash; - } - - function saveToFile (data, fileName, type, charset, encoding, bom) { - var saveIt = true; - if (typeof defaults.onBeforeSaveToFile === 'function') { - saveIt = defaults.onBeforeSaveToFile(data, fileName, type, charset, encoding); - if (typeof saveIt !== 'boolean') - saveIt = true; - } - - if (saveIt) { - try { - blob = new Blob([data], {type: type + ';charset=' + charset}); - saveAs(blob, fileName, bom === false); - - if (typeof defaults.onAfterSaveToFile === 'function') - defaults.onAfterSaveToFile(data, fileName); - } catch (e) { - downloadFile(fileName, - 'data:' + type + - (charset.length ? ';charset=' + charset : '') + - (encoding.length ? ';' + encoding : '') + ',', - (bom ? ('\ufeff' + data) : data)); - } - } - } - - function downloadFile (filename, header, data) { - var ua = window.navigator.userAgent; - if (filename !== false && window.navigator.msSaveOrOpenBlob) { - //noinspection JSUnresolvedFunction - window.navigator.msSaveOrOpenBlob(new Blob([data]), filename); - } else if (filename !== false && (ua.indexOf('MSIE ') > 0 || !!ua.match(/Trident.*rv\:11\./))) { - // Internet Explorer (<= 9) workaround by Darryl (https://github.com/dawiong/tableExport.jquery.plugin) - // based on sampopes answer on http://stackoverflow.com/questions/22317951 - // ! Not working for json and pdf format ! - var frame = document.createElement('iframe'); - - if (frame) { - document.body.appendChild(frame); - frame.setAttribute('style', 'display:none'); - frame.contentDocument.open('txt/plain', 'replace'); - frame.contentDocument.write(data); - frame.contentDocument.close(); - frame.contentWindow.focus(); - - var extension = filename.substr((filename.lastIndexOf('.') + 1)); - switch (extension) { - case 'doc': - case 'json': - case 'png': - case 'pdf': - case 'xls': - case 'xlsx': - filename += '.txt'; - break; - } - frame.contentDocument.execCommand('SaveAs', true, filename); - document.body.removeChild(frame); - } - } else { - var DownloadLink = document.createElement('a'); - - if (DownloadLink) { - var blobUrl = null; - - DownloadLink.style.display = 'none'; - if (filename !== false) - DownloadLink.download = filename; - else - DownloadLink.target = '_blank'; - - if (typeof data === 'object') { - window.URL = window.URL || window.webkitURL; - var binaryData = []; - binaryData.push(data); - blobUrl = window.URL.createObjectURL(new Blob(binaryData, {type: header})); - DownloadLink.href = blobUrl; - } else if (header.toLowerCase().indexOf('base64,') >= 0) - DownloadLink.href = header + base64encode(data); - else - DownloadLink.href = header + encodeURIComponent(data); - - document.body.appendChild(DownloadLink); - - if (document.createEvent) { - if (DownloadEvt === null) - DownloadEvt = document.createEvent('MouseEvents'); - - DownloadEvt.initEvent('click', true, false); - DownloadLink.dispatchEvent(DownloadEvt); - } else if (document.createEventObject) - DownloadLink.fireEvent('onclick'); - else if (typeof DownloadLink.onclick === 'function') - DownloadLink.onclick(); - - setTimeout(function () { - if (blobUrl) - window.URL.revokeObjectURL(blobUrl); - document.body.removeChild(DownloadLink); - - if (typeof defaults.onAfterSaveToFile === 'function') - defaults.onAfterSaveToFile(data, filename); - }, 100); - } - } - } - - function utf8Encode (text) { - if (typeof text === 'string') { - text = text.replace(/\x0d\x0a/g, '\x0a'); - var utftext = ''; - for (var n = 0; n < text.length; n++) { - var c = text.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } else if ((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - return utftext; - } - return text; - } - - function base64encode (input) { - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - var output = ''; - var i = 0; - input = utf8Encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - keyStr.charAt(enc1) + keyStr.charAt(enc2) + - keyStr.charAt(enc3) + keyStr.charAt(enc4); - } - return output; - } - - if (typeof defaults.onTableExportEnd === 'function') - defaults.onTableExportEnd(); - - return this; - }; -})(jQuery); - -!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict"; -/** @license - * jsPDF - PDF Document creation from JavaScript - * Version 1.5.3 Built on 2018-12-27T14:11:42.696Z - * CommitID d93d28db14 - * - * Copyright (c) 2010-2016 James Hall , https://github.com/MrRio/jsPDF - * 2010 Aaron Spike, https://github.com/acspike - * 2012 Willow Systems Corporation, willow-systems.com - * 2012 Pablo Hess, https://github.com/pablohess - * 2012 Florian Jenett, https://github.com/fjenett - * 2013 Warren Weckesser, https://github.com/warrenweckesser - * 2013 Youssef Beddad, https://github.com/lifof - * 2013 Lee Driscoll, https://github.com/lsdriscoll - * 2013 Stefan Slonevskiy, https://github.com/stefslon - * 2013 Jeremy Morel, https://github.com/jmorel - * 2013 Christoph Hartmann, https://github.com/chris-rock - * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria - * 2014 James Makes, https://github.com/dollaruw - * 2014 Diego Casorran, https://github.com/diegocr - * 2014 Steven Spungin, https://github.com/Flamenco - * 2014 Kenneth Glassey, https://github.com/Gavvers - * - * Licensed under the MIT License - * - * Contributor(s): - * siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango, - * kim3er, mfo, alnorth, Flamenco - */function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){if("object"!==se(t.console)){t.console={};for(var e,n,r=t.console,i=function(){},o=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=o.pop();)r[e]||(r[e]={});for(;n=a.pop();)r[n]||(r[n]=i)}var s,l,h,u,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===t.btoa&&(t.btoa=function(t){var e,n,r,i,o,a=0,s=0,l="",h=[];if(!t)return t;for(;e=(o=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,h[s++]=c.charAt(e)+c.charAt(n)+c.charAt(r)+c.charAt(i),a>16&255,n=a>>8&255,r=255&a,h[l++]=64==i?String.fromCharCode(e):64==o?String.fromCharCode(e,n):String.fromCharCode(e,n,r),s>>0,r=new Array(n),i=1>>0,i=0;i>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i>16&255,r=l>>8&255,i=255&l}if(void 0===r||void 0===o&&n===r&&r===i)if("string"==typeof n)e=n+" "+a[0];else switch(t.precision){case 2:e=Z(n/255)+" "+a[0];break;case 3:default:e=Q(n/255)+" "+a[0]}else if(void 0===o||"object"===se(o)){if(o&&!isNaN(o.a)&&0===o.a)return e=["1.000","1.000","1.000",a[1]].join(" ");if("string"==typeof n)e=[n,r,i,a[1]].join(" ");else switch(t.precision){case 2:e=[Z(n/255),Z(r/255),Z(i/255),a[1]].join(" ");break;default:case 3:e=[Q(n/255),Q(r/255),Q(i/255),a[1]].join(" ")}}else if("string"==typeof n)e=[n,r,i,o,a[2]].join(" ");else switch(t.precision){case 2:e=[Z(n/255),Z(r/255),Z(i/255),Z(o/255),a[2]].join(" ");break;case 3:default:e=[Q(n/255),Q(r/255),Q(i/255),Q(o/255),a[2]].join(" ")}return e},ct=l.__private__.getFilters=function(){return o},ft=l.__private__.putStream=function(t){var e=(t=t||{}).data||"",n=t.filters||ct(),r=t.alreadyAppliedFilters||[],i=t.addLength1||!1,o=e.length,a={};!0===n&&(n=["FlateEncode"]);var s=t.additionalKeyValues||[],l=(a=void 0!==ae.API.processDataByFilters?ae.API.processDataByFilters(e,n):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());0!==a.data.length&&(s.push({key:"Length",value:a.data.length}),!0===i&&s.push({key:"Length1",value:o})),0!=l.length&&(l.split("/").length-1==1?s.push({key:"Filter",value:l}):s.push({key:"Filter",value:"["+l+"]"})),tt("<<");for(var h=0;h>"),0!==a.data.length&&(tt("stream"),tt(a.data),tt("endstream"))},pt=l.__private__.putPage=function(t){t.mediaBox;var e=t.number,n=t.data,r=t.objId,i=t.contentsObjId;ot(r,!0);V[x].mediaBox.topRightX,V[x].mediaBox.bottomLeftX,V[x].mediaBox.topRightY,V[x].mediaBox.bottomLeftY;tt("<>"),tt("endobj");var o=n.join("\n");return ot(i,!0),ft({data:o,filters:ct()}),tt("endobj"),r},dt=l.__private__.putPages=function(){var t,e,n=[];for(t=1;t<=W;t++)V[t].objId=X(),V[t].contentsObjId=X();for(t=1;t<=W;t++)n.push(pt({number:t,data:I[t],objId:V[t].objId,contentsObjId:V[t].contentsObjId,mediaBox:V[t].mediaBox,cropBox:V[t].cropBox,bleedBox:V[t].bleedBox,trimBox:V[t].trimBox,artBox:V[t].artBox,userUnit:V[t].userUnit,rootDictionaryObjId:st,resourceDictionaryObjId:lt}));ot(st,!0),tt("<>"),tt("endobj"),it.publish("postPutPages")},gt=function(){!function(){for(var t in rt)rt.hasOwnProperty(t)&&(!1===s||!0===s&&K.hasOwnProperty(t))&&(e=rt[t],it.publish("putFont",{font:e,out:tt,newObject:J,putStream:ft}),!0!==e.isAlreadyPutted&&(e.objectNumber=J(),tt("<<"),tt("/Type /Font"),tt("/BaseFont /"+e.postScriptName),tt("/Subtype /Type1"),"string"==typeof e.encoding&&tt("/Encoding /"+e.encoding),tt("/FirstChar 32"),tt("/LastChar 255"),tt(">>"),tt("endobj")));var e}(),it.publish("putResources"),ot(lt,!0),tt("<<"),function(){for(var t in tt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),tt("/Font <<"),rt)rt.hasOwnProperty(t)&&(!1===s||!0===s&&K.hasOwnProperty(t))&&tt("/"+t+" "+rt[t].objectNumber+" 0 R");tt(">>"),tt("/XObject <<"),it.publish("putXobjectDict"),tt(">>")}(),tt(">>"),tt("endobj"),it.publish("postPutResources")},mt=function(t,e,n){H.hasOwnProperty(e)||(H[e]={}),H[e][n]=t},yt=function(t,e,n,r,i){i=i||!1;var o="F"+(Object.keys(rt).length+1).toString(10),a={id:o,postScriptName:t,fontName:e,fontStyle:n,encoding:r,isStandardFont:i,metadata:{}};return it.publish("addFont",{font:a,instance:this}),void 0!==o&&(rt[o]=a,mt(o,e,n)),o},vt=l.__private__.pdfEscape=l.pdfEscape=function(t,e){return function(t,e){var n,r,i,o,a,s,l,h,u;if(i=(e=e||{}).sourceEncoding||"Unicode",a=e.outputEncoding,(e.autoencode||a)&&rt[$].metadata&&rt[$].metadata[i]&&rt[$].metadata[i].encoding&&(o=rt[$].metadata[i].encoding,!a&&rt[$].encoding&&(a=rt[$].encoding),!a&&o.codePages&&(a=o.codePages[0]),"string"==typeof a&&(a=o[a]),a)){for(l=!1,s=[],n=0,r=t.length;n>8&&(l=!0);t=s.join("")}for(n=t.length;void 0===l&&0!==n;)t.charCodeAt(n-1)>>8&&(l=!0),n--;if(!l)return t;for(s=e.noBOM?[]:[254,255],n=0,r=t.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(u),s.push(h-(u<<8))}return String.fromCharCode.apply(void 0,s)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},wt=l.__private__.beginPage=function(t,e){var n,r="string"==typeof e&&e.toLowerCase();if("string"==typeof t&&(n=f(t.toLowerCase()))&&(t=n[0],e=n[1]),Array.isArray(t)&&(e=t[1],t=t[0]),(isNaN(t)||isNaN(e))&&(t=i[0],e=i[1]),r){switch(r.substr(0,1)){case"l":t>"),tt("endobj")},St=l.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||st;switch(J(),tt("<<"),tt("/Type /Catalog"),tt("/Pages "+e+" 0 R"),L||(L="fullwidth"),L){case"fullwidth":tt("/OpenAction [3 0 R /FitH null]");break;case"fullheight":tt("/OpenAction [3 0 R /FitV null]");break;case"fullpage":tt("/OpenAction [3 0 R /Fit]");break;case"original":tt("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+L;"%"===n.substr(n.length-1)&&(L=parseInt(L)/100),"number"==typeof L&&tt("/OpenAction [3 0 R /XYZ null null "+Z(L)+"]")}switch(S||(S="continuous"),S){case"continuous":tt("/PageLayout /OneColumn");break;case"single":tt("/PageLayout /SinglePage");break;case"two":case"twoleft":tt("/PageLayout /TwoColumnLeft");break;case"tworight":tt("/PageLayout /TwoColumnRight")}A&&tt("/PageMode /"+A),it.publish("putCatalog"),tt(">>"),tt("endobj")},_t=l.__private__.putTrailer=function(){tt("trailer"),tt("<<"),tt("/Size "+(U+1)),tt("/Root "+U+" 0 R"),tt("/Info "+(U-1)+" 0 R"),tt("/ID [ <"+d+"> <"+d+"> ]"),tt(">>")},Ft=l.__private__.putHeader=function(){tt("%PDF-"+h),tt("%ºß¬à")},Pt=l.__private__.putXRef=function(){var t=1,e="0000000000";for(tt("xref"),tt("0 "+(U+1)),tt("0000000000 65535 f "),t=1;t<=U;t++){"function"==typeof z[t]?tt((e+z[t]()).slice(-10)+" 00000 n "):void 0!==z[t]?tt((e+z[t]).slice(-10)+" 00000 n "):tt("0000000000 00000 n ")}},kt=l.__private__.buildDocument=function(){k=!1,B=U=0,C=[],z=[],G=[],st=X(),lt=X(),it.publish("buildDocument"),Ft(),dt(),function(){it.publish("putAdditionalObjects");for(var t=0;t',i=ie.open();if(null!==i&&i.document.write(r),i||"undefined"==typeof safari)return i;case"datauri":case"dataurl":return ie.document.location.href="data:application/pdf;filename="+e.filename+";base64,"+btoa(n);default:return null}}).foo=function(){try{return F.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var n="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!ie.console)throw new Error(n);ie.console.error(n,t),ie.alert&&alert(n)}},(F.foo.bar=F).foo),Bt=function(t){return!0===Array.isArray(Y)&&-1":")"),Y=1):(W=Wt(e),V=Vt(n),G=(l?"<":"(")+v[H]+(l?">":")")),void 0!==q&&void 0!==q[H]&&(J=q[H]+" Tw\n"),0!==S.length&&0===H?t.push(J+S.join(" ")+" "+W.toFixed(2)+" "+V.toFixed(2)+" Tm\n"+G):1===Y||0===Y&&0===H?t.push(J+W.toFixed(2)+" "+V.toFixed(2)+" Td\n"+G):t.push(J+G);t=0===Y?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var X="BT\n/"+$+" "+et+" Tf\n"+(et*u).toFixed(2)+" TL\n"+Kt+"\n";return X+=h,X+=t,tt(X+="ET"),K[$]=!0,c},l.__private__.lstext=l.lstext=function(t,e,n,r){return console.warn("jsPDF.lstext is deprecated"),this.text(t,e,n,{charSpace:r})},l.__private__.clip=l.clip=function(t){tt("evenodd"===t?"W*":"W"),tt("n")},l.__private__.clip_fixed=l.clip_fixed=function(t){console.log("clip_fixed is deprecated"),l.clip(t)};var Ot=l.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","F","DF","FD","f","f*","B","B*"].indexOf(t)&&(e=!0),e},qt=l.__private__.getStyle=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":"f"!==t&&"f*"!==t&&"B"!==t&&"B*"!==t||(e=t),e};l.__private__.line=l.line=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.line");return this.lines([[n-t,r-e]],t,e)},l.__private__.lines=l.lines=function(t,e,n,r,i,o){var a,s,l,h,u,c,f,p,d,g,m,y;if("number"==typeof t&&(y=n,n=e,e=t,t=y),r=r||[1,1],o=o||!1,isNaN(e)||isNaN(n)||!Array.isArray(t)||!Array.isArray(r)||!Ot(i)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(tt(Q(Wt(e))+" "+Q(Vt(n))+" m "),a=r[0],s=r[1],h=t.length,g=e,m=n,l=0;l=o.length-1;if(b&&!x){m+=" ";continue}if(b||x){if(x)d=w;else if(i.multiline&&a<(h+2)*(y+2)+2)continue t}else{if(!i.multiline)continue t;if(a<(h+2)*(y+2)+2)continue t;d=w}for(var N="",L=p;L<=d;L++)N+=o[L]+" ";switch(N=" "==N.substr(N.length-1)?N.substr(0,N.length-1):N,g=F(N,i,r).width,i.textAlign){case"right":c=s-g-2;break;case"center":c=(s-g)/2;break;case"left":default:c=2}t+=_(c)+" "+_(f)+" Td\n",t+="("+S(N)+") Tj\n",t+=-_(c)+" 0 Td\n",f=-(r+2),g=0,p=d+1,y++,m=""}else;break}return n.text=t,n.fontSize=r,n},F=function(t,e,n){var r=A.internal.getFont(e.fontName,e.fontStyle),i=A.getStringUnitWidth(t,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:A.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},u={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},p=function(){A.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=A.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];n.objId=void 0,n.hasAnnotation&&d.call(A,n)}},d=function(t){var e={type:"reference",object:t};void 0===A.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===e.type&&t.object===e.object})&&A.internal.getPageInfo(t.page).pageContext.annotations.push(e)},g=function(){if(void 0===A.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");A.internal.write("/AcroForm "+A.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},m=function(){A.internal.events.unsubscribe(A.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete A.internal.acroformPlugin.acroFormDictionaryRoot._eventID,A.internal.acroformPlugin.printedOut=!0},L=function(t){var e=!t;t||(A.internal.newObjectDeferredBegin(A.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),A.internal.acroformPlugin.acroFormDictionaryRoot.putStream());t=t||A.internal.acroformPlugin.acroFormDictionaryRoot.Kids;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],i=[],o=r.Rect;if(r.Rect&&(r.Rect=c.call(this,r.Rect)),A.internal.newObjectDeferredBegin(r.objId,!0),r.DA=Y.createDefaultAppearanceStream(r),"object"===se(r)&&"function"==typeof r.getKeyValueListForStream&&(i=r.getKeyValueListForStream()),r.Rect=o,r.hasAppearanceStream&&!r.appearanceStreamContent){var a=f.call(this,r);i.push({key:"AP",value:"<>"}),A.internal.acroformPlugin.xForms.push(a)}if(r.appearanceStreamContent){var s="";for(var l in r.appearanceStreamContent)if(r.appearanceStreamContent.hasOwnProperty(l)){var h=r.appearanceStreamContent[l];if(s+="/"+l+" ",s+="<<",1<=Object.keys(h).length||Array.isArray(h))for(var n in h){var u;if(h.hasOwnProperty(n))"function"==typeof(u=h[n])&&(u=u.call(this,r)),s+="/"+n+" "+u+" ",0<=A.internal.acroformPlugin.xForms.indexOf(u)||A.internal.acroformPlugin.xForms.push(u)}else"function"==typeof(u=h)&&(u=u.call(this,r)),s+="/"+n+" "+u,0<=A.internal.acroformPlugin.xForms.indexOf(u)||A.internal.acroformPlugin.xForms.push(u);s+=">>"}i.push({key:"AP",value:"<<\n"+s+">>"})}A.internal.putStream({additionalKeyValues:i}),A.internal.out("endobj")}e&&P.call(this,A.internal.acroformPlugin.xForms)},P=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=e,r=t[e];A.internal.newObjectDeferredBegin(r&&r.objId,!0),"object"===se(r)&&"function"==typeof r.putStream&&r.putStream(),delete t[n]}},k=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(A=this,M.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(u)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");n=A.internal.scaleFactor,A.internal.acroformPlugin.acroFormDictionaryRoot=new E,A.internal.acroformPlugin.acroFormDictionaryRoot._eventID=A.internal.events.subscribe("postPutResources",m),A.internal.events.subscribe("buildDocument",p),A.internal.events.subscribe("putCatalog",g),A.internal.events.subscribe("postPutPages",L),A.internal.acroformPlugin.isInitialized=!0}},I=t.__acroform__.arrayToPdfArray=function(t){if(Array.isArray(t)){for(var e="[",n=0;n>"),e.join("\n")}},set:function(t){"object"===se(t)&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};r(D,M);var U=function(){D.call(this),this.pushButton=!0};r(U,D);var z=function(){D.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};r(z,D);var H=function(){var e,n;M.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t}});var r,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t,e=[];for(t in e.push("<<"),i)e.push("/"+t+" ("+i[t]+")");return e.push(">>"),e.join("\n")},set:function(t){"object"===se(t)&&(i=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}}),this.optionName=name,this.caption="l",this.appearanceState="Off",this._AppearanceType=Y.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(name)};r(H,M),z.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA()}},z.prototype.createOption=function(t){this.Kids.length;var e=new H;return e.Parent=this,e.optionName=t,this.Kids.push(e),J.call(this,e),e};var W=function(){D.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Y.CheckBox.createAppearanceStream()};r(W,D);var V=function(){M.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,13):this.Ff=N(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,21):this.Ff=N(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,23):this.Ff=N(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,24):this.Ff=N(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,25):this.Ff=N(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,26):this.Ff=N(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};r(V,M);var G=function(){V.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(b(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=x(this.Ff,14):this.Ff=N(this.Ff,14)}}),this.password=!0};r(G,V);var Y={CheckBox:{createAppearanceStream:function(){return{N:{On:Y.CheckBox.YesNormal},D:{On:Y.CheckBox.YesPushDown,Off:Y.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=l(t),n=[],r=A.internal.getFont(t.fontName,t.fontStyle).id,i=A.__private__.encodeColorString(t.color),o=h(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+_(Y.internal.getWidth(t))+" "+_(Y.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+_(o.fontSize)+" Tf "+i),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join("\n"),e},YesNormal:function(t){var e=l(t),n=A.internal.getFont(t.fontName,t.fontStyle).id,r=A.__private__.encodeColorString(t.color),i=[],o=Y.internal.getHeight(t),a=Y.internal.getWidth(t),s=h(t,t.caption);return i.push("1 g"),i.push("0 0 "+_(a)+" "+_(o)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+_(a-1)+" "+_(o-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+_(s.fontSize)+" Tf "+r),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=l(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+_(Y.internal.getWidth(t))+" "+_(Y.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:Y.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=Y.RadioButton.Circle.YesNormal,e.D[t]=Y.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=l(t),n=[],r=Y.internal.getWidth(t)<=Y.internal.getHeight(t)?Y.internal.getWidth(t)/4:Y.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=Y.internal.Bezier_C,o=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+s(Y.internal.getWidth(t)/2)+" "+s(Y.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=l(t),n=[],r=Y.internal.getWidth(t)<=Y.internal.getHeight(t)?Y.internal.getWidth(t)/4:Y.internal.getHeight(t)/4,i=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),o=Number((i*Y.internal.Bezier_C).toFixed(5)),a=Number((r*Y.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+s(Y.internal.getWidth(t)/2)+" "+s(Y.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+s(Y.internal.getWidth(t)/2)+" "+s(Y.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=l(t),n=[],r=Y.internal.getWidth(t)<=Y.internal.getHeight(t)?Y.internal.getWidth(t)/4:Y.internal.getHeight(t)/4,i=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),o=Number((i*Y.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+s(Y.internal.getWidth(t)/2)+" "+s(Y.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:Y.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=Y.RadioButton.Cross.YesNormal,e.D[t]=Y.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=l(t),n=[],r=Y.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+_(Y.internal.getWidth(t)-2)+" "+_(Y.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(_(r.x1.x)+" "+_(r.x1.y)+" m"),n.push(_(r.x2.x)+" "+_(r.x2.y)+" l"),n.push(_(r.x4.x)+" "+_(r.x4.y)+" m"),n.push(_(r.x3.x)+" "+_(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},YesPushDown:function(t){var e=l(t),n=Y.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+_(Y.internal.getWidth(t))+" "+_(Y.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+_(Y.internal.getWidth(t)-2)+" "+_(Y.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(_(n.x1.x)+" "+_(n.x1.y)+" m"),r.push(_(n.x2.x)+" "+_(n.x2.y)+" l"),r.push(_(n.x4.x)+" "+_(n.x4.y)+" m"),r.push(_(n.x3.x)+" "+_(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=l(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+_(Y.internal.getWidth(t))+" "+_(Y.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=A.internal.getFont(t.fontName,t.fontStyle).id,n=A.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};Y.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=Y.internal.getWidth(t),n=Y.internal.getHeight(t),r=Math.min(e,n);return{x1:{x:(e-r)/2,y:(n-r)/2+r},x2:{x:(e-r)/2+r,y:(n-r)/2},x3:{x:(e-r)/2,y:(n-r)/2},x4:{x:(e-r)/2+r,y:(n-r)/2+r}}}},Y.internal.getWidth=function(t){var e=0;return"object"===se(t)&&(e=v(t.Rect[2])),e},Y.internal.getHeight=function(t){var e=0;return"object"===se(t)&&(e=v(t.Rect[3])),e};var J=t.addField=function(t){if(k.call(this),!(t instanceof M))throw new Error("Invalid argument passed to jsPDF.addField.");return function(t){A.internal.acroformPlugin.printedOut&&(A.internal.acroformPlugin.printedOut=!1,A.internal.acroformPlugin.acroFormDictionaryRoot=null),A.internal.acroformPlugin.acroFormDictionaryRoot||k.call(A),A.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t)}.call(this,t),t.page=A.internal.getCurrentPageInfo().pageNumber,this};t.addButton=function(t){if(t instanceof D==!1)throw new Error("Invalid argument passed to jsPDF.addButton.");return J.call(this,t)},t.addTextField=function(t){if(t instanceof V==!1)throw new Error("Invalid argument passed to jsPDF.addTextField.");return J.call(this,t)},t.addChoiceField=function(t){if(t instanceof O==!1)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return J.call(this,t)};"object"==se(e)&&void 0===e.ChoiceField&&void 0===e.ListBox&&void 0===e.ComboBox&&void 0===e.EditBox&&void 0===e.Button&&void 0===e.PushButton&&void 0===e.RadioButton&&void 0===e.CheckBox&&void 0===e.TextField&&void 0===e.PasswordField?(e.ChoiceField=O,e.ListBox=q,e.ComboBox=T,e.EditBox=R,e.Button=D,e.PushButton=U,e.RadioButton=z,e.CheckBox=W,e.TextField=V,e.PasswordField=G,e.AcroForm={Appearance:Y}):console.warn("AcroForm-Classes are not populated into global-namespace, because the class-Names exist already."),t.AcroFormChoiceField=O,t.AcroFormListBox=q,t.AcroFormComboBox=T,t.AcroFormEditBox=R,t.AcroFormButton=D,t.AcroFormPushButton=U,t.AcroFormRadioButton=z,t.AcroFormCheckBox=W,t.AcroFormTextField=V,t.AcroFormPasswordField=G,t.AcroFormAppearance=Y,t.AcroForm={ChoiceField:O,ListBox:q,ComboBox:T,EditBox:R,Button:D,PushButton:U,RadioButton:z,CheckBox:W,TextField:V,PasswordField:G,Appearance:Y}})((window.tmp=lt).API,"undefined"!=typeof window&&window||"undefined"!=typeof global&&global), -/** @license - * jsPDF addImage plugin - * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/ - * 2013 Chris Dowling, https://github.com/gingerchris - * 2013 Trinh Ho, https://github.com/ineedfat - * 2013 Edwin Alejandro Perez, https://github.com/eaparango - * 2013 Norah Smith, https://github.com/burnburnrocket - * 2014 Diego Casorran, https://github.com/diegocr - * 2014 James Robb, https://github.com/jamesbrobb - * - * - */ -function(x){var N="addImage_",l={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},h=x.getImageFileTypeByImageData=function(t,e){var n,r;e=e||"UNKNOWN";var i,o,a,s="UNKNOWN";for(a in x.isArrayBufferView(t)&&(t=x.arrayBufferToBinaryString(t)),l)for(i=l[a],n=0;n>"}),"trns"in e&&e.trns.constructor==Array){for(var s="",l=0,h=e.trns.length;l>18]+r[(258048&e)>>12]+r[(4032&e)>>6]+r[63&e];return 1==a?n+=r[(252&(e=i[s]))>>2]+r[(3&e)<<4]+"==":2==a&&(n+=r[(64512&(e=i[s]<<8|i[s+1]))>>10]+r[(1008&e)>>4]+r[(15&e)<<2]+"="),n},x.createImageInfo=function(t,e,n,r,i,o,a,s,l,h,u,c,f){var p={alias:s,w:e,h:n,cs:r,bpc:i,i:a,data:t};return o&&(p.f=o),l&&(p.dp=l),h&&(p.trns=h),u&&(p.pal=u),c&&(p.smask=c),f&&(p.p=f),p},x.addImage=function(t,e,n,r,i,o,a,s,l){var h="";if("string"!=typeof e){var u=o;o=i,i=r,r=n,n=e,e=u}if("object"===se(t)&&!_(t)&&"imageData"in t){var c=t;t=c.imageData,e=c.format||e||"UNKNOWN",n=c.x||n||0,r=c.y||r||0,i=c.w||i,o=c.h||o,a=c.alias||a,s=c.compression||s,l=c.rotation||c.angle||l}var f=this.internal.getFilters();if(void 0===s&&-1!==f.indexOf("FlateEncode")&&(s="SLOW"),"string"==typeof t&&(t=unescape(t)),isNaN(n)||isNaN(r))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var p,d,g,m,y,v,w,b=function(){var t=this.internal.collections[N+"images"];return t||(this.internal.collections[N+"images"]=t={},this.internal.events.subscribe("putResources",L),this.internal.events.subscribe("putXobjectDict",A)),t}.call(this);if(!((p=P(t,b))||(_(t)&&(t=F(t,e)),(null==(w=a)||0===w.length)&&(a="string"==typeof(v=t)?x.sHashCode(v):x.isArrayBufferView(v)?x.sHashCode(x.arrayBufferToBinaryString(v)):null),p=P(a,b)))){if(this.isString(t)&&(""!==(h=this.convertStringToImageData(t))?t=h:void 0!==(h=x.loadFile(t))&&(t=h)),e=this.getImageFileTypeByImageData(t,e),!S(e))throw new Error("addImage does not support files of type '"+e+"', please ensure that a plugin for '"+e+"' support is added.");if(this.supportsArrayBuffer()&&(t instanceof Uint8Array||(d=t,t=this.binaryStringToUint8Array(t))),!(p=this["process"+e.toUpperCase()](t,(y=0,(m=b)&&(y=Object.keys?Object.keys(m).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(m)),y),a,((g=s)&&"string"==typeof g&&(g=g.toUpperCase()),g in x.image_compression?g:x.image_compression.NONE),d)))throw new Error("An unknown error occurred whilst processing the image")}return function(t,e,n,r,i,o,a,s){var l=function(t,e,n){return t||e||(e=t=-96),t<0&&(t=-1*n.w*72/t/this.internal.scaleFactor),e<0&&(e=-1*n.h*72/e/this.internal.scaleFactor),0===t&&(t=e*n.w/n.h),0===e&&(e=t*n.h/n.w),[t,e]}.call(this,n,r,i),h=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;if(n=l[0],r=l[1],a[o]=i,s){s*=Math.PI/180;var c=Math.cos(s),f=Math.sin(s),p=function(t){return t.toFixed(4)},d=[p(c),p(f),p(-1*f),p(c),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,h(t),u(e+r),"cm"].join(" ")),this.internal.write(d.join(" ")),this.internal.write([h(n),"0","0",h(r),"0","0","cm"].join(" "))):this.internal.write([h(n),"0","0",h(r),h(t),u(e+r),"cm"].join(" ")),this.internal.write("/I"+i.i+" Do"),this.internal.write("Q")}.call(this,n,r,i,o,p,p.i,b,l),this},x.convertStringToImageData=function(t){var e,n="";if(this.isString(t)){var r;e=null!==(r=this.extractImageFromDataUrl(t))?r.data:t;try{n=atob(e)}catch(t){throw x.validateStringAsBase64(e)?new Error("atob-Error in jsPDF.convertStringToImageData "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertStringToImageData ")}}return n};var u=function(t,e){return t.subarray(e,e+5)};x.processJPEG=function(t,e,n,r,i,o){var a,s=this.decode.DCT_DECODE;if(!this.isString(t)&&!this.isArrayBuffer(t)&&!this.isArrayBufferView(t))return null;if(this.isString(t)&&(a=function(t){var e;if("JPEG"!==h(t))throw new Error("getJpegSize requires a binary string jpeg file");for(var n=256*t.charCodeAt(4)+t.charCodeAt(5),r=4,i=t.length;r>",h.content=m;var f=h.objId+" 0 R";m="<>";else if(l.options.pageNumber)switch(m="<>",this.internal.write(m))}}this.internal.write("]")}}]),t.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},t.link=function(t,e,n,r,i){this.internal.getCurrentPageInfo().pageContext.annotations.push({x:t,y:e,w:n,h:r,options:i,type:"link"})},t.textWithLink=function(t,e,n,r){var i=this.getTextWidth(t),o=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(t,e,n),n+=.2*o,this.link(e,n-o,i,o,r),i},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor}, -/** - * @license - * Copyright (c) 2017 Aras Abbasi - * - * Licensed under the MIT License. - * http://opensource.org/licenses/mit-license - */ -function(t){var h={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},a={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},e={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},n=[1570,1571,1573,1575];t.__arabicParser__={};var r=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==h[t.charCodeAt(0)]},u=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},i=t.__arabicParser__.isArabicEndLetter=function(t){return u(t)&&r(t)&&h[t.charCodeAt(0)].length<=2},o=t.__arabicParser__.isArabicAlfLetter=function(t){return u(t)&&0<=n.indexOf(t.charCodeAt(0))},s=(t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return u(t)&&r(t)&&1<=h[t.charCodeAt(0)].length},t.__arabicParser__.arabicLetterHasFinalForm=function(t){return u(t)&&r(t)&&2<=h[t.charCodeAt(0)].length}),l=(t.__arabicParser__.arabicLetterHasInitialForm=function(t){return u(t)&&r(t)&&3<=h[t.charCodeAt(0)].length},t.__arabicParser__.arabicLetterHasMedialForm=function(t){return u(t)&&r(t)&&4==h[t.charCodeAt(0)].length}),c=t.__arabicParser__.resolveLigatures=function(t){var e=0,n=a,r=0,i="",o=0;for(e=0;e>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this}, -/** - * @license - * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv - * - * Licensed under the MIT License. - * http://opensource.org/licenses/mit-license - */ -e=lt.API,(n=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(t){n=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(t){r=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(t){i=t}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(t){o=t}}),Object.defineProperty(this,"parentNode",{get:function(){return!1}})}).prototype.getContext=function(t,e){var n;if("2d"!==(t=t||"2d"))return null;for(n in e)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=e[n]);return(this.pdf.context2d._canvas=this).pdf.context2d},n.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new n,this.canvas.pdf=this}]), -/** - * @license - * ==================================================================== - * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com - * 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br - * 2013 Lee Driscoll, https://github.com/lsdriscoll - * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria - * 2014 James Hall, james@parall.ax - * 2014 Diego Casorran, https://github.com/diegocr - * - * - * ==================================================================== - */ -_=lt.API,F={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},P=1,p=function(t,e,n,r,i){F={x:t,y:e,w:n,h:r,ln:i}},d=function(){return F},k={left:0,top:0,bottom:0},_.setHeaderFunction=function(t){l=t},_.getTextDimensions=function(t,e){var n=this.table_font_size||this.internal.getFontSize(),r=(this.internal.getFont().fontStyle,(e=e||{}).scaleFactor||this.internal.scaleFactor),i=0,o=0,a=0;if("string"==typeof t)0!=(i=this.getStringUnitWidth(t)*n)&&(o=1);else{if("[object Array]"!==Object.prototype.toString.call(t))throw new Error("getTextDimensions expects text-parameter to be of type String or an Array of Strings.");for(var s=0;s=this.internal.pageSize.getHeight()-h.bottom&&(this.cellAddPage(),l=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(o,!0)),e=d().y+d().h,l&&(e=23)}if(void 0!==i[0])if(this.printingHeaderRow?this.rect(t,e,n,r,"FD"):this.rect(t,e,n,r),"right"===a){i instanceof Array||(i=[i]);for(var u=0;u=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:n,startAngle:r,endAngle:i,counterclockwise:o})},n.prototype.arcTo=function(t,e,n,r,i){throw new Error("arcTo not implemented.")},n.prototype.rect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.lineTo(t+n,e),this.lineTo(t,e)},n.prototype.fillRect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!N.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,n,r),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},n.prototype.strokeRect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");L.call(this)||(this.beginPath(),this.rect(t,e,n,r),this.stroke())},n.prototype.clearRect=function(t,e,n,r){if(isNaN(t)||isNaN(e)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,n,r))},n.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n"},s=function(t){var r,e,n,i,o,a=String,s="length",l="charCodeAt",h="slice",u="replace";for(t[h](-2),t=t[h](0,-2)[u](/\s/g,"")[u]("z","!!!!!"),n=[],i=0,o=(t+=r="uuuuu"[h](t[s]%5||5))[s];i>24,255&e>>16,255&e>>8,255&e);return function(t,e){for(var n=r[s];0")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var n="",r=0;r>8&255,n>>16&255,n>>24&255]),t.length+2),t=String.fromCharCode.apply(null,i)},a.processDataByFilters=function(t,e){var n=0,r=t||"",i=[];for("string"==typeof(e=e||[])&&(e=[e]),n=0;n>"),this.internal.out("endobj"),w=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+b+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==v&&void 0!==w&&this.internal.out("/Names <>")}),this},( -/** - * @license - * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv - * - * Licensed under the MIT License. - * http://opensource.org/licenses/mit-license - */ -x=lt.API).events.push(["postPutResources",function(){var t=this,e=/^(\d+) 0 obj$/;if(0> endobj")}var c=t.internal.newObject();for(t.internal.write("<< /Names [ "),r=0;r>","endobj"),t.internal.newObject(),t.internal.write("<< /Dests "+c+" 0 R"),t.internal.write(">>","endobj")}}]),x.events.push(["putCatalog",function(){0> \r\nendobj\r\n"},a.outline.count_r=function(t,e){for(var n=0;n>>24&255,f[c++]=s>>>16&255,f[c++]=s>>>8&255,f[c++]=255&s,I.arrayBufferToBinaryString(f)},N=function(t,e){var n=Math.LOG2E*Math.log(32768)-8<<4|8,r=n<<8;return r|=Math.min(3,(e-1&255)>>1)<<6,r|=0,[n,255&(r+=31-r%31)]},L=function(t,e){for(var n,r=1,i=0,o=t.length,a=0;0>>0},A=function(t,e,n,r){for(var i,o,a,s=t.length/e,l=new Uint8Array(t.length+s),h=T(),u=0;u>>1)&255;return o},O=function(t,e,n){var r,i,o,a,s=[],l=0,h=t.length;for(s[0]=4;l>>d&255,d+=o.bits;y[w]=x>>>d&255}if(16===o.bits){g=(_=new Uint32Array(o.decodePixels().buffer)).length,m=new Uint8Array(g*(32/o.pixelBitlength)*o.colors),y=new Uint8Array(g*(32/o.pixelBitlength));for(var x,N=1>>0&255,N&&(m[b++]=x>>>16&255,x=_[w++],m[b++]=x>>>0&255),y[L++]=x>>>16&255;p=8}r!==I.image_compression.NONE&&C()?(t=B(m,o.width*o.colors,o.colors,r),u=B(y,o.width,1,r)):(t=m,u=y,f=null)}if(3===o.colorType&&(c=this.color_spaces.INDEXED,h=o.palette,o.transparency.indexed)){var A=o.transparency.indexed,S=0;for(w=0,g=A.length;wr&&(i.push(t.slice(l,o)),s=0,l=o),s+=e[o],o++;return l!==o&&i.push(t.slice(l,o)),i},J=function(t,e,n){n||(n={});var r,i,o,a,s,l,h=[],u=[h],c=n.textIndent||0,f=0,p=0,d=t.split(" "),g=W.apply(this,[" ",n])[0];if(l=-1===n.lineIndent?d[0].length+2:n.lineIndent||0){var m=Array(l).join(" "),y=[];d.map(function(t){1<(t=t.split(/\s*\n/)).length?y=y.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):y.push(t[0])}),d=y,l=G.apply(this,[m,n])}for(o=0,a=d.length;o>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this}, -/** ==================================================================== - * jsPDF XMP metadata plugin - * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi - * - * - * ==================================================================== - */ -nt=lt.API,ot=it=rt="",nt.addMetadata=function(t,e){return it=e||"http://jspdf.default.namespaceuri/",rt=t,this.internal.events.subscribe("postPutResources",function(){if(rt){var t='',e=unescape(encodeURIComponent('')),n=unescape(encodeURIComponent(t)),r=unescape(encodeURIComponent(rt)),i=unescape(encodeURIComponent("")),o=unescape(encodeURIComponent("")),a=n.length+r.length+i.length+e.length+o.length;ot=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+a+" >>"),this.internal.write("stream"),this.internal.write(e+n+r+i+o),this.internal.write("endstream"),this.internal.write("endobj")}else ot=""}),this.internal.events.subscribe("putCatalog",function(){ot&&this.internal.write("/Metadata "+ot+" 0 R")}),this},function(f,t){var e=f.API;var m=e.pdfEscape16=function(t,e){for(var n,r=e.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=t.length;a<"+i+">");return r.length&&(o+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),o+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};e.events.push(["putFont",function(t){!function(t,e,n,r){if(t.metadata instanceof f.API.TTFFont&&"Identity-H"===t.encoding){for(var i=t.metadata.Unicode.widths,o=t.metadata.subset.encode(t.metadata.glyIdsUsed,1),a="",s=0;s>"),e("endobj");var c=n();e("<<"),e("/Type /Font"),e("/BaseFont /"+t.fontName),e("/FontDescriptor "+u+" 0 R"),e("/W "+f.API.PDFObject.convert(i)),e("/CIDToGIDMap /Identity"),e("/DW 1000"),e("/Subtype /CIDFontType2"),e("/CIDSystemInfo"),e("<<"),e("/Supplement 0"),e("/Registry (Adobe)"),e("/Ordering ("+t.encoding+")"),e(">>"),e(">>"),e("endobj"),t.objectNumber=n(),e("<<"),e("/Type /Font"),e("/Subtype /Type0"),e("/ToUnicode "+h+" 0 R"),e("/BaseFont /"+t.fontName),e("/Encoding /"+t.encoding),e("/DescendantFonts ["+c+" 0 R]"),e(">>"),e("endobj"),t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]);e.events.push(["putFont",function(t){!function(t,e,n,r){if(t.metadata instanceof f.API.TTFFont&&"WinAnsiEncoding"===t.encoding){t.metadata.Unicode.widths;for(var i=t.metadata.rawData,o="",a=0;a>"),e("endobj"),t.objectNumber=n(),a=0;a>"),e("endobj"),t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]);var h=function(t){var e,n,r=t.text||"",i=t.x,o=t.y,a=t.options||{},s=t.mutex||{},l=s.pdfEscape,h=s.activeFontKey,u=s.fonts,c=(s.activeFontSize,""),f=0,p="",d=u[n=h].encoding;if("Identity-H"!==u[n].encoding)return{text:r,x:i,y:o,options:a,mutex:s};for(p=r,n=h,"[object Array]"===Object.prototype.toString.call(r)&&(p=r[0]),f=0;fw-h.top-h.bottom&&s.pagesplit){var p=function(t,e,n,r,i){var o=document.createElement("canvas");o.height=i,o.width=r;var a=o.getContext("2d");return a.mozImageSmoothingEnabled=!1,a.webkitImageSmoothingEnabled=!1,a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,a.fillStyle=s.backgroundColor||"#ffffff",a.fillRect(0,0,r,i),a.drawImage(t,e,n,r,i,0,0,r,i),o},n=function(){for(var t,e,n=0,r=0,i={},o=!1;;){var a;if(r=0,i.top=0!==n?h.top:g,i.left=0!==n?h.left:d,o=(v-h.left-h.right)*y=l.width)break;this.addPage()}else s=[a=p(l,0,n,t,e),i.left,i.top,a.width/y,a.height/y,c,null,f],this.addImage.apply(this,s);if((n+=e)>=l.height)break;this.addPage()}m(u,n,null,s)}.bind(this);if("CANVAS"===l.nodeName){var r=new Image;r.onload=n,r.src=l.toDataURL("image/png"),l=r}else n()}else{var i=Math.random().toString(35),o=[l,d,g,u,e,c,i,f];this.addImage.apply(this,o),m(u,e,i,o)}}.bind(this),"undefined"!=typeof html2canvas&&!s.rstz)return html2canvas(t,s);if("undefined"==typeof rasterizeHTML)return null;var n="drawDocument";return"string"==typeof t&&(n=/^http/.test(t)?"drawURL":"drawHTML"),s.width=s.width||v*y,rasterizeHTML[n](t,void 0,s).then(function(t){s.onrendered(t.image)},function(t){m(null,t)})}, -/** - * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser - * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com - * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria - * 2014 Diego Casorran, https://github.com/diegocr - * 2014 Daniel Husar, https://github.com/danielhusar - * 2014 Wolfgang Gassler, https://github.com/woolfg - * 2014 Steven Spungin, https://github.com/flamenco - * - * @license - * - * ==================================================================== - */ -function(t){var P,k,i,a,s,l,h,u,I,w,f,c,p,n,C,B,d,g,m,j;P=function(){return function(t){return e.prototype=t,new e};function e(){}}(),w=function(t){var e,n,r,i,o,a,s;for(n=0,r=t.length,e=void 0,a=i=!1;!i&&n!==r;)(e=t[n]=t[n].trimLeft())&&(i=!0),n++;for(n=r-1;r&&!a&&-1!==n;)(e=t[n]=t[n].trimRight())&&(a=!0),n--;for(o=/\s+$/g,s=!0,n=0;n!==r;)"\u2028"!=t[n]&&(e=t[n].replace(/\s+/g," "),s&&(e=e.trimLeft()),e&&(s=o.test(e)),t[n]=e),n++;return t},c=function(t){var e,n,r;for(e=void 0,n=(r=t.split(",")).shift();!e&&n;)e=i[n.trim().toLowerCase()],n=r.shift();return e},p=function(t){var e;return-1<(t="auto"===t?"0px":t).indexOf("em")&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),-1i.pdf.margins_doc.top&&(i.pdf.addPage(),i.y=i.pdf.margins_doc.top,i.executeWatchFunctions(n));var b=I(n),x=i.x,N=12/i.pdf.internal.scaleFactor,L=(b["margin-left"]+b["padding-left"])*N,A=(b["margin-right"]+b["padding-right"])*N,S=(b["margin-top"]+b["padding-top"])*N,_=(b["margin-bottom"]+b["padding-bottom"])*N;void 0!==b.float&&"right"===b.float?x+=i.settings.width-n.width-A:x+=L,i.pdf.addImage(v,x,i.y+S,n.width,n.height),v=void 0,"right"===b.float||"left"===b.float?(i.watchFunctions.push(function(t,e,n,r){return i.y>=e?(i.x+=t,i.settings.width+=n,!0):!!(r&&1===r.nodeType&&!E[r.nodeName]&&i.x+r.width>i.pdf.margins_doc.left+i.pdf.margins_doc.width)&&(i.x+=t,i.y=e,i.settings.width+=n,!0)}.bind(this,"left"===b.float?-n.width-L-A:0,i.y+n.height+S+_,n.width)),i.watchFunctions.push(function(t,e,n){return!(i.y]*?>/gi,""),h="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),(l=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",l.innerHTML='',i=t.open();if(null!==i&&i.document.write(a),i||"undefined"==typeof safari)return i;case"datauri":case"dataurl":return t.document.location.href="data:application/pdf;filename="+n.filename+";base64,"+btoa(r);default:return null}}).foo=function(){try{return P.apply(this,arguments)}catch(r){var e=r.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var n="Error in function "+e.split("\n")[0].split("<")[0]+": "+r.message;if(!t.console)throw new Error(n);t.console.error(n,r),t.alert&&alert(n)}},(P.foo.bar=P).foo),Fe=function(e){return!0===Array.isArray(oe)&&-1":")"),te=1):(J=Xe(n),Z=Ye(r),Q=(c?"<":"(")+x[K]+(c?">":")")),void 0!==H&&void 0!==H[K]&&(ne=H[K]+" Tw\n"),0!==R.length&&0===K?t.push(ne+R.join(" ")+" "+J.toFixed(2)+" "+Z.toFixed(2)+" Tm\n"+Q):1===te||0===te&&0===K?t.push(ne+J.toFixed(2)+" "+Z.toFixed(2)+" Td\n"+Q):t.push(ne+Q);t=0===te?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var re="BT\n/"+O+" "+q+" Tf\n"+(q*f).toFixed(2)+" TL\n"+et+"\n";return re+=u,re+=t,U(re+="ET"),h[O]=!0,d},d.__private__.lstext=d.lstext=function(e,t,n,r){return console.warn("jsPDF.lstext is deprecated"),this.text(e,t,n,{charSpace:r})},d.__private__.clip=d.clip=function(e){U("evenodd"===e?"W*":"W"),U("n")},d.__private__.clip_fixed=d.clip_fixed=function(e){console.log("clip_fixed is deprecated"),d.clip(e)};var We=d.__private__.isValidStyle=function(e){var t=!1;return-1!==[void 0,null,"S","F","DF","FD","f","f*","B","B*"].indexOf(e)&&(t=!0),t},Ue=d.__private__.getStyle=function(e){var t="S";return"F"===e?t="f":"FD"===e||"DF"===e?t="B":"f"!==e&&"f*"!==e&&"B"!==e&&"B*"!==e||(t=e),t};d.__private__.line=d.line=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw new Error("Invalid arguments passed to jsPDF.line");return this.lines([[n-e,r-t]],e,t)},d.__private__.lines=d.lines=function(e,t,n,r,a,i){var o,s,l,c,u,f,h,d,p,g,m,v;if("number"==typeof e&&(v=n,n=t,t=e,e=v),r=r||[1,1],i=i||!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!We(a)||"boolean"!=typeof i)throw new Error("Invalid arguments passed to jsPDF.lines");for(U(w(Xe(t))+" "+w(Ye(n))+" m "),o=r[0],s=r[1],c=e.length,g=t,m=n,l=0;l=o.length-1;if(_&&!C){y+=" ";continue}if(_||C){if(C)v=E;else if(e.multiline&&c<(h+2)*(w+2)+2)continue e}else{if(!e.multiline)continue e;if(c<(h+2)*(w+2)+2)continue e;v=E}for(var k="",A=m;A<=v;A++)k+=o[A]+" ";switch(k=" "==k.substr(k.length-1)?k.substr(0,k.length-1):k,b=x(k,e,l).width,e.textAlign){case"right":p=u-b-2;break;case"center":p=(u-b)/2;break;case"left":default:p=2}t+=s(p)+" "+s(g)+" Td\n",t+="("+i(k)+") Tj\n",t+=-s(p)+" 0 Td\n",g=-(l+2),b=0,m=v+1,w++,y=""}break}return a.text=t,a.fontSize=l,a},x=function(e,t,n){var a=r.internal.getFont(t.fontName,t.fontStyle),i=r.getStringUnitWidth(e,{font:a,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:r.getStringUnitWidth("3",{font:a,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},E={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},_=function(){r.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=r.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];n.objId=void 0,n.hasAnnotation&&C.call(r,n)}},C=function(e){var t={type:"reference",object:e};void 0===r.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===t.type&&e.object===t.object})&&r.internal.getPageInfo(e.page).pageContext.annotations.push(t)},k=function(){if(void 0===r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");r.internal.write("/AcroForm "+r.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")},A=function(){r.internal.events.unsubscribe(r.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete r.internal.acroformPlugin.acroFormDictionaryRoot._eventID,r.internal.acroformPlugin.printedOut=!0},T=function(t){var n=!t;for(var a in t||(r.internal.newObjectDeferredBegin(r.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),r.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||r.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(a)){var i=t[a],o=[],s=i.Rect;if(i.Rect&&(i.Rect=y.call(this,i.Rect)),r.internal.newObjectDeferredBegin(i.objId,!0),i.DA=X.createDefaultAppearanceStream(i),"object"===e(i)&&"function"==typeof i.getKeyValueListForStream&&(o=i.getKeyValueListForStream()),i.Rect=s,i.hasAppearanceStream&&!i.appearanceStreamContent){var l=w.call(this,i);o.push({key:"AP",value:"<>"}),r.internal.acroformPlugin.xForms.push(l)}if(i.appearanceStreamContent){var c="";for(var u in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(u)){var f=i.appearanceStreamContent[u];if(c+="/"+u+" ",c+="<<",1<=Object.keys(f).length||Array.isArray(f))for(var a in f){var h;f.hasOwnProperty(a)&&("function"==typeof(h=f[a])&&(h=h.call(this,i)),c+="/"+a+" "+h+" ",0<=r.internal.acroformPlugin.xForms.indexOf(h)||r.internal.acroformPlugin.xForms.push(h))}else"function"==typeof(h=f)&&(h=h.call(this,i)),c+="/"+a+" "+h,0<=r.internal.acroformPlugin.xForms.indexOf(h)||r.internal.acroformPlugin.xForms.push(h);c+=">>"}o.push({key:"AP",value:"<<\n"+c+">>"})}r.internal.putStream({additionalKeyValues:o}),r.internal.out("endobj")}n&&R.call(this,r.internal.acroformPlugin.xForms)},R=function(t){for(var n in t)if(t.hasOwnProperty(n)){var a=n,i=t[n];r.internal.newObjectDeferredBegin(i&&i.objId,!0),"object"===e(i)&&"function"==typeof i.putStream&&i.putStream(),delete t[a]}},N=function(){if(void 0!==this.internal&&(void 0===this.internal.acroformPlugin||!1===this.internal.acroformPlugin.isInitialized)){if(r=this,F.FieldNum=0,this.internal.acroformPlugin=JSON.parse(JSON.stringify(E)),this.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");a=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new P,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",A),r.internal.events.subscribe("buildDocument",_),r.internal.events.subscribe("putCatalog",k),r.internal.events.subscribe("postPutPages",T),r.internal.acroformPlugin.isInitialized=!0}},B=t.__acroform__.arrayToPdfArray=function(t){if(Array.isArray(t)){for(var n="[",r=0;r>"),t.join("\n")}},set:function(t){"object"===e(t)&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(e){"string"==typeof e&&(n.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+e}})};c(U,F);var z=function(){U.call(this),this.pushButton=!0};c(z,U);var H=function(){U.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};c(H,U);var V=function(){var t,n;F.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(e){n=e}});var r,a={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e,t=[];for(e in t.push("<<"),a)t.push("/"+e+" ("+a[e]+")");return t.push(">>"),t.join("\n")},set:function(t){"object"===e(t)&&(a=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return a.CA||""},set:function(e){"string"==typeof e&&(a.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(e){r="/"+e}}),this.optionName=name,this.caption="l",this.appearanceState="Off",this._AppearanceType=X.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(name)};c(V,F),H.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e&&"getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},H.prototype.createOption=function(e){this.Kids.length;var t=new V;return t.Parent=this,t.optionName=e,this.Kids.push(t),Y.call(this,t),t};var q=function(){U.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=X.CheckBox.createAppearanceStream()};c(q,U);var G=function(){F.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,13))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,13):this.Ff=b(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,21))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,21):this.Ff=b(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,23):this.Ff=b(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,24))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,24):this.Ff=b(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,25))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,25):this.Ff=b(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,26):this.Ff=b(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};c(G,F);var $=function(){G.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(m(this.Ff,14))},set:function(e){!0===Boolean(e)?this.Ff=v(this.Ff,14):this.Ff=b(this.Ff,14)}}),this.password=!0};c($,G);var X={CheckBox:{createAppearanceStream:function(){return{N:{On:X.CheckBox.YesNormal},D:{On:X.CheckBox.YesPushDown,Off:X.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=h(e),n=[],a=r.internal.getFont(e.fontName,e.fontStyle).id,i=r.__private__.encodeColorString(e.color),o=S(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+s(X.internal.getWidth(e))+" "+s(X.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+a+" "+s(o.fontSize)+" Tf "+i),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join("\n"),t},YesNormal:function(e){var t=h(e),n=r.internal.getFont(e.fontName,e.fontStyle).id,a=r.__private__.encodeColorString(e.color),i=[],o=X.internal.getHeight(e),l=X.internal.getWidth(e),c=S(e,e.caption);return i.push("1 g"),i.push("0 0 "+s(l)+" "+s(o)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+s(l-1)+" "+s(o-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+s(c.fontSize)+" Tf "+a),i.push(c.text),i.push("ET"),i.push("Q"),t.stream=i.join("\n"),t},OffPushDown:function(e){var t=h(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+s(X.internal.getWidth(e))+" "+s(X.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:X.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=X.RadioButton.Circle.YesNormal,t.D[e]=X.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=h(e),n=[],r=X.internal.getWidth(e)<=X.internal.getHeight(e)?X.internal.getWidth(e)/4:X.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var a=X.internal.Bezier_C,i=Number((r*a).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+l(X.internal.getWidth(e)/2)+" "+l(X.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),n.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),n.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),n.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=h(e),n=[],r=X.internal.getWidth(e)<=X.internal.getHeight(e)?X.internal.getWidth(e)/4:X.internal.getHeight(e)/4,a=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),i=Number((a*X.internal.Bezier_C).toFixed(5)),o=Number((r*X.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+l(X.internal.getWidth(e)/2)+" "+l(X.internal.getHeight(e)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),n.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),n.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),n.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+l(X.internal.getWidth(e)/2)+" "+l(X.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=h(e),n=[],r=X.internal.getWidth(e)<=X.internal.getHeight(e)?X.internal.getWidth(e)/4:X.internal.getHeight(e)/4,a=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),i=Number((a*X.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+l(X.internal.getWidth(e)/2)+" "+l(X.internal.getHeight(e)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),n.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),n.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),n.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:X.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=X.RadioButton.Cross.YesNormal,t.D[e]=X.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=h(e),n=[],r=X.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+s(X.internal.getWidth(e)-2)+" "+s(X.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(s(r.x1.x)+" "+s(r.x1.y)+" m"),n.push(s(r.x2.x)+" "+s(r.x2.y)+" l"),n.push(s(r.x4.x)+" "+s(r.x4.y)+" m"),n.push(s(r.x3.x)+" "+s(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=h(e),n=X.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+s(X.internal.getWidth(e))+" "+s(X.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+s(X.internal.getWidth(e)-2)+" "+s(X.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(s(n.x1.x)+" "+s(n.x1.y)+" m"),r.push(s(n.x2.x)+" "+s(n.x2.y)+" l"),r.push(s(n.x4.x)+" "+s(n.x4.y)+" m"),r.push(s(n.x3.x)+" "+s(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=h(e),n=[];return n.push("0.749023 g"),n.push("0 0 "+s(X.internal.getWidth(e))+" "+s(X.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=r.internal.getFont(e.fontName,e.fontStyle).id,n=r.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};X.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=X.internal.getWidth(e),n=X.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},X.internal.getWidth=function(t){var n=0;return"object"===e(t)&&(n=u(t.Rect[2])),n},X.internal.getHeight=function(t){var n=0;return"object"===e(t)&&(n=u(t.Rect[3])),n};var Y=t.addField=function(e){if(N.call(this),!(e instanceof F))throw new Error("Invalid argument passed to jsPDF.addField.");return function(e){r.internal.acroformPlugin.printedOut&&(r.internal.acroformPlugin.printedOut=!1,r.internal.acroformPlugin.acroFormDictionaryRoot=null),r.internal.acroformPlugin.acroFormDictionaryRoot||N.call(r),r.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e)}.call(this,e),e.page=r.internal.getCurrentPageInfo().pageNumber,this};t.addButton=function(e){if(e instanceof U==0)throw new Error("Invalid argument passed to jsPDF.addButton.");return Y.call(this,e)},t.addTextField=function(e){if(e instanceof G==0)throw new Error("Invalid argument passed to jsPDF.addTextField.");return Y.call(this,e)},t.addChoiceField=function(e){if(e instanceof D==0)throw new Error("Invalid argument passed to jsPDF.addChoiceField.");return Y.call(this,e)},"object"==e(n)&&void 0===n.ChoiceField&&void 0===n.ListBox&&void 0===n.ComboBox&&void 0===n.EditBox&&void 0===n.Button&&void 0===n.PushButton&&void 0===n.RadioButton&&void 0===n.CheckBox&&void 0===n.TextField&&void 0===n.PasswordField?(n.ChoiceField=D,n.ListBox=M,n.ComboBox=j,n.EditBox=W,n.Button=U,n.PushButton=z,n.RadioButton=H,n.CheckBox=q,n.TextField=G,n.PasswordField=$,n.AcroForm={Appearance:X}):console.warn("AcroForm-Classes are not populated into global-namespace, because the class-Names exist already."),t.AcroFormChoiceField=D,t.AcroFormListBox=M,t.AcroFormComboBox=j,t.AcroFormEditBox=W,t.AcroFormButton=U,t.AcroFormPushButton=z,t.AcroFormRadioButton=H,t.AcroFormCheckBox=q,t.AcroFormTextField=G,t.AcroFormPasswordField=$,t.AcroFormAppearance=X,t.AcroForm={ChoiceField:D,ListBox:M,ComboBox:j,EditBox:W,Button:U,PushButton:z,RadioButton:H,CheckBox:q,TextField:G,PasswordField:$,Appearance:X}})((window.tmp=ce).API,"undefined"!=typeof window&&window||"undefined"!=typeof global&&global),function(t){var n="addImage_",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},a=t.getImageFileTypeByImageData=function(e,n){var a,i;n=n||"UNKNOWN";var o,s,l,c="UNKNOWN";for(l in t.isArrayBufferView(e)&&(e=t.arrayBufferToBinaryString(e)),r)for(o=r[l],a=0;a>"}),"trns"in t&&t.trns.constructor==Array){for(var s="",l=0,c=t.trns.length;l>18]+r[(258048&t)>>12]+r[(4032&t)>>6]+r[63&t];return 1==o?n+=r[(252&(t=a[s]))>>2]+r[(3&t)<<4]+"==":2==o&&(n+=r[(64512&(t=a[s]<<8|a[s+1]))>>10]+r[(1008&t)>>4]+r[(15&t)<<2]+"="),n},t.createImageInfo=function(e,t,n,r,a,i,o,s,l,c,u,f,h){var d={alias:s,w:t,h:n,cs:r,bpc:a,i:o,data:e};return i&&(d.f=i),l&&(d.dp=l),c&&(d.trns=c),u&&(d.pal=u),f&&(d.smask=f),h&&(d.p=h),d},t.addImage=function(r,a,i,h,d,p,g,m,v){var b="";if("string"!=typeof a){var y=p;p=d,d=h,h=i,i=a,a=y}if("object"===e(r)&&!c(r)&&"imageData"in r){var w=r;r=w.imageData,a=w.format||a||"UNKNOWN",i=w.x||i||0,h=w.y||h||0,d=w.w||d,p=w.h||p,g=w.alias||g,m=w.compression||m,v=w.rotation||w.angle||v}var S=this.internal.getFilters();if(void 0===m&&-1!==S.indexOf("FlateEncode")&&(m="SLOW"),"string"==typeof r&&(r=unescape(r)),isNaN(i)||isNaN(h))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var x,E,_,C,k,A,T,R=function(){var e=this.internal.collections[n+"images"];return e||(this.internal.collections[n+"images"]=e={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s)),e}.call(this);if(!((x=f(r,R))||(c(r)&&(r=u(r,a)),(null==(T=g)||0===T.length)&&(g="string"==typeof(A=r)?t.sHashCode(A):t.isArrayBufferView(A)?t.sHashCode(t.arrayBufferToBinaryString(A)):null),x=f(g,R)))){if(this.isString(r)&&(""!==(b=this.convertStringToImageData(r))?r=b:void 0!==(b=t.loadFile(r))&&(r=b)),a=this.getImageFileTypeByImageData(r,a),!l(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(this.supportsArrayBuffer()&&(r instanceof Uint8Array||(E=r,r=this.binaryStringToUint8Array(r))),!(x=this["process"+a.toUpperCase()](r,(k=0,(C=R)&&(k=Object.keys?Object.keys(C).length:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&t++;return t}(C)),k),g,((_=m)&&"string"==typeof _&&(_=_.toUpperCase()),_ in t.image_compression?_:t.image_compression.NONE),E)))throw new Error("An unknown error occurred whilst processing the image")}return function(e,t,n,r,a,i,o,s){var l=function(e,t,n){return e||t||(t=e=-96),e<0&&(e=-1*n.w*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.h*72/t/this.internal.scaleFactor),0===e&&(e=t*n.w/n.h),0===t&&(t=e*n.h/n.w),[e,t]}.call(this,n,r,a),c=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString;if(n=l[0],r=l[1],o[i]=a,s){s*=Math.PI/180;var f=Math.cos(s),h=Math.sin(s),d=function(e){return e.toFixed(4)},p=[d(f),d(h),d(-1*h),d(f),0,0,"cm"]}this.internal.write("q"),s?(this.internal.write([1,"0","0",1,c(e),u(t+r),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([c(n),"0","0",c(r),"0","0","cm"].join(" "))):this.internal.write([c(n),"0","0",c(r),c(e),u(t+r),"cm"].join(" ")),this.internal.write("/I"+a.i+" Do"),this.internal.write("Q")}.call(this,i,h,d,p,x,x.i,R,v),this},t.convertStringToImageData=function(e){var n,r="";if(this.isString(e)){var a;n=null!==(a=this.extractImageFromDataUrl(e))?a.data:e;try{r=atob(n)}catch(e){throw t.validateStringAsBase64(n)?new Error("atob-Error in jsPDF.convertStringToImageData "+e.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertStringToImageData ")}}return r};var h=function(e,t){return e.subarray(t,t+5)};t.processJPEG=function(e,t,n,r,i,o){var s,l=this.decode.DCT_DECODE;if(!this.isString(e)&&!this.isArrayBuffer(e)&&!this.isArrayBufferView(e))return null;if(this.isString(e)&&(s=function(e){var t;if("JPEG"!==a(e))throw new Error("getJpegSize requires a binary string jpeg file");for(var n=256*e.charCodeAt(4)+e.charCodeAt(5),r=4,i=e.length;r>",c.content=m;var h=c.objId+" 0 R";m="<>";else if(l.options.pageNumber)switch(m="<>",this.internal.write(m))}}this.internal.write("]")}}]),t.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":t.pageContext.annotations.push(e)}},t.link=function(e,t,n,r,a){this.internal.getCurrentPageInfo().pageContext.annotations.push({x:e,y:t,w:n,h:r,options:a,type:"link"})},t.textWithLink=function(e,t,n,r){var a=this.getTextWidth(e),i=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(e,t,n),n+=.2*i,this.link(t,n-i,a,i,r),a},t.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor},function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];e.__arabicParser__={};var i=e.__arabicParser__.isInArabicSubstitutionA=function(e){return void 0!==t[e.charCodeAt(0)]},o=e.__arabicParser__.isArabicLetter=function(e){return"string"==typeof e&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return o(e)&&i(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return o(e)&&0<=a.indexOf(e.charCodeAt(0))},c=(e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return o(e)&&i(e)&&1<=t[e.charCodeAt(0)].length},e.__arabicParser__.arabicLetterHasFinalForm=function(e){return o(e)&&i(e)&&2<=t[e.charCodeAt(0)].length}),u=(e.__arabicParser__.arabicLetterHasInitialForm=function(e){return o(e)&&i(e)&&3<=t[e.charCodeAt(0)].length},e.__arabicParser__.arabicLetterHasMedialForm=function(e){return o(e)&&i(e)&&4==t[e.charCodeAt(0)].length}),f=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,a=0,i="",o=0;for(t=0;t>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})}return this},n=ce.API,(r=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var a={};Object.defineProperty(this,"style",{get:function(){return a},set:function(e){a=e}}),Object.defineProperty(this,"parentNode",{get:function(){return!1}})}).prototype.getContext=function(e,t){var n;if("2d"!==(e=e||"2d"))return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return(this.pdf.context2d._canvas=this).pdf.context2d},r.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},n.events.push(["initialized",function(){this.canvas=new r,this.canvas.pdf=this}]),a=ce.API,o={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},s=1,l=function(e,t,n,r,a){o={x:e,y:t,w:n,h:r,ln:a}},c=function(){return o},u={left:0,top:0,bottom:0},a.setHeaderFunction=function(e){i=e},a.getTextDimensions=function(e,t){var n=this.table_font_size||this.internal.getFontSize(),r=(this.internal.getFont().fontStyle,(t=t||{}).scaleFactor||this.internal.scaleFactor),a=0,i=0,o=0;if("string"==typeof e)0!=(a=this.getStringUnitWidth(e)*n)&&(i=1);else{if("[object Array]"!==Object.prototype.toString.call(e))throw new Error("getTextDimensions expects text-parameter to be of type String or an Array of Strings.");for(var s=0;s=this.internal.pageSize.getHeight()-h.bottom&&(this.cellAddPage(),f=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(i,!0)),t=c().y+c().h,f&&(t=23)}if(void 0!==a[0])if(this.printingHeaderRow?this.rect(e,t,n,r,"FD"):this.rect(e,t,n,r),"right"===o){a instanceof Array||(a=[a]);for(var d=0;d=2*Math.PI&&(r=0,a=2*Math.PI),this.path.push({type:"arc",x:e,y:t,radius:n,startAngle:r,endAngle:a,counterclockwise:i})},c.prototype.arcTo=function(e,t,n,r,a){throw new Error("arcTo not implemented.")},c.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},c.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var a={};"butt"!==this.lineCap&&(a.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(a.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(e,t,n,r),this.fill(),a.hasOwnProperty("lineCap")&&(this.lineCap=a.lineCap),a.hasOwnProperty("lineJoin")&&(this.lineJoin=a.lineJoin)}},c.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");h.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},c.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw console.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(e,t,n,r))},c.prototype.save=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n"},d=function(e){var t,n,r,a,i,o=String,s="length",l="charCodeAt",c="slice",u="replace";for(e[c](-2),e=e[c](0,-2)[u](/\s/g,"")[u]("z","!!!!!"),r=[],a=0,i=(e+=t="uuuuu"[c](e[s]%5||5))[s];a>24,255&n>>16,255&n>>8,255&n);return function(e,n){for(var r=t[s];0"},g=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(e=e.replace(/\s/g,"")).indexOf(">")&&(e=e.substr(0,e.indexOf(">"))),e.length%2&&(e+="0"),!1===t.test(e))return"";for(var n="",r=0;r>8&255,n>>16&255,n>>24&255]),e.length+2),String.fromCharCode.apply(null,a)},f.processDataByFilters=function(e,t){var n=0,r=e||"",a=[];for("string"==typeof(t=t||[])&&(t=[t]),n=0;n>"),this.internal.out("endobj"),_=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+C+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==E&&void 0!==_&&this.internal.out("/Names <>")}),this},(k=ce.API).events.push(["postPutResources",function(){var e=this,t=/^(\d+) 0 obj$/;if(0> endobj")}var f=e.internal.newObject();for(e.internal.write("<< /Names [ "),r=0;r>","endobj"),e.internal.newObject(),e.internal.write("<< /Dests "+f+" 0 R"),e.internal.write(">>","endobj")}}]),k.events.push(["putCatalog",function(){0> \r\nendobj\r\n"},e.outline.count_r=function(e,t){for(var n=0;n>>24&255,h[f++]=s>>>16&255,h[f++]=s>>>8&255,h[f++]=255&s,A.arrayBufferToBinaryString(h)},N=function(e,t){var n=Math.LOG2E*Math.log(32768)-8<<4|8,r=n<<8;return r|=Math.min(3,(t-1&255)>>1)<<6,r|=0,[n,255&(r+=31-r%31)]},B=function(e,t){for(var n,r=1,a=0,i=e.length,o=0;0>>0},I=function(e,t,n,r){for(var a,i,o,s=e.length/t,l=new Uint8Array(e.length+s),c=j(),u=0;u>>1)&255;return i},D=function(e,t,n){var r,a,i,o,s=[],l=0,c=e.length;for(s[0]=4;l>>p&255,p+=i.bits;v[y]=S>>>p&255}if(16===i.bits){g=(k=new Uint32Array(i.decodePixels().buffer)).length,m=new Uint8Array(g*(32/i.pixelBitlength)*i.colors),v=new Uint8Array(g*(32/i.pixelBitlength));for(var S,x=1>>0&255,x&&(m[w++]=S>>>16&255,S=k[y++],m[w++]=S>>>0&255),v[E++]=S>>>16&255;d=8}r!==A.image_compression.NONE&&T()?(e=R(m,i.width*i.colors,i.colors,r),u=R(v,i.width,1,r)):(e=m,u=v,h=null)}if(3===i.colorType&&(f=this.color_spaces.INDEXED,c=i.palette,i.transparency.indexed)){var _=i.transparency.indexed,C=0;for(y=0,g=_.length;yr&&(a.push(e.slice(l,i)),s=0,l=i),s+=t[i],i++;return l!==i&&a.push(e.slice(l,i)),a},Y=function(e,t,n){n||(n={});var r,a,i,o,s,l,c=[],u=[c],f=n.textIndent||0,h=0,d=0,p=e.split(" "),g=q.apply(this,[" ",n])[0];if(l=-1===n.lineIndent?p[0].length+2:n.lineIndent||0){var m=Array(l).join(" "),v=[];p.map(function(e){1<(e=e.split(/\s*\n/)).length?v=v.concat(e.map(function(e,t){return(t&&e.length?"\n":"")+e})):v.push(e[0])}),p=v,l=$.apply(this,[m,n])}for(i=0,o=p.length;i>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},re=ce.API,oe=ie=ae="",re.addMetadata=function(e,t){return ie=t||"http://jspdf.default.namespaceuri/",ae=e,this.internal.events.subscribe("postPutResources",function(){if(ae){var e='',t=unescape(encodeURIComponent('')),n=unescape(encodeURIComponent(e)),r=unescape(encodeURIComponent(ae)),a=unescape(encodeURIComponent("")),i=unescape(encodeURIComponent("")),o=n.length+r.length+a.length+t.length+i.length;oe=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+o+" >>"),this.internal.write("stream"),this.internal.write(t+n+r+a+i),this.internal.write("endstream"),this.internal.write("endobj")}else oe=""}),this.internal.events.subscribe("putCatalog",function(){oe&&this.internal.write("/Metadata "+oe+" 0 R")}),this},function(e,t){var n=e.API,r=n.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,a=["","0","00","000","0000"],i=[""],o=0,s=e.length;o<"+a+">");return r.length&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),i+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};n.events.push(["putFont",function(t){!function(t,n,r,i){if(t.metadata instanceof e.API.TTFFont&&"Identity-H"===t.encoding){for(var o=t.metadata.Unicode.widths,s=t.metadata.subset.encode(t.metadata.glyIdsUsed,1),l="",c=0;c>"),n("endobj");var d=r();n("<<"),n("/Type /Font"),n("/BaseFont /"+t.fontName),n("/FontDescriptor "+h+" 0 R"),n("/W "+e.API.PDFObject.convert(o)),n("/CIDToGIDMap /Identity"),n("/DW 1000"),n("/Subtype /CIDFontType2"),n("/CIDSystemInfo"),n("<<"),n("/Supplement 0"),n("/Registry (Adobe)"),n("/Ordering ("+t.encoding+")"),n(">>"),n(">>"),n("endobj"),t.objectNumber=r(),n("<<"),n("/Type /Font"),n("/Subtype /Type0"),n("/ToUnicode "+f+" 0 R"),n("/BaseFont /"+t.fontName),n("/Encoding /"+t.encoding),n("/DescendantFonts ["+d+" 0 R]"),n(">>"),n("endobj"),t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]),n.events.push(["putFont",function(t){!function(t,n,r,i){if(t.metadata instanceof e.API.TTFFont&&"WinAnsiEncoding"===t.encoding){t.metadata.Unicode.widths;for(var o=t.metadata.rawData,s="",l=0;l>"),n("endobj"),t.objectNumber=r(),l=0;l>"),n("endobj"),t.isAlreadyPutted=!0}}(t.font,t.out,t.newObject,t.putStream)}]);var i=function(e){var t,n,a=e.text||"",i=e.x,o=e.y,s=e.options||{},l=e.mutex||{},c=l.pdfEscape,u=l.activeFontKey,f=l.fonts,h=(l.activeFontSize,""),d=0,p="",g=f[n=u].encoding;if("Identity-H"!==f[n].encoding)return{text:a,x:i,y:o,options:s,mutex:l};for(p=a,n=u,"[object Array]"===Object.prototype.toString.call(a)&&(p=a[0]),d=0;dl-c.top-c.bottom&&r.pagesplit){var p=function(e,t,n,a,i){var o=document.createElement("canvas");o.height=i,o.width=a;var s=o.getContext("2d");return s.mozImageSmoothingEnabled=!1,s.webkitImageSmoothingEnabled=!1,s.msImageSmoothingEnabled=!1,s.imageSmoothingEnabled=!1,s.fillStyle=r.backgroundColor||"#ffffff",s.fillRect(0,0,a,i),s.drawImage(e,t,n,a,i,0,0,a,i),o},g=function(){for(var r,i,u=0,g=0,m={},v=!1;;){var b;if(g=0,m.top=0!==u?c.top:n,m.left=0!==u?c.left:t,v=(s-c.left-c.right)*o=e.width)break;this.addPage()}else y=[b=p(e,0,u,r,i),m.left,m.top,b.width/o,b.height/o,h,null,d],this.addImage.apply(this,y);if((u+=i)>=e.height)break;this.addPage()}a(f,u,null,y)}.bind(this);if("CANVAS"===e.nodeName){var m=new Image;m.onload=g,m.src=e.toDataURL("image/png"),e=m}else g()}else{var v=Math.random().toString(35),b=[e,t,n,f,u,h,v,d];this.addImage.apply(this,b),a(f,u,v,b)}}.bind(this),"undefined"!=typeof html2canvas&&!r.rstz)return html2canvas(e,r);if("undefined"==typeof rasterizeHTML)return null;var c="drawDocument";return"string"==typeof e&&(c=/^http/.test(e)?"drawURL":"drawHTML"),r.width=r.width||s*o,rasterizeHTML[c](e,void 0,r).then(function(e){r.onrendered(e.image)},function(e){a(null,e)})},function(t){var n,r,a,i,o,s,l,c,u,f,h,d,p,g,m,v,b,y,w,S;n=function(){return function(t){return e.prototype=t,new e};function e(){}}(),f=function(e){var t,n,r,a,i,o,s;for(n=0,r=e.length,t=void 0,o=a=!1;!a&&n!==r;)(t=e[n]=e[n].trimLeft())&&(a=!0),n++;for(n=r-1;r&&!o&&-1!==n;)(t=e[n]=e[n].trimRight())&&(o=!0),n--;for(i=/\s+$/g,s=!0,n=0;n!==r;)"\u2028"!=e[n]&&(t=e[n].replace(/\s+/g," "),s&&(t=t.trimLeft()),t&&(s=i.test(t)),e[n]=t),n++;return e},d=function(e){var t,n,r;for(t=void 0,n=(r=e.split(",")).shift();!t&&n;)t=a[n.trim().toLowerCase()],n=r.shift();return t},p=function(e){var t;return-1<(e="auto"===e?"0px":e).indexOf("em")&&!isNaN(Number(e.replace("em","")))&&(e=18.719*Number(e.replace("em",""))+"px"),-1a.pdf.margins_doc.top&&(a.pdf.addPage(),a.y=a.pdf.margins_doc.top,a.executeWatchFunctions(o));var R=u(o),N=a.x,B=12/a.pdf.internal.scaleFactor,I=(R["margin-left"]+R["padding-left"])*B,O=(R["margin-right"]+R["padding-right"])*B,L=(R["margin-top"]+R["padding-top"])*B,P=(R["margin-bottom"]+R["padding-bottom"])*B;void 0!==R.float&&"right"===R.float?N+=a.settings.width-o.width-O:N+=I,a.pdf.addImage(A,N,a.y+L,o.width,o.height),A=void 0,"right"===R.float||"left"===R.float?(a.watchFunctions.push(function(e,t,n,r){return a.y>=t?(a.x+=e,a.settings.width+=n,!0):!!(r&&1===r.nodeType&&!x[r.nodeName]&&a.x+r.width>a.pdf.margins_doc.left+a.pdf.margins_doc.width)&&(a.x+=e,a.y=t,a.settings.width+=n,!0)}.bind(this,"left"===R.float?-o.width-I-O:0,a.y+o.height+L+P,o.width)),a.watchFunctions.push(function(e,t,n){return!(a.y]*?>/gi,""),u="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),(c=document.createElement("div")).style.cssText="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",c.innerHTML='")).one("load",function(){o.one("load",function(){var t=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,e=t.documentElement?t.documentElement:t.body,n=e.getElementsByTagName("textarea")[0],r=n&&n.getAttribute("data-type")||null,o=n&&n.getAttribute("data-status")||200,s=n&&n.getAttribute("data-statusText")||"OK",a={html:e.innerHTML,text:r?n.value:e?e.textContent||e.innerText:null};u(),i(o,s,a,r?"Content-Type: "+r:null)}),r[0].submit()}),t("body").append(r,o)},abort:function(){null!==o&&(o.unbind("load").attr("src","javascript:false;"),u())}}})}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],t):"object"==typeof exports?t(require("jquery"),require("./vendor/jquery.ui.widget")):t(window.jQuery)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var r=n.dataTransfer;r&&-1!==t.inArray("Files",r.types)&&!1!==this._trigger(e,t.Event(e,{delegatedEvent:n}))&&(n.preventDefault(),i&&(r.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:void 0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){if(e.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,r=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&r-i._time").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",r=(e.prop("files")||[1]).length;r;)n.push(i),r-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var r=t.Deferred(),o=r.promise();return i=i||this.options.context||o,!0===e?r.resolveWith(i,n):!1===e&&r.rejectWith(i,n),o.abort=r.promise,this._enhancePromise(o)},_addConvenienceMethods:function(e,i){var n=this,r=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,o){return(e||o)&&(i._processQueue=this._processQueue=(this._processQueue||r([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():r(arguments)}).then(e,o)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,r,o=this,s=e.files[0],a=s.size,l=e.uploadedBytes,u=e.maxChunkSize||a,c=this._blobSlice,h=t.Deferred(),d=h.promise();return!(!(this._isXHRUpload(e)&&c&&(l||("function"===t.type(u)?u(e):u)=a?(s.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",s.error])):(r=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=c.call(s,l,l+("function"===t.type(u)?u(i):u),s.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+a,o._trigger("chunkbeforesend",null,i),o._initXHRData(i),o._initProgressListener(i),n=(!1!==o._trigger("chunksend",null,i)&&t.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,s,u){l=o._getUploadedBytes(u)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=s,i.jqXHR=u,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),la._sending)for(var n=a._slots.shift();n;){if("pending"===a._getDeferredState(n)){n.resolve();break}n=a._slots.shift()}0===a._active&&a._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=t.Deferred(),this._slots.push(o),s=o.then(u)):(this._sequence=this._sequence.then(u,u),s=this._sequence),s.abort=function(){return r=[void 0,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,r),u())},this._enhancePromise(s)):u()},_onAdd:function(e,i){var n,r,o,s,a=this,l=!0,u=t.extend({},this.options,i),c=i.files,h=c.length,d=u.limitMultiFileUploads,f=u.limitMultiFileUploadSize,p=u.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(u),v=0;if(!h)return!1;if(f&&void 0===c[0].size&&(f=void 0),(u.singleFileUploads||d||f)&&this._isXHRUpload(u))if(u.singleFileUploads||f||!d)if(!u.singleFileUploads&&f)for(o=[],n=[],s=0;sf||d&&s+1-v>=d)&&(o.push(c.slice(v,s+1)),(r=m.slice(v,s+1)).length||(r=m),n.push(r),v=s+1,g=0);else n=m;else for(o=[],n=[],s=0;s").append(n)[0].reset(),i.after(n).detach(),r&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,r=this,o=t.Deferred(),s=[],a=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])},l=function(){n.readEntries(function(t){t.length?(s=s.concat(t),l()):function(t){r._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(a)}(s)},a)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},a):e.isDirectory?(n=e.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var i=(e=e||{}).items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?((e=t.webkitGetAsEntry())&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var i,n,r=(e=t(e)).prop("webkitEntries")||e.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if((i=t.makeArray(e.prop("files"))).length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(n=e.prop("value")))return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(r){n.files=r,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",t.Event("change",{delegatedEvent:e}),n)&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,r={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,!1!==i._trigger("drop",t.Event("drop",{delegatedEvent:e}),r)&&i._onAdd(e,r)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,r){var o,s=r.name.toLowerCase();/^data-/.test(s)&&(s=s.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),o=n[s],e._isRegExpOption(s,o)&&(o=e._getRegExp(o)),i[s]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,r=this,o=t.Deferred(),s=o.promise();return s.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),s)},this._getFileInputFiles(e.fileInput).always(function(t){n||(t.length?(e.files=t,(i=r._onSend(null,e)).then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})):o.reject())}),this._enhancePromise(s)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&e(jQuery)}(0,function(t){"use strict";var e=function(i,n,r,o,s){this.fallbackValue=r?"string"==typeof r?this.parse(r):r:null,this.fallbackFormat=o||"rgba",this.hexNumberSignPrefix=!0===s,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=n||{},this.colors=t.extend({},e.webColors,this.predefinedColors),i&&(void 0!==i.h?this.value=i:this.setColor(String(i))),this.value||(this.value={h:0,s:0,b:0,a:1})};e.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){var r,o,s,a,l;return 0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t=(t*=360)%360/60,r=o=s=i-(l=i*e),r+=[l,a=l*(1-Math.abs(t%2-1)),0,0,a,l][t=~~t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],{r:Math.round(255*r),g:Math.round(255*o),b:Math.round(255*s),a:n}},toHex:function(t,e,i,n,r){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,r=this.value.a);var o="#",s=this.toRGB(e,i,n,r);return this.rgbaIsTransparent(s)?"transparent":(t||(o=this.hexNumberSignPrefix?"#":""),o+((1<<24)+(parseInt(s.r)<<16)+(parseInt(s.g)<<8)+parseInt(s.b)).toString(16).slice(1))},toHSL:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a);var r=t,o=(2-e)*i,s=e*i;return s/=o>0&&o<=1?o:2-o,o/=2,s>1&&(s=1),{h:isNaN(r)?0:r,s:isNaN(s)?0:s,l:isNaN(o)?0:o,a:isNaN(n)?0:n}},toAlias:function(t,e,i,n){var r,o=0===arguments.length?this.toHex(!0):this.toHex(!0,t,e,i,n),s="alias"===this.origFormat?o:this.toString(!1,this.origFormat);for(var a in this.colors)if((r=this.colors[a].toLowerCase().trim())===o||r===s)return a;return!1},RGBtoHSB:function(t,e,i,n){var r,o,s,a;return t/=255,e/=255,i/=255,r=((r=0===(a=(s=Math.max(t,e,i))-Math.min(t,e,i))?null:s===t?(e-i)/a:s===e?(i-t)/a+2:(t-e)/a+4)+360)%6*60/360,o=0===a?0:a/s,{h:this._sanitizeNumber(r),s:o,b:s,a:this._sanitizeNumber(n)}},HueToRGB:function(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t},HSLtoRGB:function(t,e,i,n){var r;e<0&&(e=0);var o=2*i-(r=i<=.5?i*(1+e):i+e-i*e),s=t+1/3,a=t,l=t-1/3;return[Math.round(255*this.HueToRGB(o,r,s)),Math.round(255*this.HueToRGB(o,r,a)),Math.round(255*this.HueToRGB(o,r,l)),this._sanitizeNumber(n)]},parse:function(e){if("string"!=typeof e)return this.fallbackValue;if(0===arguments.length)return!1;var i,n,r=this,o=!1,s=void 0!==this.colors[e];return s&&(e=this.colors[e].toLowerCase().trim()),t.each(this.stringParsers,function(t,a){var l=a.re.exec(e);return!(i=l&&a.parse.apply(r,[l]))||(o={},n=s?"alias":a.format?a.format:r.getValidFallbackFormat(),(o=n.match(/hsla?/)?r.RGBtoHSB.apply(r,r.HSLtoRGB.apply(r,i)):r.RGBtoHSB.apply(r,i))instanceof Object&&(o.format=n),!1)}),o},getValidFallbackFormat:function(){var t=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==t.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==t.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(t,i,n){n=n||!1;var r=!1;switch(i=i||this.origFormat||this.fallbackFormat){case"rgb":return r=this.toRGB(),this.rgbaIsTransparent(r)?"transparent":"rgb("+r.r+","+r.g+","+r.b+")";case"rgba":return"rgba("+(r=this.toRGB()).r+","+r.g+","+r.b+","+r.a+")";case"hsl":return r=this.toHSL(),"hsl("+Math.round(360*r.h)+","+Math.round(100*r.s)+"%,"+Math.round(100*r.l)+"%)";case"hsla":return r=this.toHSL(),"hsla("+Math.round(360*r.h)+","+Math.round(100*r.s)+"%,"+Math.round(100*r.l)+"%,"+r.a+")";case"hex":return this.toHex(t);case"alias":return!1===(r=this.toAlias())?this.toString(t,this.getValidFallbackFormat()):n&&!(r in e.webColors)&&r in this.predefinedColors?this.predefinedColors[r]:r;default:return r}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(t){return[t[1],t[2],t[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}],colorNameToHex:function(t){return void 0!==this.colors[t.toLowerCase()]&&this.colors[t.toLowerCase()]}};var i={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'',leftArrow:"",rightArrow:"",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},o=function(){function i(e,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),this._config=t.extend({},r,n),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=e instanceof jQuery?e:t(e),this._isBootstrap3=3==t.fn.modal.Constructor.VERSION[0];var s='",a='',l='";t(this._config.doc.body).append('"),this._$modal=t("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=t(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),t(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(t){return t.preventDefault(),o.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(t){return t.preventDefault(),o.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return o._toggleLoading(!0),o._handle(),o._config.onShown.call(o)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return o._galleryName&&(t(document).off("keydown.ekkoLightbox"),t(window).off("resize.ekkoLightbox")),o._$modal.remove(),o._config.onHidden.call(o)}).modal(this._config),t(window).on("resize.ekkoLightbox",function(){o._resize(o._wantedWidth,o._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){o._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){o._touchendX=event.changedTouches[0].screenX,o._swipeGesure()})}return e(i,null,[{key:"Default",get:function(){return r}}]),e(i,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(e){if(e<0||e>this._$galleryItems.length-1)return this;this._galleryIndex=e,this.updateNavigation(),this._$element=t(this._$galleryItems.get(this._galleryIndex)),this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var t=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?t.find("a:first-child").addClass("disabled"):t.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?t.find("a:last-child").addClass("disabled"):t.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(t){return 39===(t=t||window.event).keyCode?this.navigateRight():37===t.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(t,e){return!(e=e||!1)&&this._isImage(t)&&(e="image"),!e&&this._getYoutubeId(t)&&(e="youtube"),!e&&this._getVimeoId(t)&&(e="vimeo"),!e&&this._getInstagramId(t)&&(e="instagram"),(!e||["image","youtube","vimeo","instagram","video","url"].indexOf(e)<0)&&(e="url"),e}},{key:"_isImage",value:function(t){return t&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var t=this,e=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(e=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){t._$lightboxBodyTwo.hasClass("in")||t._$lightboxBodyTwo.empty(),t._$lightboxBodyOne.hasClass("in")||t._$lightboxBodyOne.empty()},500),e.addClass("in show"),e}},{key:"_handle",value:function(){var t=this._containerToUse();this._updateTitleAndFooter();var e=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(e,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","video","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(e,t),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(e,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(e),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(e),t);break;case"video":this._showHtml5Video(e,t);break;default:this._loadRemoteContent(e,t)}return this}},{key:"_getYoutubeId",value:function(t){if(!t)return!1;var e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!e||11!==e[2].length)&&e[2]}},{key:"_getVimeoId",value:function(t){return!!(t&&t.indexOf("vimeo")>0)&&t}},{key:"_getInstagramId",value:function(t){return!!(t&&t.indexOf("instagram")>0)&&t}},{key:"_toggleLoading",value:function(e){return(e=e||!1)?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),t(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),t(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(t){return parseInt(this._$modalDialog.css(t),10)+parseInt(this._$modalContent.css(t),10)+parseInt(this._$modalBody.css(t),10)}},{key:"_updateTitleAndFooter",value:function(){var t=this._$element.data("title")||"",e=this._$element.data("footer")||"";return this._titleIsShown=!1,t||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(t||" ")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,e?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(e)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(t,e){var i=this._getYoutubeId(t),n=t.indexOf("&")>0?t.substr(t.indexOf("&")):"",r=this._$element.data("width")||560,o=this._$element.data("height")||r/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+i+"?badge=0&autoplay=1&html5=1"+n,r,o,e)}},{key:"_showVimeoVideo",value:function(t,e){var i=this._$element.data("width")||500,n=this._$element.data("height")||i/(560/315);return this._showVideoIframe(t+"?autoplay=1",i,n,e)}},{key:"_showInstagramVideo",value:function(t,e){var i=this._$element.data("width")||612,n=i+80;return t="/"!==t.substr(-1)?t+"/":t,e.html(''),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(t,e,i,n){return i=i||e,n.html('
    '),this._resize(e,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(t,e){var i=this._$element.data("width")||560,n=this._$element.data("height")||i/(560/315);return e.html('
    '),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var n=this,r=this._$element.data("width")||560,o=this._$element.data("height")||560,s=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),s||this._isExternal(e)?(i.html(''),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return n._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(r,o),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var n=t(this._$galleryItems.get(e),!1);if(void 0!==n){var r=n.attr("data-remote")||n.attr("href");return("image"===n.attr("data-type")||this._isImage(r))&&this._preloadImage(r,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var n=this;i=i||!1;var r,o=new Image;return i&&(r=setTimeout(function(){i.append(n._config.loadingMessage)},200),o.onload=function(){r&&clearTimeout(r),r=null;var e=t("");return e.attr("src",o.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),n._$modalArrows&&n._$modalArrows.css("display",""),n._resize(o.width,o.height),n._toggleLoading(!1),n._config.onContentLoaded.call(n)},o.onerror=function(){return n._toggleLoading(!1),n._error(n._config.strings.fail+" "+e)}),o.src=e,o}},{key:"_swipeGesure",value:function(){return this._touchendXthis._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var n=e/i,r=this._padding.left+this._padding.right+this._border.left+this._border.right,o=this._config.doc.body.clientWidth>575?20:0,s=this._config.doc.body.clientWidth>575?0:20,a=Math.min(e+r,this._config.doc.body.clientWidth-o,this._config.maxWidth);e+r>a?(i=(a-r-s)/n,e=a):e+=r;var l=0,u=0;this._footerIsShown&&(u=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(l=this._$modalHeader.outerHeight(!0)||67);var c=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,h=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),d=Math.min(i,t(window).height()-c-h-l-u,this._config.maxHeight-c-l-u);i>d&&(e=Math.ceil(d*n)+r),this._$lightboxContainer.css("height",d),this._$modalDialog.css("flex",1).css("maxWidth",e);var f=this._$modal.data("bs.modal");if(f)try{f._handleUpdate()}catch(t){f.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var n=this;return e=e||{},this.each(function(){var r=t(n),o=t.extend({},i.Default,r.data(),"object"==typeof e&&e);new i(n,o)})}}]),i}();t.fn[i]=o._jQueryInterface,t.fn[i].Constructor=o,t.fn[i].noConflict=function(){return t.fn[i]=n,o._jQueryInterface}}(jQuery)}(jQuery),function(t){var e="iCheck",i=e+"-helper",n="radio",r="checked",o="un"+r,s="disabled",a="determinate",l="in"+a,u="update",c="type",h="touchbegin.i touchend.i",d="addClass",f="removeClass",p="trigger",g="label",m="cursor",v=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);function y(t,e,i){var o=t[0],h=/er/.test(i)?l:/bl/.test(i)?s:r,d=i==u?{checked:o[r],disabled:o[s],indeterminate:"true"==t.attr(l)||"false"==t.attr(a)}:o[h];if(/^(ch|di|in)/.test(i)&&!d)b(t,h);else if(/^(un|en|de)/.test(i)&&d)_(t,h);else if(i==u)for(var f in d)d[f]?b(t,f,!0):_(t,f,!0);else e&&"toggle"!=i||(e||t[p]("ifClicked"),d?o[c]!==n&&_(t,h):b(t,h))}function b(u,h,p){var g=u[0],v=u.parent(),y=h==r,b=h==l,x=h==s,D=b?a:y?o:"enabled",T=w(u,D+C(g[c])),S=w(u,h+C(g[c]));if(!0!==g[h]){if(!p&&h==r&&g[c]==n&&g.name){var A=u.closest("form"),M='input[name="'+g.name+'"]';(M=A.length?A.find(M):t(M)).each(function(){this!==g&&t(this).data(e)&&_(t(this),h)})}b?(g[h]=!0,g[r]&&_(u,r,"force")):(p||(g[h]=!0),y&&g[l]&&_(u,l,!1)),k(u,y,h,p)}g[s]&&w(u,m,!0)&&v.find("."+i).css(m,"default"),v[d](S||w(u,h)||""),v.attr("role")&&!b&&v.attr("aria-"+(x?s:r),"true"),v[f](T||w(u,D)||"")}function _(t,e,n){var u=t[0],h=t.parent(),p=e==r,g=e==l,v=e==s,y=g?a:p?o:"enabled",b=w(t,y+C(u[c])),_=w(t,e+C(u[c]));!1!==u[e]&&(!g&&n&&"force"!=n||(u[e]=!1),k(t,p,y,n)),!u[s]&&w(t,m,!0)&&h.find("."+i).css(m,"pointer"),h[f](_||w(t,e)||""),h.attr("role")&&!g&&h.attr("aria-"+(v?s:r),"false"),h[d](b||w(t,y)||"")}function x(i,n){i.data(e)&&(i.parent().html(i.attr("style",i.data(e).s||"")),n&&i[p](n),i.off(".i").unwrap(),t(g+'[for="'+i[0].id+'"]').add(i.closest(g)).off(".i"))}function w(t,i,n){if(t.data(e))return t.data(e).o[i+(n?"":"Class")]}function C(t){return t.charAt(0).toUpperCase()+t.slice(1)}function k(t,e,i,n){n||(e&&t[p]("ifToggled"),t[p]("ifChanged")[p]("if"+C(i)))}t.fn[e]=function(o,a){var m='input[type="checkbox"], input[type="'+n+'"]',w=t(),C=function(e){e.each(function(){var e=t(this);w=e.is(m)?w.add(e):w.add(e.find(m))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(o))return o=o.toLowerCase(),C(this),w.each(function(){var e=t(this);"destroy"==o?x(e,"ifDestroyed"):y(e,!0,o),t.isFunction(a)&&a()});if("object"!=typeof o&&o)return this;var k=t.extend({checkedClass:r,disabledClass:s,indeterminateClass:l,labelHover:!0},o),D=k.handle,T=k.hoverClass||"hover",S=k.focusClass||"focus",A=k.activeClass||"active",M=!!k.labelHover,E=k.labelHoverClass||"hover",I=0|(""+k.increaseArea).replace("%","");return"checkbox"!=D&&D!=n||(m='input[type="'+D+'"]'),I<-50&&(I=-50),C(this),w.each(function(){var o=t(this);x(o);var a,l=this,m=l.id,w=-I+"%",C=100+2*I+"%",D={position:"absolute",top:w,left:w,display:"block",width:C,height:C,margin:0,padding:0,background:"#fff",border:0,opacity:0},O=v?{position:"absolute",visibility:"hidden"}:I?D:{position:"absolute",opacity:0},P="checkbox"==l[c]?k.checkboxClass||"icheckbox":k.radioClass||"i"+n,F=t(g+'[for="'+m+'"]').add(o.closest(g)),$=!!k.aria,N=e+"-"+Math.random().toString(36).substr(2,6),L='
    ")[p]("ifCreated").parent().append(k.insert),a=t('').css(D).appendTo(L),o.data(e,{o:k,s:o.attr("style")}).css(O),k.inheritClass&&L[d](l.className||""),k.inheritID&&m&&L.attr("id",e+"-"+m),"static"==L.css("position")&&L.css("position","relative"),y(o,!0,u),F.length&&F.on("click.i mouseover.i mouseout.i "+h,function(e){var i=e[c],n=t(this);if(!l[s]){if("click"==i){if(t(e.target).is("a"))return;y(o,!1,!0)}else M&&(/ut|nd/.test(i)?(L[f](T),n[f](E)):(L[d](T),n[d](E)));if(!v)return!1;e.stopPropagation()}}),o.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[c],i=t.keyCode;return"click"!=e&&("keydown"==e&&32==i?(l[c]==n&&l[r]||(l[r]?_(o,r):b(o,r)),!1):void("keyup"==e&&l[c]==n?!l[r]&&b(o,r):/us|ur/.test(e)&&L["blur"==e?f:d](S)))}),a.on("click mousedown mouseup mouseover mouseout "+h,function(t){var e=t[c],i=/wn|up/.test(e)?A:T;if(!l[s]){if("click"==e?y(o,!1,!0):(/wn|er|in/.test(e)?L[d](i):L[f](i+" "+A),F.length&&M&&i==T&&F[/ut|nd/.test(e)?f:d](E)),!v)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(t){var e=[],i=[],n=[],r=[],o={init:function(s,a){for(var l=t.extend({bind:"click",passwordElement:null,displayElement:null,passwordLength:16,uppercase:!0,lowercase:!0,numbers:!0,specialChars:!0,additionalSpecialChars:[],onPasswordGenerated:function(t){}},s),u=48;u<58;u++)e.push(u);for(u=65;u<91;u++)i.push(u);for(u=97;u<123;u++)n.push(u);return r=[33,35,64,36,38,42,91,93,123,125,92,47,63,58,59,95,45].concat(l.additionalSpecialChars),this.each(function(){t(this).bind(l.bind,function(t){t.preventDefault(),o.generatePassword(l)})})},generatePassword:function(o){var a=new Array,l=o.uppercase+o.lowercase+o.numbers+o.specialChars,u=0,c=new Array,h=Math.floor(o.passwordLength/l);if(o.uppercase){for(var d=0;d1&&(r-=1)),[360*r,100*o,100*u]},r.rgb.hwb=function(t){var e=t[0],i=t[1],n=t[2];return[r.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(i,n))),100*(n=1-1/255*Math.max(e,Math.max(i,n)))]},r.rgb.cmyk=function(t){var e,i=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-r)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]},r.rgb.keyword=function(t){var n=e[t];if(n)return n;var r,o,s,a=1/0;for(var l in i)if(i.hasOwnProperty(l)){var u=i[l],c=(o=t,s=u,Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2)+Math.pow(o[2]-s[2],2));c.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},r.rgb.lab=function(t){var e=r.rgb.xyz(t),i=e[0],n=e[1],o=e[2];return n/=100,o/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},r.hsl.rgb=function(t){var e,i,n,r,o,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0===a)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+a):l+a-l*a),r=[0,0,0];for(var u=0;u<3;u++)(n=s+1/3*-(u-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,r[u]=255*o;return r},r.hsl.hsv=function(t){var e=t[0],i=t[1]/100,n=t[2]/100,r=i,o=Math.max(n,.01);return i*=(n*=2)<=1?n:2-n,r*=o<=1?o:2-o,[e,100*(0===n?2*r/(o+r):2*i/(n+i)),100*((n+i)/2)]},r.hsv.rgb=function(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o));switch(n*=255,r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},r.hsv.hsl=function(t){var e,i,n,r=t[0],o=t[1]/100,s=t[2]/100,a=Math.max(s,.01);return n=(2-o)*s,i=o*a,[r,100*(i=(i/=(e=(2-o)*a)<=1?e:2-e)||0),100*(n/=2)]},r.hwb.rgb=function(t){var e,i,n,r,o,s,a,l=t[0]/360,u=t[1]/100,c=t[2]/100,h=u+c;switch(h>1&&(u/=h,c/=h),n=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(n=1-n),r=u+n*((i=1-c)-u),e){default:case 6:case 0:o=i,s=r,a=u;break;case 1:o=r,s=i,a=u;break;case 2:o=u,s=i,a=r;break;case 3:o=u,s=r,a=i;break;case 4:o=r,s=u,a=i;break;case 5:o=i,s=u,a=r}return[255*o,255*s,255*a]},r.cmyk.rgb=function(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]},r.xyz.rgb=function(t){var e,i,n,r=t[0]/100,o=t[1]/100,s=t[2]/100;return i=-.9689*r+1.8758*o+.0415*s,n=.0557*r+-.204*o+1.057*s,e=(e=3.2406*r+-1.5372*o+-.4986*s)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]},r.xyz.lab=function(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},r.lab.xyz=function(t){var e,i,n,r=t[0];e=t[1]/500+(i=(r+16)/116),n=i-t[2]/200;var o=Math.pow(i,3),s=Math.pow(e,3),a=Math.pow(n,3);return i=o>.008856?o:(i-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,[e*=95.047,i*=100,n*=108.883]},r.lab.lch=function(t){var e,i=t[0],n=t[1],r=t[2];return(e=360*Math.atan2(r,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+r*r),e]},r.lch.lab=function(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]},r.rgb.ansi16=function(t){var e=t[0],i=t[1],n=t[2],o=1 in arguments?arguments[1]:r.rgb.hsv(t)[2];if(0===(o=Math.round(o/50)))return 30;var s=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(e/255));return 2===o&&(s+=60),s},r.hsv.ansi16=function(t){return r.rgb.ansi16(r.hsv.rgb(t),t[2])},r.rgb.ansi256=function(t){var e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},r.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},r.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var i;return t-=16,[Math.floor(t/36)/5*255,Math.floor((i=t%36)/6)/5*255,i%6/5*255]},r.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},r.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var i=e[0];3===e[0].length&&(i=i.split("").map(function(t){return t+t}).join(""));var n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},r.rgb.hcg=function(t){var e,i=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(i,n),r),s=Math.min(Math.min(i,n),r),a=o-s;return e=a<=0?0:o===i?(n-r)/a%6:o===n?2+(r-i)/a:4+(i-n)/a+4,e/=6,[360*(e%=1),100*a,100*(a<1?s/(1-a):0)]},r.hsl.hcg=function(t){var e=t[1]/100,i=t[2]/100,n=1,r=0;return(n=i<.5?2*e*i:2*e*(1-i))<1&&(r=(i-.5*n)/(1-n)),[t[0],100*n,100*r]},r.hsv.hcg=function(t){var e=t[1]/100,i=t[2]/100,n=e*i,r=0;return n<1&&(r=(i-n)/(1-n)),[t[0],100*n,100*r]},r.hcg.rgb=function(t){var e=t[0]/360,i=t[1]/100,n=t[2]/100;if(0===i)return[255*n,255*n,255*n];var r,o=[0,0,0],s=e%1*6,a=s%1,l=1-a;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return r=(1-i)*n,[255*(i*o[0]+r),255*(i*o[1]+r),255*(i*o[2]+r)]},r.hcg.hsv=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e),n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},r.hcg.hsl=function(t){var e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},r.hcg.hwb=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},r.hwb.hcg=function(t){var e=t[1]/100,i=1-t[2]/100,n=i-e,r=0;return n<1&&(r=(i-n)/(1-n)),[t[0],100*n,100*r]},r.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},r.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},r.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},r.gray.hsl=r.gray.hsv=function(t){return[0,0,t[0]]},r.gray.hwb=function(t){return[0,100,t[0]]},r.gray.cmyk=function(t){return[0,0,0,t[0]]},r.gray.lab=function(t){return[t[0],0,0]},r.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},r.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(e={exports:{}},e.exports),e.exports);n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function r(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,r=0;r1&&(e=Array.prototype.slice.call(arguments));var i=t(e);if("object"==typeof i)for(var n=i.length,r=0;r1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)})});var l=a,u={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],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],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],rebeccapurple:[102,51,153],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]},c={getRgba:h,getHsla:d,getRgb:function(t){var e=h(t);return e&&e.slice(0,3)},getHsl:function(t){var e=d(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=h(t);if(e)return e[3];if(e=d(t))return e[3];if(e=f(t))return e[3]},hexString:function(t,e){var e=void 0!==e&&3===t.length?e:t[3];return"#"+y(t[0])+y(t[1])+y(t[2])+(e>=0&&e<1?y(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:p,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+r+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return m(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function h(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(n){r=(n=n[1])[3];for(var o=0;oi?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,r=2*n-1,o=this.alpha()-i.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,a=1-s;return this.rgb(s*this.red()+a*i.red(),s*this.green()+a*i.green(),s*this.blue()+a*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new x,n=this.values,r=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?r[o]=t.slice(0):"[object Number]"===e?r[o]=t:console.error("unexpected color value:",t));return i}},x.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},x.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},x.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n=0;r--)e.call(i,t[r],r);else for(r=0;r=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},A={effects:S};T.easingEffects=S;var M=Math.PI,E=M/180,I=2*M,O=M/2,P=M/4,F=2*M/3,$={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,r,o){if(o){var s=Math.min(o,r/2,n/2),a=e+s,l=i+s,u=e+n-s,c=i+r-s;t.moveTo(e,l),ae.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,r=this.animations,o=0;o=i?(U.callback(t.onAnimationComplete,[t],e),e.animating=!1,r.splice(o,1)):++o}},tt=U.options.resolve,et=["push","pop","shift","splice","unshift"];function it(t,e){var i=t._chartjs;if(i){var n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(et.forEach(function(e){delete t[e]}),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};U.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements(),i._type=i.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,i=e.scales,n=this.getDataset(),r=e.options.scales;null!==t.xAxisID&&t.xAxisID in i&&!n.xAxisID||(t.xAxisID=n.xAxisID||r.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in i&&!n.yAxisID||(t.yAxisID=n.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&it(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],r=i.data;for(t=0,e=n.length;ti&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;ir?(o=r/e.innerRadius,t.arc(s,a,e.innerRadius-r,n+o,i-o,!0)):t.arc(s,a,r,n+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip()}function at(t,e,i){var n="inner"===e.borderAlign;n?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),i.fullCircles&&function(t,e,i,n){var r,o=i.endAngle;for(n&&(i.endAngle=i.startAngle+ot,st(t,i),i.endAngle=o,i.endAngle===i.startAngle&&i.fullCircles&&(i.endAngle+=ot,i.fullCircles--)),t.beginPath(),t.arc(i.x,i.y,i.innerRadius,i.startAngle+ot,i.startAngle,!0),r=0;ra;)r-=ot;for(;r=s&&r<=a,u=o>=i.innerRadius&&o<=i.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n="inner"===i.borderAlign?.33:0,r={x:i.x,y:i.y,innerRadius:i.innerRadius,outerRadius:Math.max(i.outerRadius-n,0),pixelMargin:n,startAngle:i.startAngle,endAngle:i.endAngle,fullCircles:Math.floor(i.circumference/ot)};if(e.save(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+ot,e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),t=0;tt.x&&(e=bt(e,"left","right")):t.basei?i:n,r:l.right||r<0?0:r>e?e:r,b:l.bottom||o<0?0:o>i?i:o,l:l.left||s<0?0:s>e?e:s}}function xt(t,e,i){var n=null===e,r=null===i,o=!(!t||n&&r)&&yt(t);return o&&(n||e>=o.left&&e<=o.right)&&(r||i>=o.top&&i<=o.bottom)}R._set("global",{elements:{rectangle:{backgroundColor:mt,borderColor:mt,borderSkipped:"bottom",borderWidth:0}}});var wt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=yt(t),i=e.right-e.left,n=e.bottom-e.top,r=_t(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b}}}(e),n=i.outer,r=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===r.w&&n.h===r.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(r.x,r.y,r.w,r.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return vt(i)?xt(i,t,null):xt(i,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return vt(i)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return vt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Ct={},kt=lt,Dt=ht,Tt=gt,St=wt;Ct.Arc=kt,Ct.Line=Dt,Ct.Point=Tt,Ct.Rectangle=St;var At=U._deprecated,Mt=U.valueOrDefault;function Et(t,e,i){var n,r,o=i.barThickness,s=e.stackCount,a=e.pixels[t],l=U.isNullOrUndef(o)?function(t,e){var i,n,r,o,s=t._length;for(r=1,o=e.length;r0?Math.min(s,Math.abs(n-i)):s,i=n;return s}(e.scale,e.pixels):-1;return U.isNullOrUndef(o)?(n=l*i.categoryPercentage,r=i.barPercentage):(n=o*s,r=1),{chunk:n/s,ratio:r,start:a-n/2}}R._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),R._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var It=rt.extend({dataElementType:Ct.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,i=this;rt.prototype.initialize.apply(i,arguments),(t=i.getMeta()).stack=i.getDataset().stack,t.bar=!0,e=i._getIndexScale().options,At("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),At("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),At("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),At("bar chart",i._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),At("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e=0&&g.min>=0?g.min:g.max,_=void 0===g.start?g.end:g.max>=0&&g.min>=0?g.max-g.min:g.min-g.max,x=p.length;if(v||void 0===v&&void 0!==y)for(n=0;n=0&&u.max>=0?u.max:u.min,(g.min<0&&o<0||g.max>=0&&o>0)&&(b+=o));return s=h.getPixelForValue(b),l=(a=h.getPixelForValue(b+_))-s,void 0!==m&&Math.abs(l)=0&&!d||_<0&&d?s-m:s+m),{size:l,base:s,head:a,center:a+l/2}},calculateBarIndexPixels:function(t,e,i,n){var r="flex"===n.barThickness?function(t,e,i){var n,r=e.pixels,o=r[t],s=t>0?r[t-1]:null,a=t=Nt?-Lt:y<-Nt?Lt:0)+m,_=Math.cos(y),x=Math.sin(y),w=Math.cos(b),C=Math.sin(b),k=y<=0&&b>=0||b>=Lt,D=y<=Rt&&b>=Rt||b>=Lt+Rt,T=y<=-Rt&&b>=-Rt||b>=Nt+Rt,S=y===-Nt||b>=Nt?-1:Math.min(_,_*g,w,w*g),A=T?-1:Math.min(x,x*g,C,C*g),M=k?1:Math.max(_,_*g,w,w*g),E=D?1:Math.max(x,x*g,C,C*g);u=(M-S)/2,c=(E-A)/2,h=-(M+S)/2,d=-(E+A)/2}for(n=0,r=p.length;n0&&!isNaN(t)?Lt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,r,o,s,a,l,u=0,c=this.chart;if(!t)for(e=0,i=c.data.datasets.length;e(u=a>u?a:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,i=t._options,n=U.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=$t(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=$t(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=$t(i.hoverBorderWidth,i.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,i=0;i0&&Ut(l[t-1]._model,a)&&(i.controlPointPreviousX=u(i.controlPointPreviousX,a.left,a.right),i.controlPointPreviousY=u(i.controlPointPreviousY,a.top,a.bottom)),t0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return ne(t,e,{intersect:!1})},point:function(t,e){return te(t,Qt(e,t))},nearest:function(t,e,i){var n=Qt(e,t);i.axis=i.axis||"xy";var r=ie(i.axis);return ee(t,n,i.intersect,r)},x:function(t,e,i){var n=Qt(e,t),r=[],o=!1;return Jt(t,function(t){t.inXRange(n.x)&&r.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(r=[]),r},y:function(t,e,i){var n=Qt(e,t),r=[],o=!1;return Jt(t,function(t){t.inYRange(n.y)&&r.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(r=[]),r}}},oe=U.extend;function se(t,e){return U.where(t,function(t){return t.pos===e})}function ae(t,e){return t.sort(function(t,i){var n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function le(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function ue(t,e,i){var n,r,o=i.box,s=t.maxPadding;if(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?o.height:o.width,t[i.pos]+=i.size,o.getPadding){var a=o.getPadding();s.top=Math.max(s.top,a.top),s.left=Math.max(s.left,a.left),s.bottom=Math.max(s.bottom,a.bottom),s.right=Math.max(s.right,a.right)}if(n=e.outerWidth-le(s,t,"left","right"),r=e.outerHeight-le(s,t,"top","bottom"),n!==t.w||r!==t.h){t.w=n,t.h=r;var l=i.horizontal?[n,t.w]:[r,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ce(t,e){var i=e.maxPadding;function n(t){var n={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){n[t]=Math.max(e[t],i[t])}),n}return n(t?["left","right"]:["top","bottom"])}function he(t,e,i){var n,r,o,s,a,l,u=[];for(n=0,r=t.length;n div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",ye="chartjs-render-monitor",be="chartjs-render-animation",_e=["animationstart","webkitAnimationStart"],xe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function we(t,e){var i=U.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var Ce=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function ke(t,e,i){t.addEventListener(e,i,Ce)}function De(t,e,i){t.removeEventListener(e,i,Ce)}function Te(t,e,i,n,r){return{type:t,chart:e,native:r||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Se(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,i){var n,r,o,s,a=t[me]||(t[me]={}),l=a.resizer=function(t){var e=Se(ve),i=Se(ve+"-expand"),n=Se(ve+"-shrink");i.appendChild(Se()),n.appendChild(Se()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var r=function(){e._reset(),t()};return ke(i,"scroll",r.bind(i,"expand")),ke(n,"scroll",r.bind(n,"shrink")),e}((n=function(){if(a.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,r=n?n.clientWidth:0;e(Te("resize",i)),n&&n.clientWidth0){var o=t[0];o.label?i=o.label:o.xLabel?i=o.xLabel:r>0&&o.index-1?t.split("\n"):t}function He(t){var e=R.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:$e(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:$e(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:$e(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:$e(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:$e(t.titleFontStyle,e.defaultFontStyle),titleFontSize:$e(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:$e(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:$e(t.footerFontStyle,e.defaultFontStyle),footerFontSize:$e(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function ze(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function We(t){return Re([],je(t))}var Ue=G.extend({initialize:function(){this._model=He(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),r=[];return r=Re(r,je(e)),r=Re(r,je(i)),r=Re(r,je(n))},getBeforeBody:function(){return We(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,r=[];return U.each(t,function(t){var o={before:[],lines:[],after:[]};Re(o.before,je(n.beforeLabel.call(i,t,e))),Re(o.lines,n.label.call(i,t,e)),Re(o.after,je(n.afterLabel.call(i,t,e))),r.push(o)}),r},getAfterBody:function(){return We(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),r=[];return r=Re(r,je(e)),r=Re(r,je(i)),r=Re(r,je(n))},update:function(t){var e,i,n,r,o,s,a,l,u,c,h=this,d=h._options,f=h._model,p=h._model=He(d),g=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},y={x:f.x,y:f.y},b={width:f.width,height:f.height},_={x:f.caretX,y:f.caretY};if(g.length){p.opacity=1;var x=[],w=[];_=Le[d.position].call(h,g,h._eventPosition);var C=[];for(e=0,i=g.length;en.width&&(r=n.width-e.width),r<0&&(r=0)),"top"===c?o+=h:o-="bottom"===c?e.height+h:e.height/2,"center"===c?"left"===u?r+=h:"right"===u&&(r-=h):"left"===u?r-=d:"right"===u&&(r+=d),{x:r,y:o}}(p,b,v=function(t,e){var i,n,r,o,s,a=t._model,l=t._chart,u=t._chart.chartArea,c="center",h="center";a.yl.height-e.height&&(h="bottom");var d=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(i=function(t){return t<=d},n=function(t){return t>d}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+a.caretSize+a.caretPadding>l.width},o=function(t){return t-e.width-a.caretSize-a.caretPadding<0},s=function(t){return t<=f?"top":"bottom"},i(a.x)?(c="left",r(a.x)&&(c="center",h=s(a.y))):n(a.x)&&(c="right",o(a.x)&&(c="center",h=s(a.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:h}}(this,b),h._chart)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=y.x,p.y=y.y,p.width=b.width,p.height=b.height,p.caretX=_.x,p.caretY=_.y,h._model=p,t&&d.custom&&d.custom.call(h,p),h},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,r=this.getCaretPosition(t,e,n);i.lineTo(r.x1,r.y1),i.lineTo(r.x2,r.y2),i.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,i){var n,r,o,s,a,l,u=i.caretSize,c=i.cornerRadius,h=i.xAlign,d=i.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===d)a=p+m/2,"left"===h?(r=(n=f)-u,o=n,s=a+u,l=a-u):(r=(n=f+g)+u,o=n,s=a-u,l=a+u);else if("left"===h?(n=(r=f+c+u)-u,o=r+u):"right"===h?(n=(r=f+g-c-u)-u,o=r+u):(n=(r=i.caretX)-u,o=r+u),"top"===d)a=(s=p)-u,l=s;else{a=(s=p+m)+u,l=s;var v=o;o=n,n=v}return{x1:n,x2:r,x3:o,y1:s,y2:a,y3:l}},drawTitle:function(t,e,i){var n,r,o,s=e.title,a=s.length;if(a){var l=Ne(e.rtl,e.x,e.width);for(t.x=ze(e,e._titleAlign),i.textAlign=l.textAlign(e._titleAlign),i.textBaseline="middle",n=e.titleFontSize,r=e.titleSpacing,i.fillStyle=e.titleFontColor,i.font=U.fontString(n,e._titleFontStyle,e._titleFontFamily),o=0;o0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(n,e,t,i),n.y+=e.yPadding,U.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),U.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:(i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&i._active.reverse()),(e=!U.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),Be=Le,qe=Ue;qe.positioners=Be;var Ve=U.valueOrDefault;function Ye(){return U.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var r,o,s,a=i[t].length;for(e[t]||(e[t]=[]),r=0;r=e[t].length&&e[t].push({}),!e[t][r].type||s.type&&s.type!==e[t][r].type?U.merge(e[t][r],[Fe.getScaleDefaults(o),s]):U.merge(e[t][r],s)}else U._merger(t,e,i,n)}})}function Xe(){return U.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){var r=e[t]||Object.create(null),o=i[t];"scales"===t?e[t]=Ye(r,o):"scale"===t?e[t]=U.merge(r,[Fe.getScaleDefaults(o.type),o]):U._merger(t,e,i,n)}})}function Ke(t,e,i){var n,r=function(t){return t.id===n};do{n=e+i++}while(U.findIndex(t,r)>=0);return n}function Ge(t){return"top"===t||"bottom"===t}function Ze(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}R._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qe=function(t,e){return this.construct(t,e),this};U.extend(Qe.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(R.global,R[t.type],t.options||{}),t}(e);var n=Oe.acquireContext(t,e),r=n&&n.canvas,o=r&&r.height,s=r&&r.width;i.id=U.uid(),i.ctx=n,i.canvas=r,i.config=e,i.width=s,i.height=o,i.aspectRatio=o?s/o:null,i.options=e.options,i._bufferedRender=!1,i._layers=[],i.chart=i,i.controller=i,Qe.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&r?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Pe.notify(t,"beforeInit"),U.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Pe.notify(t,"afterInit"),t},clear:function(){return U.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,r=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(U.getMaximumWidth(n))),s=Math.max(0,Math.floor(r?o/r:U.getMaximumHeight(n)));if((e.width!==o||e.height!==s)&&(n.width=e.width=o,n.height=e.height=s,n.style.width=o+"px",n.style.height=s+"px",U.retinaScale(e,i.devicePixelRatio),!t)){var a={width:o,height:s};Pe.notify(e,"resize",[a]),i.onResize&&i.onResize(e,a),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;U.each(e.xAxes,function(t,i){t.id||(t.id=Ke(e.xAxes,"x-axis-",i))}),U.each(e.yAxes,function(t,i){t.id||(t.id=Ke(e.yAxes,"y-axis-",i))}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],r=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),U.each(n,function(e){var n=e.options,o=n.id,s=Ve(n.type,e.dtype);Ge(n.position)!==Ge(e.dposition)&&(n.position=e.dposition),r[o]=!0;var a=null;if(o in i&&i[o].type===s)(a=i[o]).options=n,a.ctx=t.ctx,a.chart=t;else{var l=Fe.getScaleConstructor(s);if(!l)return;a=new l({id:o,type:s,options:n,ctx:t.ctx,chart:t}),i[a.id]=a}a.mergeTicksOptions(),e.isDefault&&(t.scale=a)}),U.each(r,function(t,e){t||delete i[e]}),t.scales=i,Fe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,i=this,n=[],r=i.data.datasets;for(t=0,e=r.length;t=0;--i)this.drawDataset(e[i],t);Pe.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i={meta:t,index:t.index,easingValue:e};!1!==Pe.notify(this,"beforeDatasetDraw",[i])&&(t.controller.draw(e),Pe.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==Pe.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),Pe.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return re.modes.single(this,t)},getElementsAtEvent:function(t){return re.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return re.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=re.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return re.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var r=U.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var s=U.log10(Math.abs(t)),a=Math.floor(s)-Math.floor(r);a=Math.max(Math.min(a,20),0),o=t.toExponential(a)}else{var l=-1*Math.floor(r);l=Math.max(Math.min(l,20),0),o=t.toFixed(l)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(U.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},ri=U.isArray,oi=U.isNullOrUndef,si=U.valueOrDefault,ai=U.valueAtIndexOrDefault;function li(t,e,i){var n,r=t.getTicks().length,o=Math.min(e,r-1),s=t.getPixelForTick(o),a=t._startPixel,l=t._endPixel;if(!(i&&(n=1===r?Math.max(s-a,l-s):0===e?(t.getPixelForTick(1)-s)/2:(s-t.getPixelForTick(o-1))/2,(s+=ol+1e-6)))return s}function ui(t,e,i,n){var r,o,s,a,l,u,c,h,d,f,p,g,m,v=i.length,y=[],b=[],_=[],x=0,w=0;for(r=0;re){for(i=0;i=d||c<=1||!a.isHorizontal()?a.labelRotation=h:(e=(t=a._getLabelSizes()).widest.width,i=t.highest.height-t.highest.offset,n=Math.min(a.maxWidth,a.chart.width-e),e+6>(r=l.offset?a.maxWidth/c:n/(c-1))&&(r=n/(c-(l.offset?.5:1)),o=a.maxHeight-ci(l.gridLines)-u.padding-hi(l.scaleLabel),s=Math.sqrt(e*e+i*i),f=U.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/r,1)),Math.asin(Math.min(o/s,1))-Math.asin(i/s))),f=Math.max(h,Math.min(d,f))),a.labelRotation=f)},afterCalculateTickRotation:function(){U.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){U.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=t.chart,n=t.options,r=n.ticks,o=n.scaleLabel,s=n.gridLines,a=t._isVisible(),l="bottom"===n.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:a&&(e.width=ci(s)+hi(o)),u?a&&(e.height=ci(s)+hi(o)):e.height=t.maxHeight,r.display&&a){var c=fi(r),h=t._getLabelSizes(),d=h.first,f=h.last,p=h.widest,g=h.highest,m=.4*c.minor.lineHeight,v=r.padding;if(u){var y=0!==t.labelRotation,b=U.toRadians(t.labelRotation),_=Math.cos(b),x=Math.sin(b),w=x*p.width+_*(g.height-(y?g.offset:0))+(y?0:m);e.height=Math.min(t.maxHeight,e.height+w+v);var C,k,D=t.getPixelForTick(0)-t.left,T=t.right-t.getPixelForTick(t.getTicks().length-1);y?(C=l?_*d.width+x*d.offset:x*(d.height-d.offset),k=l?x*(f.height-f.offset):_*f.width+x*f.offset):(C=d.width/2,k=f.width/2),t.paddingLeft=Math.max((C-D)*t.width/(t.width-D),0)+3,t.paddingRight=Math.max((k-T)*t.width/(t.width-T),0)+3}else{var S=r.mirror?0:p.width+v+m;e.width=Math.min(t.maxWidth,e.width+S),t.paddingTop=d.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=i.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){U.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(oi(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,i,n,r=this;for(r.ticks=t.map(function(t){return t.value}),r.beforeTickToLabelConversion(),e=r.convertTicksToLabels(t)||r.ticks,r.afterTickToLabelConversion(),i=0,n=t.length;ii-1?null:this.getPixelForDecimal(t*n+(e?n/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n,r,o=this.options.ticks,s=this._length,a=o.maxTicksLimit||s/this._tickSize()+1,l=o.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;ea)return function(t,e,i){var n,r,o=0,s=e[0];for(i=Math.ceil(i),n=0;nu)return o;return Math.max(u,1)}(l,t,0,a),u>0){for(e=0,i=u-1;e1?(h-c)/(u-1):null,gi(t,n,U.isNullOrUndef(r)?0:c-r,c),gi(t,n,h,U.isNullOrUndef(r)?t.length:h+r),pi(t)}return gi(t,n),pi(t)},_tickSize:function(){var t=this.options.ticks,e=U.toRadians(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,s=r?r.widest.width+o:0,a=r?r.highest.height+o:0;return this.isHorizontal()?a*i>s*n?s/i:a/n:a*n=0&&(s=t),void 0!==o&&(t=i.indexOf(o))>=0&&(a=t),e.minIndex=s,e.maxIndex=a,e.min=i[s],e.max=i[a]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,i=this.maxIndex;this.ticks=0===e&&i===t.length-1?t:t.slice(e,i+1)},getLabelForIndex:function(t,e){var i=this.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(i.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,i=t.ticks;vi.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),i&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(i.length-(e?0:1),1))},getPixelForValue:function(t,e,i){var n,r,o,s=this;return yi(e)||yi(i)||(t=s.chart.data.datasets[i].data[e]),yi(t)||(n=s.isHorizontal()?t.x:t.y),(void 0!==n||void 0!==t&&isNaN(e))&&(r=s._getLabels(),t=U.valueOrDefault(n,t),e=-1!==(o=r.indexOf(t))?o:e,isNaN(e)&&(e=t)),s.getPixelForDecimal((e-s._startValue)/s._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),_i={position:"bottom"};bi._defaults=_i;var xi=U.noop,wi=U.isNullOrUndef;var Ci=vi.extend({getRightValue:function(t){return"string"==typeof t?+t:vi.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=U.sign(t.min),n=U.sign(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),r!==o&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:xi,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:U.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var i,n,r,o,s=[],a=t.stepSize,l=a||1,u=t.maxTicks-1,c=t.min,h=t.max,d=t.precision,f=e.min,p=e.max,g=U.niceNum((p-f)/u/l)*l;if(g<1e-14&&wi(c)&&wi(h))return[f,p];(o=Math.ceil(p/g)-Math.floor(f/g))>u&&(g=U.niceNum(o*g/u/l)*l),a||wi(d)?i=Math.pow(10,U._decimalPlaces(g)):(i=Math.pow(10,d),g=Math.ceil(g*i)/i),n=Math.floor(f/g)*g,r=Math.ceil(p/g)*g,a&&(!wi(c)&&U.almostWhole(c/g,g/1e3)&&(n=c),!wi(h)&&U.almostWhole(h/g,g/1e3)&&(r=h)),o=(r-n)/g,o=U.almostEquals(o,Math.round(o),g/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,r=Math.round(r*i)/i,s.push(wi(c)?n:c);for(var m=1;me.length-1?null:this.getPixelForValue(e[t])}}),Ai=ki;Si._defaults=Ai;var Mi=U.valueOrDefault,Ei=U.math.log10;var Ii={position:"left",ticks:{callback:ni.formatters.logarithmic}};function Oi(t,e){return U.isFinite(t)&&t>=0?t:e}var Pi=vi.extend({determineDataLimits:function(){var t,e,i,n,r,o,s=this,a=s.options,l=s.chart,u=l.data.datasets,c=s.isHorizontal();function h(t){return c?t.xAxisID===s.id:t.yAxisID===s.id}s.min=Number.POSITIVE_INFINITY,s.max=Number.NEGATIVE_INFINITY,s.minNotZero=Number.POSITIVE_INFINITY;var d=a.stacked;if(void 0===d)for(t=0;t0){var e=U.min(t),i=U.max(t);s.min=Math.min(s.min,e),s.max=Math.max(s.max,i)}})}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Ei(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:Oi(e.min),max:Oi(e.max)},r=t.ticks=function(t,e){var i,n,r=[],o=Mi(t.min,Math.pow(10,Math.floor(Ei(e.min)))),s=Math.floor(Ei(e.max)),a=Math.ceil(e.max/Math.pow(10,s));0===o?(i=Math.floor(Ei(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),r.push(o),o=n*Math.pow(10,i)):(i=Math.floor(Ei(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{r.push(o),10==++n&&(n=1,l=++i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(ie.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Ei(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,i=0;vi.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),i=Mi(t.options.ticks.fontSize,R.global.defaultFontSize)/t._length),t._startValue=Ei(e),t._valueOffset=i,t._valueRange=(Ei(t.max)-Ei(e))/(1-i)},getPixelForValue:function(t){var e=this,i=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(i=(Ei(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(i)},getValueForPixel:function(t){var e=this,i=e.getDecimalForPixel(t);return 0===i&&0===e.min?0:Math.pow(10,e._startValue+(i-e._valueOffset)*e._valueRange)}}),Fi=Ii;Pi._defaults=Fi;var $i=U.valueOrDefault,Ni=U.valueAtIndexOrDefault,Li=U.options.resolve,Ri={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:ni.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function ji(t){var e=t.ticks;return e.display&&t.display?$i(e.fontSize,R.global.defaultFontSize)+2*e.backdropPaddingY:0}function Hi(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:tr?{start:e-i,end:e}:{start:e,end:e+i}}function zi(t){return 0===t||180===t?"center":t<180?"left":"right"}function Wi(t,e,i,n){var r,o,s=i.y+n/2;if(U.isArray(e))for(r=0,o=e.length;r270||t<90)&&(i.y-=e.h)}function Bi(t){return U.isNumber(t)?t:0}var qi=Ci.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=ji(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;U.each(e.data.datasets,function(r,o){if(e.isDatasetVisible(o)){var s=e.getDatasetMeta(o);U.each(r.data,function(e,r){var o=+t.getRightValue(e);isNaN(o)||s.data[r].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/ji(this.options))},convertTicksToLabels:function(){var t=this;Ci.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=U.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,r=U.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},s={};t.ctx.font=r.string,t._pointLabelSizes=[];var a,l,u,c=t.chart.data.labels.length;for(e=0;eo.r&&(o.r=f.end,s.r=h),p.starto.b&&(o.b=p.end,s.b=h)}t.setReductions(t.drawingArea,o,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,r=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),s=-e.t/Math.cos(i.t),a=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);r=Bi(r),o=Bi(o),s=Bi(s),a=Bi(a),n.drawingArea=Math.min(Math.floor(t-(r+o)/2),Math.floor(t-(s+a)/2)),n.setCenterPoint(r,o,s,a)},setCenterPoint:function(t,e,i,n){var r=this,o=r.width-e-r.drawingArea,s=t+r.drawingArea,a=i+r.drawingArea,l=r.height-r.paddingTop-n-r.drawingArea;r.xCenter=Math.floor((s+o)/2+r.left),r.yCenter=Math.floor((a+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,i=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(U.isNullOrUndef(t))return NaN;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,i=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},_drawGrid:function(){var t,e,i,n=this,r=n.ctx,o=n.options,s=o.gridLines,a=o.angleLines,l=$i(a.lineWidth,s.lineWidth),u=$i(a.color,s.color);if(o.pointLabels.display&&function(t){var e=t.ctx,i=t.options,n=i.pointLabels,r=ji(i),o=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),s=U.options._parseFont(n);e.save(),e.font=s.string,e.textBaseline="middle";for(var a=t.chart.data.labels.length-1;a>=0;a--){var l=0===a?r/2:0,u=t.getPointPosition(a,o+l+5),c=Ni(n.fontColor,a,R.global.defaultFontColor);e.fillStyle=c;var h=t.getIndexAngle(a),d=U.toDegrees(h);e.textAlign=zi(d),Ui(d,t._pointLabelSizes[a],u),Wi(e,t.pointLabels[a],u,s.lineHeight)}e.restore()}(n),s.display&&U.each(n.ticks,function(t,i){0!==i&&(e=n.getDistanceFromCenterForValue(n.ticksAsNumbers[i]),function(t,e,i,n){var r,o=t.ctx,s=e.circular,a=t.chart.data.labels.length,l=Ni(e.color,n-1),u=Ni(e.lineWidth,n-1);if((s||a)&&l&&u){if(o.save(),o.strokeStyle=l,o.lineWidth=u,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),s)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{r=t.getPointPosition(0,i),o.moveTo(r.x,r.y);for(var c=1;c=0;t--)e=n.getDistanceFromCenterForValue(o.ticks.reverse?n.min:n.max),i=n.getPointPosition(t,e),r.beginPath(),r.moveTo(n.xCenter,n.yCenter),r.lineTo(i.x,i.y),r.stroke();r.restore()}},_drawLabels:function(){var t=this,e=t.ctx,i=t.options.ticks;if(i.display){var n,r,o=t.getIndexAngle(0),s=U.options._parseFont(i),a=$i(i.fontColor,R.global.defaultFontColor);e.save(),e.font=s.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",U.each(t.ticks,function(o,l){(0!==l||i.reverse)&&(n=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),i.showLabelBackdrop&&(r=e.measureText(o).width,e.fillStyle=i.backdropColor,e.fillRect(-r/2-i.backdropPaddingX,-n-s.size/2-i.backdropPaddingY,r+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)),e.fillStyle=a,e.fillText(o,0,-n))}),e.restore()}},_drawTitle:U.noop}),Vi=Ri;qi._defaults=Vi;var Yi=U._deprecated,Xi=U.options.resolve,Ki=U.valueOrDefault,Gi=Number.MIN_SAFE_INTEGER||-9007199254740991,Zi=Number.MAX_SAFE_INTEGER||9007199254740991,Qi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ji=Object.keys(Qi);function tn(t,e){return t-e}function en(t){return U.valueOrDefault(t.time.min,t.ticks.min)}function nn(t){return U.valueOrDefault(t.time.max,t.ticks.max)}function rn(t,e,i,n){var r=function(t,e,i){for(var n,r,o,s=0,a=t.length-1;s>=0&&s<=a;){if(r=t[(n=s+a>>1)-1]||null,o=t[n],!r)return{lo:null,hi:o};if(o[e]i))return{lo:r,hi:o};a=n-1}}return{lo:o,hi:null}}(t,e,i),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],s=r.lo?r.hi?r.hi:t[t.length-1]:t[1],a=s[e]-o[e],l=a?(i-o[e])/a:0,u=(s[n]-o[n])*l;return o[n]+u}function on(t,e){var i=t._adapter,n=t.options.time,r=n.parser,o=r||n.format,s=e;return"function"==typeof r&&(s=r(s)),U.isFinite(s)||(s="string"==typeof o?i.parse(s,o):i.parse(s)),null!==s?+s:(r||"function"!=typeof o||(s=o(e),U.isFinite(s)||(s=i.parse(s))),s)}function sn(t,e){if(U.isNullOrUndef(e))return null;var i=t.options.time,n=on(t,t.getRightValue(e));return null===n?n:(i.round&&(n=+t._adapter.startOf(n,i.round)),n)}function an(t,e,i,n){var r,o,s,a=Ji.length;for(r=Ji.indexOf(t);r=0&&(e[o].major=!0);return e}(t,o,s,i):o}var un=vi.extend({initialize:function(){this.mergeTicksOptions(),vi.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),i=this._adapter=new ii._date(t.adapters.date);return Yi("time scale",e.format,"time.format","time.parser"),Yi("time scale",e.min,"time.min","ticks.min"),Yi("time scale",e.max,"time.max","ticks.max"),U.mergeIf(e.displayFormats,i.formats()),vi.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),vi.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,r,o,s,a=this,l=a.chart,u=a._adapter,c=a.options,h=c.time.unit||"day",d=Zi,f=Gi,p=[],g=[],m=[],v=a._getLabels();for(t=0,i=v.length;t1?function(t){var e,i,n,r={},o=[];for(e=0,i=t.length;e1e5*u)throw e+" and "+i+" are too far apart with stepSize of "+u+" "+l;for(r=h;r=r&&i<=o&&c.push(i);return n.min=r,n.max=o,n._unit=l.unit||(a.autoSkip?an(l.minUnit,n.min,n.max,h):function(t,e,i,n,r){var o,s;for(o=Ji.length-1;o>=Ji.indexOf(i);o--)if(s=Ji[o],Qi[s].common&&t._adapter.diff(r,n,s)>=e-1)return s;return Ji[i?Ji.indexOf(i):0]}(n,c.length,l.minUnit,n.min,n.max)),n._majorUnit=a.major.enabled&&"year"!==n._unit?function(t){for(var e=Ji.indexOf(t)+1,i=Ji.length;ee&&a=0&&t0?a:1}}),cn={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};un._defaults=cn;var hn={category:bi,linear:Si,logarithmic:Pi,radialLinear:qi,time:un},dn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};ii._date.override("function"==typeof t?{_id:"moment",formats:function(){return dn},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t(e).diff(t(i),n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),R._set("global",{plugins:{filler:{propagate:!0}}});var fn={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),r=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=r.length||0;return o?function(t,e){return e=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function gn(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,i,n,r,o,s=t.el._scale,a=s.options,l=s.chart.data.labels.length,u=t.fill,c=[];if(!l)return null;for(e=a.ticks.reverse?s.max:s.min,i=a.ticks.reverse?s.min:s.max,n=s.getPointPositionForValue(0,e),r=0;r0;--o)U.canvas.lineTo(t,i[o],i[o-1],!0);else for(s=i[0].cx,a=i[0].cy,l=Math.sqrt(Math.pow(i[0].x-s,2)+Math.pow(i[0].y-a,2)),o=r-1;o>0;--o)t.arc(s,a,l,i[o].angle,i[o-1].angle,!0)}}function _n(t,e,i,n,r,o){var s,a,l,u,c,h,d,f,p=e.length,g=n.spanGaps,m=[],v=[],y=0,b=0;for(t.beginPath(),s=0,a=p;s=0;--i)(e=l[i].$filler)&&e.visible&&(r=(n=e.el)._view,o=n._children||[],s=e.mapper,a=r.backgroundColor||R.global.defaultColor,s&&a&&o.length&&(U.canvas.clipArea(u,t.chartArea),_n(u,o,s,r,a,n._loop),U.canvas.unclipArea(u)))}},wn=U.rtl.getRtlAdapter,Cn=U.noop,kn=U.valueOrDefault;function Dn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}R._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,i=t.options.legend||{},n=i.labels&&i.labels.usePointStyle;return t._getSortedDatasetMetas().map(function(i){var r=i.controller.getStyle(n?0:void 0);return{text:e[i.index].label,fillStyle:r.backgroundColor,hidden:!t.isDatasetVisible(i.index),lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:r.borderWidth,strokeStyle:r.borderColor,pointStyle:r.pointStyle,rotation:r.rotation,datasetIndex:i.index}},this)}}},legendCallback:function(t){var e,i,n,r=document.createElement("ul"),o=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,i=o.length;el.width)&&(h+=s+i.padding,c[c.length-(e>0?0:1)]=0),a[e]={left:0,top:0,width:n,height:s},c[c.length-1]+=n+i.padding}),l.height+=h}else{var d=i.padding,f=t.columnWidths=[],p=t.columnHeights=[],g=i.padding,m=0,v=0;U.each(t.legendItems,function(t,e){var n=Dn(i,s)+s/2+r.measureText(t.text).width;e>0&&v+s+2*d>l.height&&(g+=m+i.padding,f.push(m),p.push(v),m=0,v=0),m=Math.max(m,n),v+=s+d,a[e]={left:0,top:0,width:n,height:s}}),g+=m,f.push(m),p.push(v),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Cn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=R.global,r=n.defaultColor,o=n.elements.line,s=t.height,a=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var c,h=wn(e.rtl,t.left,t.minSize.width),d=t.ctx,f=kn(i.fontColor,n.defaultFontColor),p=U.options._parseFont(i),g=p.size;d.textAlign=h.textAlign("left"),d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=p.string;var m=Dn(i,g),v=t.legendHitBoxes,y=function(t,n){switch(e.align){case"start":return i.padding;case"end":return t-n;default:return(t-n+i.padding)/2}},b=t.isHorizontal();c=b?{x:t.left+y(l,u[0]),y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+y(s,a[0]),line:0},U.rtl.overrideTextDirection(t.ctx,e.textDirection);var _=g+i.padding;U.each(t.legendItems,function(e,n){var f=d.measureText(e.text).width,p=m+g/2+f,x=c.x,w=c.y;h.setWidth(t.minSize.width),b?n>0&&x+p+i.padding>t.left+t.minSize.width&&(w=c.y+=_,c.line++,x=c.x=t.left+y(l,u[c.line])):n>0&&w+_>t.top+t.minSize.height&&(x=c.x=x+t.columnWidths[c.line]+i.padding,c.line++,w=c.y=t.top+y(s,a[c.line]));var C=h.x(x);!function(t,e,n){if(!(isNaN(m)||m<=0)){d.save();var s=kn(n.lineWidth,o.borderWidth);if(d.fillStyle=kn(n.fillStyle,r),d.lineCap=kn(n.lineCap,o.borderCapStyle),d.lineDashOffset=kn(n.lineDashOffset,o.borderDashOffset),d.lineJoin=kn(n.lineJoin,o.borderJoinStyle),d.lineWidth=s,d.strokeStyle=kn(n.strokeStyle,r),d.setLineDash&&d.setLineDash(kn(n.lineDash,o.borderDash)),i&&i.usePointStyle){var a=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+g/2;U.canvas.drawPoint(d,n.pointStyle,a,l,u,n.rotation)}else d.fillRect(h.leftForLtr(t,m),e,m,g),0!==s&&d.strokeRect(h.leftForLtr(t,m),e,m,g);d.restore()}}(C,w,e),v[n].left=h.leftForLtr(C,v[n].width),v[n].top=w,function(t,e,i,n){var r=g/2,o=h.xPlus(t,m+r),s=e+r;d.fillText(i.text,o,s),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,s),d.lineTo(h.xPlus(o,n),s),d.stroke())}(C,w,e,f),b?c.x+=p+i.padding:c.y+=_}),U.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var i,n,r,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(r=o.legendHitBoxes,i=0;i=(n=r[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,r="mouseup"===t.type?"click":t.type;if("mousemove"===r){if(!n.onHover&&!n.onLeave)return}else{if("click"!==r)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===r?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function Sn(t,e){var i=new Tn({ctx:t.ctx,options:e,chart:t});pe.configure(t,i,e),pe.addBox(t,i),t.legend=i}var An={id:"legend",_element:Tn,beforeInit:function(t){var e=t.options.legend;e&&Sn(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(U.mergeIf(e,R.global.legend),i?(pe.configure(t,i,e),i.options=e):Sn(t,e)):i&&(pe.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},Mn=U.noop;R._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var En=G.extend({initialize:function(t){U.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Mn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:Mn,beforeSetDimensions:Mn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Mn,beforeBuildLabels:Mn,buildLabels:Mn,afterBuildLabels:Mn,beforeFit:Mn,fit:function(){var t,e=this,i=e.options,n=e.minSize={},r=e.isHorizontal();i.display?(t=(U.isArray(i.text)?i.text.length:1)*U.options._parseFont(i).lineHeight+2*i.padding,e.width=n.width=r?e.maxWidth:t,e.height=n.height=r?t:e.maxHeight):e.width=n.width=e.height=n.height=0},afterFit:Mn,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,r,o,s=U.options._parseFont(i),a=s.lineHeight,l=a/2+i.padding,u=0,c=t.top,h=t.left,d=t.bottom,f=t.right;e.fillStyle=U.valueOrDefault(i.fontColor,R.global.defaultFontColor),e.font=s.string,t.isHorizontal()?(r=h+(f-h)/2,o=c+l,n=f-h):(r="left"===i.position?h+l:f-l,o=c+(d-c)/2,n=d-c,u=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(r,o),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var p=i.text;if(U.isArray(p))for(var g=0,m=0;m=0;n--){var r=t[n];if(e(r))return r}},U.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},U.almostEquals=function(t,e,i){return Math.abs(t-e)=t},U.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},U.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},U.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},U.toRadians=function(t){return t*(Math.PI/180)},U.toDegrees=function(t){return t*(180/Math.PI)},U._decimalPlaces=function(t){if(U.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},U.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},U.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},U.aliasPixel=function(t){return t%2==0?0:.5},U._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,r=i/2;return Math.round((e-r)*n)/n+r},U.splineCurve=function(t,e,i,n){var r=t.skip?e:t,o=e,s=i.skip?e:i,a=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),u=a/(a+l),c=l/(a+l),h=n*(u=isNaN(u)?0:u),d=n*(c=isNaN(c)?0:c);return{previous:{x:o.x-h*(s.x-r.x),y:o.y-h*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}},U.EPSILON=Number.EPSILON||1e-14,U.splineCurveMonotone=function(t){var e,i,n,r,o,s,a,l,u,c=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=c.length;for(e=0;e0?c[e-1]:null,(r=e0?c[e-1]:null,r=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},U.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},U.niceNum=function(t,e){var i=Math.floor(U.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},U.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},U.getRelativePosition=function(t,e){var i,n,r=t.originalEvent||t,o=t.target||t.srcElement,s=o.getBoundingClientRect(),a=r.touches;a&&a.length>0?(i=a[0].clientX,n=a[0].clientY):(i=r.clientX,n=r.clientY);var l=parseFloat(U.getStyle(o,"padding-left")),u=parseFloat(U.getStyle(o,"padding-top")),c=parseFloat(U.getStyle(o,"padding-right")),h=parseFloat(U.getStyle(o,"padding-bottom")),d=s.right-s.left-l-c,f=s.bottom-s.top-u-h;return{x:i=Math.round((i-s.left-l)/d*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-s.top-u)/f*o.height/e.currentDevicePixelRatio)}},U.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},U.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},U._calculatePadding=function(t,e,i){return(e=U.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},U._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},U.getMaximumWidth=function(t){var e=U._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-U._calculatePadding(e,"padding-left",i)-U._calculatePadding(e,"padding-right",i),r=U.getConstraintWidth(t);return isNaN(r)?n:Math.min(n,r)},U.getMaximumHeight=function(t){var e=U._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-U._calculatePadding(e,"padding-top",i)-U._calculatePadding(e,"padding-bottom",i),r=U.getConstraintHeight(t);return isNaN(r)?n:Math.min(n,r)},U.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},U.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,r=t.height,o=t.width;n.height=r*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=r+"px",n.style.width=o+"px")}},U.fontString=function(t,e,i){return e+" "+t+"px "+i},U.longestText=function(t,e,i,n){var r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var s,a,l,u,c,h=0,d=i.length;for(s=0;si.length){for(s=0;sn&&(n=o),n},U.numberOfLabelLines=function(t){var e=1;return U.each(t,function(t){U.isArray(t)&&t.length>e&&(e=t.length)}),e},U.color=w?function(t){return t instanceof CanvasGradient&&(t=R.global.defaultColor),w(t)}:function(t){return console.error("Color.js not found!"),t},U.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:U.color(t).saturate(.5).darken(.1).rgbString()}}(),Je._adapters=ii,Je.Animation=Q,Je.animationService=J,Je.controllers=Zt,Je.DatasetController=rt,Je.defaults=R,Je.Element=G,Je.elements=Ct,Je.Interaction=re,Je.layouts=pe,Je.platform=Oe,Je.plugins=Pe,Je.Scale=vi,Je.scaleService=Fe,Je.Ticks=ni,Je.Tooltip=qe,Je.helpers.each(hn,function(t,e){Je.scaleService.registerScaleType(e,t,t._defaults)}),On)On.hasOwnProperty(Nn)&&Je.plugins.register(On[Nn]);Je.platform.initialize();var Ln=Je;return"undefined"!=typeof window&&(window.Chart=Je),Je.Chart=Je,Je.Legend=On.legend._element,Je.Title=On.title._element,Je.pluginService=Je.plugins,Je.PluginBase=Je.Element.extend({}),Je.canvasHelpers=Je.helpers.canvas,Je.layoutService=Je.layouts,Je.LinearScaleBase=Ci,Je.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){Je[t]=function(e,i){return new Je(e,Je.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Ln}),function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.SignaturePad=e()}):"object"==typeof exports?module.exports=e():t.SignaturePad=e()}(this,function(){return function(t){"use strict";var e=function(t,e){var i=this,n=e||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onEnd=n.onEnd,this.onBegin=n.onBegin,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(i._mouseButtonDown=!0,i._strokeBegin(t))},this._handleMouseMove=function(t){i._mouseButtonDown&&i._strokeUpdate(t)},this._handleMouseUp=function(t){1===t.which&&i._mouseButtonDown&&(i._mouseButtonDown=!1,i._strokeEnd(t))},this._handleTouchStart=function(t){if(1==t.targetTouches.length){var e=t.changedTouches[0];i._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];i._strokeUpdate(e)},this._handleTouchEnd=function(t){t.target===i._canvas&&(t.preventDefault(),i._strokeEnd(t))},this._handleMouseEvents(),this._handleTouchEvents()};e.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._reset()},e.prototype.toDataURL=function(t,e){var i=this._canvas;return i.toDataURL.apply(i,arguments)},e.prototype.fromDataURL=function(t){var e=this,i=new Image,n=window.devicePixelRatio||1,r=this._canvas.width/n,o=this._canvas.height/n;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,r,o)},this._isEmpty=!1},e.prototype._strokeUpdate=function(t){var e=this._createPoint(t);this._addPoint(e)},e.prototype._strokeBegin=function(t){this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},e.prototype._strokeDraw=function(t){var e=this._ctx,i="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,i),e.closePath(),e.fill()},e.prototype._strokeEnd=function(t){var e=this.points.length>2,i=this.points[0];!e&&i&&this._strokeDraw(i),"function"==typeof this.onEnd&&this.onEnd(t)},e.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),t.addEventListener("mouseup",this._handleMouseUp)},e.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},e.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},e.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),t.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._isEmpty=!0,this._ctx.fillStyle=this.penColor},e.prototype._createPoint=function(t){var e=this._canvas.getBoundingClientRect();return new i(t.clientX-e.left,t.clientY-e.top)},e.prototype._addPoint=function(t){var e,i,r,o=this.points;o.push(t),o.length>2&&(3===o.length&&o.unshift(o[0]),e=this._calculateCurveControlPoints(o[0],o[1],o[2]).c2,i=this._calculateCurveControlPoints(o[1],o[2],o[3]).c1,r=new n(o[1],e,i,o[2]),this._addCurve(r),o.shift())},e.prototype._calculateCurveControlPoints=function(t,e,n){var r=t.x-e.x,o=t.y-e.y,s=e.x-n.x,a=e.y-n.y,l=(t.x+e.x)/2,u=(t.y+e.y)/2,c=(e.x+n.x)/2,h=(e.y+n.y)/2,d=Math.sqrt(r*r+o*o),f=Math.sqrt(s*s+a*a),p=f/(d+f),g=c+(l-c)*p,m=h+(u-h)*p,v=e.x-g,y=e.y-m;return{c1:new i(l+v,u+y),c2:new i(c+v,h+y)}},e.prototype._addCurve=function(t){var e,i,n=t.startPoint;e=t.endPoint.velocityFrom(n),e=this.velocityFilterWeight*e+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(e),this._drawCurve(t,this._lastWidth,i),this._lastVelocity=e,this._lastWidth=i},e.prototype._drawPoint=function(t,e,i){var n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1},e.prototype._drawCurve=function(t,e,i){var n,r,o,s,a,l,u,c,h,d,f,p=this._ctx,g=i-e;for(n=Math.floor(t.length()),p.beginPath(),o=0;o0&&(s=i-r,a=n-o,l+=Math.sqrt(s*s+a*a)),r=i,o=n;return l},n.prototype._point=function(t,e,i,n,r){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+r*t*t*t},e}(document)}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){var e;!function(t,e,i){var n=function(){return!1},r=null,o={numHalted:0,haltValidation:function(e){this.numHalted++,t.formUtils.haltValidation=!0,e.unbind("submit",n).bind("submit",n).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(e){this.numHalted--,0===this.numHalted&&(t.formUtils.haltValidation=!1,e.unbind("submit",n).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};function s(t,e){this.$form=t,this.$input=e,this.reset(),e.on("change paste",this.reset.bind(this))}s.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=void 0},s.prototype.run=function(t,e){return"keyup"===t?null:this.isRunning?(r=t,this.haltedFormValidation||(o.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(r=t,o.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),e(function(t){this.done(t)}.bind(this)),null)},s.prototype.done=function(t){this.result=t,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(o.unHaltValidation(this.$form),"submit"===r?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},s.loadInstance=function(t,e,i){var n,r=e.get(0);return r.asyncValidators||(r.asyncValidators={}),r.asyncValidators[t]?n=r.asyncValidators[t]:(n=new s(i,e),r.asyncValidators[t]=n),n},t.formUtils=t.extend(t.formUtils||{},{asyncValidation:function(t,e,i){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),s.loadInstance(t,e,i)},addAsyncValidator:function(e){var i=t.extend({},e),n=i.validatorFunction;i.async=!0,i.validatorFunction=function(t,e,r,o,a,l){return s.loadInstance(this.name,e,a).run(l,function(s){n.apply(i,[s,t,e,r,o,a,l])})},this.addValidator(i)}}),t(e).bind("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),i.find("[data-validation]").each(function(){var e=t(this);e.valAttr("async",!1),t.each(t.split(e.attr("data-validation")),function(i,n){var r=t.formUtils.validators["validate_"+n];r&&r.async&&e.valAttr("async","yes")})})})}(t,window),function(t,e){"use strict";t.fn.validateForm=function(e,i){return t.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(e,i,!0)},t(window).on("formValidationPluginInit",function(e,i){!function(e){var i={se:"sv",cz:"cs",dk:"da"};if(e.lang in i){var n=i[e.lang];t.formUtils.warn('Deprecated use of lang code "'+e.lang+'" use "'+n+'" instead'),e.lang=n}}(i),function(e){e&&"custom"===e.errorMessagePosition&&"function"==typeof e.errorMessageCustom&&(t.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),e.submitErrorMessageCallback=function(t,i){e.errorMessageCustom(t,e.language.errorTitle,i,e)})}(i),function(e){if(e.errorMessagePosition&&"object"==typeof e.errorMessagePosition){t.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var i=e.errorMessagePosition;e.errorMessagePosition="top",e.submitErrorMessageCallback=function(){return i}}}(i)}).on("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),function(e){var i=e.find("[data-validation-if-checked]");i.length&&t.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"');i.on("beforeValidation",function(){var i=t(this),n=i.valAttr("if-checked"),r=t('input[name="'+n+'"]',e),o=r.is(":checked"),s=(t.formUtils.getValue(r)||"").toString(),a=i.valAttr("if-checked-value");(!o||a&&a!==s)&&i.valAttr("skipped",!0)})}(i)})}(t),function(t){"use strict";var e={resolveErrorMessage:function(t,e,i,n,r){var o=n.validationErrorMsgAttribute+"-"+i.replace("validate_",""),s=t.attr(o);return s||(s=t.attr(n.validationErrorMsgAttribute))||(s="function"!=typeof e.errorMessageKey?r[e.errorMessageKey]:r[e.errorMessageKey(n)])||(s=e.errorMessage),s},getParentContainer:function(e){if(e.valAttr("error-msg-container"))return t(e.valAttr("error-msg-container"));var i=e.parent();return"checkbox"===e.attr("type")&&e.closest(".checkbox").length?i=e.closest(".checkbox").parent():"radio"===e.attr("type")&&e.closest(".radio").length&&(i=e.closest(".radio").parent()),i.closest(".input-group").length&&(i=i.closest(".input-group").parent()),i},applyInputErrorStyling:function(t,e){t.addClass(e.errorElementClass).removeClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnError).removeClass(e.inputParentClassOnSuccess),""!==e.borderColorOnError&&t.css("border-color",e.borderColorOnError)},applyInputSuccessStyling:function(t,e){t.addClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(t,i){t.removeClass(i.successElementClass).removeClass(i.errorElementClass).css("border-color","");var n=e.getParentContainer(t);if(n.removeClass(i.inputParentClassOnError).removeClass(i.inputParentClassOnSuccess),"function"==typeof i.inlineErrorMessageCallback){var r=i.inlineErrorMessageCallback(t,!1,i);r&&r.html("")}else n.find("."+i.errorMessageClass).remove()},removeAllMessagesAndStyling:function(i,n){if("function"==typeof n.submitErrorMessageCallback){var r=n.submitErrorMessageCallback(i,!1,n);r&&r.html("")}else i.find("."+n.errorMessageClass+".alert").remove();i.find("."+n.errorElementClass+",."+n.successElementClass).each(function(){e.removeInputStylingAndMessage(t(this),n)})},setInlineMessage:function(e,i,n){this.applyInputErrorStyling(e,n);var r,o=document.getElementById(e.attr("name")+"_err_msg"),s=!1,a=function(n){t.formUtils.$win.trigger("validationErrorDisplay",[e,n]),n.html(i)},l=function(){var o=!1;s.find("."+n.errorMessageClass).each(function(){if(this.inputReferer===e[0])return o=t(this),!1}),o?i?a(o):o.remove():""!==i&&(r=t('
    '),a(r),r[0].inputReferer=e[0],s.prepend(r))};if(o)t.formUtils.warn("Using deprecated element reference "+o.id),s=t(o),l();else if("function"==typeof n.inlineErrorMessageCallback){if(!(s=n.inlineErrorMessageCallback(e,i,n)))return;l()}else{var u=this.getParentContainer(e);0===(r=u.find("."+n.errorMessageClass+".help-block")).length&&(r=t("").addClass("help-block").addClass(n.errorMessageClass)).appendTo(u),a(r)}},setMessageInTopOfForm:function(e,i,n,r){var o='
    {errorTitle}
      {fields}
    ',s=!1;if("function"!=typeof n.submitErrorMessageCallback||(s=n.submitErrorMessageCallback(e,i,n))){var a={errorTitle:r.errorTitle,fields:"",errorMessageClass:n.errorMessageClass};t.each(i,function(t,e){a.fields+="
  • "+e+"
  • "}),t.each(a,function(t,e){o=o.replace("{"+t+"}",e)}),s?s.html(o):e.children().eq(0).before(t(o))}}};t.formUtils=t.extend(t.formUtils||{},{dialogs:e})}(t),function(t,e,i){"use strict";var n=0;t.fn.validateOnBlur=function(e,i){var n=this,r=this.find("*[data-validation]");return r.each(function(){var r=t(this);if(r.is("[type=radio]")){var o=n.find('[type=radio][name="'+r.attr("name")+'"]');o.bind("blur.validation",function(){r.validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&o.bind("click.validation",function(){r.validateInputOnBlur(e,i,!0,"click")})}}),r.bind("blur.validation",function(){t(this).validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){t(this).validateInputOnBlur(e,i,!0,"click")}),this},t.fn.validateOnEvent=function(e,i){if(0!==this.length)return("FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this).each(function(){var n=t(this),r=n.valAttr("event");r&&n.unbind(r+".validation").bind(r+".validation",function(n){9!==(n||{}).keyCode&&t(this).validateInputOnBlur(e,i,!0,r)})}),this},t.fn.showHelpOnFocus=function(e){return e||(e="data-validation-help"),this.find("textarea,input").each(function(){var i=t(this),r="jquery_form_help_"+ ++n,o=i.attr(e);i.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),o&&i.addClass("has-help-txt").bind("focus.help",function(){var e=i.parent().find("."+r);0===e.length&&(e=t("").addClass(r).addClass("help").addClass("help-block").text(o).hide(),i.after(e)),e.fadeIn()}).bind("blur.help",function(){t(this).parent().find("."+r).fadeOut("slow")})}),this},t.fn.validate=function(e,i,n){var r=t.extend({},t.formUtils.LANG,n||{});this.each(function(){var n=t(this),o=(n.closest("form").get(0)||{}).validationConfig||t.formUtils.defaultConfig();n.one("validation",function(t,i){"function"==typeof e&&e(i,this,t)}),n.validateInputOnBlur(r,t.extend({},o,i||{}),!0)})},t.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!e.postponedValidation},t.fn.validateInputOnBlur=function(i,n,r,o){if(t.formUtils.eventType=o,this.willPostponeValidation()){var s=this,a=this.valAttr("postpone")||200;return e.postponedValidation=function(){s.validateInputOnBlur(i,n,r,o),e.postponedValidation=!1},setTimeout(function(){e.postponedValidation&&e.postponedValidation()},a),this}i=t.extend({},t.formUtils.LANG,i||{}),t.formUtils.dialogs.removeInputStylingAndMessage(this,n);var l=this,u=l.closest("form"),c=t.formUtils.validateInput(l,i,n,u,o),h=function(){l.validateInputOnBlur(i,n,!1,"blur.revalidated")};return"blur"===o&&l.unbind("validation.revalidate",h).one("validation.revalidate",h),r&&l.removeKeyUpValidation(),c.shouldChangeDisplay&&(c.isValid?t.formUtils.dialogs.applyInputSuccessStyling(l,n):t.formUtils.dialogs.setInlineMessage(l,c.errorMsg,n)),!c.isValid&&r&&l.validateOnKeyUp(i,n),this},t.fn.validateOnKeyUp=function(e,i){return this.each(function(){var n=t(this);n.valAttr("has-keyup-event")||n.valAttr("has-keyup-event","true").bind("keyup.validation",function(t){9!==t.keyCode&&n.validateInputOnBlur(e,i,!1,"keyup")})}),this},t.fn.removeKeyUpValidation=function(){return this.each(function(){t(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},t.fn.valAttr=function(t,e){return void 0===e?this.attr("data-validation-"+t):!1===e||null===e?this.removeAttr("data-validation-"+t):(t=t.length>0?"-"+t:"",this.attr("data-validation"+t,e))},t.fn.isValid=function(e,i,n){if(t.formUtils.isLoadingModules){var r=this;return setTimeout(function(){r.isValid(e,i,n)},200),null}i=t.extend({},t.formUtils.defaultConfig(),i||{}),e=t.extend({},t.formUtils.LANG,e||{}),n=!1!==n,t.formUtils.errorDisplayPreventedWhenHalted&&(delete t.formUtils.errorDisplayPreventedWhenHalted,n=!1);var o=function(e,r){t.inArray(e,a)<0&&a.push(e),l.push(r),r.valAttr("current-error",e),n&&t.formUtils.dialogs.applyInputErrorStyling(r,i)},s=[],a=[],l=[],u=this;if(n&&t.formUtils.dialogs.removeAllMessagesAndStyling(u,i),u.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var n,r,a=t(this),l=a.attr("type"),c="radio"===l||"checkbox"===l,h=a.attr("name");if(n=h,!("submit"===(r=l)||"button"===r||"reset"===r||t.inArray(n,i.ignore||[])>-1)&&(!c||t.inArray(h,s)<0)){c&&s.push(h);var d=t.formUtils.validateInput(a,e,i,u,"submit");d.isValid?d.isValid&&d.shouldChangeDisplay&&(a.valAttr("current-error",!1),t.formUtils.dialogs.applyInputSuccessStyling(a,i)):o(d.errorMsg,a)}}),"function"==typeof i.onValidate){var c=i.onValidate(u);t.isArray(c)?t.each(c,function(t,e){o(e.message,e.element)}):c&&c.element&&c.message&&o(c.message,c.element)}return t.formUtils.isValidatingEntireForm=!1,l.length>0&&n&&("top"===i.errorMessagePosition?t.formUtils.dialogs.setMessageInTopOfForm(u,a,i,e):t.each(l,function(e,n){t.formUtils.dialogs.setInlineMessage(n,n.valAttr("current-error"),i)}),i.scrollToTopOnError&&t.formUtils.$win.scrollTop(u.offset().top-20)),!n&&t.formUtils.haltValidation&&(t.formUtils.errorDisplayPreventedWhenHalted=!0),0===l.length&&!t.formUtils.haltValidation},t.fn.restrictLength=function(e){return new t.formUtils.lengthRestriction(this,e),this},t.fn.addSuggestions=function(e){var i=!1;return this.find("input").each(function(){var n=t(this);(i=t.split(n.attr("data-suggestions"))).length>0&&!n.hasClass("has-suggestions")&&(t.formUtils.suggest(n,i,e),n.addClass("has-suggestions"))}),this}}(t,window),function(t){"use strict";t.formUtils=t.extend(t.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(e){this.loadedModules[t.trim(e).toLowerCase()]=!0},hasLoadedModule:function(e){return t.trim(e).toLowerCase()in this.loadedModules},loadModules:function(e,i,n){if(t.formUtils.isLoadingModules)setTimeout(function(){t.formUtils.loadModules(e,i,n)},100);else{var r=function(e,i){var r=t.split(e),o=r.length,s=function(){0===--o&&(t.formUtils.isLoadingModules=!1,"function"==typeof n&&n())};o>0&&(t.formUtils.isLoadingModules=!0);var a="?_="+(new Date).getTime(),l=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];t.each(r,function(e,n){if(0===(n=t.trim(n)).length||t.formUtils.hasLoadedModule(n))s();else{var r=i+n+(".js"===n.slice(-3)?"":".js"),o=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([r+(".dev.js"===r.slice(-7)?a:"")],s):(o.type="text/javascript",o.onload=s,o.src=r+(".dev.js"===r.slice(-7)?a:""),o.onerror=function(){t.formUtils.warn("Unable to load form validation module "+r,!0),s()},o.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(s(),this.onload=null,this.onreadystatechange=null)},l.appendChild(o))}})};if(i)r(e,i);else{var o=function(){var i=!1;return t('script[src*="form-validator"]').each(function(){if(!(this.src.split("form-validator")[1].split("node_modules").length>1))return"/"===(i=this.src.substr(0,this.src.lastIndexOf("/"))+"/")&&(i=""),!1}),!1!==i&&(r(e,i),!0)};o()||t(function(){o()||"function"==typeof n&&n()})}}}})}(t),function(t){"use strict";t.split=function(e,i,n){n=void 0===n||!0===n;var r=new RegExp("[,|"+(n?"\\s":"")+"-]\\s*","g");if("function"!=typeof i){if(!e)return[];var o=[];return t.each(e.split(i||r),function(e,i){(i=t.trim(i)).length&&o.push(i)}),o}e&&t.each(e.split(r),function(e,n){if((n=t.trim(n)).length)return i(n,e)})},t.validate=function(e){var i=t.extend(t.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(e=t.extend(i,e||{}),t(window).trigger("formValidationPluginInit",[e]),e.lang&&"en"!==e.lang){var n="lang/"+e.lang+".js";e.modules+=e.modules.length?","+n:n}t(e.form).each(function(i,n){n.validationConfig=e;var r=t(n);r.trigger("formValidationSetup",[r,e]),r.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),r.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),r.bind("submit.validation",function(i){var n=t(this),r=function(){return i.stopImmediatePropagation(),!1};if(t.formUtils.haltValidation)return r();if(t.formUtils.isLoadingModules)return setTimeout(function(){n.trigger("submit.validation")},200),r();var o=n.isValid(e.language,e);return t.formUtils.haltValidation?r():o&&"function"==typeof e.onSuccess?!1===e.onSuccess(n)?r():void 0:o||"function"!=typeof e.onError?!!o||r():(e.onError(n),r())}).bind("reset.validation",function(){t.formUtils.dialogs.removeAllMessagesAndStyling(r,e)}).addClass("has-validation-callback"),e.showHelpOnFocus&&r.showHelpOnFocus(),e.addSuggestions&&r.addSuggestions(),e.validateOnBlur&&(r.validateOnBlur(e.language,e),r.bind("html5ValidationAttrsFound",function(){r.validateOnBlur(e.language,e)})),e.validateOnEvent&&r.validateOnEvent(e.language,e)}),""!==e.modules&&t.formUtils.loadModules(e.modules,null,function(){"function"==typeof e.onModulesLoaded&&e.onModulesLoaded();var i="string"==typeof e.form?t(e.form):e.form;t.formUtils.$win.trigger("validatorsLoaded",[i,e])})}}(t),function(t,e){"use strict";var i=t(e);t.formUtils=t.extend(t.formUtils||{},{$win:i,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'
    {messages}
    ',messages:"{errorTitle}
      {fields}
    ",field:"
  • {msg}
  • "},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(t){var e=0===t.name.indexOf("validate_")?t.name:"validate_"+t.name;void 0===t.validateOnKeyUp&&(t.validateOnKeyUp=!0),this.validators[e]=t},addSanitizer:function(t){this.sanitizers[t.name]=t},warn:function(t,i){"console"in e?"function"==typeof e.console.warn?e.console.warn(t):"function"==typeof e.console.log&&e.console.log(t):i&&alert(t)},getValue:function(t,e){var i=e?e.find(t):t;if(i.length>0){var n=i.eq(0).attr("type");return"radio"===n||"checkbox"===n?i.filter(":checked").val()||"":i.val()||""}return!1},validateInput:function(e,i,n,r,o){n=n||t.formUtils.defaultConfig(),i=i||t.formUtils.LANG,r.length||(r=e.parent());var s=this.getValue(e);e.valAttr("skipped",!1).one("beforeValidation",function(){(e.attr("disabled")||!e.is(":visible")&&!n.validateHiddenInputs)&&e.valAttr("skipped",1)}).trigger("beforeValidation",[s,i,n]);var a="true"===e.valAttr("optional"),l=!s&&a,u=e.attr(n.validationRuleAttribute),c=!0,h="",d={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!u||l||e.valAttr("skipped"))return d.shouldChangeDisplay=n.addValidClassOnAll,d;var f=e.valAttr("ignore");return f&&t.each(f.split(""),function(t,e){s=s.replace(new RegExp("\\"+e,"g"),"")}),t.split(u,function(a){0!==a.indexOf("validate_")&&(a="validate_"+a);var l=t.formUtils.validators[a];if(!l)throw new Error('Using undefined validator "'+a+'". Maybe you have forgotten to load the module that "'+a+'" belongs to?');if("validate_checkbox_group"===a&&(e=r.find('[name="'+e.attr("name")+'"]:eq(0)')),("keyup"!==o||l.validateOnKeyUp)&&(c=l.validatorFunction(s,e,n,i,r,o)),!c)return n.validateOnBlur&&e.validateOnKeyUp(i,n),h=t.formUtils.dialogs.resolveErrorMessage(e,l,a,n,i),!1}),!1===c?(e.trigger("validation",!1),d.errorMsg=h,d.isValid=!1,d.shouldChangeDisplay=!0):null===c?d.shouldChangeDisplay=!1:(e.trigger("validation",!0),d.shouldChangeDisplay=!0),"function"==typeof n.onElementValidate&&null!==h&&n.onElementValidate(d.isValid,e,r,h),e.trigger("afterValidation",[d,o]),d},parseDate:function(e,i,n){var r,o,s,a,l=i.replace(/[a-zA-Z]/gi,"").substring(0,1),u="^",c=i.split(l||null);if(t.each(c,function(t,e){u+=(t>0?"\\"+l:"")+"(\\d{"+e.length+"})"}),u+="$",n){var h=[];t.each(e.split(l),function(t,e){1===e.length&&(e="0"+e),h.push(e)}),e=h.join(l)}if(null===(r=e.match(new RegExp(u))))return!1;var d=function(e,i,n){for(var r=0;r28&&(a%4!=0||a%100==0&&a%400!=0)||2===s&&o>29&&(a%4==0||a%100!=0&&a%400==0)||s>12||0===s)&&(!(this.isShortMonth(s)&&o>30||!this.isShortMonth(s)&&o>31||0===o)&&[a,s,o])},parseDateInt:function(t){return 0===t.indexOf("0")&&(t=t.replace("0","")),parseInt(t,10)},isShortMonth:function(t){return t%2==0&&t<7||t%2!=0&&t>7},lengthRestriction:function(e,i){var n=parseInt(i.text(),10),r=0,o=function(){var t=e.val().length;if(t>n){var o=e.scrollTop();e.val(e.val().substring(0,n)),e.scrollTop(o)}(r=n-t)<0&&(r=0),i.text(r)};t(e).bind("keydown keyup keypress focus blur",o).bind("cut paste",function(){setTimeout(o,100)}),t(document).bind("ready",o)},numericRangeCheck:function(e,i){var n=t.split(i),r=parseInt(i.substr(3),10);return 1===n.length&&-1===i.indexOf("min")&&-1===i.indexOf("max")&&(n=[i,i]),2===n.length&&(eparseInt(n[1],10))?["out",n[0],n[1]]:0===i.indexOf("min")&&er?["max",r]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(e,n,r){var o={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},s=function(t,e){var i=e.offset();t.css({width:e.outerWidth(),left:i.left+"px",top:i.top+e.outerHeight()+"px"})};r&&t.extend(o,r),o.css.position="absolute",o.css["z-index"]=9999,e.attr("autocomplete","off"),0===this._numSuggestionElements&&i.bind("resize",function(){t(".jquery-form-suggestions").each(function(){var e=t(this),i=e.attr("data-suggest-container");s(e,t(".suggestions-"+i).eq(0))})}),this._numSuggestionElements++;var a=function(e){var i=e.valAttr("suggestion-nr");t.formUtils._selectedSuggestion=null,t.formUtils._previousTypedVal=null,t(".jquery-form-suggestion-"+i).fadeOut("fast")};return e.data("suggestions",n).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){t(this).trigger("keyup"),t.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var i=t(this),n=[],r=t.trim(i.val()).toLocaleLowerCase();if(r!==t.formUtils._previousTypedVal){t.formUtils._previousTypedVal=r;var l=!1,u=i.valAttr("suggestion-nr"),c=t(".jquery-form-suggestion-"+u);if(c.scrollTop(0),""!==r){var h=r.length>2;t.each(i.data("suggestions"),function(t,e){var i=e.toLocaleLowerCase();if(i===r)return n.push(""+e+""),l=!0,!1;(0===i.indexOf(r)||h&&i.indexOf(r)>-1)&&n.push(e.replace(new RegExp(r,"gi"),"$&"))})}l||0===n.length&&c.length>0?c.hide():n.length>0&&0===c.length?(c=t("
    ").css(o.css).appendTo("body"),e.addClass("suggestions-"+u),c.attr("data-suggest-container",u).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+u)):n.length>0&&!c.is(":visible")&&c.show(),n.length>0&&r.length!==n[0].length&&(s(c,i),c.html(""),t.each(n,function(e,n){t("
    ").append(n).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(c).click(function(){i.focus(),i.val(t(this).text()),i.trigger("change"),a(i)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(e){var i,n,r=e.keyCode?e.keyCode:e.which,s=t(this);if(13===r&&null!==t.formUtils._selectedSuggestion){if(i=s.valAttr("suggestion-nr"),(n=t(".jquery-form-suggestion-"+i)).length>0){var l=n.find("div").eq(t.formUtils._selectedSuggestion).text();s.val(l),s.trigger("change"),a(s),e.preventDefault()}}else{i=s.valAttr("suggestion-nr");var u=(n=t(".jquery-form-suggestion-"+i)).children();if(u.length>0&&t.inArray(r,[38,40])>-1){38===r?(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=u.length-1:t.formUtils._selectedSuggestion--,t.formUtils._selectedSuggestion<0&&(t.formUtils._selectedSuggestion=u.length-1)):40===r&&(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=0:t.formUtils._selectedSuggestion++,t.formUtils._selectedSuggestion>u.length-1&&(t.formUtils._selectedSuggestion=0));var c=n.innerHeight(),h=n.scrollTop(),d=n.children().eq(0).outerHeight()*t.formUtils._selectedSuggestion;return(dh+c)&&n.scrollTop(d),u.removeClass("active-suggestion").css("background","none").eq(t.formUtils._selectedSuggestion).addClass("active-suggestion").css(o.activeSuggestionCSS),e.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){a(t(this))}),e},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(t,window),(e=t).formUtils.addValidator({name:"email",validatorFunction:function(t){var i=t.toLowerCase().split("@"),n=i[0],r=i[1];if(n&&r){if(0===n.indexOf('"')){var o=n.length;if((n=n.replace(/\"/g,"")).length!==o-2)return!1}return e.formUtils.validators.validate_domain.validatorFunction(i[1])&&0!==n.indexOf(".")&&"."!==n.substring(n.length-1,n.length)&&-1===n.indexOf("..")&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(n)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),e.formUtils.addValidator({name:"domain",validatorFunction:function(t){return t.length>0&&t.length<=253&&!/[^a-zA-Z0-9]/.test(t.slice(-2))&&!/[^a-zA-Z0-9]/.test(t.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(t)&&1===t.split("..").length&&t.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),e.formUtils.addValidator({name:"required",validatorFunction:function(t,i,n,r,o){switch(i.attr("type")){case"checkbox":return i.is(":checked");case"radio":return o.find('input[name="'+i.attr("name")+'"]').filter(":checked").length>0;default:return""!==e.trim(t)}},errorMessage:"",errorMessageKey:function(t){return"top"===t.errorMessagePosition||"function"==typeof t.errorMessagePosition?"requiredFields":"requiredField"}}),e.formUtils.addValidator({name:"length",validatorFunction:function(t,i,n,r){var o=i.valAttr("length"),s=i.attr("type");if(void 0===o)return alert('Please add attribute "data-validation-length" to '+i[0].nodeName+" named "+i.attr("name")),!0;var a,l="file"===s&&void 0!==i.get(0).files?i.get(0).files.length:t.length,u=e.formUtils.numericRangeCheck(l,o);switch(u[0]){case"out":this.errorMessage=r.lengthBadStart+o+r.lengthBadEnd,a=!1;break;case"min":this.errorMessage=r.lengthTooShortStart+u[1]+r.lengthBadEnd,a=!1;break;case"max":this.errorMessage=r.lengthTooLongStart+u[1]+r.lengthBadEnd,a=!1;break;default:a=!0}return a},errorMessage:"",errorMessageKey:""}),e.formUtils.addValidator({name:"url",validatorFunction:function(t){if(/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)){var i=t.split("://")[1],n=i.indexOf("/");return n>-1&&(i=i.substr(0,n)),e.formUtils.validators.validate_domain.validatorFunction(i)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),e.formUtils.addValidator({name:"number",validatorFunction:function(t,e,i){if(""!==t){var n,r,o=e.valAttr("allowing")||"",s=e.valAttr("decimal-separator")||i.decimalSeparator,a=!1,l=e.valAttr("step")||"",u=!1;if((e.attr("data-sanitize")||"").match(/(^|[\s])numberFormat([\s]|$)/i)){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");t.length&&(t=String(numeral().unformat(t)))}if(-1===o.indexOf("number")&&(o+=",number"),-1===o.indexOf("negative")&&0===t.indexOf("-"))return!1;if(o.indexOf("range")>-1&&(n=parseFloat(o.substring(o.indexOf("[")+1,o.indexOf(";"))),r=parseFloat(o.substring(o.indexOf(";")+1,o.indexOf("]"))),a=!0),""!==l&&(u=!0),","===s){if(t.indexOf(".")>-1)return!1;t=t.replace(",",".")}if(""===t.replace(/[0-9-]/g,"")&&(!a||t>=n&&t<=r)&&(!u||t%l==0))return!0;if(o.indexOf("float")>-1&&null!==t.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!a||t>=n&&t<=r)&&(!u||t%l==0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),e.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(t,i,n,r){var o=i.valAttr("allowing"),s="",a=!1;if(o){s="^([a-zA-Z0-9"+o+"]+)$";var l=o.replace(/\\/g,"");l.indexOf(" ")>-1&&(a=!0,l=l.replace(" ",""),l+=r.andSpaces||e.formUtils.LANG.andSpaces),r.badAlphaNumericAndExtraAndSpaces&&r.badAlphaNumericAndExtra?this.errorMessage=a?r.badAlphaNumericAndExtraAndSpaces+l:r.badAlphaNumericAndExtra+l+r.badAlphaNumericExtra:this.errorMessage=r.badAlphaNumeric+r.badAlphaNumericExtra+l}else s="^([a-zA-Z0-9]+)$",this.errorMessage=r.badAlphaNumeric;return new RegExp(s).test(t)},errorMessage:"",errorMessageKey:""}),e.formUtils.addValidator({name:"custom",validatorFunction:function(t,e){return new RegExp(e.valAttr("regexp")).test(t)},errorMessage:"",errorMessageKey:"badCustomVal"}),e.formUtils.addValidator({name:"date",validatorFunction:function(t,i,n){var r=i.valAttr("format")||n.dateFormat||"yyyy-mm-dd",o="false"===i.valAttr("require-leading-zero");return!1!==e.formUtils.parseDate(t,r,o)},errorMessage:"",errorMessageKey:"badDate"}),e.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(t,i,n,r,o){var s=!0,a=i.attr("name"),l=e('input[type=checkbox][name^="'+a+'"]',o),u=l.filter(":checked").length,c=i.valAttr("qty");if(void 0===c){var h=i.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+h+" named "+i.attr("name"))}var d=e.formUtils.numericRangeCheck(u,c);switch(d[0]){case"out":this.errorMessage=r.groupCheckedRangeStart+c+r.groupCheckedEnd,s=!1;break;case"min":this.errorMessage=r.groupCheckedTooFewStart+d[1]+(r.groupCheckedTooFewEnd||r.groupCheckedEnd),s=!1;break;case"max":this.errorMessage=r.groupCheckedTooManyStart+d[1]+(r.groupCheckedTooManyEnd||r.groupCheckedEnd),s=!1;break;default:s=!0}if(!s){var f=function(){l.unbind("click",f),l.filter("*[data-validation]").validateInputOnBlur(r,n,!1,"blur")};l.bind("click",f)}return s}})});var List=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=11)}([function(t,e,i){var n=i(4),r=/\s+/;Object.prototype.toString;function o(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new o(t)},o.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~n(e,t)||e.push(t),this.el.className=e.join(" "),this},o.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),i=n(e,t);return~i&&e.splice(i,1),this.el.className=e.join(" "),this},o.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},o.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(r);return""===t[0]&&t.shift(),t},o.prototype.has=o.prototype.contains=function(t){return this.list?this.list.contains(t):!!~n(this.array(),t)}},function(t,e,i){var n=window.addEventListener?"addEventListener":"attachEvent",r=window.removeEventListener?"removeEventListener":"detachEvent",o="addEventListener"!==n?"on":"",s=i(5);e.bind=function(t,e,i,r){t=s(t);for(var a=0;a0?setTimeout(function(){e(i,n,r)},1):(t.update(),n(r))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var i=t.items,n=0,r=i.length;np.page,s=new g(t[r],void 0,n),p.items.push(s),i.push(s)}return p.update(),i}m(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,p.update(),p},this.remove=function(t,e,i){for(var n=0,r=0,o=p.items.length;r-1&&i.splice(n,1),p},this.trigger=function(t){for(var e=p.handlers[t].length;e--;)p.handlers[t][e](p);return p},this.reset={filter:function(){for(var t=p.items,e=t.length;e--;)t[e].filtered=!1;return p},search:function(){for(var t=p.items,e=t.length;e--;)t[e].found=!1;return p}},this.update=function(){var t=p.items,e=t.length;p.visibleItems=[],p.matchingItems=[],p.templater.clear();for(var i=0;i=p.i&&p.visibleItems.lengthe},innerWindow:function(t,e,i){return t>=e-i&&t<=e+i},dotted:function(t,e,i,n,r,o,s){return this.dottedLeft(t,e,i,n,r,o)||this.dottedRight(t,e,i,n,r,o,s)},dottedLeft:function(t,e,i,n,r,o){return e==i+1&&!this.innerWindow(e,r,o)&&!this.right(e,n)},dottedRight:function(t,e,i,n,r,o,s){return!t.items[s-1].values().dotted&&(e==n&&!this.innerWindow(e,r,o)&&!this.right(e,n))}},s=function(e,i,n){r.bind(e,"click",function(){t.show((i-1)*n+1,n)})};return function(i){var n=new o(t.listContainer.id,{listClass:i.paginationClass||"pagination",item:"
  • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,i)}),e(n,i)}}},function(t,e,i){t.exports=function(t){var e=i(2)(t),n=function(i,n){for(var r=0,o=i.length;r0?setTimeout(function(){r(e,i)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,i=[],n=0,r=e.length;n-1))},reset:function(){t.reset.search(),t.searched=!1}},a=function(e){return t.trigger("searchStart"),o.resetList(),o.setSearchString(e),o.setOptions(arguments),o.setColumns(),""===n?s.reset():(t.searched=!0,r?r(n,i):s.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var i=e.target||e.srcElement;""===i.value&&!t.searched||a(i.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){""===(t.target||t.srcElement).value&&a("")}),a}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var i=0,n=e.els.length;i]/g.exec(e)){var o=document.createElement("tbody");return o.innerHTML=e,o.firstChild}if(-1!==e.indexOf("<")){var s=document.createElement("div");return s.innerHTML=e,s.firstChild}var a=document.getElementById(t.item);if(a)return a}},this.get=function(e,n){i.create(e);for(var r={},o=0,s=n.length;o=1;)t.list.removeChild(t.list.firstChild)},(e=i.getItemSource(t.item))&&(e=i.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new i(t)}},function(t,e){t.exports=function(t,e){var i=t.getAttribute&&t.getAttribute(e)||null;if(!i)for(var n=t.attributes.length,r=0;r=48&&t<=57}function a(t,e){for(var i=(t+="").length,n=(e+="").length,a=0,l=0;a32)return!1;var s=n,a=function(){var t,i={};for(t=0;t=v;_--){var x=a[t.charAt(_-1)];if(b[_]=0===m?(b[_+1]<<1|1)&x:(b[_+1]<<1|1)&x|(p[_+1]|p[_])<<1|1|p[_+1],b[_]&f){var w=l(m,_-1);if(w<=u){if(u=w,!((c=_-1)>s))break;v=Math.max(1,2*s-c)}}}if(l(m+1,s)>u)break;p=b}return!(c<0)}}]); +if(function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=0)}({"++bc":function(t,e,i){var n,r,o;!function(s){"use strict";r=[i("EVdn"),i("MIQu")],void 0===(o="function"==typeof(n=function(t){function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var r=n.dataTransfer;r&&-1!==t.inArray("Files",r.types)&&!1!==this._trigger(e,t.Event(e,{delegatedEvent:n}))&&(n.preventDefault(),i&&(r.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:void 0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){if(e.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,r=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&r-i._time").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",r=(e.prop("files")||[1]).length;r;)n.push(i),r-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var r=t.Deferred(),o=r.promise();return i=i||this.options.context||o,!0===e?r.resolveWith(i,n):!1===e&&r.rejectWith(i,n),o.abort=r.promise,this._enhancePromise(o)},_addConvenienceMethods:function(e,i){var n=this,r=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,o){return(e||o)&&(i._processQueue=this._processQueue=(this._processQueue||r([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():r(arguments)}).then(e,o)),this._processQueue||r([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,r,o=this,s=e.files[0],a=s.size,l=e.uploadedBytes,u=e.maxChunkSize||a,c=this._blobSlice,h=t.Deferred(),d=h.promise();return!(!(this._isXHRUpload(e)&&c&&(l||("function"===t.type(u)?u(e):u)=a?(s.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",s.error])):(r=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=c.call(s,l,l+("function"===t.type(u)?u(i):u),s.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+a,o._trigger("chunkbeforesend",null,i),o._initXHRData(i),o._initProgressListener(i),n=(!1!==o._trigger("chunksend",null,i)&&t.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,s,u){l=o._getUploadedBytes(u)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=s,i.jqXHR=u,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),la._sending)for(var n=a._slots.shift();n;){if("pending"===a._getDeferredState(n)){n.resolve();break}n=a._slots.shift()}0===a._active&&a._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=t.Deferred(),this._slots.push(o),s=o.then(u)):(this._sequence=this._sequence.then(u,u),s=this._sequence),s.abort=function(){return r=[void 0,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,r),u())},this._enhancePromise(s)):u()},_onAdd:function(e,i){var n,r,o,s,a=this,l=!0,u=t.extend({},this.options,i),c=i.files,h=c.length,d=u.limitMultiFileUploads,f=u.limitMultiFileUploadSize,p=u.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(u),v=0;if(!h)return!1;if(f&&void 0===c[0].size&&(f=void 0),(u.singleFileUploads||d||f)&&this._isXHRUpload(u))if(u.singleFileUploads||f||!d)if(!u.singleFileUploads&&f)for(o=[],n=[],s=0;sf||d&&s+1-v>=d)&&(o.push(c.slice(v,s+1)),(r=m.slice(v,s+1)).length||(r=m),n.push(r),v=s+1,g=0);else n=m;else for(o=[],n=[],s=0;s").append(n)[0].reset(),i.after(n).detach(),r&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,r=this,o=t.Deferred(),s=[],a=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])},l=function(){n.readEntries(function(t){t.length?(s=s.concat(t),l()):function(t){r._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(a)}(s)},a)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},a):e.isDirectory?(n=e.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var i=(e=e||{}).items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?((e=t.webkitGetAsEntry())&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var i,n,r=(e=t(e)).prop("webkitEntries")||e.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if((i=t.makeArray(e.prop("files"))).length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(n=e.prop("value")))return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(r){n.files=r,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",t.Event("change",{delegatedEvent:e}),n)&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,r={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){r.files=n,!1!==i._trigger("drop",t.Event("drop",{delegatedEvent:e}),r)&&i._onAdd(e,r)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,r){var o,s=r.name.toLowerCase();/^data-/.test(s)&&(s=s.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),o=n[s],e._isRegExpOption(s,o)&&(o=e._getRegExp(o)),i[s]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,r=this,o=t.Deferred(),s=o.promise();return s.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),s)},this._getFileInputFiles(e.fileInput).always(function(t){n||(t.length?(e.files=t,(i=r._onSend(null,e)).then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})):o.reject())}),this._enhancePromise(s)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})})?n.apply(e,r):n)||(t.exports=o)}()},"/Tgh":function(t,e,i){(e=i("JPst")(!1)).push([t.i,"legend[data-v-3bdd24a5]{font-size:13px;font-weight:700;border:0}fieldset>div[data-v-3bdd24a5]{background:#f4f4f4;border:1px solid #d3d6de;margin:0 15px 15px;padding:20px 20px 10px}@media (max-width:992px){legend[data-v-3bdd24a5]{text-align:left!important}}@media (min-width:992px){fieldset>div[data-v-3bdd24a5]{width:55%}}",""]),t.exports=e},"/iJB":function(t,e){},0:function(t,e,i){i("z0aP"),i("w742"),i("u2NQ"),i("M5PX"),i("zzf1"),i("J7Dn"),i("d9Lc"),i("oOJW"),i("0mT4"),i("uPJo"),i("3n7o"),i("20Jq"),i("/iJB"),i("nUDU"),i("2NnB"),i("DH49"),i("0EWH"),i("qhJT"),i("GD7A"),i("bgxH"),t.exports=i("9tD5")},"0EWH":function(t,e){},"0mT4":function(t,e){},1:function(t,e){},"1I/1":function(t,e,i){"use strict";i.r(e);var n=i("KHd+"),r=Object(n.a)({props:["errors"]},function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.errors?i("div",{staticClass:"box"},[i("div",{staticClass:"box-body"},[t._m(0),t._v(" "),i("div",{staticClass:"errors-table"},[i("table",{staticClass:"table table-striped table-bordered",attrs:{id:"errors-table"}},[t._m(1),t._v(" "),i("tbody",t._l(t.errors,function(e,n){return i("tr",[i("td",[t._v(t._s(n))]),t._v(" "),t._l(e,function(e,n){return i("td",[i("b",[t._v(t._s(n)+":")]),t._v(" "),t._l(e,function(e){return i("span",[t._v(t._s(e[0]))])}),t._v(" "),i("br")],2)})],2)}))])])])]):t._e()},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"alert alert-warning"},[e("strong",[this._v("Warning")]),this._v(" Some Errors occured while importing\n ")])},function(){var t=this.$createElement,e=this._self._c||t;return e("thead",[e("th",[this._v("Item")]),this._v(" "),e("th",[this._v("Errors")])])}],!1,null,"3351e4cf",null);e.default=r.exports},"20Jq":function(t,e){},"2NnB":function(t,e){},"2dnx":function(t,e,i){var n=i("dIx6");"string"==typeof n&&(n=[[t.i,n,""]]);i("aET+")(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(t.exports=n.locals)},"3n7o":function(t,e){},"9tD5":function(t,e){},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(r=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},BPH3:function(t,e,i){var n=i("ue9v");"string"==typeof n&&(n=[[t.i,n,""]]);i("aET+")(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(t.exports=n.locals)},DH49:function(t,e){},DjPg:function(t,e,i){var n,r,o;r=[i("EVdn")],void 0===(o="function"==typeof(n=function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;return function(){var t,i,n;e&&e.requirejs||(e?i=e:e={},function(e){var r,o,s,a,l={},u={},c={},h={},d=Object.prototype.hasOwnProperty,f=[].slice,p=/\.js$/;function g(t,e){return d.call(t,e)}function m(t,e){var i,n,r,o,s,a,l,u,h,d,f,g=e&&e.split("/"),m=c.map,v=m&&m["*"]||{};if(t){for(s=(t=t.split("/")).length-1,c.nodeIdCompat&&p.test(t[s])&&(t[s]=t[s].replace(p,"")),"."===t[0].charAt(0)&&g&&(t=g.slice(0,g.length-1).concat(t)),h=0;h0&&(t.splice(h-1,2),h-=2)}t=t.join("/")}if((g||v)&&m){for(h=(i=t.split("/")).length;h>0;h-=1){if(n=i.slice(0,h).join("/"),g)for(d=g.length;d>0;d-=1)if((r=m[g.slice(0,d).join("/")])&&(r=r[n])){o=r,a=h;break}if(o)break;!l&&v&&v[n]&&(l=v[n],u=h)}!o&&l&&(o=l,a=u),o&&(i.splice(0,a,o),t=i.join("/"))}return t}function v(t,e){return function(){var i=f.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),o.apply(void 0,i.concat([t,e]))}}function y(t){return function(e){l[t]=e}}function b(t){if(g(u,t)){var e=u[t];delete u[t],h[t]=!0,r.apply(void 0,e)}if(!g(l,t)&&!g(h,t))throw new Error("No "+t);return l[t]}function _(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function x(t){return t?_(t):[]}function w(t){return function(){return c&&c.config&&c.config[t]||{}}}s=function(t,e){var i,n,r=_(t),o=r[0],s=e[1];return t=r[1],o&&(i=b(o=m(o,s))),o?t=i&&i.normalize?i.normalize(t,(n=s,function(t){return m(t,n)})):m(t,s):(o=(r=_(t=m(t,s)))[0],t=r[1],o&&(i=b(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:i}},a={require:function(t){return v(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:w(t)}}},r=function(t,e,i,n){var r,o,c,d,f,p,m,_=[],w=typeof i;if(p=x(n=n||t),"undefined"===w||"function"===w){for(e=!e.length&&i.length?["require","exports","module"]:e,f=0;f0&&(i.call(arguments,t.prototype.constructor),r=e.prototype.constructor),r.apply(this,arguments)}e.displayName=t.displayName,o.prototype=new function(){this.constructor=o};for(var s=0;s":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},e.appendMany=function(e,i){if("1.7"===t.fn.jquery.substr(0,3)){var n=t();t.map(i,function(t){n=n.add(t)}),i=n}e.append(i)},e.__cache={};var r=0;return e.GetUniqueElementId=function(t){var e=t.getAttribute("data-select2-id");return null==e&&(t.id?(e=t.id,t.setAttribute("data-select2-id",e)):(t.setAttribute("data-select2-id",++r),e=r.toString())),e},e.StoreData=function(t,i,n){var r=e.GetUniqueElementId(t);e.__cache[r]||(e.__cache[r]={}),e.__cache[r][i]=n},e.GetData=function(i,n){var r=e.GetUniqueElementId(i);return n?e.__cache[r]&&null!=e.__cache[r][n]?e.__cache[r][n]:t(i).data(n):e.__cache[r]},e.RemoveData=function(t){var i=e.GetUniqueElementId(t);null!=e.__cache[i]&&delete e.__cache[i],t.removeAttribute("data-select2-id")},e}),e.define("select2/results",["jquery","./utils"],function(t,e){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('
      ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=t(''),r=this.options.get("translations").get(e.message);n.append(i(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var i=this;this.data.current(function(n){var r=t.map(n,function(t){return t.id.toString()});i.$results.find(".select2-results__option[aria-selected]").each(function(){var i=t(this),n=e.GetData(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(o,r)>-1?i.attr("aria-selected","true"):i.attr("aria-selected","false")})})},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(i){var n=document.createElement("li");n.className="select2-results__option";var r={role:"option","aria-selected":"false"},o=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var s in(null!=i.element&&o.call(i.element,":disabled")||null==i.element&&i.disabled)&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==i.id&&delete r["aria-selected"],null!=i._resultId&&(n.id=i._resultId),i.title&&(n.title=i.title),i.children&&(r.role="group",r["aria-label"]=i.text,delete r["aria-selected"]),r){var a=r[s];n.setAttribute(s,a)}if(i.children){var l=t(n),u=document.createElement("strong");u.className="select2-results__group",t(u),this.template(i,u);for(var c=[],h=0;h",{class:"select2-results__options select2-results__options--nested"});p.append(c),l.append(u),l.append(p)}else this.template(i,n);return e.StoreData(n,"data",i),n},i.prototype.bind=function(i,n){var r=this,o=i.id+"-results";this.$results.attr("id",o),i.on("results:all",function(t){r.clear(),r.append(t.data),i.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),i.on("results:append",function(t){r.append(t.data),i.isOpen()&&r.setClasses()}),i.on("query",function(t){r.hideMessages(),r.showLoading(t)}),i.on("select",function(){i.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())}),i.on("unselect",function(){i.isOpen()&&(r.setClasses(),r.options.get("scrollAfterSelect")&&r.highlightFirstItem())}),i.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),i.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),i.on("results:toggle",function(){var t=r.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),i.on("results:select",function(){var t=r.getHighlightedResults();if(0!==t.length){var i=e.GetData(t[0],"data");"true"==t.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:i})}}),i.on("results:previous",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),i=e.index(t);if(!(i<=0)){var n=i-1;0===t.length&&(n=0);var o=e.eq(n);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===n?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}}),i.on("results:next",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var n=e.eq(i);n.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=n.offset().top+n.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===i?r.$results.scrollTop(0):s>o&&r.$results.scrollTop(a)}}),i.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),i.on("results:message",function(t){r.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=r.$results.scrollTop(),i=r.$results.get(0).scrollHeight-e+t.deltaY,n=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&i<=r.$results.height();n?(r.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(i){var n=t(this),o=e.GetData(this,"data");"true"!==n.attr("aria-selected")?r.trigger("select",{originalEvent:i,data:o}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:i,data:o}):r.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(i){var n=e.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:n,element:t(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,r=this.$results.scrollTop()+(n-i),o=n-i;r-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,i){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=n(e,i);null==o?i.style.display="none":"string"==typeof o?i.innerHTML=r(o):t(i).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var i=t('');return this._tabindex=0,null!=e.GetData(this.$element[0],"old-tabindex")?this._tabindex=e.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),i.attr("title",this.$element.attr("title")),i.attr("tabindex",this._tabindex),i.attr("aria-disabled","false"),this.$selection=i,i},n.prototype.bind=function(t,e){var n=this,r=t.id+"-results";this.container=t,this.$selection.on("focus",function(t){n.trigger("focus",t)}),this.$selection.on("blur",function(t){n._handleBlur(t)}),this.$selection.on("keydown",function(t){n.trigger("keypress",t),t.which===i.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){n.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){n.update(t.data)}),t.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(t)}),t.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(t)}),t.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),t.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},n.prototype._handleBlur=function(e){var i=this;window.setTimeout(function(){document.activeElement==i.$selection[0]||t.contains(i.$selection[0],document.activeElement)||i.trigger("blur",e)},1)},n.prototype._attachCloseHandler=function(i){t(document.body).on("mousedown.select2."+i.id,function(i){var n=t(i.target).closest(".select2");t(".select2.select2-container--open").each(function(){this!=n[0]&&e.GetData(this,"element").select2("close")})})},n.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n.prototype.isEnabled=function(){return!this.isDisabled()},n.prototype.isDisabled=function(){return this.options.get("disabled")},n}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,i,n){function r(){r.__super__.constructor.apply(this,arguments)}return i.Extend(r,e),r.prototype.render=function(){var t=r.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html(''),t},r.prototype.bind=function(t,e){var i=this;r.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||i.$selection.trigger("focus")})},r.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},r.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},r.prototype.selectionContainer=function(){return t("")},r.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n);var r=e.title||e.text;r?i.attr("title",r):i.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(t,e,i){function n(t,e){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,e),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('
        '),t},n.prototype.bind=function(e,r){var o=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){o.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!o.isDisabled()){var n=t(this).parent(),r=i.GetData(n[0],"data");o.trigger("unselect",{originalEvent:e,data:r})}})},n.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},n.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},n.prototype.selectionContainer=function(){return t('
      • ×
      • ')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=0;n1||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(t,e,i){function n(){}return n.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){n._handleClear(t)}),e.on("keypress",function(t){n._handleKeyboardClear(t,e)})},n.prototype._handleClear=function(t,e){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();var r=i.GetData(n[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var s={data:r};if(this.trigger("clear",s),s.prevented)this.$element.val(o);else{for(var a=0;a0||0===n.length)){var r=this.options.get("translations").get("removeAllItems"),o=t('×');i.StoreData(o[0],"data",n),this.$selection.find(".select2-selection__rendered").prepend(o)}},n}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(t,e,i){function n(t,e,i){t.call(this,e,i)}return n.prototype.render=function(e){var i=t('');this.$searchContainer=i,this.$search=i.find("input");var n=e.call(this);return this._transferTabIndex(),n},n.prototype.bind=function(t,n,r){var o=this,s=n.id+"-results";t.call(this,n,r),n.on("open",function(){o.$search.attr("aria-controls",s),o.$search.trigger("focus")}),n.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),n.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),n.on("disable",function(){o.$search.prop("disabled",!0)}),n.on("focus",function(t){o.$search.trigger("focus")}),n.on("results:focus",function(t){t.data._resultId?o.$search.attr("aria-activedescendant",t.data._resultId):o.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(t){o.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){o._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===i.BACKSPACE&&""===o.$search.val()){var n=o.$searchContainer.prev(".select2-selection__choice");if(n.length>0){var r=e.GetData(n[0],"data");o.searchRemoveChoice(r),t.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(t){o.$search.val()&&t.stopPropagation()});var a=document.documentMode,l=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){l?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(l&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=i.SHIFT&&e!=i.CTRL&&e!=i.ALT&&e!=i.TAB&&o.handleSearch(t)}})},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.trigger("focus")},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t;t=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",t)},n}),e.define("select2/selection/eventRelay",["jquery"],function(t){function e(){}return e.prototype.bind=function(e,i,n){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];e.call(this,i,n),i.on("*",function(e,i){if(-1!==t.inArray(e,o)){i=i||{};var n=t.Event("select2:"+e,{params:i});r.$element.trigger(n),-1!==t.inArray(e,s)&&(i.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,e){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var n=e(t);i._cache[t]=n}return new i(i._cache[t])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}}),e.define("select2/data/base",["../utils"],function(t){function e(t,i){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,i){var n=e.id+"-result-";return n+=t.generateChars(4),null!=i.id?n+="-"+i.id.toString():n+="-"+t.generateChars(4),n},e}),e.define("select2/data/select",["./base","../utils","jquery"],function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,t),n.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each(function(){var t=i(this),r=n.item(t);e.push(r)}),t(e)},n.prototype.select=function(t){var e=this;if(t.selected=!0,i(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(n){var r=[];(t=[t]).push.apply(t,n);for(var o=0;o=0){var c=r.filter(a(u)),h=this.item(c),d=i.extend(!0,{},u,h),f=this.option(d);c.replaceWith(f)}else{var p=this.option(u);if(u.children){var g=this.convertToOptions(u.children);e.appendMany(p,g)}s.push(p)}}return s},n}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,i){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return i.extend({},t,{q:t.term})},transport:function(t,e,n){var r=i.ajax(t);return r.then(e),r.fail(n),r}};return i.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){var n=this;null!=this._request&&(i.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=i.extend({type:"GET"},this.ajaxOptions);function o(){var o=r.transport(r,function(r){var o=n.processResults(r,t);n.options.get("debug")&&window.console&&console.error&&(o&&o.results&&i.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(o)},function(){(!("status"in o)||0!==o.status&&"0"!==o.status)&&n.trigger("results:message",{message:"errorLoading"})});n._request=o}"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},n}),e.define("select2/data/tags",["jquery"],function(t){function e(e,i,n){var r=n.get("tags"),o=n.get("createTag");void 0!==o&&(this.createTag=o);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,i,n),t.isArray(r))for(var a=0;a0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),e.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",function(){n._checkIfMaximumSelected()})},t.prototype.query=function(t,e,i){var n=this;this._checkIfMaximumSelected(function(){t.call(n,e,i)})},t.prototype._checkIfMaximumSelected=function(t,e){var i=this;this.current(function(t){var n=null!=t?t.length:0;i.maximumSelectionLength>0&&n>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e&&e()})},t}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),e.define("select2/dropdown/search",["jquery","../utils"],function(t,e){function i(){}return i.prototype.render=function(e){var i=e.call(this),n=t('');return this.$searchContainer=n,this.$search=n.find("input"),i.prepend(n),i},i.prototype.bind=function(e,i,n){var r=this,o=i.id+"-results";e.call(this,i,n),this.$search.on("keydown",function(t){r.trigger("keypress",t),r._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){r.handleSearch(t)}),i.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",o),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),i.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),i.on("focus",function(){i.isOpen()||r.$search.trigger("focus")}),i.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(r.showSearch(t)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),i.on("results:focus",function(t){t.data._resultId?r.$search.attr("aria-activedescendant",t.data._resultId):r.$search.removeAttr("aria-activedescendant")})},i.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.showSearch=function(t,e){return!0},i}),e.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;n>=0;n--){var r=e[n];this.placeholder.id===r.id&&i.splice(n,1)}return i},t}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(t){function e(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("query",function(t){n.lastParams=t,n.loading=!0}),e.on("query:append",function(t){n.lastParams=t,n.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=t.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('
      • '),i=this.options.get("translations").get("loadingMore");return e.html(i(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(t,e){function i(e,i,n){this.$dropdownParent=t(n.get("dropdownParent")||document.body),e.call(this,i,n)}return i.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("open",function(){n._showDropdown(),n._attachPositioningHandler(e),n._bindContainerResultHandlers(e)}),e.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},i.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(e){var i=t(""),n=e.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},i.prototype._bindContainerResultHandlers=function(t,e){if(!this._containerResultsHandlersBound){var i=this;e.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("results:message",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("select",function(){i._positionDropdown(),i._resizeDropdown()}),e.on("unselect",function(){i._positionDropdown(),i._resizeDropdown()}),this._containerResultsHandlersBound=!0}},i.prototype._attachPositioningHandler=function(i,n){var r=this,o="scroll.select2."+n.id,s="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){e.StoreData(this,"select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(o,function(i){var n=e.GetData(this,"select2-scroll-position");t(this).scrollTop(n.y)}),t(window).on(o+" "+s+" "+a,function(t){r._positionDropdown(),r._resizeDropdown()})},i.prototype._detachPositioningHandler=function(i,n){var r="scroll.select2."+n.id,o="resize.select2."+n.id,s="orientationchange.select2."+n.id;this.$container.parents().filter(e.hasScroll).off(r),t(window).off(r+" "+o+" "+s)},i.prototype._positionDropdown=function(){var e=t(window),i=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=e.scrollTop(),u=e.scrollTop()+e.height(),c=lo.bottom+a,d={left:o.left,top:s.bottom},f=this.$dropdownParent;"static"===f.css("position")&&(f=f.offsetParent());var p={top:0,left:0};(t.contains(document.body,f[0])||f[0].isConnected)&&(p=f.offset()),d.top-=p.top,d.left-=p.left,i||n||(r="below"),h||!c||i?!c&&h&&i&&(r="below"):r="above",("above"==r||i&&"below"!==r)&&(d.top=s.top-p.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},i.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},i.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return t.prototype.showSearch=function(t,e){return!(function t(e){for(var i=0,n=0;n0&&(c.dataAdapter=u.Decorate(c.dataAdapter,v)),c.maximumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,y)),c.maximumSelectionLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,b)),c.tags&&(c.dataAdapter=u.Decorate(c.dataAdapter,g)),null==c.tokenSeparators&&null==c.tokenizer||(c.dataAdapter=u.Decorate(c.dataAdapter,m)),null!=c.query){var h=e(c.amdBase+"compat/query");c.dataAdapter=u.Decorate(c.dataAdapter,h)}if(null!=c.initSelection){var A=e(c.amdBase+"compat/initSelection");c.dataAdapter=u.Decorate(c.dataAdapter,A)}}if(null==c.resultsAdapter&&(c.resultsAdapter=i,null!=c.ajax&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,C)),null!=c.placeholder&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,w)),c.selectOnClose&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,T))),null==c.dropdownAdapter){if(c.multiple)c.dropdownAdapter=_;else{var M=u.Decorate(_,x);c.dropdownAdapter=M}if(0!==c.minimumResultsForSearch&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,D)),c.closeOnSelect&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,S)),null!=c.dropdownCssClass||null!=c.dropdownCss||null!=c.adaptDropdownCssClass){var E=e(c.amdBase+"compat/dropdownCss");c.dropdownAdapter=u.Decorate(c.dropdownAdapter,E)}c.dropdownAdapter=u.Decorate(c.dropdownAdapter,k)}if(null==c.selectionAdapter){if(c.multiple?c.selectionAdapter=r:c.selectionAdapter=n,null!=c.placeholder&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,o)),c.allowClear&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,s)),c.multiple&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,a)),null!=c.containerCssClass||null!=c.containerCss||null!=c.adaptContainerCssClass){var I=e(c.amdBase+"compat/containerCss");c.selectionAdapter=u.Decorate(c.selectionAdapter,I)}c.selectionAdapter=u.Decorate(c.selectionAdapter,l)}c.language=this._resolveLanguage(c.language),c.language.push("en");for(var O=[],P=0;P0){for(var o=t.extend(!0,{},r),s=r.children.length-1;s>=0;s--)null==i(n,r.children[s])&&o.children.splice(s,1);return o.children.length>0?o:i(n,o)}var a=e(r.text).toUpperCase(),l=e(n.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},M.prototype.applyFromElement=function(t,e){var i=t.language,n=this.defaults.language,r=e.prop("lang"),o=e.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(o));return t.language=s,t},M.prototype._resolveLanguage=function(e){if(!e)return[];if(t.isEmptyObject(e))return[];if(t.isPlainObject(e))return[e];var i;i=t.isArray(e)?e:[e];for(var n=[],r=0;r0){var o=i[r].split("-")[0];n.push(o)}return n},M.prototype._processTranslations=function(e,i){for(var n=new c,r=0;r-1||(e.isPlainObject(this.options[h])?e.extend(this.options[h],c[h]):this.options[h]=c[h]);return this},r.prototype.get=function(t){return this.options[t]},r.prototype.set=function(t,e){this.options[t]=e},r}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(t,e,i,n){var r=function(t,n){null!=i.GetData(t[0],"select2")&&i.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),n=n||{},this.options=new e(n,t),r.__super__.constructor.call(this);var o=t.attr("tabindex")||0;i.StoreData(t[0],"old-tabindex",o),t.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(t,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var u=this.options.get("dropdownAdapter");this.dropdown=new u(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var c=this.options.get("resultsAdapter");this.results=new c(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var h=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){h.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),i.StoreData(t[0],"select2",this),t.data("select2",this)};return i.Extend(r,i.Observable),r.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},r.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var r=t.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a=1)return u[1]}return null}return"computedstyle"==e?window.getComputedStyle(t[0]).width:e},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},r.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerSelectionEvents=function(){var e=this,i=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(n,r){-1===t.inArray(n,i)&&e.trigger(n,r)})},r.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2-container--open")}),this.on("close",function(){t.$container.removeClass("select2-container--open")}),this.on("enable",function(){t.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(i){t.trigger("results:all",{data:i,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(i){t.trigger("results:append",{data:i,query:e})})}),this.on("keypress",function(e){var i=e.which;t.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&e.altKey?(t.close(e),e.preventDefault()):i===n.ENTER?(t.trigger("results:select",{}),e.preventDefault()):i===n.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):i===n.UP?(t.trigger("results:previous",{}),e.preventDefault()):i===n.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._isChangeMutation=function(e,i){var n=!1,r=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(i)if(i.addedNodes&&i.addedNodes.length>0)for(var o=0;o0?n=!0:t.isArray(i)&&t.each(i,function(t,e){if(r._isChangeMutation(t,e))return n=!0,!1});else n=!0;return n}},r.prototype._syncSubtree=function(t,e){var i=this._isChangeMutation(t,e),n=this;i&&this.dataAdapter.current(function(t){n.trigger("selection:update",{data:t})})},r.prototype.trigger=function(t,e){var i=r.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===e&&(e={}),t in n){var o=n[t],s={prevented:!1,name:t,args:e};if(i.call(this,o,s),s.prevented)return void(e.prevented=!0)}i.call(this,t,e)},r.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},r.prototype.close=function(t){this.isOpen()&&this.trigger("close",{originalEvent:t})},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var i=e[0];t.isArray(i)&&(i=t.map(i,function(t){return t.toString()})),this.$element.val(i).trigger("input").trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",i.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),i.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),i.StoreData(e[0],"element",this.$element),e},r}),e.define("jquery-mousewheel",["jquery"],function(t){return t}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(t,e,i,n,r){if(null==t.fn.select2){var o=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each(function(){var n=t.extend(!0,{},e);new i(t(this),n)}),this;if("string"==typeof e){var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=r.GetData(this,"select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=t[e].apply(t,s)}),t.inArray(e,o)>-1?this:n}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=n),i}),{define:e.define,require:e.require}}(),i=e.require("jquery.select2");return t.fn.select2.amd=e,i})?n.apply(e,r):n)||(t.exports=o)},Dpv2:function(t,e,i){"use strict";i.r(e);var n=(i("GOpo"),i("KHd+")),r=Object(n.a)({props:["clientsUrl","tokensUrl"],data:function(){return{tokens:[]}},ready:function(){this.prepareComponent()},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){this.getTokens()},getTokens:function(){var t=this;this.$http.get(this.tokensUrl).then(function(e){t.tokens=e.data})},revoke:function(t){var e=this;this.$http.delete(this.tokensUrl+"/"+t.id).then(function(t){e.getTokens()})}}},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.tokens.length>0?i("div",[i("div",{staticClass:"panel panel-default"},[i("h2",{staticClass:"panel-heading"},[t._v("Authorized Applications")]),t._v(" "),i("div",{staticClass:"panel-body"},[i("table",{staticClass:"table table-borderless m-b-none"},[t._m(0),t._v(" "),i("tbody",t._l(t.tokens,function(e){return i("tr",[i("td",{staticStyle:{"vertical-align":"middle"}},[t._v("\n "+t._s(e.client.name)+"\n ")]),t._v(" "),i("td",{staticStyle:{"vertical-align":"middle"}},[e.scopes.length>0?i("span",[t._v("\n "+t._s(e.scopes.join(", "))+"\n ")]):t._e()]),t._v(" "),i("td",{staticStyle:{"vertical-align":"middle"}},[i("a",{staticClass:"action-link text-danger",on:{click:function(i){t.revoke(e)}}},[t._v("\n Revoke\n ")])])])}))])])])]):t._e()])},[function(){var t=this.$createElement,e=this._self._c||t;return e("thead",[e("tr",[e("th",[this._v("Name")]),this._v(" "),e("th",[this._v("Scopes")]),this._v(" "),e("th",[e("span",{staticClass:"sr-only"},[this._v("Delete")])])])])}],!1,null,"18abfa16",null);e.default=r.exports},EVdn:function(t,e,i){var n;!function(e,i){"use strict";"object"==typeof t.exports?t.exports=e.document?i(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return i(t)}:i(e)}("undefined"!=typeof window?window:this,function(i,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,c=o.indexOf,h={},d=h.toString,f=h.hasOwnProperty,p=f.toString,g=p.call(Object),m={},v=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function(t){return null!=t&&t===t.window},b=i.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,i){var n,r,o=(i=i||b).createElement("script");if(o.text=t,e)for(n in _)(r=e[n]||e.getAttribute&&e.getAttribute(n))&&o.setAttribute(n,r);i.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?h[d.call(t)]||"object":typeof t}var C=function(t,e){return new C.fn.init(t,e)};function k(t){var e=!!t&&"length"in t&&t.length,i=w(t);return!v(t)&&!y(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:"3.5.1",constructor:C,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(C.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i+~]|"+L+")"+L+"*"),q=new RegExp(L+"|>"),V=new RegExp(H),Y=new RegExp("^"+R+"$"),X={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),it=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},nt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,rt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ot=function(){d()},st=_t(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{P.apply(E=F.call(x.childNodes),x.childNodes),E[x.childNodes.length].nodeType}catch(t){P={apply:E.length?function(t,e){O.apply(t,F.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function at(t,e,n,r){var o,a,u,c,h,p,v,y=e&&e.ownerDocument,x=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==x&&9!==x&&11!==x)return n;if(!r&&(d(e),e=e||f,g)){if(11!==x&&(h=J.exec(t)))if(o=h[1]){if(9===x){if(!(u=e.getElementById(o)))return n;if(u.id===o)return n.push(u),n}else if(y&&(u=y.getElementById(o))&&b(e,u)&&u.id===o)return n.push(u),n}else{if(h[2])return P.apply(n,e.getElementsByTagName(t)),n;if((o=h[3])&&i.getElementsByClassName&&e.getElementsByClassName)return P.apply(n,e.getElementsByClassName(o)),n}if(i.qsa&&!S[t+" "]&&(!m||!m.test(t))&&(1!==x||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===x&&(q.test(t)||B.test(t))){for((y=tt.test(t)&&vt(e.parentNode)||e)===e&&i.scope||((c=e.getAttribute("id"))?c=c.replace(nt,rt):e.setAttribute("id",c=_)),a=(p=s(t)).length;a--;)p[a]=(c?"#"+c:":scope")+" "+bt(p[a]);v=p.join(",")}try{return P.apply(n,y.querySelectorAll(v)),n}catch(e){S(t,!0)}finally{c===_&&e.removeAttribute("id")}}}return l(t.replace(W,"$1"),e,n,r)}function lt(){var t=[];return function e(i,r){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=r}}function ut(t){return t[_]=!0,t}function ct(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ht(t,e){for(var i=t.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=e}function dt(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function gt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ut(function(e){return e=+e,ut(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=at.support={},o=at.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!K.test(e||i&&i.nodeName||"HTML")},d=at.setDocument=function(t){var e,r,s=t?t.ownerDocument||t:x;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,g=!o(f),x!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ot,!1):r.attachEvent&&r.attachEvent("onunload",ot)),i.scope=ct(function(t){return p.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length}),i.attributes=ct(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=ct(function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=Q.test(f.getElementsByClassName),i.getById=ct(function(t){return p.appendChild(t).id=_,!f.getElementsByName||!f.getElementsByName(_).length}),i.getById?(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i,n,r,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(r=e.getElementsByName(t),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(i.qsa=Q.test(f.querySelectorAll))&&(ct(function(t){var e;p.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+L+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+L+"*(?:value|"+N+")"),t.querySelectorAll("[id~="+_+"-]").length||m.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||m.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]"),t.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")}),ct(function(t){t.innerHTML="";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+L+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(i.matchesSelector=Q.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ct(function(t){i.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=Q.test(p.compareDocumentPosition),b=e||Q.test(p.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},A=e?function(t,e){if(t===e)return h=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t==f||t.ownerDocument==x&&b(x,t)?-1:e==f||e.ownerDocument==x&&b(x,e)?1:c?$(c,t)-$(c,e):0:4&n?-1:1)}:function(t,e){if(t===e)return h=!0,0;var i,n=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t==f?-1:e==f?1:r?-1:o?1:c?$(c,t)-$(c,e):0;if(r===o)return dt(t,e);for(i=t;i=i.parentNode;)s.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?dt(s[n],a[n]):s[n]==x?-1:a[n]==x?1:0},f):f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(d(t),i.matchesSelector&&g&&!S[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var n=y.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){S(e,!0)}return at(e,f,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=f&&d(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=f&&d(t);var r=n.attrHandle[e.toLowerCase()],o=r&&M.call(n.attrHandle,e.toLowerCase())?r(t,e,!g):void 0;return void 0!==o?o:i.attributes||!g?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},at.escape=function(t){return(t+"").replace(nt,rt)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,n=[],r=0,o=0;if(h=!i.detectDuplicates,c=!i.sortStable&&t.slice(0),t.sort(A),h){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return c=null,t},r=at.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=r(e);return i},(n=at.selectors={cacheLength:50,createPseudo:ut,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,it),t[3]=(t[3]||t[4]||t[5]||"").replace(et,it),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&V.test(i)&&(e=s(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=k[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&k(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var r=at.attr(n,t);return null==r?"!="===e:!e||(r+="","="===e?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&r.indexOf(i)>-1:"$="===e?i&&r.slice(-i.length)===i:"~="===e?(" "+r.replace(z," ")+" ").indexOf(i)>-1:"|="===e&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var u,c,h,d,f,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(b=(f=(u=(c=(h=(d=m)[_]||(d[_]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===w&&u[1])&&u[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(b=f=0)||p.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[w,f,b];break}}else if(y&&(b=f=(u=(c=(h=(d=e)[_]||(d[_]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===w&&u[1]),!1===b)for(;(d=++f&&d&&d[g]||(b=f=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((c=(h=d[_]||(d[_]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]=[w,b]),d!==e)););return(b-=r)===n||b%n==0&&b/n>=0}}},PSEUDO:function(t,e){var i,r=n.pseudos[t]||n.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return r[_]?r(e):r.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?ut(function(t,i){for(var n,o=r(t,e),s=o.length;s--;)t[n=$(t,o[s])]=!(i[n]=o[s])}):function(t){return r(t,0,i)}):r}},pseudos:{not:ut(function(t){var e=[],i=[],n=a(t.replace(W,"$1"));return n[_]?ut(function(t,e,i,r){for(var o,s=n(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,r,o){return e[0]=t,n(e,null,o,i),e[0]=null,!i.pop()}}),has:ut(function(t){return function(e){return at(t,e).length>0}}),contains:ut(function(t){return t=t.replace(et,it),function(e){return(e.textContent||r(e)).indexOf(t)>-1}}),lang:ut(function(t){return Y.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,it).toLowerCase(),function(e){var i;do{if(i=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:gt(!1),disabled:gt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return Z.test(t.nodeName)},input:function(t){return G.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:mt(function(){return[0]}),last:mt(function(t,e){return[e-1]}),eq:mt(function(t,e,i){return[i<0?i+e:i]}),even:mt(function(t,e){for(var i=0;ie?e:i;--n>=0;)t.push(n);return t}),gt:mt(function(t,e,i){for(var n=i<0?i+e:i;++n1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function wt(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,u=null!=e;a-1&&(o[u]=!(s[u]=h))}}else v=wt(v===s?v.splice(p,v.length):v),r?r(null,s,v,l):P.apply(s,v)})}function kt(t){for(var e,i,r,o=t.length,s=n.relative[t[0].type],a=s||n.relative[" "],l=s?1:0,c=_t(function(t){return t===e},a,!0),h=_t(function(t){return $(e,t)>-1},a,!0),d=[function(t,i,n){var r=!s&&(n||i!==u)||((e=i).nodeType?c(t,i,n):h(t,i,n));return e=null,r}];l1&&xt(d),l>1&&bt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(W,"$1"),i,l0,r=t.length>0,o=function(o,s,a,l,c){var h,p,m,v=0,y="0",b=o&&[],_=[],x=u,C=o||r&&n.find.TAG("*",c),k=w+=null==x?1:Math.random()||.1,D=C.length;for(c&&(u=s==f||s||c);y!==D&&null!=(h=C[y]);y++){if(r&&h){for(p=0,s||h.ownerDocument==f||(d(h),a=!g);m=t[p++];)if(m(h,s||f,a)){l.push(h);break}c&&(w=k)}i&&((h=!m&&h)&&v--,o&&b.push(h))}if(v+=y,i&&y!==v){for(p=0;m=e[p++];)m(b,_,s,a);if(o){if(v>0)for(;y--;)b[y]||_[y]||(_[y]=I.call(l));_=wt(_)}P.apply(l,_),c&&!o&&_.length>0&&v+e.length>1&&at.uniqueSort(l)}return c&&(w=k,u=x),b};return i?ut(o):o}(o,r))).selector=t}return a},l=at.select=function(t,e,i,r){var o,l,u,c,h,d="function"==typeof t&&t,f=!r&&s(t=d.selector||t);if(i=i||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&g&&n.relative[l[1].type]){if(!(e=(n.find.ID(u.matches[0].replace(et,it),e)||[])[0]))return i;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=X.needsContext.test(t)?0:l.length;o--&&(u=l[o],!n.relative[c=u.type]);)if((h=n.find[c])&&(r=h(u.matches[0].replace(et,it),tt.test(l[0].type)&&vt(e.parentNode)||e))){if(l.splice(o,1),!(t=r.length&&bt(l)))return P.apply(i,r),i;break}}return(d||a(t,f))(r,e,!g,i,!e||tt.test(t)&&vt(e.parentNode)||e),i},i.sortStable=_.split("").sort(A).join("")===_,i.detectDuplicates=!!h,d(),i.sortDetached=ct(function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))}),ct(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ht("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&&ct(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ht("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),ct(function(t){return null==t.getAttribute("disabled")})||ht(N,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),at}(i);C.find=D,C.expr=D.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=D.uniqueSort,C.text=D.getText,C.isXMLDoc=D.isXML,C.contains=D.contains,C.escapeSelector=D.escape;var T=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&C(t).is(i))break;n.push(t)}return n},S=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},A=C.expr.match.needsContext;function M(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function I(t,e,i){return v(e)?C.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?C.grep(t,function(t){return t===e!==i}):"string"!=typeof e?C.grep(t,function(t){return c.call(e,t)>-1!==i}):C.filter(e,t,i)}C.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?C.find.matchesSelector(n,t)?[n]:[]:C.find.matches(t,C.grep(e,function(t){return 1===t.nodeType}))},C.fn.extend({find:function(t){var e,i,n=this.length,r=this;if("string"!=typeof t)return this.pushStack(C(t).filter(function(){for(e=0;e1?C.uniqueSort(i):i},filter:function(t){return this.pushStack(I(this,t||[],!1))},not:function(t){return this.pushStack(I(this,t||[],!0))},is:function(t){return!!I(this,"string"==typeof t&&A.test(t)?C(t):t||[],!1).length}});var O,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||O,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),E.test(n[1])&&C.isPlainObject(e))for(n in e)v(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(r=b.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==i.ready?i.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,O=C(b);var F=/^(?:parents|prev(?:Until|All))/,$={children:!0,contents:!0,next:!0,prev:!0};function N(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),i=e.length;return this.filter(function(){for(var t=0;t-1:1===i.nodeType&&C.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(C(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,i){return T(t,"parentNode",i)},next:function(t){return N(t,"nextSibling")},prev:function(t){return N(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,i){return T(t,"nextSibling",i)},prevUntil:function(t,e,i){return T(t,"previousSibling",i)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(M(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},function(t,e){C.fn[t]=function(i,n){var r=C.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=C.filter(n,r)),this.length>1&&($[t]||C.uniqueSort(r),F.test(t)&&r.reverse()),this.pushStack(r)}});var L=/[^\x20\t\r\n\f]+/g;function R(t){return t}function j(t){throw t}function H(t,e,i,n){var r;try{t&&v(r=t.promise)?r.call(t).done(e).fail(i):t&&v(r=t.then)?r.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(L)||[],function(t,i){e[i]=!0}),e}(t):C.extend({},t);var e,i,n,r,o=[],s=[],a=-1,l=function(){for(r=r||t.once,n=e=!0;s.length;a=-1)for(i=s.shift();++a-1;)o.splice(i,1),i<=a&&a--}),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||e||(o=i=""),this},locked:function(){return!!r},fireWith:function(t,i){return r||(i=[t,(i=i||[]).slice?i.slice():i],s.push(i),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!n}};return u},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return C.Deferred(function(i){C.each(e,function(e,n){var r=v(t[n[4]])&&t[n[4]];o[n[1]](function(){var t=r&&r.apply(this,arguments);t&&v(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(t,n,r){var o=0;function s(t,e,n,r){return function(){var a=this,l=arguments,u=function(){var i,u;if(!(t=o&&(n!==j&&(a=void 0,l=[i]),e.rejectWith(a,l))}};t?c():(C.Deferred.getStackHook&&(c.stackTrace=C.Deferred.getStackHook()),i.setTimeout(c))}}return C.Deferred(function(i){e[0][3].add(s(0,i,v(r)?r:R,i.notifyWith)),e[1][3].add(s(0,i,v(t)?t:R)),e[2][3].add(s(0,i,v(n)?n:j))}).promise()},promise:function(t){return null!=t?C.extend(t,r):r}},o={};return C.each(e,function(t,i){var s=i[2],a=i[5];r[i[1]]=s.add,a&&s.add(function(){n=a},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(i[3].fire),o[i[0]]=function(){return o[i[0]+"With"](this===o?void 0:this,arguments),this},o[i[0]+"With"]=s.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,i=e,n=Array(i),r=a.call(arguments),o=C.Deferred(),s=function(t){return function(i){n[t]=this,r[t]=arguments.length>1?a.call(arguments):i,--e||o.resolveWith(n,r)}};if(e<=1&&(H(t,o.done(s(i)).resolve,o.reject,!e),"pending"===o.state()||v(r[i]&&r[i].then)))return o.then();for(;i--;)H(r[i],s(i),o.reject);return o.promise()}});var z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){i.console&&i.console.warn&&t&&z.test(t.name)&&i.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){i.setTimeout(function(){throw t})};var W=C.Deferred();function U(){b.removeEventListener("DOMContentLoaded",U),i.removeEventListener("load",U),C.ready()}C.fn.ready=function(t){return W.then(t).catch(function(t){C.readyException(t)}),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||W.resolveWith(b,[C]))}}),C.ready.then=W.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?i.setTimeout(C.ready):(b.addEventListener("DOMContentLoaded",U),i.addEventListener("load",U));var B=function(t,e,i,n,r,o,s){var a=0,l=t.length,u=null==i;if("object"===w(i))for(a in r=!0,i)B(t,e,a,i[a],!0,o,s);else if(void 0!==n&&(r=!0,v(n)||(s=!0),u&&(s?(e.call(t,n),e=null):(u=e,e=function(t,e,i){return u.call(C(t),i)})),e))for(;a1,null,!0)},removeData:function(t){return this.each(function(){Q.remove(this,t)})}}),C.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=Z.get(t,e),i&&(!n||Array.isArray(i)?n=Z.access(t,e,C.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=C.queue(t,e),n=i.length,r=i.shift(),o=C._queueHooks(t,e);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,function(){C.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return Z.get(t,i)||Z.access(t,i,{empty:C.Callbacks("once memory").add(function(){Z.remove(t,[e+"queue",i])})})}}),C.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length\x20\t\r\n\f]*)/i,vt=/^$|^module$|\/(?:java|ecma)script/i;ft=b.createDocumentFragment().appendChild(b.createElement("div")),(pt=b.createElement("input")).setAttribute("type","radio"),pt.setAttribute("checked","checked"),pt.setAttribute("name","t"),ft.appendChild(pt),m.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="",m.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue,ft.innerHTML="",m.option=!!ft.lastChild;var yt={thead:[1,"","
        "],col:[2,"","
        "],tr:[2,"","
        "],td:[3,"","
        "],_default:[0,"",""]};function bt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&M(t,e)?C.merge([t],i):i}function _t(t,e){for(var i=0,n=t.length;i",""]);var xt=/<|&#?\w+;/;function wt(t,e,i,n,r){for(var o,s,a,l,u,c,h=e.createDocumentFragment(),d=[],f=0,p=t.length;f-1)r&&r.push(o);else if(u=st(o),s=bt(h.appendChild(o),"script"),u&&_t(s),i)for(c=0;o=s[c++];)vt.test(o.type||"")&&i.push(o);return h}var Ct=/^key/,kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Dt=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function St(){return!1}function At(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function Mt(t,e,i,n,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof i&&(n=n||i,i=void 0),e)Mt(t,a,i,n,e[a],o);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=St;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return C().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=C.guid++)),t.each(function(){C.event.add(this,e,r,n,i)})}function Et(t,e,i){i?(Z.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var n,r,o=Z.get(this,e);if(1&t.isTrigger&&this[e]){if(o.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=a.call(arguments),Z.set(this,e,o),n=i(this,e),this[e](),o!==(r=Z.get(this,e))||n?Z.set(this,e,!1):r={},o!==r)return t.stopImmediatePropagation(),t.preventDefault(),r.value}else o.length&&(Z.set(this,e,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Z.get(t,e)&&C.event.add(t,e,Tt)}C.event={global:{},add:function(t,e,i,n,r){var o,s,a,l,u,c,h,d,f,p,g,m=Z.get(t);if(K(t))for(i.handler&&(i=(o=i).handler,r=o.selector),r&&C.find.matchesSelector(ot,r),i.guid||(i.guid=C.guid++),(l=m.events)||(l=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(L)||[""]).length;u--;)f=g=(a=Dt.exec(e[u])||[])[1],p=(a[2]||"").split(".").sort(),f&&(h=C.event.special[f]||{},f=(r?h.delegateType:h.bindType)||f,h=C.event.special[f]||{},c=C.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&C.expr.match.needsContext.test(r),namespace:p.join(".")},o),(d=l[f])||((d=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,n,p,s)||t.addEventListener&&t.addEventListener(f,s)),h.add&&(h.add.call(t,c),c.handler.guid||(c.handler.guid=i.guid)),r?d.splice(d.delegateCount++,0,c):d.push(c),C.event.global[f]=!0)},remove:function(t,e,i,n,r){var o,s,a,l,u,c,h,d,f,p,g,m=Z.hasData(t)&&Z.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(L)||[""]).length;u--;)if(f=g=(a=Dt.exec(e[u])||[])[1],p=(a[2]||"").split(".").sort(),f){for(h=C.event.special[f]||{},d=l[f=(n?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!r&&g!==c.origType||i&&i.guid!==c.guid||a&&!a.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(t,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,p,m.handle)||C.removeEvent(t,f,m.handle),delete l[f])}else for(f in l)C.event.remove(t,f+e[u],i,n,!0);C.isEmptyObject(l)&&Z.remove(t,"handle events")}},dispatch:function(t){var e,i,n,r,o,s,a=new Array(arguments.length),l=C.event.fix(t),u=(Z.get(this,"events")||Object.create(null))[l.type]||[],c=C.event.special[l.type]||{};for(a[0]=l,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},i=0;i-1:C.find(r,this,null,[u]).length),s[r]&&o.push(n);o.length&&a.push({elem:u,handlers:o})}return u=this,l\s*$/g;function Ft(t,e){return M(t,"table")&&M(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function $t(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Nt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(t,e){var i,n,r,o,s,a;if(1===e.nodeType){if(Z.hasData(t)&&(a=Z.get(t).events))for(r in Z.remove(e,"handle events"),a)for(i=0,n=a[r].length;i1&&"string"==typeof p&&!m.checkClone&&Ot.test(p))return t.each(function(r){var o=t.eq(r);g&&(e[0]=p.call(this,r,o.html())),jt(o,e,i,n)});if(d&&(o=(r=wt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===r.childNodes.length&&(r=o),o||n)){for(a=(s=C.map(bt(r,"script"),$t)).length;h0&&_t(s,!l&&bt(t,"script")),a},cleanData:function(t){for(var e,i,n,r=C.event.special,o=0;void 0!==(i=t[o]);o++)if(K(i)){if(e=i[Z.expando]){if(e.events)for(n in e.events)r[n]?C.event.remove(i,n):C.removeEvent(i,n,e.handle);i[Z.expando]=void 0}i[Q.expando]&&(i[Q.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Ht(this,t,!0)},remove:function(t){return Ht(this,t)},text:function(t){return B(this,function(t){return void 0===t?C.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return jt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ft(this,t).appendChild(t)})},prepend:function(){return jt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ft(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return jt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return jt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return C.clone(this,t,e)})},html:function(t){return B(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!It.test(t)&&!yt[(mt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;i3,ot.removeChild(t)),a}}))}();var Yt=["Webkit","Moz","ms"],Xt=b.createElement("div").style,Kt={};function Gt(t){return C.cssProps[t]||Kt[t]||(t in Xt?t:Kt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Yt.length;i--;)if((t=Yt[i]+e)in Xt)return t}(t)||t)}var Zt=/^(none|table(?!-c[ea]).+)/,Qt=/^--/,Jt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,i){var n=nt.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function ie(t,e,i,n,r,o){var s="width"===e?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(l+=C.css(t,i+rt[s],!0,r)),n?("content"===i&&(l-=C.css(t,"padding"+rt[s],!0,r)),"margin"!==i&&(l-=C.css(t,"border"+rt[s]+"Width",!0,r))):(l+=C.css(t,"padding"+rt[s],!0,r),"padding"!==i?l+=C.css(t,"border"+rt[s]+"Width",!0,r):a+=C.css(t,"border"+rt[s]+"Width",!0,r));return!n&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))||0),l}function ne(t,e,i){var n=Wt(t),r=(!m.boxSizingReliable()||i)&&"border-box"===C.css(t,"boxSizing",!1,n),o=r,s=qt(t,e,n),a="offset"+e[0].toUpperCase()+e.slice(1);if(zt.test(s)){if(!i)return s;s="auto"}return(!m.boxSizingReliable()&&r||!m.reliableTrDimensions()&&M(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,n))&&t.getClientRects().length&&(r="border-box"===C.css(t,"boxSizing",!1,n),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ie(t,e,i||(r?"border":"content"),o,n,s)+"px"}function re(t,e,i,n,r){return new re.prototype.init(t,e,i,n,r)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=qt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=X(e),l=Qt.test(e),u=t.style;if(l||(e=Gt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:u[e];"string"==(o=typeof i)&&(r=nt.exec(i))&&r[1]&&(i=ut(t,e,r),o="number"),null!=i&&i==i&&("number"!==o||l||(i+=r&&r[3]||(C.cssNumber[a]?"":"px")),m.clearCloneStyle||""!==i||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n))||(l?u.setProperty(e,i):u[e]=i))}},css:function(t,e,i,n){var r,o,s,a=X(e);return Qt.test(e)||(e=Gt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=qt(t,e,n)),"normal"===r&&e in te&&(r=te[e]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),C.each(["height","width"],function(t,e){C.cssHooks[e]={get:function(t,i,n){if(i)return!Zt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,n):Ut(t,Jt,function(){return ne(t,e,n)})},set:function(t,i,n){var r,o=Wt(t),s=!m.scrollboxSize()&&"absolute"===o.position,a=(s||n)&&"border-box"===C.css(t,"boxSizing",!1,o),l=n?ie(t,e,n,a,o):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ie(t,e,"border",!1,o)-.5)),l&&(r=nt.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=C.css(t,e)),ee(0,i,l)}}}),C.cssHooks.marginLeft=Vt(m.reliableMarginLeft,function(t,e){if(e)return(parseFloat(qt(t,"marginLeft"))||t.getBoundingClientRect().left-Ut(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(t,e){C.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+rt[n]+e]=o[n]||o[n-2]||o[0];return r}},"margin"!==t&&(C.cssHooks[t+e].set=ee)}),C.fn.extend({css:function(t,e){return B(this,function(t,e,i){var n,r,o={},s=0;if(Array.isArray(e)){for(n=Wt(t),r=e.length;s1)}}),C.Tween=re,re.prototype={constructor:re,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(C.cssNumber[i]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,i=re.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Gt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=re.prototype.init,C.fx.step={};var oe,se,ae=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function ue(){se&&(!1===b.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(ue):i.setTimeout(ue,C.fx.interval),C.fx.tick())}function ce(){return i.setTimeout(function(){oe=void 0}),oe=Date.now()}function he(t,e){var i,n=0,r={height:t};for(e=e?1:0;n<4;n+=2-e)r["margin"+(i=rt[n])]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function de(t,e,i){for(var n,r=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=r.length;o1)},removeAttr:function(t){return this.each(function(){C.removeAttr(this,t)})}}),C.extend({attr:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,i):(1===o&&C.isXMLDoc(t)||(r=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?pe:void 0)),void 0!==i?null===i?void C.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:null==(n=C.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!m.radioValue&&"radio"===e&&M(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,r=e&&e.match(L);if(r&&1===t.nodeType)for(;i=r[n++];)t.removeAttribute(i)}}),pe={set:function(t,e,i){return!1===e?C.removeAttr(t,i):t.setAttribute(i,i),i}},C.each(C.expr.match.bool.source.match(/\w+/g),function(t,e){var i=ge[e]||C.find.attr;ge[e]=function(t,e,n){var r,o,s=e.toLowerCase();return n||(o=ge[s],ge[s]=r,r=null!=i(t,e,n)?s:null,ge[s]=o),r}});var me=/^(?:input|select|textarea|button)$/i,ve=/^(?:a|area)$/i;function ye(t){return(t.match(L)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function _e(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}C.fn.extend({prop:function(t,e){return B(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[C.propFix[t]||t]})}}),C.extend({prop:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,r=C.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ve.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(t){var e,i,n,r,o,s,a,l=0;if(v(t))return this.each(function(e){C(this).addClass(t.call(this,e,be(this)))});if((e=_e(t)).length)for(;i=this[l++];)if(r=be(i),n=1===i.nodeType&&" "+ye(r)+" "){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(a=ye(n))&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,r,o,s,a,l=0;if(v(t))return this.each(function(e){C(this).removeClass(t.call(this,e,be(this)))});if(!arguments.length)return this.attr("class","");if((e=_e(t)).length)for(;i=this[l++];)if(r=be(i),n=1===i.nodeType&&" "+ye(r)+" "){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r!==(a=ye(n))&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t,n="string"===i||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):v(t)?this.each(function(i){C(this).toggleClass(t.call(this,i,be(this),e),e)}):this.each(function(){var e,r,o,s;if(n)for(r=0,o=C(this),s=_e(t);e=s[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||((e=be(this))&&Z.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Z.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+ye(be(i))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;C.fn.extend({val:function(t){var e,i,n,r=this[0];return arguments.length?(n=v(t),this.each(function(i){var r;1===this.nodeType&&(null==(r=n?t.call(this,i,C(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=C.map(r,function(t){return null==t?"":t+""})),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))})):r?(e=C.valHooks[r.type]||C.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(xe,""):null==i?"":i:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:ye(C.text(t))}},select:{get:function(t){var e,i,n,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?o+1:r.length;for(n=o<0?l:s?o:0;n-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},m.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),m.focusin="onfocusin"in i;var we=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,n,r){var o,s,a,l,u,c,h,d,p=[n||b],g=f.call(t,"type")?t.type:t,m=f.call(t,"namespace")?t.namespace.split("."):[];if(s=d=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!we.test(g+C.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),u=g.indexOf(":")<0&&"on"+g,(t=t[C.expando]?t:new C.Event(g,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:C.makeArray(e,[t]),h=C.event.special[g]||{},r||!h.trigger||!1!==h.trigger.apply(n,e))){if(!r&&!h.noBubble&&!y(n)){for(l=h.delegateType||g,we.test(l+g)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(n.ownerDocument||b)&&p.push(a.defaultView||a.parentWindow||i)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)d=s,t.type=o>1?l:h.bindType||g,(c=(Z.get(s,"events")||Object.create(null))[t.type]&&Z.get(s,"handle"))&&c.apply(s,e),(c=u&&s[u])&&c.apply&&K(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=g,r||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(p.pop(),e)||!K(n)||u&&v(n[g])&&!y(n)&&((a=n[u])&&(n[u]=null),C.event.triggered=g,t.isPropagationStopped()&&d.addEventListener(g,Ce),n[g](),t.isPropagationStopped()&&d.removeEventListener(g,Ce),C.event.triggered=void 0,a&&(n[u]=a)),t.result}},simulate:function(t,e,i){var n=C.extend(new C.Event,i,{type:t,isSimulated:!0});C.event.trigger(n,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each(function(){C.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return C.event.trigger(t,e,i,!0)}}),m.focusin||C.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var n=this.ownerDocument||this.document||this,r=Z.access(n,e);r||n.addEventListener(t,i,!0),Z.access(n,e,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,r=Z.access(n,e)-1;r?Z.access(n,e,r):(n.removeEventListener(t,i,!0),Z.remove(n,e))}}});var ke=i.location,De={guid:Date.now()},Te=/\?/;C.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new i.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+t),e};var Se=/\[\]$/,Ae=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;function Ie(t,e,i,n){var r;if(Array.isArray(e))C.each(e,function(e,r){i||Se.test(t)?n(t,r):Ie(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,i,n)});else if(i||"object"!==w(e))n(t,e);else for(r in e)Ie(t+"["+r+"]",e[r],i,n)}C.param=function(t,e){var i,n=[],r=function(t,e){var i=v(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,function(){r(this.name,this.value)});else for(i in t)Ie(i,t[i],e,r);return n.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&Ee.test(this.nodeName)&&!Me.test(t)&&(this.checked||!gt.test(t))}).map(function(t,e){var i=C(this).val();return null==i?null:Array.isArray(i)?C.map(i,function(t){return{name:e.name,value:t.replace(Ae,"\r\n")}}):{name:e.name,value:i.replace(Ae,"\r\n")}}).get()}});var Oe=/%20/g,Pe=/#.*$/,Fe=/([?&])_=[^&]*/,$e=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ne=/^(?:GET|HEAD)$/,Le=/^\/\//,Re={},je={},He="*/".concat("*"),ze=b.createElement("a");function We(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(L)||[];if(v(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Ue(t,e,i,n){var r={},o=t===je;function s(a){var l;return r[a]=!0,C.each(t[a]||[],function(t,a){var u=a(e,i,n);return"string"!=typeof u||o||r[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),s(u),!1)}),l}return s(e.dataTypes[0])||!r["*"]&&s("*")}function Be(t,e){var i,n,r=C.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&C.extend(!0,t,n),t}ze.href=ke.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ke.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Be(Be(t,C.ajaxSettings),e):Be(C.ajaxSettings,t)},ajaxPrefilter:We(Re),ajaxTransport:We(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,o,s,a,l,u,c,h,d,f=C.ajaxSetup({},e),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?C(p):C.event,m=C.Deferred(),v=C.Callbacks("once memory"),y=f.statusCode||{},_={},x={},w="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(u){if(!s)for(s={};e=$e.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)k.always(t[k.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||w;return n&&n.abort(e),D(0,e),this}};if(m.promise(k),f.url=((t||f.url||ke.href)+"").replace(Le,ke.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){l=b.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=ze.protocol+"//"+ze.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=C.param(f.data,f.traditional)),Ue(Re,f,e,k),u)return k;for(h in(c=C.event&&f.global)&&0==C.active++&&C.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ne.test(f.type),r=f.url.replace(Pe,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Oe,"+")):(d=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Te.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Fe,"$1"),d=(Te.test(r)?"&":"?")+"_="+De.guid+++d),f.url=r+d),f.ifModified&&(C.lastModified[r]&&k.setRequestHeader("If-Modified-Since",C.lastModified[r]),C.etag[r]&&k.setRequestHeader("If-None-Match",C.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+He+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(p,k,f)||u))return k.abort();if(w="abort",v.add(f.complete),k.done(f.success),k.fail(f.error),n=Ue(je,f,e,k)){if(k.readyState=1,c&&g.trigger("ajaxSend",[k,f]),u)return k;f.async&&f.timeout>0&&(a=i.setTimeout(function(){k.abort("timeout")},f.timeout));try{u=!1,n.send(_,D)}catch(t){if(u)throw t;D(-1,t)}}else D(-1,"No Transport");function D(t,e,s,l){var h,d,b,_,x,w=e;u||(u=!0,a&&i.clearTimeout(a),n=void 0,o=l||"",k.readyState=t>0?4:0,h=t>=200&&t<300||304===t,s&&(_=function(t,e,i){for(var n,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),i[o]}(f,k,s)),!h&&C.inArray("script",f.dataTypes)>-1&&(f.converters["text script"]=function(){}),_=function(t,e,i,n){var r,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(f,_,k,h),h?(f.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(C.lastModified[r]=x),(x=k.getResponseHeader("etag"))&&(C.etag[r]=x)),204===t||"HEAD"===f.type?w="nocontent":304===t?w="notmodified":(w=_.state,d=_.data,h=!(b=_.error))):(b=w,!t&&w||(w="error",t<0&&(t=0))),k.status=t,k.statusText=(e||w)+"",h?m.resolveWith(p,[d,w,k]):m.rejectWith(p,[k,w,b]),k.statusCode(y),y=void 0,c&&g.trigger(h?"ajaxSuccess":"ajaxError",[k,f,h?d:b]),v.fireWith(p,[k,w]),c&&(g.trigger("ajaxComplete",[k,f]),--C.active||C.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,i){return C.get(t,e,i,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],function(t,e){C[e]=function(t,i,n,r){return v(i)&&(r=r||n,n=i,i=void 0),C.ajax(C.extend({url:t,type:e,dataType:r,data:i,success:n},C.isPlainObject(t)&&t))}}),C.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),C._evalUrl=function(t,e,i){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,i)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return v(t)?this.each(function(e){C(this).wrapInner(t.call(this,e))}):this.each(function(){var e=C(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=v(t);return this.each(function(i){C(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(t){}};var qe={0:200,1223:204},Ve=C.ajaxSettings.xhr();m.cors=!!Ve&&"withCredentials"in Ve,m.ajax=Ve=!!Ve,C.ajaxTransport(function(t){var e,n;if(m.cors||Ve&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(qe[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout(function(){e&&n()})},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),C.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),C.ajaxTransport("script",function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,r){e=C(" From 0e21a9581738cfc9017862eda41bb3aba15082f5 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 9 Nov 2021 19:39:32 -0800 Subject: [PATCH 106/144] Escape error message in asset autdit apI (same as in v5) Signed-off-by: snipe --- app/Http/Controllers/Api/AssetsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 6e56b317d..b1337c45b 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -899,7 +899,7 @@ class AssetsController extends Controller } } - return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag'=> e($request->input('asset_tag'))], 'Asset with tag '.$request->input('asset_tag').' not found')); + return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag'=> e($request->input('asset_tag'))], 'Asset with tag '.e($request->input('asset_tag')).' not found')); From 542ab75d892aa1130bb9bf010bcbb340952a5c54 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 9 Nov 2021 19:39:50 -0800 Subject: [PATCH 107/144] Added new backup routes Signed-off-by: snipe --- routes/web.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/routes/web.php b/routes/web.php index c1c439638..a17c51151 100644 --- a/routes/web.php +++ b/routes/web.php @@ -189,6 +189,14 @@ Route::group(['prefix' => 'admin', 'middleware' => ['auth', 'authorize:superuser [SettingsController::class, 'postBackups'] )->name('settings.backups.create'); + Route::post('/restore/{filename}', + [SettingsController::class, 'postRestore'] + )->name('settings.backups.restore'); + + Route::post('/upload', + [SettingsController::class, 'postUploadBackup'] + )->name('settings.backups.upload'); + Route::get('/', [SettingsController::class, 'getBackups'])->name('settings.backups.index'); }); From 1b1b54fbf4635d1aadcd0a805d0a6aabddab73d8 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 9 Nov 2021 22:37:49 -0800 Subject: [PATCH 108/144] Add modified_value and modified_display so we can use the formatted date but still sort correctly Signed-off-by: snipe --- app/Http/Controllers/SettingsController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index a52598592..22a4336e6 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -1018,17 +1018,25 @@ class SettingsController extends Controller $backup_files = Storage::files($path); $files_raw = []; + if (count($backup_files) > 0) { for ($f = 0; $f < count($backup_files); $f++) { // Skip dotfiles like .gitignore and .DS_STORE if ((substr(basename($backup_files[$f]), 0, 1) != '.')) { + //$lastmodified = Carbon::parse(Storage::lastModified($backup_files[$f]))->toDatetimeString(); + $file_timestamp = Storage::lastModified($backup_files[$f]); + + $files_raw[] = [ 'filename' => basename($backup_files[$f]), 'filesize' => Setting::fileSizeConvert(Storage::size($backup_files[$f])), - 'modified' => Storage::lastModified($backup_files[$f]), + 'modified_value' => $file_timestamp, + 'modified_display' => Helper::getFormattedDateObject($file_timestamp, $type = 'datetime', false), + ]; } + } } From 76506dabbfdc3d405bd1425aff3c3bec2b9410bc Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 9 Nov 2021 22:38:14 -0800 Subject: [PATCH 109/144] Made helpers call full namespace (tho I have no idea why this was necessary) Signed-off-by: snipe --- app/Http/Requests/AssetFileRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/AssetFileRequest.php b/app/Http/Requests/AssetFileRequest.php index 1aa1fadb8..f8631f23b 100644 --- a/app/Http/Requests/AssetFileRequest.php +++ b/app/Http/Requests/AssetFileRequest.php @@ -21,7 +21,7 @@ class AssetFileRequest extends Request */ public function rules() { - $max_file_size = Helper::file_upload_max_size(); + $max_file_size = \App\Helpers\Helper::file_upload_max_size(); return [ 'file.*' => 'required|mimes:png,gif,jpg,svg,jpeg,doc,docx,pdf,txt,zip,rar,xls,xlsx,lic,xml,rtf,webp|max:'.$max_file_size, From 3b25093aeb0bf4f6d4e56d03396d05ea69cf47de Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 9 Nov 2021 22:38:27 -0800 Subject: [PATCH 110/144] Removed noisy debugging Signed-off-by: snipe --- app/Http/Requests/ImageUploadRequest.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/Http/Requests/ImageUploadRequest.php b/app/Http/Requests/ImageUploadRequest.php index c49201111..45d7bca5e 100644 --- a/app/Http/Requests/ImageUploadRequest.php +++ b/app/Http/Requests/ImageUploadRequest.php @@ -90,11 +90,6 @@ class ImageUploadRequest extends Request $use_db_field = $db_fieldname; } - \Log::info('Image path is: '.$path); - \Log::debug('Type is: '.$type); - \Log::debug('Form fieldname is: '.$form_fieldname); - \Log::debug('DB fieldname is: '.$use_db_field); - \Log::debug('Trying to upload to '. $path); // ConvertBase64ToFiles just changes object type, // as it cannot currently insert files to $this->files From 05c6254fdc223ab1e42bbcdc000e03896310b108 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 9 Nov 2021 22:39:33 -0800 Subject: [PATCH 111/144] Updated snipeit.js with "restore" modal code Signed-off-by: snipe --- package-lock.json | 2 +- public/css/build/overrides.css | 1 - public/css/dist/all.css | 1 + public/js/build/app.js | 43 ++++++++++++++++++++++++++++++---- public/js/dist/all.js | 43 ++++++++++++++++++++++++++++++---- public/js/snipeit.js | 30 ++++++++++++++++++++++++ public/mix-manifest.json | 4 ++-- resources/assets/js/snipeit.js | 32 +++++++++++++++++++++++++ 8 files changed, 144 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 463ca7dc3..05d2f032f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15845,7 +15845,7 @@ "jquery": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", - "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" + "integrity": "sha1-xyoJ8Vwb3OFC9J2/EXC9+K2sJHA=" }, "jquery-form-validator": { "version": "2.3.79", diff --git a/public/css/build/overrides.css b/public/css/build/overrides.css index 2ce2c2327..c676b59b6 100644 --- a/public/css/build/overrides.css +++ b/public/css/build/overrides.css @@ -554,7 +554,6 @@ th.css-accessory > .th-inner::before { .form-group.has-error label { color: #a94442; } - .select2-container--default .select2-selection--multiple { border-radius: 0px; } diff --git a/public/css/dist/all.css b/public/css/dist/all.css index d0ae4b8a2..269ae29c6 100644 --- a/public/css/dist/all.css +++ b/public/css/dist/all.css @@ -20465,6 +20465,7 @@ th.css-accessory > .th-inner::before { border-radius: 0px; } + .select2-container { box-sizing: border-box; display: inline-block; diff --git a/public/js/build/app.js b/public/js/build/app.js index 041da5eee..4bb786901 100644 --- a/public/js/build/app.js +++ b/public/js/build/app.js @@ -1695,7 +1695,36 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content'); (function ($, settings) { var Components = {}; - Components.modals = {}; // confirm delete modal + Components.modals = {}; // confirm restore modal + + Components.modals.confirmRestore = function () { + var $el = $('table'); + var events = { + 'click': function click(evnt) { + var $context = $(this); + var $restoreConfirmModal = $('#restoreConfirmModal'); + var href = $context.attr('href'); + var message = $context.attr('data-content'); + var title = $context.attr('data-title'); + $('#restoreConfirmModalLabel').text(title); + $restoreConfirmModal.find('.modal-body').text(message); + $('#restoreForm').attr('action', href); + $restoreConfirmModal.modal({ + show: true + }); + return false; + } + }; + + var render = function render() { + $el.on('click', '.restore-asset', events['click']); + }; + + return { + render: render + }; + }; // confirm delete modal + Components.modals.confirmDelete = function () { var $el = $('table'); @@ -1731,6 +1760,7 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content'); $(function () { + new Components.modals.confirmRestore().render(); new Components.modals.confirmDelete().render(); }); })(jQuery, window.snipeit.settings); @@ -1886,10 +1916,10 @@ $(document).ready(function () { return x !== 0; }); // makes sure we're not selecting the same thing twice for multiples - var filteredResponse = response.items.filter(function (item) { + var filteredResponse = response.results.filter(function (item) { return currentlySelected.indexOf(+item.id) < 0; }); - var first = currentlySelected.length > 0 ? filteredResponse[0] : response.items[0]; + var first = currentlySelected.length > 0 ? filteredResponse[0] : response.results[0]; if (first && first.id) { first.selected = true; @@ -2095,7 +2125,7 @@ $(document).ready(function () { for (var i = 0; i < this.files.length; i++) { total_size += this.files[i].size; - $(id + '-info').append('' + this.files[i].name + ' (' + formatBytes(this.files[i].size) + ') '); + $(id + '-info').append('' + htmlEntities(this.files[i].name) + ' (' + formatBytes(this.files[i].size) + ') '); } console.log('Max size is: ' + max_size); @@ -2111,10 +2141,15 @@ $(document).ready(function () { } }); }); + +function htmlEntities(str) { + return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); +} /** * Toggle disabled */ + (function ($) { $.fn.toggleDisabled = function (callback) { return this.each(function () { diff --git a/public/js/dist/all.js b/public/js/dist/all.js index f22f12b48..35aa39b9d 100644 --- a/public/js/dist/all.js +++ b/public/js/dist/all.js @@ -60833,7 +60833,36 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content'); (function ($, settings) { var Components = {}; - Components.modals = {}; // confirm delete modal + Components.modals = {}; // confirm restore modal + + Components.modals.confirmRestore = function () { + var $el = $('table'); + var events = { + 'click': function click(evnt) { + var $context = $(this); + var $restoreConfirmModal = $('#restoreConfirmModal'); + var href = $context.attr('href'); + var message = $context.attr('data-content'); + var title = $context.attr('data-title'); + $('#restoreConfirmModalLabel').text(title); + $restoreConfirmModal.find('.modal-body').text(message); + $('#restoreForm').attr('action', href); + $restoreConfirmModal.modal({ + show: true + }); + return false; + } + }; + + var render = function render() { + $el.on('click', '.restore-asset', events['click']); + }; + + return { + render: render + }; + }; // confirm delete modal + Components.modals.confirmDelete = function () { var $el = $('table'); @@ -60869,6 +60898,7 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content'); $(function () { + new Components.modals.confirmRestore().render(); new Components.modals.confirmDelete().render(); }); })(jQuery, window.snipeit.settings); @@ -61024,10 +61054,10 @@ $(document).ready(function () { return x !== 0; }); // makes sure we're not selecting the same thing twice for multiples - var filteredResponse = response.items.filter(function (item) { + var filteredResponse = response.results.filter(function (item) { return currentlySelected.indexOf(+item.id) < 0; }); - var first = currentlySelected.length > 0 ? filteredResponse[0] : response.items[0]; + var first = currentlySelected.length > 0 ? filteredResponse[0] : response.results[0]; if (first && first.id) { first.selected = true; @@ -61233,7 +61263,7 @@ $(document).ready(function () { for (var i = 0; i < this.files.length; i++) { total_size += this.files[i].size; - $(id + '-info').append('' + this.files[i].name + ' (' + formatBytes(this.files[i].size) + ') '); + $(id + '-info').append('' + htmlEntities(this.files[i].name) + ' (' + formatBytes(this.files[i].size) + ') '); } console.log('Max size is: ' + max_size); @@ -61249,10 +61279,15 @@ $(document).ready(function () { } }); }); + +function htmlEntities(str) { + return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); +} /** * Toggle disabled */ + (function ($) { $.fn.toggleDisabled = function (callback) { return this.each(function () { diff --git a/public/js/snipeit.js b/public/js/snipeit.js index cfa646d9e..81c79c884 100644 --- a/public/js/snipeit.js +++ b/public/js/snipeit.js @@ -172,6 +172,36 @@ pieOptions = { $el.on('click', '.delete-asset', events['click']); }; + return { + render: render + }; + + // confirm restore modal + Components.modals.confirmRestore = function () { + var $el = $('table'); + + var events = { + 'click': function click(evnt) { + var $context = $(this); + var $dataConfirmModal = $('#restoreConfirmModal'); + var href = $context.attr('href'); + var message = $context.attr('data-content'); + var title = $context.attr('data-title'); + + $('#myModalLabel').text(title); + $dataConfirmModal.find('.modal-body').text(message); + $('#confirmRestoreForm').attr('action', href); + $dataConfirmModal.modal({ + show: true + }); + return false; + } + }; + + var render = function render() { + $el.on('click', '.restore-modal', events['click']); + }; + return { render: render }; diff --git a/public/mix-manifest.json b/public/mix-manifest.json index cd55b16f0..8c393d17f 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,5 +1,5 @@ { - "/js/build/app.js": "/js/build/app.js?id=c8a70594c0d99275266d", + "/js/build/app.js": "/js/build/app.js?id=202aad1c623e7f3c560c", "/css/dist/skins/skin-blue.css": "/css/dist/skins/skin-blue.css?id=83e39e254b7f9035eddc", "/css/build/overrides.css": "/css/build/overrides.css?id=b1866ec98d44c0a8ceea", "/css/build/app.css": "/css/build/app.css?id=61d5535cb27cce41d422", @@ -26,7 +26,7 @@ "/css/dist/bootstrap-table.css": "/css/dist/bootstrap-table.css?id=93c24b4c89490bbfd73e", "/js/build/vendor.js": "/js/build/vendor.js?id=651427cc4b45d8e68d0c", "/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=867755a1544f6c0ea828", - "/js/dist/all.js": "/js/dist/all.js?id=a233dcde4650f5d34491", + "/js/dist/all.js": "/js/dist/all.js?id=78b490e0623f67ef071d", "/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=efda2335fa5243175850", "/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=6e35fb4cb2f1063b3047", "/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=ec96c42439cdeb022133", diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index c74340b10..f55d16a87 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -84,6 +84,37 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content'); var Components = {}; Components.modals = {}; + // confirm restore modal + Components.modals.confirmRestore = function() { + var $el = $('table'); + + var events = { + 'click': function(evnt) { + var $context = $(this); + var $restoreConfirmModal = $('#restoreConfirmModal'); + var href = $context.attr('href'); + var message = $context.attr('data-content'); + var title = $context.attr('data-title'); + + $('#restoreConfirmModalLabel').text(title); + $restoreConfirmModal.find('.modal-body').text(message); + $('#restoreForm').attr('action', href); + $restoreConfirmModal.modal({ + show: true + }); + return false; + } + }; + + var render = function() { + $el.on('click', '.restore-asset', events['click']); + }; + + return { + render: render + }; + }; + // confirm delete modal Components.modals.confirmDelete = function() { var $el = $('table'); @@ -121,6 +152,7 @@ var baseUrl = $('meta[name="baseUrl"]').attr('content'); * Component definition stays out of load event, execution only happens. */ $(function() { + new Components.modals.confirmRestore().render(); new Components.modals.confirmDelete().render(); }); }(jQuery, window.snipeit.settings)); From 96f76e1f6b5ddf91c40c2285ebd3fc1217010da4 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 00:07:17 -0800 Subject: [PATCH 112/144] INCOMPLETE: Added restore and upload methods for backups Signed-off-by: snipe --- app/Http/Controllers/SettingsController.php | 95 ++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 22a4336e6..9f15493e2 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -11,7 +11,6 @@ use App\Models\Setting; use App\Models\User; use App\Notifications\FirstAdminNotification; use App\Notifications\MailTest; -use Artisan; use Auth; use Crypt; use DB; @@ -22,6 +21,8 @@ use Image; use Input; use Redirect; use Response; +use Illuminate\Support\Str; +use Illuminate\Support\Facades\Artisan; /** * This controller handles all actions related to Settings for @@ -1136,6 +1137,98 @@ class SettingsController extends Controller } } + + /** + * Uploads a backup file + * + * @author [A. Gianotto] [] + * + * @since [v6.0] + * + * @return Redirect + */ + + public function postUploadBackup(Request $request) { + + $max_file_size = Helper::file_upload_max_size(); + + $rules = [ + 'file' => 'required|mimes:zip|max:'.$max_file_size, + ]; + + $validator = \Validator::make($request->all(), $rules); + + if ($validator->passes()) { + + if ($request->hasFile('file')) { + + $upload_filename = 'uploaded-'.date('U').'-'.Str::slug(pathinfo($request->file('file')->getClientOriginalName(), PATHINFO_FILENAME)).'.zip'; + + Storage::putFileAs('app/backups', $request->file('file'), $upload_filename); + + return redirect()->route('settings.backups.index')->with('success', 'File uploaded'); + + } else { + return redirect()->route('settings.backups.index')->with('error', 'No file uploaded'); + } + + } else { + return redirect()->route('settings.backups.index')->withErrors($request->getErrors()); + } + + } + + /** + * Restore the backup file. + * + * @author [A. Gianotto] [] + * + * @since [v6.0] + * + * @return View + */ + public function postRestore($filename = null) + { + + if (! config('app.lock_passwords')) { + $path = 'app/backups'; + + if (Storage::exists($path.'/'.$filename)) { + + // grab the user's info so we can make sure they exist in the system + $user = User::find(Auth::user()->id); + + // run the restore command + Artisan::call('snipeit:restore', + [ + '--force' => true, + '--no-progress' => true, + 'filename' => storage_path($path).'/'.$filename + ]); + + $output = Artisan::output(); + + + // If it's greater than 300, it probably worked + if (strlen($output) > 300) { + return redirect()->route('settings.backups.index')->with('success', 'Your system has been restored.'); + + } else { + return redirect()->route('settings.backups.index')->with('error', $output); + + } + //dd($output); + + // insert the user if they are not there in the old one + // log the user out + } else { + return redirect()->route('settings.backups.index')->with('error', trans('admin/settings/message.backup.file_not_found')); + } + } else { + return redirect()->route('settings.backups.index')->with('error', trans('general.feature_disabled')); + } + } + /** * Return a form to allow a super admin to update settings. * From 76685d7fd31d7bcf8bcaa4daeff482d603b48174 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 00:07:32 -0800 Subject: [PATCH 113/144] Clearer text in restore artisan command Signed-off-by: snipe --- app/Console/Commands/RestoreFromBackup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/RestoreFromBackup.php b/app/Console/Commands/RestoreFromBackup.php index 8f8114229..93aacbeb3 100644 --- a/app/Console/Commands/RestoreFromBackup.php +++ b/app/Console/Commands/RestoreFromBackup.php @@ -14,7 +14,7 @@ class RestoreFromBackup extends Command */ protected $signature = 'snipeit:restore {--force : Skip the danger prompt; assuming you hit "y"} - {filename : The zip file to be migrated} + {filename : The full path of the .zip file to be migrated} {--no-progress : Don\'t show a progress bar}'; /** @@ -22,7 +22,7 @@ class RestoreFromBackup extends Command * * @var string */ - protected $description = 'Restore from a previously created backup'; + protected $description = 'Restore from a previously created Snipe-IT backup file'; /** * Create a new command instance. @@ -67,7 +67,7 @@ class RestoreFromBackup extends Command ZipArchive::ER_INCONS => 'Zip archive inconsistent.', ZipArchive::ER_INVAL => 'Invalid argument.', ZipArchive::ER_MEMORY => 'Malloc failure.', - ZipArchive::ER_NOENT => 'No such file.', + ZipArchive::ER_NOENT => 'No such file ('.$filename.') in directory '.$dir.'.', ZipArchive::ER_NOZIP => 'Not a zip archive.', ZipArchive::ER_OPEN => "Can't open file.", ZipArchive::ER_READ => 'Read error.', From cf070866f0ee9602e8e4710826afbe5f6236406e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 00:07:47 -0800 Subject: [PATCH 114/144] INCOMPLETE: Added more generic language strings Signed-off-by: snipe --- resources/lang/en/general.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 942947e6c..c16d464da 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -113,6 +113,8 @@ 'image' => 'Image', 'image_delete' => 'Delete Image', 'image_upload' => 'Upload Image', + 'filetypes_accepted_help' => 'Accepted filetype is :types. Max upload size allowed is :size.|Accepted filetypes are :types. Max upload size allowed is :size.', + 'filetypes_size_help' => 'Max upload size allowed is :size.', 'image_filetypes_help' => 'Accepted filetypes are jpg, webp, png, gif, and svg. Max upload size allowed is :size.', 'import' => 'Import', 'importing' => 'Importing', From 8590e5d67e6e195402c15a081bd60a17866afd13 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 00:08:15 -0800 Subject: [PATCH 115/144] UNRELATED: fixed wrong html tag for license view badge count Signed-off-by: snipe --- resources/views/licenses/view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.php index 5d5eadb88..7e4253f10 100755 --- a/resources/views/licenses/view.blade.php +++ b/resources/views/licenses/view.blade.php @@ -47,7 +47,7 @@
        - {{ $license->availCount()->count() }} / {{ $license->seats }} + {{ $license->availCount()->count() }} / {{ $license->seats }} From 856b9294f8e5ab63d7307af1df69f26f98fc6450 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 00:08:43 -0800 Subject: [PATCH 116/144] Improved BS tables on backups Signed-off-by: snipe --- resources/views/settings/backups.blade.php | 86 ++++++++++++++++------ 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/resources/views/settings/backups.blade.php b/resources/views/settings/backups.blade.php index 78537bb92..fed72052e 100644 --- a/resources/views/settings/backups.blade.php +++ b/resources/views/settings/backups.blade.php @@ -7,7 +7,15 @@ @stop @section('header_right') - {{ trans('general.back') }} + + {{ trans('general.back') }} + + +
        + {{ Form::hidden('_token', csrf_token()) }} + +
        + @stop {{-- Page content --}} @@ -15,10 +23,16 @@
        +
        +
        + + +
        + - - - + + + + + + @foreach ($files as $file) @@ -43,7 +60,8 @@ {{ $file['filename'] }} - + + @endforeach
        FileCreatedSize
        FileCreatedSize {{ trans('general.delete') }}
        {{ date("M d, Y g:i A", $file['modified']) }} {{ $file['modified_display'] }} {{ $file['modified_value'] }} {{ $file['filesize'] }} @@ -53,38 +71,62 @@ {{ trans('general.delete') }} + + + + Restore + + @endcan
        -
        -
        -
        -
        +
        +
        +
        +
        +
        -
        - {{ Form::hidden('_token', csrf_token()) }} + +

        Backup files are located in: {{ $path }}

        -

        - -

        +

        Upload Backup

        - @if (config('app.lock_passwords')) -

        {{ trans('general.feature_disabled') }}

        - @endif + +
        +
        + + {{ Form::open([ + 'method' => 'POST', + 'route' => 'settings.backups.upload', + 'files' => true, + 'class' => 'form-horizontal' ]) }} + @csrf - -

        Backup files are located in: {{ $path }}

        + + + + +

        {{ trans_choice('general.filetypes_accepted_help', 3, ['size' => Helper::file_upload_max_size_readable(), 'types' => '.zip']) }}

        + {!! $errors->first('file', '') !!} + + {{ Form::close() }} + +
        +
        - -
        - + + @stop From 457c6080cc60da50639c118ef1cb6520525327cf Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 01:43:45 -0800 Subject: [PATCH 117/144] Better handling if there was no file uploaded Signed-off-by: snipe --- app/Http/Controllers/SettingsController.php | 77 ++++++++++++--------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 9f15493e2..716743a17 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -1150,31 +1150,32 @@ class SettingsController extends Controller public function postUploadBackup(Request $request) { - $max_file_size = Helper::file_upload_max_size(); - - $rules = [ - 'file' => 'required|mimes:zip|max:'.$max_file_size, - ]; - - $validator = \Validator::make($request->all(), $rules); - - if ($validator->passes()) { - - if ($request->hasFile('file')) { - - $upload_filename = 'uploaded-'.date('U').'-'.Str::slug(pathinfo($request->file('file')->getClientOriginalName(), PATHINFO_FILENAME)).'.zip'; - - Storage::putFileAs('app/backups', $request->file('file'), $upload_filename); - - return redirect()->route('settings.backups.index')->with('success', 'File uploaded'); - - } else { - return redirect()->route('settings.backups.index')->with('error', 'No file uploaded'); - } - + if (!$request->hasFile('file')) { + return redirect()->route('settings.backups.index')->with('error', 'No file uploaded'); } else { - return redirect()->route('settings.backups.index')->withErrors($request->getErrors()); + $max_file_size = Helper::file_upload_max_size(); + + $rules = [ + 'file' => 'required|mimes:zip|max:'.$max_file_size, + ]; + + $validator = \Validator::make($request->all(), $rules); + + if ($validator->passes()) { + + + + $upload_filename = 'uploaded-'.date('U').'-'.Str::slug(pathinfo($request->file('file')->getClientOriginalName(), PATHINFO_FILENAME)).'.zip'; + + Storage::putFileAs('app/backups', $request->file('file'), $upload_filename); + + return redirect()->route('settings.backups.index')->with('success', 'File uploaded'); + } else { + return redirect()->route('settings.backups.index')->withErrors($request->getErrors()); + } } + + } @@ -1198,29 +1199,41 @@ class SettingsController extends Controller // grab the user's info so we can make sure they exist in the system $user = User::find(Auth::user()->id); + + // TODO: run a backup + + // TODO: add db:wipe + + // run the restore command Artisan::call('snipeit:restore', - [ - '--force' => true, - '--no-progress' => true, - 'filename' => storage_path($path).'/'.$filename - ]); + [ + '--force' => true, + '--no-progress' => true, + 'filename' => storage_path($path).'/'.$filename + ]); $output = Artisan::output(); - - + + // If it's greater than 300, it probably worked if (strlen($output) > 300) { return redirect()->route('settings.backups.index')->with('success', 'Your system has been restored.'); - } else { return redirect()->route('settings.backups.index')->with('error', $output); } //dd($output); - // insert the user if they are not there in the old one + // TODO: insert the user if they are not there in the old one + + + + // log the user out + // \Auth::logout(); + + } else { return redirect()->route('settings.backups.index')->with('error', trans('admin/settings/message.backup.file_not_found')); } From 230a56814585b66d042dd4c400e63f47c72134ad Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 01:44:11 -0800 Subject: [PATCH 118/144] Added help text and more info in the modal Signed-off-by: snipe --- resources/views/settings/backups.blade.php | 69 +++++++++++++--------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/resources/views/settings/backups.blade.php b/resources/views/settings/backups.blade.php index fed72052e..90d17b0d7 100644 --- a/resources/views/settings/backups.blade.php +++ b/resources/views/settings/backups.blade.php @@ -1,4 +1,6 @@ -@extends('layouts/default') +@extends('layouts/default', [ + 'helpText' => 'Backup files are located in: '.$path.'', +]) {{-- Page title --}} @section('title') @@ -72,8 +74,8 @@ {{ trans('general.delete') }} - + Restore @@ -91,37 +93,48 @@
        +

        Upload Backup

        - -

        Backup files are located in: {{ $path }}

        + {{ Form::open([ + 'method' => 'POST', + 'route' => 'settings.backups.upload', + 'files' => true, + 'class' => 'form-horizontal' ]) }} -

        Upload Backup

        + @csrf - -
        + +
        +
        + + + + + + +
        +
        + +
        - {{ Form::open([ - 'method' => 'POST', - 'route' => 'settings.backups.upload', - 'files' => true, - 'class' => 'form-horizontal' ]) }} - - @csrf - - - - - -

        {{ trans_choice('general.filetypes_accepted_help', 3, ['size' => Helper::file_upload_max_size_readable(), 'types' => '.zip']) }}

        - {!! $errors->first('file', '') !!} - - - {{ Form::close() }} +

        +

        {{ trans_choice('general.filetypes_accepted_help', 3, ['size' => Helper::file_upload_max_size_readable(), 'types' => '.zip']) }}

        + {!! $errors->first('image', '') !!} + +
        + + +
        + + {{ Form::close() }} + + +
        From ec2a3b0f35af3654ca076d87c60bad5b913cd0dd Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 Nov 2021 01:44:34 -0800 Subject: [PATCH 119/144] Updated label names Signed-off-by: snipe --- resources/views/layouts/default.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 46ca5be03..0138a6192 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -853,12 +853,12 @@ -