diff --git a/composer.json b/composer.json
index 2e2a7c1b..c8a4f63d 100644
--- a/composer.json
+++ b/composer.json
@@ -4,10 +4,9 @@
"type": "library",
"require": {
"php": "^8.0",
- "laravel/framework": "8.x|9.x",
+ "laravel/framework": "^8.0|^9.0|^10.0",
"intervention/image": "^2.5",
- "psr/container": "^1.0|^2.0",
- "illuminate/contracts": "8.x|^9.43"
+ "psr/container": "^1.0|^2.0"
},
"require-dev": {
"orchestra/testbench": "^7.17",
diff --git a/src/ChildResource.php b/src/ChildResource.php
index 8c4efae1..8a884420 100644
--- a/src/ChildResource.php
+++ b/src/ChildResource.php
@@ -2,7 +2,7 @@
namespace BadChoice\Thrust;
-use BadChoice\Thrust\ResourceManager;
+use BadChoice\Thrust\Facades\Thrust;
abstract class ChildResource extends Resource
{
@@ -57,6 +57,16 @@ public function parent($object)
public function getParentHasManyUrlParams($object)
{
$parent = $this->parent($object);
- return $this::$parentChildsRelation && $parent ? [app(ResourceManager::class)->resourceNameFromModel($parent), $parent->id, static::$parentChildsRelation] : null;
+ return $this::$parentChildsRelation && $parent ? [Thrust::resourceNameFromModel($parent), $parent->id, static::$parentChildsRelation] : null;
+ }
+
+ public function breadcrumbs(mixed $object): ?string
+ {
+ $parent = $this->parent($object);
+ if(! $parent) {
+ return null;
+ }
+ $parentResource = Thrust::make(Thrust::resourceNameFromModel($parent));
+ return implode(' / ', array_filter([$parentResource->breadcrumbs($parent), $parent->{$parentResource->nameField}]));
}
}
diff --git a/src/Console/Commands/Optimize.php b/src/Console/Commands/Optimize.php
deleted file mode 100644
index b67cf7e9..00000000
--- a/src/Console/Commands/Optimize.php
+++ /dev/null
@@ -1,21 +0,0 @@
-call(OptimizeCommand::class);
- $this->call(Cache::class);
-
- return static::SUCCESS;
- }
-}
diff --git a/src/Console/Commands/OptimizeClear.php b/src/Console/Commands/OptimizeClear.php
deleted file mode 100644
index 98c8afa6..00000000
--- a/src/Console/Commands/OptimizeClear.php
+++ /dev/null
@@ -1,21 +0,0 @@
-call(OptimizeClearCommand::class);
- $this->call(Clear::class);
-
- return static::SUCCESS;
- }
-}
diff --git a/src/Controllers/ThrustActionsController.php b/src/Controllers/ThrustActionsController.php
index 230f2a87..3b042238 100644
--- a/src/Controllers/ThrustActionsController.php
+++ b/src/Controllers/ThrustActionsController.php
@@ -25,7 +25,7 @@ public function toggle($resourceName, $id, $field)
public function create($resourceName)
{
- $action = $this->findActionForResource($resourceName, request('action'));
+ $action = $this->findActionForResource($resourceName, request('action'));
if (! $action) {
abort(404);
@@ -33,6 +33,9 @@ public function create($resourceName)
$action->setSelectedTargets(collect(explode(',', request('ids'))));
+ if(request('search')) {
+ $resourceName = Thrust::make($resourceName)::$searchResource ?? $resourceName;
+ }
return view('thrust::actions.create', [
'action' => $action,
'resourceName' => $resourceName,
@@ -60,13 +63,27 @@ public function perform($resourceName)
return back()->withMessage($response);
}
+ public function index($resourceName)
+ {
+ $resource = Thrust::make($resourceName);
+
+ return view('thrust::components.actionsIndex', [
+ 'actions' => collect($resource->searchActions(request('search'))),
+ 'resourceName' => $resource->name(),
+ ]);
+ }
+
private function findActionForResource($resourceName, $actionClass)
{
$resource = Thrust::make($resourceName);
- $action = collect($resource->actions())->first(function ($action) use ($actionClass) {
+ $action = collect($resource->searchActions(request('search')))->first(function ($action) use ($actionClass) {
return $action instanceof $actionClass;
});
- $action->resource = $resource;
+
+ $action->resource = request('search') && $resource::$searchResource
+ ? Thrust::make($resource::$searchResource)
+ : $resource;
+
return $action;
}
}
diff --git a/src/Controllers/ThrustBelongsToManyController.php b/src/Controllers/ThrustBelongsToManyController.php
index 5a23e774..f3785f7f 100644
--- a/src/Controllers/ThrustBelongsToManyController.php
+++ b/src/Controllers/ThrustBelongsToManyController.php
@@ -4,6 +4,7 @@
use BadChoice\Thrust\Facades\Thrust;
use BadChoice\Thrust\Fields\BelongsToMany;
+use BadChoice\Thrust\ResourceGate;
use Illuminate\Database\Eloquent\Relations\BelongsToMany as BelongsToManyBuilder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Routing\Controller;
@@ -17,7 +18,10 @@ public function index($resourceName, $id, $relationship)
$object = $resource->find($id);
$belongsToManyField = $resource->fieldFor($relationship);
$explodedPivotClass = explode('\\', $object->$relationship()->getPivotClass());
+ app(ResourceGate::class)->check($resource, 'index');
+
return view('thrust::belongsToManyIndex', [
+ 'resource' => $resource,
'resourceName' => $resourceName,
'pivotResourceName' => end($explodedPivotClass),
'object' => $object,
diff --git a/src/Controllers/ThrustController.php b/src/Controllers/ThrustController.php
index 709b9d5c..1ac6e681 100644
--- a/src/Controllers/ThrustController.php
+++ b/src/Controllers/ThrustController.php
@@ -26,6 +26,7 @@ public function index($resourceName)
return view('thrust::index', [
'resourceName' => $resourceName,
'resource' => $resource,
+ 'actions' => collect($resource->actions()),
'searchable' => count($resource::$search) > 0,
'description' => $resource->getDescription(),
]);
@@ -64,7 +65,8 @@ public function editInline($resourceName, $id)
public function store($resourceName)
{
$resource = Thrust::make($resourceName);
- request()->validate($resource->getValidationRules(null));
+ $resource->validate(request(), null);
+
try {
$result = $resource->create(request()->all());
} catch (\Exception $e) {
@@ -72,7 +74,8 @@ public function store($resourceName)
return back()->withErrors(['message' => $e->getMessage()]);
}
if (request()->ajax()) { return response()->json($result);}
- return back()->withMessage(__('thrust::messages.created'));
+
+ return $this->backWithMessage('created');
}
public function storeMultiple($resourceName)
@@ -95,14 +98,15 @@ public function storeMultiple($resourceName)
}
DB::commit();
- return back()->withMessage(__('thrust::messages.created'));
+
+ return $this->backWithMessage('created');
}
public function update($resourceName, $id)
{
$resource = Thrust::make($resourceName);
if (! request()->has('inline')) {
- request()->validate($resource->getValidationRules($id));
+ $resource->validate(request(), $id);
}
try {
@@ -110,7 +114,8 @@ public function update($resourceName, $id)
} catch (\Exception $e) {
return back()->withErrors(['message' => $e->getMessage()]);
}
- return back()->withMessage(__('thrust::messages.updated'));
+
+ return $this->backWithMessage('updated');
}
public function delete($resourceName, $id)
@@ -120,7 +125,8 @@ public function delete($resourceName, $id)
} catch (\Exception $e) {
return back()->withErrors(['delete' => $e->getMessage()]);
}
- return back()->withMessage(__('thrust::messages.deleted'));
+
+ return $this->backWithMessage('deleted');
}
private function singleResourceIndex($resourceName, $resource)
@@ -131,4 +137,12 @@ private function singleResourceIndex($resourceName, $resource)
'object' => $resource->first()
]);
}
+
+ private function backWithMessage(string $message)
+ {
+ if (session()->has('thrust-redirect')) {
+ return redirect(session('thrust-redirect'));
+ }
+ return back()->withMessage(__("thrust::messages.{$message}"));
+ }
}
diff --git a/src/Controllers/ThrustHasManyController.php b/src/Controllers/ThrustHasManyController.php
index a18bfd40..5066b502 100644
--- a/src/Controllers/ThrustHasManyController.php
+++ b/src/Controllers/ThrustHasManyController.php
@@ -2,6 +2,7 @@
namespace BadChoice\Thrust\Controllers;
+use BadChoice\Thrust\ResourceGate;
use Illuminate\Routing\Controller;
use BadChoice\Thrust\Facades\Thrust;
use BadChoice\Thrust\ChildResource;
@@ -14,6 +15,7 @@ public function index($resourceName, $id, $relationship)
$object = $resource->find($id);
$hasManyField = $resource->fieldFor($relationship);
$childResource = Thrust::make($hasManyField->resourceName)->parentId($id);
+ app(ResourceGate::class)->check($resource, 'index');
$backHasManyURLParams = $resource instanceof ChildResource ? $resource->getParentHasManyUrlParams($object) : null;
@@ -21,6 +23,7 @@ public function index($resourceName, $id, $relationship)
'resourceName' => $hasManyField->resourceName,
'searchable' => count($resource::$search) > 0,
'resource' => $childResource,
+ 'actions' => collect($childResource->actions()),
'parent_id' => $id,
'isChild' => $resource instanceof ChildResource && $backHasManyURLParams,
'hasManyBackUrlParams' => $backHasManyURLParams,
diff --git a/src/Controllers/ThrustImportController.php b/src/Controllers/ThrustImportController.php
index a6a234a9..85196596 100644
--- a/src/Controllers/ThrustImportController.php
+++ b/src/Controllers/ThrustImportController.php
@@ -7,6 +7,7 @@
use BadChoice\Thrust\Importer\Importer;
use BadChoice\Thrust\ResourceGate;
use Illuminate\Routing\Controller;
+use Illuminate\Support\Facades\DB;
class ThrustImportController extends Controller
{
@@ -47,6 +48,7 @@ public function store($resourceName)
app(ResourceGate::class)->check($resource, 'create');
$importer = new Importer(request('csv'), $resource);
try {
+ DB::connection()->disableQueryLog();
$imported = $importer->import(request('mapping'));
}catch(\Exception $e){
// dd($e->validator->errors()->getMessages());
diff --git a/src/Fields/Decimal.php b/src/Fields/Decimal.php
index a439f12b..92c69a93 100644
--- a/src/Fields/Decimal.php
+++ b/src/Fields/Decimal.php
@@ -5,11 +5,15 @@
class Decimal extends Text
{
protected $asInteger = false;
+ protected $nullable = false;
public $rowClass = 'text-right';
public function getValue($object)
{
$value = parent::getValue($object);
+ if ($value === null & $this->nullable) {
+ return null;
+ }
if ($value && $this->asInteger) {
return number_format(floatval($value) / 100.0, 2);
}
@@ -30,6 +34,12 @@ public function asInteger($asInteger = true)
return $this;
}
+ public function nullable($nullable = true)
+ {
+ $this->nullable = $nullable;
+ return $this;
+ }
+
protected function getFieldType()
{
return 'number';
diff --git a/src/Fields/Field.php b/src/Fields/Field.php
index 85f6bf5e..c46f965f 100644
--- a/src/Fields/Field.php
+++ b/src/Fields/Field.php
@@ -18,6 +18,7 @@ abstract class Field
public $showInIndex = true;
public $showInEdit = true;
+ public $showInSearch = false;
public $policyAction = null;
public $withDesc = false;
@@ -161,6 +162,12 @@ public function hideInEdit($hideInEdit = true)
return $this;
}
+ public function showInSearch(bool $show = true): self
+ {
+ $this->showInSearch = $show;
+ return $this;
+ }
+
public function onlyInEdit()
{
$this->showInIndex = false;
diff --git a/src/Fields/Image.php b/src/Fields/Image.php
index ccff57a9..4363e3b3 100644
--- a/src/Fields/Image.php
+++ b/src/Fields/Image.php
@@ -18,6 +18,7 @@ class Image extends File implements Prunable
protected $maxHeight = 400;
protected $maxWidth = 400;
protected $square = false;
+ protected $forceFilename = null;
protected $maxFileSize = 1024; // 1 MB
@@ -28,6 +29,12 @@ public function gravatar($field = 'email', $default = null)
return $this;
}
+ public function withForcedFilename($filename) : self
+ {
+ $this->forceFilename = $filename;
+ return $this;
+ }
+
public function maxSize($width, $height)
{
$this->maxWidth = $width;
@@ -92,7 +99,7 @@ public function store($object, $file)
$image->crop($size, $size);
}
- $filename = Str::random(10) . '.png';
+ $filename = $this->forceFilename ?? Str::random(10) . '.png';
$this->getStorage()->put($this->getPath() . $filename, (string)$image->encode('png'), $this->storageVisibility);
$this->getStorage()->put($this->getPath() . "{$this->resizedPrefix}{$filename}", (string)$image->resize(100, 100, function ($constraint) {
$constraint->aspectRatio();
diff --git a/src/Fields/Text.php b/src/Fields/Text.php
index bfda114b..9cd78da4 100644
--- a/src/Fields/Text.php
+++ b/src/Fields/Text.php
@@ -69,7 +69,12 @@ public function getValue($object)
if (! $object) {
return null;
}
- return htmlspecialchars(parent::getValue($object));
+
+ $value = parent::getValue($object);
+
+ return $value === null
+ ? null
+ : htmlspecialchars($value);
}
public function allowScripts()
diff --git a/src/Html/Edit.php b/src/Html/Edit.php
index 3ad56d0b..8e09492e 100644
--- a/src/Html/Edit.php
+++ b/src/Html/Edit.php
@@ -30,7 +30,7 @@ public function getEditFields($multiple = false)
return $field->excludeOnMultiple;
});
}
- if ($this->resource::$sortable) {
+ if ($this->resource->canSort()) {
$fields->prepend(Hidden::make($this->resource::$sortField));
}
if ($this->resource instanceof ChildResource) {
@@ -56,6 +56,7 @@ public function show($id, $fullPage = false, $multiple = false)
return view('thrust::edit', [
'title' => $this->resource->getTitle(),
'nameField' => $this->resource->nameField,
+ 'breadcrumbs' => $this->resource->breadcrumbs($object),
'resourceName' => $this->resourceName ? : $this->resource->name(),
'fields' => $this->getEditFields($multiple),
'object' => $object,
@@ -74,7 +75,7 @@ public function showInline($id)
'nameField' => $this->resource->nameField,
'resourceName' => $this->resource->name(),
'fields' => $this->getEditInlineFields(),
- 'sortable' => $this->resource::$sortable,
+ 'sortable' => $this->resource->canSort(),
'object' => $object,
])->render();
}
@@ -87,7 +88,7 @@ public function showBelongsToManyInline($id, $belongsToManyField)
'nameField' => $this->resource->nameField,
'resourceName' => $this->resource->name(),
'fields' => $this->getEditInlineFields(),
- 'sortable' => $this->resource::$sortable,
+ 'sortable' => $this->resource->canSort(),
'object' => $object,
'belongsToManyField' => $belongsToManyField,
'relatedName' => $object->{$relation}?->{$belongsToManyField->relationDisplayField},
diff --git a/src/Html/Index.php b/src/Html/Index.php
index 3043eb3a..8554fcd9 100644
--- a/src/Html/Index.php
+++ b/src/Html/Index.php
@@ -16,7 +16,7 @@ public function __construct(Resource $resource)
public function getIndexFields()
{
return $this->resource->fieldsFlattened()->filter(function($field){
- return $field->showInIndex;// && $this->resource->can($field->policyAction);
+ return $field->showInIndex || request('search') && $field->showInSearch;
});
}
diff --git a/src/Resource.php b/src/Resource.php
index 42d14785..62c1d6a1 100644
--- a/src/Resource.php
+++ b/src/Resource.php
@@ -8,6 +8,7 @@
use BadChoice\Thrust\Contracts\FormatsNewObject;
use BadChoice\Thrust\Contracts\Prunable;
use BadChoice\Thrust\Exceptions\CanNotDeleteException;
+use BadChoice\Thrust\Facades\Thrust;
use BadChoice\Thrust\Fields\Edit;
use BadChoice\Thrust\Fields\FieldContainer;
use BadChoice\Thrust\Fields\Relationship;
@@ -15,8 +16,11 @@
use BadChoice\Thrust\ResourceFilters\Filters;
use BadChoice\Thrust\ResourceFilters\Search;
use BadChoice\Thrust\ResourceFilters\Sort;
+use Illuminate\Contracts\Validation\Validator;
use Illuminate\Database\Eloquent\Model;
+use Illuminate\Http\Request;
use Illuminate\Support\Str;
+use Illuminate\Validation\ValidationException;
abstract class Resource
{
@@ -213,6 +217,11 @@ public function canDelete($object)
return $this->can('delete', $object);
}
+ public function canSort(): bool
+ {
+ return static::$sortable && $this->can('update');
+ }
+
public function can($ability, $object = null)
{
if (! $ability) {
@@ -269,9 +278,16 @@ public function mainActions()
public function actions()
{
- return [
- new Delete(),
- ];
+ return $this->canDelete(static::$model)
+ ? [new Delete()]
+ : [];
+ }
+
+ public function searchActions(?bool $whileSearch = false)
+ {
+ return $whileSearch && static::$searchResource
+ ? Thrust::make(static::$searchResource)->actions()
+ : $this->actions();
}
public function filters()
@@ -402,7 +418,7 @@ protected function getPagination()
public function sortableIsActive()
{
- return static::$sortable && ! request('sort');
+ return $this->canSort() && ! request('sort');
}
public function getUpdateConfirmationMessage()
@@ -419,4 +435,23 @@ public function overlooked(): array
{
return $this->overlook;
}
+
+ public function breadcrumbs(mixed $object): ?string
+ {
+ return null;
+ }
+
+ /**
+ * @throws ValidationException
+ */
+ final public function validate(Request $request, ?int $id = null): void
+ {
+ $validator = \Illuminate\Support\Facades\Validator::make($request->all(), $this->getValidationRules($id));
+ $this->withValidator($request, $validator);
+ $validator->validate();
+ }
+
+ protected function withValidator(Request $request, Validator $validator)
+ {
+ }
}
diff --git a/src/ResourceGate.php b/src/ResourceGate.php
index e9212f4e..74a1b830 100644
--- a/src/ResourceGate.php
+++ b/src/ResourceGate.php
@@ -24,7 +24,7 @@ public function can($resource, $ability, $object = null)
try{
$resource = Thrust::make($resource);
if ($resource::$gate) {
- $valid = auth()->user()->can($resource::$gate);
+ $valid = $this->getUser()->can($resource::$gate);
}
$policy = $this->policyFor($resource);
if ($policy) {
@@ -37,13 +37,18 @@ public function can($resource, $ability, $object = null)
public function checkPolicyValidation($resource, $ability, $object, $policy): bool
{
$policyInstance = new $policy;
- if (method_exists($policyInstance, 'before') && $policyInstance->before(auth()->user(), $ability, $object) !== null) {
- return $policyInstance->before(auth()->user(), $ability, $object);
+ if (method_exists($policyInstance, 'before') && $policyInstance->before($this->getUser(), $ability, $object) !== null) {
+ return $policyInstance->before($this->getUser(), $ability, $object);
}
- return $policyInstance->$ability(auth()->user(), $object ?? $resource::$model);
+ return $policyInstance->$ability($this->getUser(), $object ?? $resource::$model);
}
public function policyFor($resource){
return $resource::$policy ?? Gate::getPolicyFor($resource::$model);
}
+
+ protected function getUser(): mixed
+ {
+ return auth()->user();
+ }
}
diff --git a/src/ThrustObserver.php b/src/ThrustObserver.php
index 4f9ca49a..fa623498 100644
--- a/src/ThrustObserver.php
+++ b/src/ThrustObserver.php
@@ -137,7 +137,7 @@ protected function trackDatabaseAction(
];
try {
- return DatabaseAction::create($attributes);
+ return DatabaseAction::on($model->getConnectionName())->create($attributes);
} catch (QueryException $e) {
// The table is probably not found because the user have not yet
// logged in, so we don't bother to log anything.
diff --git a/src/ThrustServiceProvider.php b/src/ThrustServiceProvider.php
index e4b1b6df..c7c4e729 100644
--- a/src/ThrustServiceProvider.php
+++ b/src/ThrustServiceProvider.php
@@ -4,8 +4,6 @@
use BadChoice\Thrust\Console\Commands\Cache;
use BadChoice\Thrust\Console\Commands\Clear;
-use BadChoice\Thrust\Console\Commands\Optimize;
-use BadChoice\Thrust\Console\Commands\OptimizeClear;
use BadChoice\Thrust\Console\Commands\Prune;
use Illuminate\Support\ServiceProvider;
@@ -29,8 +27,6 @@ public function boot()
$this->commands([
Cache::class,
Clear::class,
- Optimize::class,
- OptimizeClear::class,
Prune::class,
]);
}
diff --git a/src/resources/js/searcher.js b/src/resources/js/searcher.js
index 54584158..9af175bb 100644
--- a/src/resources/js/searcher.js
+++ b/src/resources/js/searcher.js
@@ -10,39 +10,46 @@
(function($) {
$.fn.searcher = function( callbackUrl , options ) {
- let settings = $.extend({
+ const settings = $.extend({
resultsDiv : 'results',
allDiv : 'all',
minChars : 3,
onFound : null,
updateAddressBar : true
- }, options);
+ }, options)
- let timeout = null;
+ let timeout = null
this.on('keyup',function(){
- clearTimeout(timeout);
- let self = $(this);
+ clearTimeout(timeout)
+ const self = this
timeout = setTimeout(function () {
- let searchString = (self.val());
+ const searchString = self.value
if (searchString.length >= settings.minChars) {
if (settings.updateAddressBar) {
- window.history.pushState("", "", '?search=' + searchString);
+ window.history.pushState("", "", '?search=' + searchString)
}
- $('#' + settings.resultsDiv).show();
- $('#' + settings.allDiv).hide();
- $('#' + settings.resultsDiv).load(callbackUrl + self.val().replace(new RegExp(' ', 'g'), '%20'), settings.onFound);
+ document.getElementById(settings.resultsDiv).style.display = 'block'
+ document.getElementById(settings.allDiv).style.display = 'none'
+ fetch(callbackUrl + self.value.replace(new RegExp(' ', 'g'), '%20')).then(response => {
+ response.text().then(html => {
+ document.getElementById(settings.resultsDiv).innerHTML = html
+ })
+ })
+ window.dispatchEvent(new Event('thrust.searchStarted'))
} else {
if (settings.updateAddressBar) {
- window.history.pushState("", "", "?");
+ window.history.pushState("", "", "?")
}
- $('#' + settings.resultsDiv).hide();
- $('#' + settings.allDiv).show();
+
+ document.getElementById(settings.resultsDiv).style.display = 'none'
+ document.getElementById(settings.allDiv).style.display = 'block'
+ window.dispatchEvent(new Event('thrust.searchEnded'))
}
- }, 300);
- });
+ }, 300)
+ })
}
-}(jQuery));
+}(jQuery))
function RVAjaxSelect2(url, options) {
this.options = {
@@ -58,7 +65,7 @@ function RVAjaxSelect2(url, options) {
data: function (params) {
return {
search: params.term
- };
+ }
},
processResults: function (data) {
return {
@@ -72,8 +79,8 @@ function RVAjaxSelect2(url, options) {
}
}
}
- };
- $.extend(this.options, options);
+ }
+ $.extend(this.options, options)
this.show = function(itemId) {
return $(itemId).select2(this.options)
diff --git a/src/resources/js/thrust.min.js b/src/resources/js/thrust.min.js
index 43b01b81..7cd6f2f9 100644
--- a/src/resources/js/thrust.min.js
+++ b/src/resources/js/thrust.min.js
@@ -1 +1 @@
-function _typeof(t){return(_typeof="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)}var popupUrl;!function(t,e){"object"==("undefined"==typeof module?"undefined":_typeof(module))&&"object"==_typeof(module.exports)?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){var i=[],n=i.slice,s=i.concat,o=i.push,r=i.indexOf,a={},l=a.toString,c=a.hasOwnProperty,h="".trim,u={},p=t.document,d="2.1.0",f=function t(e,i){return new t.fn.init(e,i)},g=/^-ms-/,m=/-([\da-z])/gi,v=function(t,e){return e.toUpperCase()};function y(t){var e=t.length,i=f.type(t);return"function"!==i&&!f.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}f.fn=f.prototype={jquery:d,constructor:f,selector:"",length:0,toArray:function(){return n.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:n.call(this)},pushStack:function(t){var e=f.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return f.each(this,t,e)},map:function(t){return this.pushStack(f.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(n.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:o,sort:i.sort,splice:i.splice},f.extend=f.fn.extend=function(){var t,e,i,n,s,o,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==_typeof(r)||f.isFunction(r)||(r={}),a===l&&(r=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)i=r[e],r!==(n=t[e])&&(c&&n&&(f.isPlainObject(n)||(s=f.isArray(n)))?(s?(s=!1,o=i&&f.isArray(i)?i:[]):o=i&&f.isPlainObject(i)?i:{},r[e]=f.extend(c,o,n)):void 0!==n&&(r[e]=n));return r},f.extend({expando:"jQuery"+(d+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===f.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return t-parseFloat(t)>=0},isPlainObject:function(t){if("object"!==f.type(t)||t.nodeType||f.isWindow(t))return!1;try{if(t.constructor&&!c.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==_typeof(t)||"function"==typeof t?a[l.call(t)]||"object":_typeof(t)},globalEval:function(t){var e,i=eval;(t=f.trim(t))&&(1===t.indexOf("use strict")?((e=p.createElement("script")).text=t,p.head.appendChild(e).parentNode.removeChild(e)):i(t))},camelCase:function(t){return t.replace(g,"ms-").replace(m,v)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var n=0,s=t.length,o=y(t);if(i){if(o)for(;s>n&&!1!==e.apply(t[n],i);n++);else for(n in t)if(!1===e.apply(t[n],i))break}else if(o)for(;s>n&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},trim:function(t){return null==t?"":h.call(t)},makeArray:function(t,e){var i=e||[];return null!=t&&(y(Object(t))?f.merge(i,"string"==typeof t?[t]:t):o.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:r.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;i>n;n++)t[s++]=e[n];return t.length=s,t},grep:function(t,e,i){for(var n=[],s=0,o=t.length,r=!i;o>s;s++)!e(t[s],s)!==r&&n.push(t[s]);return n},map:function(t,e,i){var n,o=0,r=t.length,a=[];if(y(t))for(;r>o;o++)null!=(n=e(t[o],o,i))&&a.push(n);else for(o in t)null!=(n=e(t[o],o,i))&&a.push(n);return s.apply([],a)},guid:1,proxy:function(t,e){var i,s,o;return"string"==typeof e&&(i=t[e],e=t,t=i),f.isFunction(t)?(s=n.call(arguments,2),(o=function(){return t.apply(e||this,s.concat(n.call(arguments)))}).guid=t.guid=t.guid||f.guid++,o):void 0},now:Date.now,support:u}),f.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){a["[object "+e+"]"]=e.toLowerCase()});var b=function(t){var e,i,n,s,o,r,a,l,c,h,u,p,d,f,g,m,v,y="sizzle"+-new Date,b=t.document,w=0,_=0,x=nt(),C=nt(),T=nt(),P=function(t,e){return t===e&&(c=!0),0},S="undefined",D=1<<31,$={}.hasOwnProperty,E=[],k=E.pop,A=E.push,I=E.push,z=E.slice,N=E.indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(this[e]===t)return e;return-1},O="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j=L.replace("w","w#"),W="\\["+H+"*("+L+")"+H+"*(?:([*^$|!~]?=)"+H+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+j+")|)|)"+H+"*\\]",R=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+W.replace(3,8)+")*)|.*)\\)|)",M=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),q=new RegExp("^"+H+"*,"+H+"*"),F=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),B=new RegExp("="+H+"*([^\\]'\"]*?)"+H+"*\\]","g"),U=new RegExp(R),Y=new RegExp("^"+j+"$"),X={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,J=/'|\\/g,tt=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),et=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{I.apply(E=z.call(b.childNodes),b.childNodes),E[b.childNodes.length].nodeType}catch(t){I={apply:E.length?function(t,e){A.apply(t,z.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function it(t,e,n,s){var o,r,a,l,c,p,g,m,w,_;if((e?e.ownerDocument||e:b)!==u&&h(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(l=(e=e||u).nodeType)&&9!==l)return[];if(d&&!s){if(o=Q.exec(t))if(a=o[1]){if(9===l){if(!(r=e.getElementById(a))||!r.parentNode)return n;if(r.id===a)return n.push(r),n}else if(e.ownerDocument&&(r=e.ownerDocument.getElementById(a))&&v(e,r)&&r.id===a)return n.push(r),n}else{if(o[2])return I.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&i.getElementsByClassName&&e.getElementsByClassName)return I.apply(n,e.getElementsByClassName(a)),n}if(i.qsa&&(!f||!f.test(t))){if(m=g=y,w=e,_=9===l&&t,1===l&&"object"!==e.nodeName.toLowerCase()){for(p=dt(t),(g=e.getAttribute("id"))?m=g.replace(J,"\\$&"):e.setAttribute("id",m),m="[id='"+m+"'] ",c=p.length;c--;)p[c]=m+ft(p[c]);w=Z.test(t)&&ut(e.parentNode)||e,_=p.join(",")}if(_)try{return I.apply(n,w.querySelectorAll(_)),n}catch(t){}finally{g||e.removeAttribute("id")}}}return _t(t.replace(M,"$1"),e,n,s)}function nt(){var t=[];return function e(i,s){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=s}}function st(t){return t[y]=!0,t}function ot(t){var e=u.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t,e){for(var i=t.split("|"),s=t.length;s--;)n.attrHandle[i[s]]=e}function at(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||D)-(~t.sourceIndex||D);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function lt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ct(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function ht(t){return st(function(e){return e=+e,st(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function ut(t){return t&&_typeof(t.getElementsByTagName)!==S&&t}for(e in i=it.support={},o=it.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},h=it.setDocument=function(t){var e,s=t?t.ownerDocument||t:b,r=s.defaultView;return s!==u&&9===s.nodeType&&s.documentElement?(u=s,p=s.documentElement,d=!o(s),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){h()},!1):r.attachEvent&&r.attachEvent("onunload",function(){h()})),i.attributes=ot(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=ot(function(t){return t.appendChild(s.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=K.test(s.getElementsByClassName)&&ot(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),i.getById=ot(function(t){return p.appendChild(t).id=y,!s.getElementsByName||!s.getElementsByName(y).length}),i.getById?(n.find.ID=function(t,e){if(_typeof(e.getElementById)!==S&&d){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},n.filter.ID=function(t){var e=t.replace(tt,et);return function(t){return t.getAttribute("id")===e}}):(delete n.find.ID,n.filter.ID=function(t){var e=t.replace(tt,et);return function(t){var i=_typeof(t.getAttributeNode)!==S&&t.getAttributeNode("id");return i&&i.value===e}}),n.find.TAG=i.getElementsByTagName?function(t,e){return _typeof(e.getElementsByTagName)!==S?e.getElementsByTagName(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(t,e){return _typeof(e.getElementsByClassName)!==S&&d?e.getElementsByClassName(t):void 0},g=[],f=[],(i.qsa=K.test(s.querySelectorAll))&&(ot(function(t){t.innerHTML="",t.querySelectorAll("[t^='']").length&&f.push("[*^$]="+H+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||f.push("\\["+H+"*(?:value|"+O+")"),t.querySelectorAll(":checked").length||f.push(":checked")}),ot(function(t){var e=s.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&f.push("name"+H+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||f.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),f.push(",.*:")})),(i.matchesSelector=K.test(m=p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ot(function(t){i.disconnectedMatch=m.call(t,"div"),m.call(t,"[s!='']:x"),g.push("!=",R)}),f=f.length&&new RegExp(f.join("|")),g=g.length&&new RegExp(g.join("|")),e=K.test(p.compareDocumentPosition),v=e||K.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},P=e?function(t,e){if(t===e)return c=!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===s||t.ownerDocument===b&&v(b,t)?-1:e===s||e.ownerDocument===b&&v(b,e)?1:l?N.call(l,t)-N.call(l,e):0:4&n?-1:1)}:function(t,e){if(t===e)return c=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,a=[t],h=[e];if(!o||!r)return t===s?-1:e===s?1:o?-1:r?1:l?N.call(l,t)-N.call(l,e):0;if(o===r)return at(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)h.unshift(i);for(;a[n]===h[n];)n++;return n?at(a[n],h[n]):a[n]===b?-1:h[n]===b?1:0},s):u},it.matches=function(t,e){return it(t,null,null,e)},it.matchesSelector=function(t,e){if((t.ownerDocument||t)!==u&&h(t),e=e.replace(B,"='$1']"),!(!i.matchesSelector||!d||g&&g.test(e)||f&&f.test(e)))try{var n=m.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return it(e,u,null,[t]).length>0},it.contains=function(t,e){return(t.ownerDocument||t)!==u&&h(t),v(t,e)},it.attr=function(t,e){(t.ownerDocument||t)!==u&&h(t);var s=n.attrHandle[e.toLowerCase()],o=s&&$.call(n.attrHandle,e.toLowerCase())?s(t,e,!d):void 0;return void 0!==o?o:i.attributes||!d?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},it.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},it.uniqueSort=function(t){var e,n=[],s=0,o=0;if(c=!i.detectDuplicates,l=!i.sortStable&&t.slice(0),t.sort(P),c){for(;e=t[o++];)e===t[o]&&(s=n.push(o));for(;s--;)t.splice(n[s],1)}return l=null,t},s=it.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+=s(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=s(e);return i},(n=it.selectors={cacheLength:50,createPseudo:st,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(tt,et),t[3]=(t[4]||t[5]||"").replace(tt,et),"~="===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]||it.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]&&it.error(t[0]),t},PSEUDO:function(t){var e,i=!t[5]&&t[2];return X.CHILD.test(t[0])?null:(t[3]&&void 0!==t[4]?t[2]=t[4]:i&&U.test(i)&&(e=dt(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(tt,et).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+H+")"+t+"("+H+"|$)"))&&x(t,function(t){return e.test("string"==typeof t.className&&t.className||_typeof(t.getAttribute)!==S&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var s=it.attr(n,t);return null==s?"!="===e:!e||(s+="","="===e?s===i:"!="===e?s!==i:"^="===e?i&&0===s.indexOf(i):"*="===e?i&&s.indexOf(i)>-1:"$="===e?i&&s.slice(-i.length)===i:"~="===e?(" "+s+" ").indexOf(i)>-1:"|="===e&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var c,h,u,p,d,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),b=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&b){for(d=(c=(h=m[y]||(m[y]={}))[t]||[])[0]===w&&c[1],p=c[0]===w&&c[2],u=d&&m.childNodes[d];u=++d&&u&&u[g]||(p=d=0)||f.pop();)if(1===u.nodeType&&++p&&u===e){h[t]=[w,d,p];break}}else if(b&&(c=(e[y]||(e[y]={}))[t])&&c[0]===w)p=c[1];else for(;(u=++d&&u&&u[g]||(p=d=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++p||(b&&((u[y]||(u[y]={}))[t]=[w,p]),u!==e)););return(p-=s)===n||p%n==0&&p/n>=0}}},PSEUDO:function(t,e){var i,s=n.pseudos[t]||n.setFilters[t.toLowerCase()]||it.error("unsupported pseudo: "+t);return s[y]?s(e):s.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?st(function(t,i){for(var n,o=s(t,e),r=o.length;r--;)t[n=N.call(t,o[r])]=!(i[n]=o[r])}):function(t){return s(t,0,i)}):s}},pseudos:{not:st(function(t){var e=[],i=[],n=r(t.replace(M,"$1"));return n[y]?st(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),!i.pop()}}),has:st(function(t){return function(e){return it(t,e).length>0}}),contains:st(function(t){return function(e){return(e.textContent||e.innerText||s(e)).indexOf(t)>-1}}),lang:st(function(t){return Y.test(t||"")||it.error("unsupported lang: "+t),t=t.replace(tt,et).toLowerCase(),function(e){var i;do{if(i=d?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===u.activeElement&&(!u.hasFocus||u.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},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 V.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:ht(function(){return[0]}),last:ht(function(t,e){return[e-1]}),eq:ht(function(t,e,i){return[0>i?i+e:i]}),even:ht(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:ht(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:ht(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:ht(function(t,e,i){for(var n=0>i?i+e:i;++ne;e++)n+=t[e].value;return n}function gt(t,e,i){var n=e.dir,s=i&&"parentNode"===n,o=_++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,o)}:function(e,i,r){var a,l,c=[w,o];if(r){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,r))return!0}else for(;e=e[n];)if(1===e.nodeType||s){if((a=(l=e[y]||(e[y]={}))[n])&&a[0]===w&&a[1]===o)return c[2]=a[2];if(l[n]=c,c[2]=t(e,i,r))return!0}}}function mt(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function vt(t,e,i,n,s){for(var o,r=[],a=0,l=t.length,c=null!=e;l>a;a++)(o=t[a])&&(!i||i(o,n,s))&&(r.push(o),c&&e.push(a));return r}function yt(t,e,i,n,s,o){return n&&!n[y]&&(n=yt(n)),s&&!s[y]&&(s=yt(s,o)),st(function(o,r,a,l){var c,h,u,p=[],d=[],f=r.length,g=o||function(t,e,i){for(var n=0,s=e.length;s>n;n++)it(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),m=!t||!o&&e?g:vt(g,p,t,a,l),v=i?s||(o?t:f||n)?[]:r:m;if(i&&i(m,v,a,l),n)for(c=vt(v,d),n(c,[],a,l),h=c.length;h--;)(u=c[h])&&(v[d[h]]=!(m[d[h]]=u));if(o){if(s||t){if(s){for(c=[],h=v.length;h--;)(u=v[h])&&c.push(m[h]=u);s(null,v=[],c,l)}for(h=v.length;h--;)(u=v[h])&&(c=s?N.call(o,u):p[h])>-1&&(o[c]=!(r[c]=u))}}else v=vt(v===r?v.splice(f,v.length):v),s?s(null,r,v,l):I.apply(r,v)})}function bt(t){for(var e,i,s,o=t.length,r=n.relative[t[0].type],l=r||n.relative[" "],c=r?1:0,h=gt(function(t){return t===e},l,!0),u=gt(function(t){return N.call(e,t)>-1},l,!0),p=[function(t,i,n){return!r&&(n||i!==a)||((e=i).nodeType?h(t,i,n):u(t,i,n))}];o>c;c++)if(i=n.relative[t[c].type])p=[gt(mt(p),i)];else{if((i=n.filter[t[c].type].apply(null,t[c].matches))[y]){for(s=++c;o>s&&!n.relative[t[s].type];s++);return yt(c>1&&mt(p),c>1&&ft(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(M,"$1"),i,s>c&&bt(t.slice(c,s)),o>s&&bt(t=t.slice(s)),o>s&&ft(t))}p.push(i)}return mt(p)}function wt(t,e){var i=e.length>0,s=t.length>0,o=function(o,r,l,c,h){var p,d,f,g=0,m="0",v=o&&[],y=[],b=a,_=o||s&&n.find.TAG("*",h),x=w+=null==b?1:Math.random()||.1,C=_.length;for(h&&(a=r!==u&&r);m!==C&&null!=(p=_[m]);m++){if(s&&p){for(d=0;f=t[d++];)if(f(p,r,l)){c.push(p);break}h&&(w=x)}i&&((p=!f&&p)&&g--,o&&v.push(p))}if(g+=m,i&&m!==g){for(d=0;f=e[d++];)f(v,y,r,l);if(o){if(g>0)for(;m--;)v[m]||y[m]||(y[m]=k.call(c));y=vt(y)}I.apply(c,y),h&&!o&&y.length>0&&g+e.length>1&&it.uniqueSort(c)}return h&&(w=x,a=b),v};return i?st(o):o}function _t(t,e,s,o){var a,l,c,h,u,p=dt(t);if(!o&&1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&i.getById&&9===e.nodeType&&d&&n.relative[l[1].type]){if(!(e=(n.find.ID(c.matches[0].replace(tt,et),e)||[])[0]))return s;t=t.slice(l.shift().value.length)}for(a=X.needsContext.test(t)?0:l.length;a--&&(c=l[a],!n.relative[h=c.type]);)if((u=n.find[h])&&(o=u(c.matches[0].replace(tt,et),Z.test(l[0].type)&&ut(e.parentNode)||e))){if(l.splice(a,1),!(t=o.length&&ft(l)))return I.apply(s,o),s;break}}return r(t,p)(o,e,!d,s,Z.test(t)&&ut(e.parentNode)||e),s}return pt.prototype=n.filters=n.pseudos,n.setFilters=new pt,r=it.compile=function(t,e){var i,n=[],s=[],o=T[t+" "];if(!o){for(e||(e=dt(t)),i=e.length;i--;)(o=bt(e[i]))[y]?n.push(o):s.push(o);o=T(t,wt(s,n))}return o},i.sortStable=y.split("").sort(P).join("")===y,i.detectDuplicates=!!c,h(),i.sortDetached=ot(function(t){return 1&t.compareDocumentPosition(u.createElement("div"))}),ot(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||rt("type|href|height|width",function(t,e,i){return i?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&&ot(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||rt("value",function(t,e,i){return i||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),ot(function(t){return null==t.getAttribute("disabled")})||rt(O,function(t,e,i){var n;return i?void 0:!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),it}(t);f.find=b,f.expr=b.selectors,f.expr[":"]=f.expr.pseudos,f.unique=b.uniqueSort,f.text=b.getText,f.isXMLDoc=b.isXML,f.contains=b.contains;var w=f.expr.match.needsContext,_=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,x=/^.[^:#\[\.,]*$/;function C(t,e,i){if(f.isFunction(e))return f.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return f.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(x.test(e))return f.filter(e,t,i);e=f.filter(e,t)}return f.grep(t,function(t){return r.call(e,t)>=0!==i})}f.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?f.find.matchesSelector(n,t)?[n]:[]:f.find.matches(t,f.grep(e,function(t){return 1===t.nodeType}))},f.fn.extend({find:function(t){var e,i=this.length,n=[],s=this;if("string"!=typeof t)return this.pushStack(f(t).filter(function(){for(e=0;i>e;e++)if(f.contains(s[e],this))return!0}));for(e=0;i>e;e++)f.find(t,s[e],n);return(n=this.pushStack(i>1?f.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(C(this,t||[],!1))},not:function(t){return this.pushStack(C(this,t||[],!0))},is:function(t){return!!C(this,"string"==typeof t&&w.test(t)?f(t):t||[],!1).length}});var T,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(f.fn.init=function(t,e){var i,n;if(!t)return this;if("string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!i[1]&&e)return!e||e.jquery?(e||T).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof f?e[0]:e,f.merge(this,f.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:p,!0)),_.test(i[1])&&f.isPlainObject(e))for(i in e)f.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(n=p.getElementById(i[2]))&&n.parentNode&&(this.length=1,this[0]=n),this.context=p,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):f.isFunction(t)?void 0!==T.ready?T.ready(t):t(f):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),f.makeArray(t,this))}).prototype=f.fn,T=f(p);var S=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function $(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}f.extend({dir:function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&f(t).is(i))break;n.push(t)}return n},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}}),f.fn.extend({has:function(t){var e=f(t,this),i=e.length;return this.filter(function(){for(var t=0;i>t;t++)if(f.contains(this,e[t]))return!0})},closest:function(t,e){for(var i,n=0,s=this.length,o=[],r=w.test(t)||"string"!=typeof t?f(t,e||this.context):0;s>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&f.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?f.unique(o):o)},index:function(t){return t?"string"==typeof t?r.call(f(t),this[0]):r.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(f.unique(f.merge(this.get(),f(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),f.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return f.dir(t,"parentNode")},parentsUntil:function(t,e,i){return f.dir(t,"parentNode",i)},next:function(t){return $(t,"nextSibling")},prev:function(t){return $(t,"previousSibling")},nextAll:function(t){return f.dir(t,"nextSibling")},prevAll:function(t){return f.dir(t,"previousSibling")},nextUntil:function(t,e,i){return f.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return f.dir(t,"previousSibling",i)},siblings:function(t){return f.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return f.sibling(t.firstChild)},contents:function(t){return t.contentDocument||f.merge([],t.childNodes)}},function(t,e){f.fn[t]=function(i,n){var s=f.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=f.filter(n,s)),this.length>1&&(D[t]||f.unique(s),S.test(t)&&s.reverse()),this.pushStack(s)}});var E,k=/\S+/g,A={};function I(){p.removeEventListener("DOMContentLoaded",I,!1),t.removeEventListener("load",I,!1),f.ready()}f.Callbacks=function(t){t="string"==typeof t?A[t]||function(t){var e=A[t]={};return f.each(t.match(k)||[],function(t,i){e[i]=!0}),e}(t):f.extend({},t);var e,i,n,s,o,r,a=[],l=!t.once&&[],c=function c(u){for(e=t.memory&&u,i=!0,r=s||0,s=0,o=a.length,n=!0;a&&o>r;r++)if(!1===a[r].apply(u[0],u[1])&&t.stopOnFalse){e=!1;break}n=!1,a&&(l?l.length&&c(l.shift()):e?a=[]:h.disable())},h={add:function(){if(a){var i=a.length;!function e(i){f.each(i,function(i,n){var s=f.type(n);"function"===s?t.unique&&h.has(n)||a.push(n):n&&n.length&&"string"!==s&&e(n)})}(arguments),n?o=a.length:e&&(s=i,c(e))}return this},remove:function(){return a&&f.each(arguments,function(t,e){for(var i;(i=f.inArray(e,a,i))>-1;)a.splice(i,1),n&&(o>=i&&o--,r>=i&&r--)}),this},has:function(t){return t?f.inArray(t,a)>-1:!(!a||!a.length)},empty:function(){return a=[],o=0,this},disable:function(){return a=l=e=void 0,this},disabled:function(){return!a},lock:function(){return l=void 0,e||h.disable(),this},locked:function(){return!l},fireWith:function(t,e){return!a||i&&!l||(e=[t,(e=e||[]).slice?e.slice():e],n?l.push(e):c(e)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},f.extend({Deferred:function(t){var e=[["resolve","done",f.Callbacks("once memory"),"resolved"],["reject","fail",f.Callbacks("once memory"),"rejected"],["notify","progress",f.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return f.Deferred(function(i){f.each(e,function(e,o){var r=f.isFunction(t[e])&&t[e];s[o[1]](function(){var t=r&&r.apply(this,arguments);t&&f.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[o[0]+"With"](this===n?i.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?f.extend(t,n):n}},s={};return n.pipe=n.then,f.each(e,function(t,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),t&&t.call(s,s),s},when:function(t){var e,i,s,o=0,r=n.call(arguments),a=r.length,l=1!==a||t&&f.isFunction(t.promise)?a:0,c=1===l?t:f.Deferred(),h=function(t,i,s){return function(o){i[t]=this,s[t]=arguments.length>1?n.call(arguments):o,s===e?c.notifyWith(i,s):--l||c.resolveWith(i,s)}};if(a>1)for(e=new Array(a),i=new Array(a),s=new Array(a);a>o;o++)r[o]&&f.isFunction(r[o].promise)?r[o].promise().done(h(o,s,r)).fail(c.reject).progress(h(o,i,e)):--l;return l||c.resolveWith(s,r),c.promise()}}),f.fn.ready=function(t){return f.ready.promise().done(t),this},f.extend({isReady:!1,readyWait:1,holdReady:function(t){t?f.readyWait++:f.ready(!0)},ready:function(t){(!0===t?--f.readyWait:f.isReady)||(f.isReady=!0,!0!==t&&--f.readyWait>0||(E.resolveWith(p,[f]),f.fn.trigger&&f(p).trigger("ready").off("ready")))}}),f.ready.promise=function(e){return E||(E=f.Deferred(),"complete"===p.readyState?setTimeout(f.ready):(p.addEventListener("DOMContentLoaded",I,!1),t.addEventListener("load",I,!1))),E.promise(e)},f.ready.promise();var z=f.access=function(t,e,i,n,s,o,r){var a=0,l=t.length,c=null==i;if("object"===f.type(i))for(a in s=!0,i)f.access(t,e,a,i[a],!0,o,r);else if(void 0!==n&&(s=!0,f.isFunction(n)||(r=!0),c&&(r?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(f(t),i)})),e))for(;l>a;a++)e(t[a],i,r?n:n.call(t[a],a,e(t[a],i)));return s?t:c?e.call(t):l?e(t[0],i):o};function N(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=f.expando+Math.random()}f.acceptData=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType},N.uid=1,N.accepts=f.acceptData,N.prototype={key:function(t){if(!N.accepts(t))return 0;var e={},i=t[this.expando];if(!i){i=N.uid++;try{e[this.expando]={value:i},Object.defineProperties(t,e)}catch(n){e[this.expando]=i,f.extend(t,e)}}return this.cache[i]||(this.cache[i]={}),i},set:function(t,e,i){var n,s=this.key(t),o=this.cache[s];if("string"==typeof e)o[e]=i;else if(f.isEmptyObject(o))f.extend(this.cache[s],e);else for(n in e)o[n]=e[n];return o},get:function(t,e){var i=this.cache[this.key(t)];return void 0===e?i:i[e]},access:function(t,e,i){var n;return void 0===e||e&&"string"==typeof e&&void 0===i?void 0!==(n=this.get(t,e))?n:this.get(t,f.camelCase(e)):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n,s,o=this.key(t),r=this.cache[o];if(void 0===e)this.cache[o]={};else{f.isArray(e)?n=e.concat(e.map(f.camelCase)):(s=f.camelCase(e),e in r?n=[e,s]:n=(n=s)in r?[n]:n.match(k)||[]),i=n.length;for(;i--;)delete r[n[i]]}},hasData:function(t){return!f.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}};var O=new N,H=new N,L=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,j=/([A-Z])/g;function W(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(j,"-$1").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:L.test(i)?f.parseJSON(i):i)}catch(t){}H.set(t,e,i)}else i=void 0;return i}f.extend({hasData:function(t){return H.hasData(t)||O.hasData(t)},data:function(t,e,i){return H.access(t,e,i)},removeData:function(t,e){H.remove(t,e)},_data:function(t,e,i){return O.access(t,e,i)},_removeData:function(t,e){O.remove(t,e)}}),f.fn.extend({data:function(t,e){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(s=H.get(o),1===o.nodeType&&!O.get(o,"hasDataAttrs"))){for(i=r.length;i--;)0===(n=r[i].name).indexOf("data-")&&(n=f.camelCase(n.slice(5)),W(o,n,s[n]));O.set(o,"hasDataAttrs",!0)}return s}return"object"==_typeof(t)?this.each(function(){H.set(this,t)}):z(this,function(e){var i,n=f.camelCase(t);if(o&&void 0===e){if(void 0!==(i=H.get(o,t)))return i;if(void 0!==(i=H.get(o,n)))return i;if(void 0!==(i=W(o,n,void 0)))return i}else this.each(function(){var i=H.get(this,n);H.set(this,n,e),-1!==t.indexOf("-")&&void 0!==i&&H.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){H.remove(this,t)})}}),f.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=O.get(t,e),i&&(!n||f.isArray(i)?n=O.access(t,e,f.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=f.queue(t,e),n=i.length,s=i.shift(),o=f._queueHooks(t,e);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,function(){f.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return O.get(t,i)||O.access(t,i,{empty:f.Callbacks("once memory").add(function(){O.remove(t,[e+"queue",i])})})}}),f.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length",u.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",u.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var B="undefined";u.focusinBubbles="onfocusin"in t;var U=/^key/,Y=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,G=/^([^.]*)(?:\.(.+)|)$/;function V(){return!0}function K(){return!1}function Q(){try{return p.activeElement}catch(t){}}f.event={global:{},add:function(t,e,i,n,s){var o,r,a,l,c,h,u,p,d,g,m,v=O.get(t);if(v)for(i.handler&&(i=(o=i).handler,s=o.selector),i.guid||(i.guid=f.guid++),(l=v.events)||(l=v.events={}),(r=v.handle)||(r=v.handle=function(e){return _typeof(f)!==B&&f.event.triggered!==e.type?f.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(k)||[""]).length;c--;)d=m=(a=G.exec(e[c])||[])[1],g=(a[2]||"").split(".").sort(),d&&(u=f.event.special[d]||{},d=(s?u.delegateType:u.bindType)||d,u=f.event.special[d]||{},h=f.extend({type:d,origType:m,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&f.expr.match.needsContext.test(s),namespace:g.join(".")},o),(p=l[d])||((p=l[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,n,g,r)||t.addEventListener&&t.addEventListener(d,r,!1)),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),s?p.splice(p.delegateCount++,0,h):p.push(h),f.event.global[d]=!0)},remove:function(t,e,i,n,s){var o,r,a,l,c,h,u,p,d,g,m,v=O.hasData(t)&&O.get(t);if(v&&(l=v.events)){for(c=(e=(e||"").match(k)||[""]).length;c--;)if(d=m=(a=G.exec(e[c])||[])[1],g=(a[2]||"").split(".").sort(),d){for(u=f.event.special[d]||{},p=l[d=(n?u.delegateType:u.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=p.length;o--;)h=p[o],!s&&m!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(p.splice(o,1),h.selector&&p.delegateCount--,u.remove&&u.remove.call(t,h));r&&!p.length&&(u.teardown&&!1!==u.teardown.call(t,g,v.handle)||f.removeEvent(t,d,v.handle),delete l[d])}else for(d in l)f.event.remove(t,d+e[c],i,n,!0);f.isEmptyObject(l)&&(delete v.handle,O.remove(t,"events"))}},trigger:function(e,i,n,s){var o,r,a,l,h,u,d,g=[n||p],m=c.call(e,"type")?e.type:e,v=c.call(e,"namespace")?e.namespace.split("."):[];if(r=a=n=n||p,3!==n.nodeType&&8!==n.nodeType&&!X.test(m+f.event.triggered)&&(m.indexOf(".")>=0&&(v=m.split("."),m=v.shift(),v.sort()),h=m.indexOf(":")<0&&"on"+m,(e=e[f.expando]?e:new f.Event(m,"object"==_typeof(e)&&e)).isTrigger=s?2:3,e.namespace=v.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:f.makeArray(i,[e]),d=f.event.special[m]||{},s||!d.trigger||!1!==d.trigger.apply(n,i))){if(!s&&!d.noBubble&&!f.isWindow(n)){for(l=d.delegateType||m,X.test(l+m)||(r=r.parentNode);r;r=r.parentNode)g.push(r),a=r;a===(n.ownerDocument||p)&&g.push(a.defaultView||a.parentWindow||t)}for(o=0;(r=g[o++])&&!e.isPropagationStopped();)e.type=o>1?l:d.bindType||m,(u=(O.get(r,"events")||{})[e.type]&&O.get(r,"handle"))&&u.apply(r,i),(u=h&&r[h])&&u.apply&&f.acceptData(r)&&(e.result=u.apply(r,i),!1===e.result&&e.preventDefault());return e.type=m,s||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),i)||!f.acceptData(n)||h&&f.isFunction(n[m])&&!f.isWindow(n)&&((a=n[h])&&(n[h]=null),f.event.triggered=m,n[m](),f.event.triggered=void 0,a&&(n[h]=a)),e.result}},dispatch:function(t){t=f.event.fix(t);var e,i,s,o,r,a=[],l=n.call(arguments),c=(O.get(this,"events")||{})[t.type]||[],h=f.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,t)){for(a=f.event.handlers.call(this,t,c),e=0;(o=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(r.namespace))&&(t.handleObj=r,t.data=r.data,void 0!==(s=((f.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l))&&!1===(t.result=s)&&(t.preventDefault(),t.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,s,o,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!==this;l=l.parentNode||this)if(!0!==l.disabled||"click"!==t.type){for(n=[],i=0;a>i;i++)void 0===n[s=(o=e[i]).selector+" "]&&(n[s]=o.needsContext?f(s,this).index(l)>=0:f.find(s,this,null,[l]).length),n[s]&&n.push(o);n.length&&r.push({elem:l,handlers:n})}return a]*)\/>/gi,J=/<([\w:]+)/,tt=/<|?\w+;/,et=/<(?:script|style|link)/i,it=/checked\s*(?:[^=]|=\s*.checked.)/i,nt=/^$|\/(?:java|ecma)script/i,st=/^true\/(.*)/,ot=/^\s*\s*$/g,rt={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function at(t,e){return f.nodeName(t,"table")&&f.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function ct(t){var e=st.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function ht(t,e){for(var i=0,n=t.length;n>i;i++)O.set(t[i],"globalEval",!e||O.get(e[i],"globalEval"))}function ut(t,e){var i,n,s,o,r,a,l,c;if(1===e.nodeType){if(O.hasData(t)&&(o=O.access(t),r=O.set(e,o),c=o.events))for(s in delete r.handle,r.events={},c)for(i=0,n=c[s].length;n>i;i++)f.event.add(e,s,c[s][i]);H.hasData(t)&&(a=H.access(t),l=f.extend({},a),H.set(e,l))}}function pt(t,e){var i=t.getElementsByTagName?t.getElementsByTagName(e||"*"):t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&f.nodeName(t,e)?f.merge([t],i):i}function dt(t,e){var i=e.nodeName.toLowerCase();"input"===i&&F.test(t.type)?e.checked=t.checked:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}rt.optgroup=rt.option,rt.tbody=rt.tfoot=rt.colgroup=rt.caption=rt.thead,rt.th=rt.td,f.extend({clone:function(t,e,i){var n,s,o,r,a=t.cloneNode(!0),l=f.contains(t.ownerDocument,t);if(!(u.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||f.isXMLDoc(t)))for(r=pt(a),n=0,s=(o=pt(t)).length;s>n;n++)dt(o[n],r[n]);if(e)if(i)for(o=o||pt(t),r=r||pt(a),n=0,s=o.length;s>n;n++)ut(o[n],r[n]);else ut(t,a);return(r=pt(a,"script")).length>0&&ht(r,!l&&pt(t,"script")),a},buildFragment:function(t,e,i,n){for(var s,o,r,a,l,c,h=e.createDocumentFragment(),u=[],p=0,d=t.length;d>p;p++)if((s=t[p])||0===s)if("object"===f.type(s))f.merge(u,s.nodeType?[s]:s);else if(tt.test(s)){for(o=o||h.appendChild(e.createElement("div")),r=(J.exec(s)||["",""])[1].toLowerCase(),a=rt[r]||rt._default,o.innerHTML=a[1]+s.replace(Z,"<$1>$2>")+a[2],c=a[0];c--;)o=o.lastChild;f.merge(u,o.childNodes),(o=h.firstChild).textContent=""}else u.push(e.createTextNode(s));for(h.textContent="",p=0;s=u[p++];)if((!n||-1===f.inArray(s,n))&&(l=f.contains(s.ownerDocument,s),o=pt(h.appendChild(s),"script"),l&&ht(o),i))for(c=0;s=o[c++];)nt.test(s.type||"")&&i.push(s);return h},cleanData:function(t){for(var e,i,n,s,o,r,a=f.event.special,l=0;void 0!==(i=t[l]);l++){if(f.acceptData(i)&&((o=i[O.expando])&&(e=O.cache[o]))){if((n=Object.keys(e.events||{})).length)for(r=0;void 0!==(s=n[r]);r++)a[s]?f.event.remove(i,s):f.removeEvent(i,s,e.handle);O.cache[o]&&delete O.cache[o]}delete H.cache[i[H.expando]]}}}),f.fn.extend({text:function(t){return z(this,function(t){return void 0===t?f.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 this.domManip(arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||at(this,t).appendChild(t)})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=at(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?f.filter(t,this):this,s=0;null!=(i=n[s]);s++)e||1!==i.nodeType||f.cleanData(pt(i)),i.parentNode&&(e&&f.contains(i.ownerDocument,i)&&ht(pt(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(f.cleanData(pt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return f.clone(this,t,e)})},html:function(t){return z(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&&!et.test(t)&&!rt[(J.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(Z,"<$1>$2>");try{for(;n>i;i++)1===(e=this[i]||{}).nodeType&&(f.cleanData(pt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,f.cleanData(pt(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=s.apply([],t);var i,n,o,r,a,l,c=0,h=this.length,p=this,d=h-1,g=t[0],m=f.isFunction(g);if(m||h>1&&"string"==typeof g&&!u.checkClone&&it.test(g))return this.each(function(i){var n=p.eq(i);m&&(t[0]=g.call(this,i,n.html())),n.domManip(t,e)});if(h&&(n=(i=f.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===i.childNodes.length&&(i=n),n)){for(r=(o=f.map(pt(i,"script"),lt)).length;h>c;c++)a=i,c!==d&&(a=f.clone(a,!0,!0),r&&f.merge(o,pt(a,"script"))),e.call(this[c],a,c);if(r)for(l=o[o.length-1].ownerDocument,f.map(o,ct),c=0;r>c;c++)a=o[c],nt.test(a.type||"")&&!O.access(a,"globalEval")&&f.contains(l,a)&&(a.src?f._evalUrl&&f._evalUrl(a.src):f.globalEval(a.textContent.replace(ot,"")))}return this}}),f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){f.fn[t]=function(t){for(var i,n=[],s=f(t),r=s.length-1,a=0;r>=a;a++)i=a===r?this:this.clone(!0),f(s[a])[e](i),o.apply(n,i.get());return this.pushStack(n)}});var ft,gt={};function mt(e,i){var n=f(i.createElement(e)).appendTo(i.body),s=t.getDefaultComputedStyle?t.getDefaultComputedStyle(n[0]).display:f.css(n[0],"display");return n.detach(),s}function vt(t){var e=p,i=gt[t];return i||("none"!==(i=mt(t,e))&&i||((e=(ft=(ft||f("")).appendTo(e.documentElement))[0].contentDocument).write(),e.close(),i=mt(t,e),ft.detach()),gt[t]=i),i}var yt=/^margin/,bt=new RegExp("^("+R+")(?!px)[a-z%]+$","i"),wt=function(t){return t.ownerDocument.defaultView.getComputedStyle(t,null)};function _t(t,e,i){var n,s,o,r,a=t.style;return(i=i||wt(t))&&(r=i.getPropertyValue(e)||i[e]),i&&(""!==r||f.contains(t.ownerDocument,t)||(r=f.style(t,e)),bt.test(r)&&yt.test(e)&&(n=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=s,a.maxWidth=o)),void 0!==r?r+"":r}function xt(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}!function(){var e,i,n=p.documentElement,s=p.createElement("div"),o=p.createElement("div");function r(){o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",n.appendChild(s);var r=t.getComputedStyle(o,null);e="1%"!==r.top,i="4px"===r.width,n.removeChild(s)}o.style.backgroundClip="content-box",o.cloneNode(!0).style.backgroundClip="",u.clearCloneStyle="content-box"===o.style.backgroundClip,s.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(o),t.getComputedStyle&&f.extend(u,{pixelPosition:function(){return r(),e},boxSizingReliable:function(){return null==i&&r(),i},reliableMarginRight:function(){var e,i=o.appendChild(p.createElement("div"));return i.style.cssText=o.style.cssText="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",i.style.marginRight=i.style.width="0",o.style.width="1px",n.appendChild(s),e=!parseFloat(t.getComputedStyle(i,null).marginRight),n.removeChild(s),o.innerHTML="",e}})}(),f.swap=function(t,e,i,n){var s,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];for(o in s=i.apply(t,n||[]),e)t.style[o]=r[o];return s};var Ct=/^(none|table(?!-c[ea]).+)/,Tt=new RegExp("^("+R+")(.*)$","i"),Pt=new RegExp("^([+-])=("+R+")","i"),St={position:"absolute",visibility:"hidden",display:"block"},Dt={letterSpacing:0,fontWeight:400},$t=["Webkit","O","Moz","ms"];function Et(t,e){if(e in t)return e;for(var i=e[0].toUpperCase()+e.slice(1),n=e,s=$t.length;s--;)if((e=$t[s]+i)in t)return e;return n}function kt(t,e,i){var n=Tt.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function At(t,e,i,n,s){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,r=0;4>o;o+=2)"margin"===i&&(r+=f.css(t,i+M[o],!0,s)),n?("content"===i&&(r-=f.css(t,"padding"+M[o],!0,s)),"margin"!==i&&(r-=f.css(t,"border"+M[o]+"Width",!0,s))):(r+=f.css(t,"padding"+M[o],!0,s),"padding"!==i&&(r+=f.css(t,"border"+M[o]+"Width",!0,s)));return r}function It(t,e,i){var n=!0,s="width"===e?t.offsetWidth:t.offsetHeight,o=wt(t),r="border-box"===f.css(t,"boxSizing",!1,o);if(0>=s||null==s){if((0>(s=_t(t,e,o))||null==s)&&(s=t.style[e]),bt.test(s))return s;n=r&&(u.boxSizingReliable()||s===t.style[e]),s=parseFloat(s)||0}return s+At(t,e,i||(r?"border":"content"),n,o)+"px"}function zt(t,e){for(var i,n,s,o=[],r=0,a=t.length;a>r;r++)(n=t[r]).style&&(o[r]=O.get(n,"olddisplay"),i=n.style.display,e?(o[r]||"none"!==i||(n.style.display=""),""===n.style.display&&q(n)&&(o[r]=O.access(n,"olddisplay",vt(n.nodeName)))):o[r]||(s=q(n),(i&&"none"!==i||!s)&&O.set(n,"olddisplay",s?i:f.css(n,"display"))));for(r=0;a>r;r++)(n=t[r]).style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[r]||"":"none"));return t}function Nt(t,e,i,n,s){return new Nt.prototype.init(t,e,i,n,s)}f.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=_t(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,o,r,a=f.camelCase(e),l=t.style;return e=f.cssProps[a]||(f.cssProps[a]=Et(l,a)),r=f.cssHooks[e]||f.cssHooks[a],void 0===i?r&&"get"in r&&void 0!==(s=r.get(t,!1,n))?s:l[e]:("string"===(o=_typeof(i))&&(s=Pt.exec(i))&&(i=(s[1]+1)*s[2]+parseFloat(f.css(t,e)),o="number"),void(null!=i&&i==i&&("number"!==o||f.cssNumber[a]||(i+="px"),u.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,n))||(l[e]="",l[e]=i))))}},css:function(t,e,i,n){var s,o,r,a=f.camelCase(e);return e=f.cssProps[a]||(f.cssProps[a]=Et(t.style,a)),(r=f.cssHooks[e]||f.cssHooks[a])&&"get"in r&&(s=r.get(t,!0,i)),void 0===s&&(s=_t(t,e,n)),"normal"===s&&e in Dt&&(s=Dt[e]),""===i||i?(o=parseFloat(s),!0===i||f.isNumeric(o)?o||0:s):s}}),f.each(["height","width"],function(t,e){f.cssHooks[e]={get:function(t,i,n){return i?0===t.offsetWidth&&Ct.test(f.css(t,"display"))?f.swap(t,St,function(){return It(t,e,n)}):It(t,e,n):void 0},set:function(t,i,n){var s=n&&wt(t);return kt(0,i,n?At(t,e,n,"border-box"===f.css(t,"boxSizing",!1,s),s):0)}}}),f.cssHooks.marginRight=xt(u.reliableMarginRight,function(t,e){return e?f.swap(t,{display:"inline-block"},_t,[t,"marginRight"]):void 0}),f.each({margin:"",padding:"",border:"Width"},function(t,e){f.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];4>n;n++)s[t+M[n]+e]=o[n]||o[n-2]||o[0];return s}},yt.test(t)||(f.cssHooks[t+e].set=kt)}),f.fn.extend({css:function(t,e){return z(this,function(t,e,i){var n,s,o={},r=0;if(f.isArray(e)){for(n=wt(t),s=e.length;s>r;r++)o[e[r]]=f.css(t,e[r],!1,n);return o}return void 0!==i?f.style(t,e,i):f.css(t,e)},t,e,arguments.length>1)},show:function(){return zt(this,!0)},hide:function(){return zt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){q(this)?f(this).show():f(this).hide()})}}),f.Tween=Nt,Nt.prototype={constructor:Nt,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(f.cssNumber[i]?"":"px")},cur:function(){var t=Nt.propHooks[this.prop];return t&&t.get?t.get(this):Nt.propHooks._default.get(this)},run:function(t){var e,i=Nt.propHooks[this.prop];return this.pos=e=this.options.duration?f.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):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):Nt.propHooks._default.set(this),this}},Nt.prototype.init.prototype=Nt.prototype,Nt.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=f.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){f.fx.step[t.prop]?f.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[f.cssProps[t.prop]]||f.cssHooks[t.prop])?f.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},Nt.propHooks.scrollTop=Nt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},f.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},f.fx=Nt.prototype.init,f.fx.step={};var Ot,Ht,Lt=/^(?:toggle|show|hide)$/,jt=new RegExp("^(?:([+-])=|)("+R+")([a-z%]*)$","i"),Wt=/queueHooks$/,Rt=[function(t,e,i){var n,s,o,r,a,l,c,h=this,u={},p=t.style,d=t.nodeType&&q(t),g=O.get(t,"fxshow");for(n in i.queue||(null==(a=f._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,f.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],"none"===(c=f.css(t,"display"))&&(c=vt(t.nodeName)),"inline"===c&&"none"===f.css(t,"float")&&(p.display="inline-block")),i.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]})),e)if(s=e[n],Lt.exec(s)){if(delete e[n],o=o||"toggle"===s,s===(d?"hide":"show")){if("show"!==s||!g||void 0===g[n])continue;d=!0}u[n]=g&&g[n]||f.style(t,n)}if(!f.isEmptyObject(u))for(n in g?"hidden"in g&&(d=g.hidden):g=O.access(t,"fxshow",{}),o&&(g.hidden=!d),d?f(t).show():h.done(function(){f(t).hide()}),h.done(function(){var e;for(e in O.remove(t,"fxshow"),u)f.style(t,e,u[e])}),u)r=Bt(d?g[n]:0,n,h),n in g||(g[n]=r.start,d&&(r.end=r.start,r.start="width"===n||"height"===n?1:0))}],Mt={"*":[function(t,e){var i=this.createTween(t,e),n=i.cur(),s=jt.exec(e),o=s&&s[3]||(f.cssNumber[t]?"":"px"),r=(f.cssNumber[t]||"px"!==o&&+n)&&jt.exec(f.css(i.elem,t)),a=1,l=20;if(r&&r[3]!==o){o=o||r[3],s=s||[],r=+n||1;do{r/=a=a||".5",f.style(i.elem,t,r+o)}while(a!==(a=i.cur()/n)&&1!==a&&--l)}return s&&(r=i.start=+r||+n||0,i.unit=o,i.end=s[1]?r+(s[1]+1)*s[2]:+s[2]),i}]};function qt(){return setTimeout(function(){Ot=void 0}),Ot=f.now()}function Ft(t,e){var i,n=0,s={height:t};for(e=e?1:0;4>n;n+=2-e)s["margin"+(i=M[n])]=s["padding"+i]=t;return e&&(s.opacity=s.width=t),s}function Bt(t,e,i){for(var n,s=(Mt[e]||[]).concat(Mt["*"]),o=0,r=s.length;r>o;o++)if(n=s[o].call(i,e,t))return n}function Ut(t,e,i){var n,s,o=0,r=Rt.length,a=f.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var e=Ot||qt(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),o=0,r=c.tweens.length;r>o;o++)c.tweens[o].run(n);return a.notifyWith(t,[c,n,i]),1>n&&r?i:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:f.extend({},e),opts:f.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Ot||qt(),duration:i.duration,tweens:[],createTween:function(e,i){var n=f.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(s)return this;for(s=!0;n>i;i++)c.tweens[i].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),h=c.props;for(function(t,e){var i,n,s,o,r;for(i in t)if(s=e[n=f.camelCase(i)],o=t[i],f.isArray(o)&&(s=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),(r=f.cssHooks[n])&&"expand"in r)for(i in o=r.expand(o),delete t[n],o)i in t||(t[i]=o[i],e[i]=s);else e[n]=s}(h,c.opts.specialEasing);r>o;o++)if(n=Rt[o].call(c,t,h,c.opts))return n;return f.map(h,Bt,c),f.isFunction(c.opts.start)&&c.opts.start.call(t,c),f.fx.timer(f.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}f.Animation=f.extend(Ut,{tweener:function(t,e){f.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,s=t.length;s>n;n++)i=t[n],Mt[i]=Mt[i]||[],Mt[i].unshift(e)},prefilter:function(t,e){e?Rt.unshift(t):Rt.push(t)}}),f.speed=function(t,e,i){var n=t&&"object"==_typeof(t)?f.extend({},t):{complete:i||!i&&e||f.isFunction(t)&&t,duration:t,easing:i&&e||e&&!f.isFunction(e)&&e};return n.duration=f.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in f.fx.speeds?f.fx.speeds[n.duration]:f.fx.speeds._default,(null==n.queue||!0===n.queue)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){f.isFunction(n.old)&&n.old.call(this),n.queue&&f.dequeue(this,n.queue)},n},f.fn.extend({fadeTo:function(t,e,i,n){return this.filter(q).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=f.isEmptyObject(t),o=f.speed(e,i,n),r=function(){var e=Ut(this,f.extend({},t),o);(s||O.get(this,"finish"))&&e.stop(!0)};return r.finish=r,s||!1===o.queue?this.each(r):this.queue(o.queue,r)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,s=null!=t&&t+"queueHooks",o=f.timers,r=O.get(this);if(s)r[s]&&r[s].stop&&n(r[s]);else for(s in r)r[s]&&r[s].stop&&Wt.test(s)&&n(r[s]);for(s=o.length;s--;)o[s].elem!==this||null!=t&&o[s].queue!==t||(o[s].anim.stop(i),e=!1,o.splice(s,1));(e||!i)&&f.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=O.get(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=f.timers,r=n?n.length:0;for(i.finish=!0,f.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;r>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),f.each(["toggle","show","hide"],function(t,e){var i=f.fn[e];f.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(Ft(e,!0),t,n,s)}}),f.each({slideDown:Ft("show"),slideUp:Ft("hide"),slideToggle:Ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){f.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),f.timers=[],f.fx.tick=function(){var t,e=0,i=f.timers;for(Ot=f.now();e1)},removeAttr:function(t){return this.each(function(){f.removeAttr(this,t)})}}),f.extend({attr:function(t,e,i){var n,s,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return _typeof(t.getAttribute)===B?f.prop(t,e,i):(1===o&&f.isXMLDoc(t)||(e=e.toLowerCase(),n=f.attrHooks[e]||(f.expr.match.bool.test(e)?Yt:void 0)),void 0===i?n&&"get"in n&&null!==(s=n.get(t,e))?s:null==(s=f.find.attr(t,e))?void 0:s:null!==i?n&&"set"in n&&void 0!==(s=n.set(t,i,e))?s:(t.setAttribute(e,i+""),i):void f.removeAttr(t,e))},removeAttr:function(t,e){var i,n,s=0,o=e&&e.match(k);if(o&&1===t.nodeType)for(;i=o[s++];)n=f.propFix[i]||i,f.expr.match.bool.test(i)&&(t[n]=!1),t.removeAttribute(i)},attrHooks:{type:{set:function(t,e){if(!u.radioValue&&"radio"===e&&f.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}}}),Yt={set:function(t,e,i){return!1===e?f.removeAttr(t,i):t.setAttribute(i,i),i}},f.each(f.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Xt[e]||f.find.attr;Xt[e]=function(t,e,n){var s,o;return n||(o=Xt[e],Xt[e]=s,s=null!=i(t,e,n)?e.toLowerCase():null,Xt[e]=o),s}});var Gt=/^(?:input|select|textarea|button)$/i;f.fn.extend({prop:function(t,e){return z(this,f.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[f.propFix[t]||t]})}}),f.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,i){var n,s,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return(1!==o||!f.isXMLDoc(t))&&(e=f.propFix[e]||e,s=f.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||Gt.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),u.optSelected||(f.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),f.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){f.propFix[this.toLowerCase()]=this});var Vt=/[\t\r\n\f]/g;f.fn.extend({addClass:function(t){var e,i,n,s,o,r,a="string"==typeof t&&t,l=0,c=this.length;if(f.isFunction(t))return this.each(function(e){f(this).addClass(t.call(this,e,this.className))});if(a)for(e=(t||"").match(k)||[];c>l;l++)if(n=1===(i=this[l]).nodeType&&(i.className?(" "+i.className+" ").replace(Vt," "):" ")){for(o=0;s=e[o++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");r=f.trim(n),i.className!==r&&(i.className=r)}return this},removeClass:function(t){var e,i,n,s,o,r,a=0===arguments.length||"string"==typeof t&&t,l=0,c=this.length;if(f.isFunction(t))return this.each(function(e){f(this).removeClass(t.call(this,e,this.className))});if(a)for(e=(t||"").match(k)||[];c>l;l++)if(n=1===(i=this[l]).nodeType&&(i.className?(" "+i.className+" ").replace(Vt," "):"")){for(o=0;s=e[o++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");r=t?f.trim(n):"",i.className!==r&&(i.className=r)}return this},toggleClass:function(t,e){var i=_typeof(t);return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):this.each(f.isFunction(t)?function(i){f(this).toggleClass(t.call(this,i,this.className,e),e)}:function(){if("string"===i)for(var e,n=0,s=f(this),o=t.match(k)||[];e=o[n++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else(i===B||"boolean"===i)&&(this.className&&O.set(this,"__className__",this.className),this.className=this.className||!1===t?"":O.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(Vt," ").indexOf(e)>=0)return!0;return!1}});var Kt=/\r/g;f.fn.extend({val:function(t){var e,i,n,s=this[0];return arguments.length?(n=f.isFunction(t),this.each(function(i){var s;1===this.nodeType&&(null==(s=n?t.call(this,i,f(this).val()):t)?s="":"number"==typeof s?s+="":f.isArray(s)&&(s=f.map(s,function(t){return null==t?"":t+""})),(e=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))})):s?(e=f.valHooks[s.type]||f.valHooks[s.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(s,"value"))?i:"string"==typeof(i=s.value)?i.replace(Kt,""):null==i?"":i:void 0}}),f.extend({valHooks:{select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||0>s,r=o?null:[],a=o?s+1:n.length,l=0>s?a:o?s:0;a>l;l++)if(!(!(i=n[l]).selected&&l!==s||(u.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&f.nodeName(i.parentNode,"optgroup"))){if(e=f(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,n,s=t.options,o=f.makeArray(e),r=s.length;r--;)((n=s[r]).selected=f.inArray(f(n).val(),o)>=0)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]={set:function(t,e){return f.isArray(e)?t.checked=f.inArray(f(t).val(),e)>=0:void 0}},u.checkOn||(f.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){f.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),f.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}});var Qt=f.now(),Zt=/\?/;f.parseJSON=function(t){return JSON.parse(t+"")},f.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return(!e||e.getElementsByTagName("parsererror").length)&&f.error("Invalid XML: "+t),e};var Jt,te,ee=/#.*$/,ie=/([?&])_=[^&]*/,ne=/^(.*?):[ \t]*([^\r\n]*)$/gm,se=/^(?:GET|HEAD)$/,oe=/^\/\//,re=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,ae={},le={},ce="*/".concat("*");try{te=location.href}catch(t){(te=p.createElement("a")).href="",te=te.href}function he(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,o=e.toLowerCase().match(k)||[];if(f.isFunction(i))for(;n=o[s++];)"+"===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 s={},o=t===le;function r(a){var l;return s[a]=!0,f.each(t[a]||[],function(t,a){var c=a(e,i,n);return"string"!=typeof c||o||s[c]?o?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}return r(e.dataTypes[0])||!s["*"]&&r("*")}function pe(t,e){var i,n,s=f.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((s[i]?t:n||(n={}))[i]=e[i]);return n&&f.extend(!0,t,n),t}Jt=re.exec(te.toLowerCase())||[],f.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:te,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Jt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ce,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?pe(pe(t,f.ajaxSettings),e):pe(f.ajaxSettings,t)},ajaxPrefilter:he(ae),ajaxTransport:he(le),ajax:function(t,e){"object"==_typeof(t)&&(e=t,t=void 0),e=e||{};var i,n,s,o,r,a,l,c,h=f.ajaxSetup({},e),u=h.context||h,p=h.context&&(u.nodeType||u.jquery)?f(u):f.event,d=f.Deferred(),g=f.Callbacks("once memory"),m=h.statusCode||{},v={},y={},b=0,w="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!o)for(o={};e=ne.exec(s);)o[e[1].toLowerCase()]=e[2];e=o[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return b||(t=y[i]=y[i]||t,v[t]=e),this},overrideMimeType:function(t){return b||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)m[e]=[m[e],t[e]];else _.always(t[_.status]);return this},abort:function(t){var e=t||w;return i&&i.abort(e),x(0,e),this}};if(d.promise(_).complete=g.add,_.success=_.done,_.error=_.fail,h.url=((t||h.url||te)+"").replace(ee,"").replace(oe,Jt[1]+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=f.trim(h.dataType||"*").toLowerCase().match(k)||[""],null==h.crossDomain&&(a=re.exec(h.url.toLowerCase()),h.crossDomain=!(!a||a[1]===Jt[1]&&a[2]===Jt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Jt[3]||("http:"===Jt[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=f.param(h.data,h.traditional)),ue(ae,h,e,_),2===b)return _;for(c in(l=h.global)&&0==f.active++&&f.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!se.test(h.type),n=h.url,h.hasContent||(h.data&&(n=h.url+=(Zt.test(n)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=ie.test(n)?n.replace(ie,"$1_="+Qt++):n+(Zt.test(n)?"&":"?")+"_="+Qt++)),h.ifModified&&(f.lastModified[n]&&_.setRequestHeader("If-Modified-Since",f.lastModified[n]),f.etag[n]&&_.setRequestHeader("If-None-Match",f.etag[n])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&_.setRequestHeader("Content-Type",h.contentType),_.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+ce+"; q=0.01":""):h.accepts["*"]),h.headers)_.setRequestHeader(c,h.headers[c]);if(h.beforeSend&&(!1===h.beforeSend.call(u,_,h)||2===b))return _.abort();for(c in w="abort",{success:1,error:1,complete:1})_[c](h[c]);if(i=ue(le,h,e,_)){_.readyState=1,l&&p.trigger("ajaxSend",[_,h]),h.async&&h.timeout>0&&(r=setTimeout(function(){_.abort("timeout")},h.timeout));try{b=1,i.send(v,x)}catch(t){if(!(2>b))throw t;x(-1,t)}}else x(-1,"No Transport");function x(t,e,o,a){var c,v,y,w,x,C=e;2!==b&&(b=2,r&&clearTimeout(r),i=void 0,s=a||"",_.readyState=t>0?4:0,c=t>=200&&300>t||304===t,o&&(w=function(t,e,i){for(var n,s,o,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(s in a)if(a[s]&&a[s].test(n)){l.unshift(s);break}if(l[0]in i)o=l[0];else{for(s in i){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}r||(r=s)}o=o||r}return o?(o!==l[0]&&l.unshift(o),i[o]):void 0}(h,_,o)),w=function(t,e,i,n){var s,o,r,a,l,c={},h=t.dataTypes.slice();if(h[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(o=h.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=h.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(r=c[l+" "+o]||c["* "+o]))for(s in c)if((a=s.split(" "))[1]===o&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[s]:!0!==c[s]&&(o=a[0],h.unshift(a[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(h,w,_,c),c?(h.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(f.lastModified[n]=x),(x=_.getResponseHeader("etag"))&&(f.etag[n]=x)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=w.state,v=w.data,c=!(y=w.error))):(y=C,(t||!C)&&(C="error",0>t&&(t=0))),_.status=t,_.statusText=(e||C)+"",c?d.resolveWith(u,[v,C,_]):d.rejectWith(u,[_,C,y]),_.statusCode(m),m=void 0,l&&p.trigger(c?"ajaxSuccess":"ajaxError",[_,h,c?v:y]),g.fireWith(u,[_,C]),l&&(p.trigger("ajaxComplete",[_,h]),--f.active||f.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,i){return f.get(t,e,i,"json")},getScript:function(t,e){return f.get(t,void 0,e,"script")}}),f.each(["get","post"],function(t,e){f[e]=function(t,i,n,s){return f.isFunction(i)&&(s=s||n,n=i,i=void 0),f.ajax({url:t,type:e,dataType:s,data:i,success:n})}}),f.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){f.fn[e]=function(t){return this.on(e,t)}}),f._evalUrl=function(t){return f.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},f.fn.extend({wrapAll:function(t){var e;return f.isFunction(t)?this.each(function(e){f(this).wrapAll(t.call(this,e))}):(this[0]&&(e=f(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 this.each(f.isFunction(t)?function(e){f(this).wrapInner(t.call(this,e))}:function(){var e=f(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=f.isFunction(t);return this.each(function(i){f(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()}}),f.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},f.expr.filters.visible=function(t){return!f.expr.filters.hidden(t)};var de=/%20/g,fe=/\[\]$/,ge=/\r?\n/g,me=/^(?:submit|button|image|reset|file)$/i,ve=/^(?:input|select|textarea|keygen)/i;function ye(t,e,i,n){var s;if(f.isArray(e))f.each(e,function(e,s){i||fe.test(t)?n(t,s):ye(t+"["+("object"==_typeof(s)?e:"")+"]",s,i,n)});else if(i||"object"!==f.type(e))n(t,e);else for(s in e)ye(t+"["+s+"]",e[s],i,n)}f.param=function(t,e){var i,n=[],s=function(t,e){e=f.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=f.ajaxSettings&&f.ajaxSettings.traditional),f.isArray(t)||t.jquery&&!f.isPlainObject(t))f.each(t,function(){s(this.name,this.value)});else for(i in t)ye(i,t[i],e,s);return n.join("&").replace(de,"+")},f.fn.extend({serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=f.prop(this,"elements");return t?f.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!f(this).is(":disabled")&&ve.test(this.nodeName)&&!me.test(t)&&(this.checked||!F.test(t))}).map(function(t,e){var i=f(this).val();return null==i?null:f.isArray(i)?f.map(i,function(t){return{name:e.name,value:t.replace(ge,"\r\n")}}):{name:e.name,value:i.replace(ge,"\r\n")}}).get()}}),f.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var be=0,we={},_e={0:200,1223:204},xe=f.ajaxSettings.xhr();t.ActiveXObject&&f(t).on("unload",function(){for(var t in we)we[t]()}),u.cors=!!xe&&"withCredentials"in xe,u.ajax=xe=!!xe,f.ajaxTransport(function(t){var e;return u.cors||xe&&!t.crossDomain?{send:function(i,n){var s,o=t.xhr(),r=++be;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)o[s]=t.xhrFields[s];for(s in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)o.setRequestHeader(s,i[s]);e=function(t){return function(){e&&(delete we[r],e=o.onload=o.onerror=null,"abort"===t?o.abort():"error"===t?n(o.status,o.statusText):n(_e[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=e(),o.onerror=e("error"),e=we[r]=e("abort"),o.send(t.hasContent&&t.data||null)},abort:function(){e&&e()}}:void 0}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return f.globalEval(t),t}}}),f.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),f.ajaxTransport("script",function(t){var e,i;if(t.crossDomain)return{send:function(n,s){e=f("
\ No newline at end of file
+
+ registerActionPopupListeners()
+
+ let searching = 0
+ @if($resource::$searchResource)
+ window.addEventListener('thrust.searchStarted', () => {
+ searching = 1
+ fetch("{{ route('thrust.actions.index', ['resourceName' => $resourceName, 'search' => true]) }}").then(response => {
+ response.text().then(html => {
+ document.getElementById('thrust-resource-actions').innerHTML = html
+ registerActionPopupListeners()
+ })
+ })
+ })
+
+ window.addEventListener('thrust.searchEnded', () => {
+ searching = 0
+ fetch("{{ route('thrust.actions.index', ['resourceName' => $resourceName]) }}").then(response => {
+ response.text().then(html => {
+ document.getElementById('thrust-resource-actions').innerHTML = html
+ registerActionPopupListeners()
+ })
+ })
+ })
+ @endif
+
diff --git a/src/resources/views/edit.blade.php b/src/resources/views/edit.blade.php
index 00434e7d..d46e3328 100644
--- a/src/resources/views/edit.blade.php
+++ b/src/resources/views/edit.blade.php
@@ -2,7 +2,8 @@
{{ $title }}
@else
-
{{ $object->{$nameField} ?? __('thrust::messages.new') }}
+ {{ $breadcrumbs }}
+ {{ $object->{$nameField} ?: __('thrust::messages.new') }}
@endif
@@ -23,11 +24,14 @@
@includeWhen($multiple, 'thrust::quantityInput')
- @if (app(BadChoice\Thrust\ResourceGate::class)->can($resourceName, 'update', $object))
- @include('thrust::components.saveButton', ["updateConfirmationMessage" => $updateConfirmationMessage])
-
- @if (isset($object->id) )
- {{ __("thrust::messages.saveAndContinueEditing") }}
+ @if (isset($object->id))
+ @if (app(BadChoice\Thrust\ResourceGate::class)->can($resourceName, 'update', $object))
+ @include('thrust::components.saveButton', ["updateConfirmationMessage" => $updateConfirmationMessage])
+ {{ __("thrust::messages.saveAndContinueEditing") }}
+ @endif
+ @else
+ @if (app(BadChoice\Thrust\ResourceGate::class)->can($resourceName, 'create', $object))
+ @include('thrust::components.saveButton', ["updateConfirmationMessage" => $updateConfirmationMessage])
@endif
@endif
diff --git a/src/resources/views/editImage.blade.php b/src/resources/views/editImage.blade.php
index 55010ed1..7c9c42b5 100644
--- a/src/resources/views/editImage.blade.php
+++ b/src/resources/views/editImage.blade.php
@@ -7,7 +7,7 @@
- @icon(times)
+ @icon(times)
{{-- --}}
@@ -43,7 +43,7 @@
@if(!$fixed)
- @icon(times)
+ @icon(times)
@endif
@@ -52,18 +52,18 @@
@if(! $fixed)
@endif
@push('edit-scripts')