commit ee1a7a12ccf1c537f04ed0165749030c0149811b Author: Fairuz Date: Thu Jun 17 20:12:08 2021 +0800 Initial setup diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..6537ca46 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..44853cd5 --- /dev/null +++ b/.env.example @@ -0,0 +1,51 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +LOG_CHANNEL=stack +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=laravel +DB_USERNAME=root +DB_PASSWORD= + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +FILESYSTEM_DRIVER=local +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +MEMCACHED_HOST=127.0.0.1 + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS=null +MAIL_FROM_NAME="${APP_NAME}" + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= +AWS_USE_PATH_STYLE_ENDPOINT=false + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..967315dd --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +* text=auto +*.css linguist-vendored +*.scss linguist-vendored +*.js linguist-vendored +CHANGELOG.md export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..95d268cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +/node_modules +/public/hot +/public/storage +/storage/*.key +/vendor +**/.idea/ +.env +.env.backup +.phpunit.result.cache +Homestead.json +Homestead.yaml +npm-debug.log +yarn-error.log +/storage/file +composer.lock +yarn.lock +.DS_Store +public/.DS_Store +public/images/.DS_Store +gox.iml +rebuild_docker.sh +docker/* +db/* +docker-compose.yml +package-lock.json +public/* +/public/* \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml new file mode 100644 index 00000000..9231873a --- /dev/null +++ b/.styleci.yml @@ -0,0 +1,13 @@ +php: + preset: laravel + disabled: + - no_unused_imports + finder: + not-name: + - index.php + - server.php +js: + finder: + not-name: + - webpack.mix.js +css: true diff --git a/README.md b/README.md new file mode 100644 index 00000000..ceb6ac0a --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## About Laravel + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, powerful, and provides tools required for large, robust applications. + +## Learning Laravel + +Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. + +If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. + +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell). + +### Premium Partners + +- **[Vehikl](https://vehikl.com/)** +- **[Tighten Co.](https://tighten.co)** +- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** +- **[64 Robots](https://64robots.com)** +- **[Cubet Techno Labs](https://cubettech.com)** +- **[Cyber-Duck](https://cyber-duck.co.uk)** +- **[Many](https://www.many.co.uk)** +- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** +- **[DevSquad](https://devsquad.com)** +- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** +- **[OP.GG](https://op.gg)** + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). + +## Code of Conduct + +In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). diff --git a/app/Classes/Exceptions/AccessForbiddenException.php b/app/Classes/Exceptions/AccessForbiddenException.php new file mode 100644 index 00000000..8d7e09aa --- /dev/null +++ b/app/Classes/Exceptions/AccessForbiddenException.php @@ -0,0 +1,12 @@ +httpStatusCode = $httpStatusCode; + } +} diff --git a/app/Classes/General/Abstracts/AbstractControllerLogic.php b/app/Classes/General/Abstracts/AbstractControllerLogic.php new file mode 100644 index 00000000..2fdd0dab --- /dev/null +++ b/app/Classes/General/Abstracts/AbstractControllerLogic.php @@ -0,0 +1,97 @@ +notification()['title'] ? $this->notification()['title']: Notifications::UNDEFINED['title']; + } + + /** + * @return string + */ + private function getNotificationMessage():string { + return $this->notification()['message'] ? $this->notification()['message']: Notifications::UNDEFINED['message']; + } + + /** + * @param Request $request + * @return JsonResponse + * @throws ErrorException + */ + abstract protected function logic(Request $request) : JsonResponse; + + /** + * @param Request $request + * @return JsonResponse + */ + public function execute(Request $request) : JsonResponse { + + try { + + DB::beginTransaction(); + + $response = $this->logic($request); + + DB::commit(); + + return $response; + + } catch (ErrorException|GeneralExceptions $exception){ + return (new ApiResponseObject($this->getNotificationTitle().' failed', $exception->getMessage(), + $exception->getCode() ? $exception->getCode() : HttpStatus::SERVER_ERROR))->handler(); + + } + } + + /** + * @param array|null $data + * @return JsonResponse + */ + public function response(?array $data = []) : JsonResponse { + + return (new ApiResponseObject($this->getNotificationTitle().' Successful', + $this->getNotificationMessage(), + HttpStatus::OK_WITH_MESSAGE, $data))->handler(); + } + + /** + * @param JsonResource $resource + * @return JsonResponse + */ + public function resourceResponse(JsonResource $resource){ + return $this->response(['data' => $resource]); + } + + /** + * @param ResourceCollection $collection + * @return JsonResponse + */ + public function collectionResponse(ResourceCollection $collection){ + return $this->response(json_decode($collection->response()->getContent(), true)); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Abstracts/AbstractRule.php b/app/Classes/General/Abstracts/AbstractRule.php new file mode 100644 index 00000000..d2e0568b --- /dev/null +++ b/app/Classes/General/Abstracts/AbstractRule.php @@ -0,0 +1,46 @@ +authorized()){ + throw new AccessForbiddenException('You don\'t have permission to preform this action'); + } + + $this->validators($object); + $this->criteria($object); + + return true; + + } catch(AccessForbiddenException $exception){ + throw new AccessForbiddenException('You don\'t have permission to preform this action'); + } catch(\Exception $exception){ + throw new RequestValidationException($exception->getMessage()); + } + + } + +} \ No newline at end of file diff --git a/app/Classes/General/Abstracts/AbstractService.php b/app/Classes/General/Abstracts/AbstractService.php new file mode 100644 index 00000000..7c7b6ddb --- /dev/null +++ b/app/Classes/General/Abstracts/AbstractService.php @@ -0,0 +1,42 @@ +handler($model); + + if($model->save()){ + return $model; + } + + + + } catch (QueryException $exception){ + throw new MalformedRequestException('Unable to update the record due to unexpected error'); + } + + } + + abstract function getModel(Model $model); + abstract function handler(Model $model); + + +} \ No newline at end of file diff --git a/app/Classes/General/Abstracts/AbstractValidation.php b/app/Classes/General/Abstracts/AbstractValidation.php new file mode 100644 index 00000000..fae27298 --- /dev/null +++ b/app/Classes/General/Abstracts/AbstractValidation.php @@ -0,0 +1,49 @@ +validator = $validator; + } + + + abstract protected function data($object): array; + + abstract protected function rules(): array; + + abstract protected function messages(): array; + + /** + * @param DataTransferObject $object + * @param null|string $type + * @return bool + * @throws RequestValidationException + */ + public function validate(DataTransferObject $object, ?string $type = 'POST') + { + $validator = $this->validator::make($this->data($object), $this->rules($type), $this->messages()); + + if($validator->fails()) { + throw new RequestValidationException($validator->messages()->first()); + } + + return true; + } + +} \ No newline at end of file diff --git a/app/Classes/General/DummyDataTransferObject.php b/app/Classes/General/DummyDataTransferObject.php new file mode 100644 index 00000000..98f2a056 --- /dev/null +++ b/app/Classes/General/DummyDataTransferObject.php @@ -0,0 +1,10 @@ +whereIn('id',$ids)->delete(); + + return ($record_deleted == count($ids)) ? true : false; + + } catch (QueryException|\Exception $exception){ + throw new MalformedRequestException('Unable to delete the record due to unexpected error'); + } + } + + + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractDeleteRecord.php b/app/Classes/General/Eloquent/AbstractDeleteRecord.php new file mode 100644 index 00000000..963df421 --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractDeleteRecord.php @@ -0,0 +1,31 @@ +delete()){ + return []; + } + + } catch (QueryException|\Exception $exception){ + throw new MalformedRequestException('Unable to update the record due to unexpected error'); + } + } + + + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractFetchRecord.php b/app/Classes/General/Eloquent/AbstractFetchRecord.php new file mode 100644 index 00000000..1fbd39da --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractFetchRecord.php @@ -0,0 +1,37 @@ +handler($filters); + + } + + + /** + * @param Builder $query + * @return Model + * @throws ResourceNotFoundException + */ + public function getResults(Builder $query): Model { + if(!$query->exists()){ + throw new ResourceNotFoundException('Unable to find any record based on the criteria provided'); + } + + return $query->first(); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractGetRecord.php b/app/Classes/General/Eloquent/AbstractGetRecord.php new file mode 100644 index 00000000..f927d818 --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractGetRecord.php @@ -0,0 +1,70 @@ +filters->except(self::DECORATION_FILTERS); + } + + /** + * @return Collection + */ + public function getDecorationFilters(){ + return $this->filters->only(self::DECORATION_FILTERS); + } + + /** + * @param null|string $json + * @return array + */ + public function deserializeFilters(?string $json): array { + return $json !== null ? collect(json_decode($json))->toArray() : []; + } + + /** + * @return Builder + */ + private function applyFiltersToQuery(): Builder + { + return (new ApplyFiltersToQuery())->execute($this->getRepository(), $this->getQueryFilters()->toArray()); + } + + /** + * @param array $filters + * @return mixed + */ + public function handler(array $filters){ + $this->filters = collect($filters); + return $this->getResults($this->applyFiltersToQuery()); + } + + + /** + * @return Builder + */ + abstract function getRepository(): Builder; + + /** + * @param Builder $query + * @return mixed + */ + abstract function getResults(Builder $query); + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractListRecord.php b/app/Classes/General/Eloquent/AbstractListRecord.php new file mode 100644 index 00000000..c5d2e6e6 --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractListRecord.php @@ -0,0 +1,46 @@ +handler($filters); + + } catch (QueryException $exception){ + throw new MalformedRequestException('Unable to fetch the list of records due to unexpected error'); + } + + } + + /** + * @param Builder $query + * @return mixed + */ + public function getResults(Builder $query) { + $filters = $this->getDecorationFilters(); + + if($filters->has('order_by')){ + $query = $query->orderBy($filters->get('order_by')->column, $filters->get('order_by')->DESC ? 'DESC': 'ASC'); + } + + return $filters->has('per_page') ? $query->paginate($filters->get('per_page')) : $query->get(); + + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractUpdateMultipleRecord.php b/app/Classes/General/Eloquent/AbstractUpdateMultipleRecord.php new file mode 100644 index 00000000..26b89a30 --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractUpdateMultipleRecord.php @@ -0,0 +1,33 @@ +whereIn('id',$ids)->update($values); + + return ($record_updated == count($ids)) ? true : false; + + } catch (QueryException|\Exception $exception){ + throw new MalformedRequestException('Unable to update the record due to unexpected error'); + } + } + + + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractUpdateRecord.php b/app/Classes/General/Eloquent/AbstractUpdateRecord.php new file mode 100644 index 00000000..44129c92 --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractUpdateRecord.php @@ -0,0 +1,30 @@ +save()){ return $model; } + + } catch (QueryException $exception){ + throw new MalformedRequestException($exception); + } + } + + + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/AbstractUpdateRelationshipRecord.php b/app/Classes/General/Eloquent/AbstractUpdateRelationshipRecord.php new file mode 100644 index 00000000..00894f11 --- /dev/null +++ b/app/Classes/General/Eloquent/AbstractUpdateRelationshipRecord.php @@ -0,0 +1,33 @@ +save($model)){ + return $model; + } + + } catch (QueryException $exception){ + throw new MalformedRequestException($exception->getMessage()); + } + } + + + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/ApplyFiltersToQuery.php b/app/Classes/General/Eloquent/ApplyFiltersToQuery.php new file mode 100644 index 00000000..afa2adb8 --- /dev/null +++ b/app/Classes/General/Eloquent/ApplyFiltersToQuery.php @@ -0,0 +1,40 @@ + $value){ + $decorator = static::createFilterDecorator($filterName); + + if (static::isValidDecorator($decorator)) { + $query = $decorator::apply($query, $value); + } + } + + return $query; + } + + private static function createFilterDecorator($name) + { + return __NAMESPACE__ . '\Filters\\' . Str::studly($name); + } + + private static function isValidDecorator($decorator) + { + return class_exists($decorator); + } + + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Active.php b/app/Classes/General/Eloquent/Filters/Active.php new file mode 100644 index 00000000..7bc21e5e --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Active.php @@ -0,0 +1,20 @@ +where('active', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/BusinessType.php b/app/Classes/General/Eloquent/Filters/BusinessType.php new file mode 100644 index 00000000..a654c9ac --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/BusinessType.php @@ -0,0 +1,20 @@ +where('business_type', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/CompanyId.php b/app/Classes/General/Eloquent/Filters/CompanyId.php new file mode 100644 index 00000000..379326cf --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/CompanyId.php @@ -0,0 +1,20 @@ +where('company_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/ConvertibleCurrencyId.php b/app/Classes/General/Eloquent/Filters/ConvertibleCurrencyId.php new file mode 100644 index 00000000..3d5701f7 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/ConvertibleCurrencyId.php @@ -0,0 +1,20 @@ +where('convertible_currency_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/CountryId.php b/app/Classes/General/Eloquent/Filters/CountryId.php new file mode 100644 index 00000000..eb1a8b8e --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/CountryId.php @@ -0,0 +1,20 @@ +where('country_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/CurrencyId.php b/app/Classes/General/Eloquent/Filters/CurrencyId.php new file mode 100644 index 00000000..a9fba8e8 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/CurrencyId.php @@ -0,0 +1,20 @@ +where('currency_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/CustomServiceType.php b/app/Classes/General/Eloquent/Filters/CustomServiceType.php new file mode 100644 index 00000000..e894a5e0 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/CustomServiceType.php @@ -0,0 +1,21 @@ +where('reference', SegmentConstants::CUSTOM_SERVICE_TYPE)->where('detail->id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/DocumentTypeIn.php b/app/Classes/General/Eloquent/Filters/DocumentTypeIn.php new file mode 100644 index 00000000..c6382c10 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/DocumentTypeIn.php @@ -0,0 +1,20 @@ +whereIn('document_type', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Email.php b/app/Classes/General/Eloquent/Filters/Email.php new file mode 100644 index 00000000..cc403255 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Email.php @@ -0,0 +1,20 @@ +where('email', '=', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Filter.php b/app/Classes/General/Eloquent/Filters/Filter.php new file mode 100644 index 00000000..42810e8b --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Filter.php @@ -0,0 +1,19 @@ +where('fix_currency_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Id.php b/app/Classes/General/Eloquent/Filters/Id.php new file mode 100644 index 00000000..a18c7601 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Id.php @@ -0,0 +1,20 @@ +where('id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/IdIn.php b/app/Classes/General/Eloquent/Filters/IdIn.php new file mode 100644 index 00000000..cfe9358e --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/IdIn.php @@ -0,0 +1,20 @@ +whereIn('id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/IdNot.php b/app/Classes/General/Eloquent/Filters/IdNot.php new file mode 100644 index 00000000..8ed35044 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/IdNot.php @@ -0,0 +1,20 @@ +where('id', '!=', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/IdNotIn.php b/app/Classes/General/Eloquent/Filters/IdNotIn.php new file mode 100644 index 00000000..12dd733d --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/IdNotIn.php @@ -0,0 +1,20 @@ +whereNotIn('id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/IssuerIn.php b/app/Classes/General/Eloquent/Filters/IssuerIn.php new file mode 100644 index 00000000..f8958842 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/IssuerIn.php @@ -0,0 +1,20 @@ +whereIn('issuer', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Marking.php b/app/Classes/General/Eloquent/Filters/Marking.php new file mode 100644 index 00000000..77a4dae2 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Marking.php @@ -0,0 +1,20 @@ +where('marking', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Name.php b/app/Classes/General/Eloquent/Filters/Name.php new file mode 100644 index 00000000..92d27f01 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Name.php @@ -0,0 +1,20 @@ +where('name', 'LIKE', '%' . $value . '%'); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/NotExpired.php b/app/Classes/General/Eloquent/Filters/NotExpired.php new file mode 100644 index 00000000..c61a2fe8 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/NotExpired.php @@ -0,0 +1,21 @@ +whereDate('expires_on', '>=', Carbon::now()); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/OriginalCurrencyIdIn.php b/app/Classes/General/Eloquent/Filters/OriginalCurrencyIdIn.php new file mode 100644 index 00000000..628a27fa --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/OriginalCurrencyIdIn.php @@ -0,0 +1,20 @@ +whereIn('original_currency_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/PaymentApprovals.php b/app/Classes/General/Eloquent/Filters/PaymentApprovals.php new file mode 100644 index 00000000..981764a3 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/PaymentApprovals.php @@ -0,0 +1,20 @@ +payments()->inComplete()->has('documents'); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/PaymentMethodType.php b/app/Classes/General/Eloquent/Filters/PaymentMethodType.php new file mode 100644 index 00000000..07350f0c --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/PaymentMethodType.php @@ -0,0 +1,20 @@ +where('payment_method_type', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/PendingPayment.php b/app/Classes/General/Eloquent/Filters/PendingPayment.php new file mode 100644 index 00000000..ab055987 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/PendingPayment.php @@ -0,0 +1,24 @@ +whereHas('service', function($service){ + $service->whereHas('constants', function($query) { + $query->where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->is_billable', true); + }); + })->whereDoesntHave('transactions', function($transaction){ + return $transaction->where('type', TransactionType::PURCHASE_ORDER)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]); + }); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/PurchaseOrderApproval.php b/app/Classes/General/Eloquent/Filters/PurchaseOrderApproval.php new file mode 100644 index 00000000..45277c97 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/PurchaseOrderApproval.php @@ -0,0 +1,29 @@ +whereHas('service', function($service){ + $service->whereHas('constants', function($query) { + $query->where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->is_billable', true); + }); + })->whereHas('transactions', function($transaction){ + return $transaction->where('type', TransactionType::PURCHASE_ORDER)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION]); + }); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Reference.php b/app/Classes/General/Eloquent/Filters/Reference.php new file mode 100644 index 00000000..fe2cbf03 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Reference.php @@ -0,0 +1,20 @@ +where('Reference', '=', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/SegmentId.php b/app/Classes/General/Eloquent/Filters/SegmentId.php new file mode 100644 index 00000000..dade3d25 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/SegmentId.php @@ -0,0 +1,20 @@ +where('segment_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/ServiceId.php b/app/Classes/General/Eloquent/Filters/ServiceId.php new file mode 100644 index 00000000..b5a55286 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/ServiceId.php @@ -0,0 +1,20 @@ +where('service_id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/ServiceType.php b/app/Classes/General/Eloquent/Filters/ServiceType.php new file mode 100644 index 00000000..d3d8a2f1 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/ServiceType.php @@ -0,0 +1,21 @@ +where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/ShortCode.php b/app/Classes/General/Eloquent/Filters/ShortCode.php new file mode 100644 index 00000000..a5030343 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/ShortCode.php @@ -0,0 +1,20 @@ +where('short_code', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Status.php b/app/Classes/General/Eloquent/Filters/Status.php new file mode 100644 index 00000000..19b23b9d --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Status.php @@ -0,0 +1,20 @@ +where('status', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/StatusIn.php b/app/Classes/General/Eloquent/Filters/StatusIn.php new file mode 100644 index 00000000..cbfdfbd0 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/StatusIn.php @@ -0,0 +1,20 @@ +whereIn('status', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/SupplierCurrencies.php b/app/Classes/General/Eloquent/Filters/SupplierCurrencies.php new file mode 100644 index 00000000..1461dbae --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/SupplierCurrencies.php @@ -0,0 +1,21 @@ +where('reference', SegmentConstants::SUPPLIER_CURRENCIES)->where('detail->id', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Token.php b/app/Classes/General/Eloquent/Filters/Token.php new file mode 100644 index 00000000..8093fc61 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Token.php @@ -0,0 +1,20 @@ +where('token', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/Type.php b/app/Classes/General/Eloquent/Filters/Type.php new file mode 100644 index 00000000..60555260 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/Type.php @@ -0,0 +1,20 @@ +where('type', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/WithBookings.php b/app/Classes/General/Eloquent/Filters/WithBookings.php new file mode 100644 index 00000000..8728e119 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/WithBookings.php @@ -0,0 +1,20 @@ +with('bookings'); + } +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/WithCompany.php b/app/Classes/General/Eloquent/Filters/WithCompany.php new file mode 100644 index 00000000..7c19bd29 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/WithCompany.php @@ -0,0 +1,20 @@ +with('owner'); + } +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/WithTransactions.php b/app/Classes/General/Eloquent/Filters/WithTransactions.php new file mode 100644 index 00000000..15cbd88e --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/WithTransactions.php @@ -0,0 +1,20 @@ +with('transactions'); + } +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/WithUser.php b/app/Classes/General/Eloquent/Filters/WithUser.php new file mode 100644 index 00000000..b731c621 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/WithUser.php @@ -0,0 +1,20 @@ +with('user'); + } +} \ No newline at end of file diff --git a/app/Classes/General/Eloquent/Filters/isDefault.php b/app/Classes/General/Eloquent/Filters/isDefault.php new file mode 100644 index 00000000..da62e1f6 --- /dev/null +++ b/app/Classes/General/Eloquent/Filters/isDefault.php @@ -0,0 +1,20 @@ +where('default', $value); + } + +} \ No newline at end of file diff --git a/app/Classes/General/Helper.php b/app/Classes/General/Helper.php new file mode 100644 index 00000000..cad68208 --- /dev/null +++ b/app/Classes/General/Helper.php @@ -0,0 +1,27 @@ +generate($nameOrInitials); + + return $this; + } + + /** + * Set if should keep lettercase on name. + * Setting this to false (default) will uppercase the name. + * + * @param boolean $keepCase + * + * @return GeneratesInitials + */ + public function keepCase($keepCase = true) + { + $this->keepCase = $keepCase; + + return $this; + } + + /** + * Set the length of the generated initials. + * + * @param int $length + * + * @return GeneratesInitials + */ + public function length($length = 2) + { + $this->length = (int) $length; + $this->initials = $this->generateInitials(); + + return $this; + } + + /** + * Generate the initials. + * + * @param null|string $name + * + * @return string + */ + public function generate($name = null) + { + if ($name !== null) { + $this->name = $name; + $this->initials = $this->generateInitials(); + } + + return (string) $this; + } + + /** + * Will return the generated initials. + * + * @return string + */ + public function getInitials() + { + return $this->initials; + } + + /** + * Return the initials. + * + * @return string + */ + public function __toString() + { + return $this->getInitials(); + } + + /** + * Generate a two-letter initial from a name, + * and if no name, assume its already initials. + * For safety, we limit it to two characters, + * in case its a single, but long, name. + * + * @return string + */ + protected function generateInitials() + { + $nameOrInitials = trim($this->name); + + if( !$this->keepCase ) { + $nameOrInitials = mb_strtoupper($nameOrInitials); + } + + $nameOrInitials = trim( trim( $nameOrInitials, '-' ) ); + + $names = explode(' ', $nameOrInitials); + + // Get names with dash (-) between into separate names + $names = array_map( static function ($namePart) { return explode('-', $namePart); }, $names ); + $realNames = []; + + foreach( new \RecursiveIteratorIterator( new \RecursiveArrayIterator($names) ) as $namePart ) { + $realNames[] = $namePart; + } + + $names = $realNames; + + $initials = $nameOrInitials; + $assignedNames = 0; + + if (count($names) > 1) { + $initials = ''; + $start = 0; + + for ($i = 0; $i < $this->length; $i++) { + $index = $i; + + if (($index === ($this->length - 1) && $index > 0) || ($index > (count($names) - 1))) { + $index = count($names) - 1; + } + + if ($assignedNames >= count($names)) { + $start++; + } + + $initials .= mb_substr($names[$index], $start, 1); + $assignedNames++; + } + } + + $initials = mb_substr($initials, 0, $this->length); + + return $initials; + } + +} \ No newline at end of file diff --git a/app/Classes/General/Wrapper/Hasher.php b/app/Classes/General/Wrapper/Hasher.php new file mode 100644 index 00000000..d02b05eb --- /dev/null +++ b/app/Classes/General/Wrapper/Hasher.php @@ -0,0 +1,23 @@ +encode(...$args); + } + public static function decode($enc) + { + if (is_int($enc)) { + return $enc; + } + return app(Hashids::class)->decode($enc)[0]; + } + +} \ No newline at end of file diff --git a/app/Classes/Notifications/AbstractEmail.php b/app/Classes/Notifications/AbstractEmail.php new file mode 100644 index 00000000..83efa01c --- /dev/null +++ b/app/Classes/Notifications/AbstractEmail.php @@ -0,0 +1,15 @@ + 'Unknown Action', + 'message' => 'unknown message..' + ]; + +} \ No newline at end of file diff --git a/app/Classes/ValueObjects/Response/ApiResponseObject.php b/app/Classes/ValueObjects/Response/ApiResponseObject.php new file mode 100644 index 00000000..c5a9a758 --- /dev/null +++ b/app/Classes/ValueObjects/Response/ApiResponseObject.php @@ -0,0 +1,78 @@ +title = $title; + $this->message = $message; + $this->statusCode = $statusCode; + $this->data = $data; + + } + + /** + * @return JsonResponse + */ + public function handler(){ + return new JsonResponse(['title' => $this->getTitle(), 'message' => $this->getMessage(), 'payload' => $this->getData()], $this->getStatusCode()); + } + + /** + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * @return string + */ + public function getMessage(): string + { + return $this->message; + } + + /** + * @return int + */ + public function getStatusCode(): int + { + return $this->statusCode; + } + + /** + * @return array + */ + public function getData(): array + { + return $this->data; + } +} \ No newline at end of file diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php new file mode 100644 index 00000000..69914e99 --- /dev/null +++ b/app/Console/Kernel.php @@ -0,0 +1,41 @@ +command('inspire')->hourly(); + } + + /** + * Register the commands for the application. + * + * @return void + */ + protected function commands() + { + $this->load(__DIR__.'/Commands'); + + require base_path('routes/console.php'); + } +} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php new file mode 100644 index 00000000..3d292064 --- /dev/null +++ b/app/Exceptions/Handler.php @@ -0,0 +1,64 @@ +view('pages.errors.maintenance'); + } + + if ($exception instanceof AuthenticationException) { + return (new ApiResponseObject('Authentication', 'To keep your account secure we need to re-validate your account', HttpStatus::ACCESS_UNAUTHORISED))->handler(); + } + + return parent::render($request, $exception); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php new file mode 100644 index 00000000..a0a2a8a3 --- /dev/null +++ b/app/Http/Controllers/Controller.php @@ -0,0 +1,13 @@ + [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + // \Illuminate\Session\Middleware\AuthenticateSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + + 'api' => [ + 'throttle:api', + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + ]; + + /** + * The application's route middleware. + * + * These middleware may be assigned to groups or used individually. + * + * @var array + */ + protected $routeMiddleware = [ + 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, + 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, + 'valid.token' => ValidateToken::class + ]; +} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php new file mode 100644 index 00000000..704089a7 --- /dev/null +++ b/app/Http/Middleware/Authenticate.php @@ -0,0 +1,21 @@ +expectsJson()) { + return route('login'); + } + } +} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 00000000..033136ad --- /dev/null +++ b/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ +check()) { + return redirect(RouteServiceProvider::HOME); + } + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php new file mode 100644 index 00000000..a8a252df --- /dev/null +++ b/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,19 @@ +allSubdomainsOfApplicationUrl(), + ]; + } +} diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php new file mode 100644 index 00000000..a3b6aef9 --- /dev/null +++ b/app/Http/Middleware/TrustProxies.php @@ -0,0 +1,23 @@ +manager = $manager; + } + + + /** + * Checks if jwt token is valid. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) + { + try { + + if(!$this->manager->check()){ throw new AccessUnauthorisedException(); } + + } catch (Exception $exception) { + + return (new ApiResponseObject('Authentication', 'To keep your account secure we need to re-validate your account', HttpStatus::ACCESS_UNAUTHORISED))->handler(); + + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php new file mode 100644 index 00000000..0c13b854 --- /dev/null +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -0,0 +1,17 @@ +getKey(); + } + + /** + * Return a key value array, containing any custom claims to be added to the JWT. + * + * @return array + */ + public function getJWTCustomClaims() + { + return []; + } + + public function emailVerification(): HasMany { + return $this->hasMany(UserEmailVerification::class, 'email', 'email'); + } + + /** + * @return HasMany + */ + public function passwordReset(): HasMany { + return $this->hasMany(PasswordReset::class, 'user_id', 'id'); + } + + /** + * @return belongsToMany + */ + public function company(): belongsToMany + { + return $this->belongsToMany(Company::class, (new Employee())->getTable(), 'user_id', 'company_id'); + } +} diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php new file mode 100644 index 00000000..ee8ca5bc --- /dev/null +++ b/app/Providers/AppServiceProvider.php @@ -0,0 +1,28 @@ + 'App\Policies\ModelPolicy', + ]; + + /** + * Register any authentication / authorization services. + * + * @return void + */ + public function boot() + { + $this->registerPolicies(); + + // + } +} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php new file mode 100644 index 00000000..395c518b --- /dev/null +++ b/app/Providers/BroadcastServiceProvider.php @@ -0,0 +1,21 @@ + [ + SendEmailVerificationNotification::class, + ], + ]; + + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + // + } +} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php new file mode 100644 index 00000000..3bd3c81e --- /dev/null +++ b/app/Providers/RouteServiceProvider.php @@ -0,0 +1,63 @@ +configureRateLimiting(); + + $this->routes(function () { + Route::prefix('api') + ->middleware('api') + ->namespace($this->namespace) + ->group(base_path('routes/api.php')); + + Route::middleware('web') + ->namespace($this->namespace) + ->group(base_path('routes/web.php')); + }); + } + + /** + * Configure the rate limiters for the application. + * + * @return void + */ + protected function configureRateLimiting() + { + RateLimiter::for('api', function (Request $request) { + return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); + }); + } +} diff --git a/artisan b/artisan new file mode 100755 index 00000000..67a3329b --- /dev/null +++ b/artisan @@ -0,0 +1,53 @@ +#!/usr/bin/env php +make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running, we will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php new file mode 100644 index 00000000..037e17df --- /dev/null +++ b/bootstrap/app.php @@ -0,0 +1,55 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/bootstrap/cache/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..61a75285 --- /dev/null +++ b/composer.json @@ -0,0 +1,68 @@ +{ + "name": "laravel/laravel", + "type": "project", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", + "require": { + "php": "^7.3|^8.0", + "fideloper/proxy": "^4.4", + "fruitcake/laravel-cors": "^2.0", + "guzzlehttp/guzzle": "^7.0.1", + "laravel/framework": "^8.40", + "laravel/tinker": "^2.5", + "ext-fileinfo": "^7.3", + "ext-json": "^1.7", + "barryvdh/laravel-dompdf": "^0.9.0", + "carlos-meneses/laravel-mpdf": "^2.1", + "intervention/image": "^2.5", + "rinvex/countries": "^6.1", + "spatie/laravel-activitylog": "^3.14", + "spatie/laravel-permission": "^4.2", + "tymon/jwt-auth": "^1.0" + }, + "require-dev": { + "facade/ignition": "^2.5", + "fakerphp/faker": "^1.9.1", + "laravel/sail": "^1.0.1", + "mockery/mockery": "^1.4.2", + "nunomaduro/collision": "^5.0", + "phpunit/phpunit": "^9.3.3" + }, + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi" + ], + "post-root-package-install": [ + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "@php artisan key:generate --ansi" + ] + }, + "extra": { + "laravel": { + "dont-discover": [] + } + }, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/config/activitylog.php b/config/activitylog.php new file mode 100644 index 00000000..a6558ecb --- /dev/null +++ b/config/activitylog.php @@ -0,0 +1,52 @@ + env('ACTIVITY_LOGGER_ENABLED', true), + + /* + * When the clean-command is executed, all recording activities older than + * the number of days specified here will be deleted. + */ + 'delete_records_older_than_days' => 365, + + /* + * If no log name is passed to the activity() helper + * we use this default log name. + */ + 'default_log_name' => 'default', + + /* + * You can specify an auth driver here that gets user models. + * If this is null we'll use the default Laravel auth driver. + */ + 'default_auth_driver' => null, + + /* + * If set to true, the subject returns soft deleted models. + */ + 'subject_returns_soft_deleted_models' => false, + + /* + * This model will be used to log activity. + * It should be implements the Spatie\Activitylog\Contracts\Activity interface + * and extend Illuminate\Database\Eloquent\Model. + */ + 'activity_model' => \Spatie\Activitylog\Models\Activity::class, + + /* + * This is the name of the table that will be created by the migration and + * used by the Activity model shipped with this package. + */ + 'table_name' => 'activity_log', + + /* + * This is the database connection that will be used by the migration and + * the Activity model shipped with this package. In case it's not set + * Laravel database.default will be used instead. + */ + 'database_connection' => env('ACTIVITY_LOGGER_DB_CONNECTION'), +]; diff --git a/config/app.php b/config/app.php new file mode 100644 index 00000000..bad26462 --- /dev/null +++ b/config/app.php @@ -0,0 +1,238 @@ + env('APP_NAME', 'Laravel'), + + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services the application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => (bool) env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + 'asset_url' => env('ASSET_URL', null), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'Asia/Kuala_Lumpur', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'en', + + /* + |-------------------------------------------------------------------------- + | Faker Locale + |-------------------------------------------------------------------------- + | + | This locale will be used by the Faker PHP library when generating fake + | data for your database seeds. For example, this will be used to get + | localized telephone numbers, street address information and more. + | + */ + + 'faker_locale' => 'en_US', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => env('APP_KEY'), + + 'cipher' => 'AES-256-CBC', + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + + /* + * Package Service Providers... + */ + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + + // Third Parties + Spatie\Permission\PermissionServiceProvider::class, + Barryvdh\DomPDF\ServiceProvider::class, + Meneses\LaravelMpdf\LaravelMpdfServiceProvider::class + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => [ + + 'App' => Illuminate\Support\Facades\App::class, + 'Arr' => Illuminate\Support\Arr::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Auth' => Illuminate\Support\Facades\Auth::class, + 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, + 'Bus' => Illuminate\Support\Facades\Bus::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Config' => Illuminate\Support\Facades\Config::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'Date' => Illuminate\Support\Facades\Date::class, + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Http' => Illuminate\Support\Facades\Http::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Notification' => Illuminate\Support\Facades\Notification::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + // 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'Str' => Illuminate\Support\Str::class, + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'View' => Illuminate\Support\Facades\View::class, + 'PDF' => Barryvdh\DomPDF\Facade::class, + 'MPDF' => Meneses\LaravelMpdf\Facades\LaravelMpdf::class, + ], + +]; diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 00000000..ba1a4d8c --- /dev/null +++ b/config/auth.php @@ -0,0 +1,117 @@ + [ + 'guard' => 'web', + 'passwords' => 'users', + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session", "token" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + + 'api' => [ + 'driver' => 'token', + 'provider' => 'users', + 'hash' => false, + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => App\Models\User::class, + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => 'password_resets', + 'expire' => 60, + 'throttle' => 60, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ + + 'password_timeout' => 10800, + +]; diff --git a/config/broadcasting.php b/config/broadcasting.php new file mode 100644 index 00000000..2d529820 --- /dev/null +++ b/config/broadcasting.php @@ -0,0 +1,64 @@ + env('BROADCAST_DRIVER', 'null'), + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), + 'options' => [ + 'cluster' => env('PUSHER_APP_CLUSTER'), + 'useTLS' => true, + ], + ], + + 'ably' => [ + 'driver' => 'ably', + 'key' => env('ABLY_KEY'), + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + 'null' => [ + 'driver' => 'null', + ], + + ], + +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 00000000..8736c7a7 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,110 @@ + env('CACHE_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + | Supported drivers: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb", "octane", "null" + | + */ + + 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + 'serialize' => false, + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + 'lock_connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'cache', + 'lock_connection' => 'default', + ], + + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), + ], + + 'octane' => [ + 'driver' => 'octane', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | + */ + + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + +]; diff --git a/config/cors.php b/config/cors.php new file mode 100644 index 00000000..8a39e6da --- /dev/null +++ b/config/cors.php @@ -0,0 +1,34 @@ + ['api/*', 'sanctum/csrf-cookie'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => ['*'], + + 'allowed_origins_patterns' => [], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => false, + +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 00000000..b42d9b30 --- /dev/null +++ b/config/database.php @@ -0,0 +1,147 @@ + env('DB_CONNECTION', 'mysql'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'url' => env('DATABASE_URL'), + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'prefix_indexes' => true, + 'strict' => true, + 'engine' => null, + 'options' => extension_loaded('pdo_mysql') ? array_filter([ + PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + ]) : [], + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + 'schema' => 'public', + 'sslmode' => 'prefer', + ], + + 'sqlsrv' => [ + 'driver' => 'sqlsrv', + 'url' => env('DATABASE_URL'), + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '1433'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'prefix_indexes' => true, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => [ + + 'client' => env('REDIS_CLIENT', 'phpredis'), + + 'options' => [ + 'cluster' => env('REDIS_CLUSTER', 'redis'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + ], + + 'default' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_DB', '0'), + ], + + 'cache' => [ + 'url' => env('REDIS_URL'), + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', '6379'), + 'database' => env('REDIS_CACHE_DB', '1'), + ], + + ], + +]; diff --git a/config/filesystems.php b/config/filesystems.php new file mode 100644 index 00000000..760ef972 --- /dev/null +++ b/config/filesystems.php @@ -0,0 +1,73 @@ + env('FILESYSTEM_DRIVER', 'local'), + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + | Supported Drivers: "local", "ftp", "sftp", "s3" + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => storage_path('app'), + ], + + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => env('APP_URL').'/storage', + 'visibility' => 'public', + ], + + 's3' => [ + 'driver' => 's3', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION'), + 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ + + 'links' => [ + public_path('storage') => storage_path('app/public'), + ], + +]; diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 00000000..84257708 --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,52 @@ + 'bcrypt', + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => 1024, + 'threads' => 2, + 'time' => 2, + ], + +]; diff --git a/config/jwt.php b/config/jwt.php new file mode 100644 index 00000000..8b7843b6 --- /dev/null +++ b/config/jwt.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + + /* + |-------------------------------------------------------------------------- + | JWT Authentication Secret + |-------------------------------------------------------------------------- + | + | Don't forget to set this in your .env file, as it will be used to sign + | your tokens. A helper command is provided for this: + | `php artisan jwt:secret` + | + | Note: This will be used for Symmetric algorithms only (HMAC), + | since RSA and ECDSA use a private/public key combo (See below). + | + */ + + 'secret' => env('JWT_SECRET'), + + /* + |-------------------------------------------------------------------------- + | JWT Authentication Keys + |-------------------------------------------------------------------------- + | + | The algorithm you are using, will determine whether your tokens are + | signed with a random string (defined in `JWT_SECRET`) or using the + | following public & private keys. + | + | Symmetric Algorithms: + | HS256, HS384 & HS512 will use `JWT_SECRET`. + | + | Asymmetric Algorithms: + | RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below. + | + */ + + 'keys' => [ + + /* + |-------------------------------------------------------------------------- + | Public Key + |-------------------------------------------------------------------------- + | + | A path or resource to your public key. + | + | E.g. 'file://path/to/public/key' + | + */ + + 'public' => env('JWT_PUBLIC_KEY'), + + /* + |-------------------------------------------------------------------------- + | Private Key + |-------------------------------------------------------------------------- + | + | A path or resource to your private key. + | + | E.g. 'file://path/to/private/key' + | + */ + + 'private' => env('JWT_PRIVATE_KEY'), + + /* + |-------------------------------------------------------------------------- + | Passphrase + |-------------------------------------------------------------------------- + | + | The passphrase for your private key. Can be null if none set. + | + */ + + 'passphrase' => env('JWT_PASSPHRASE'), + + ], + + /* + |-------------------------------------------------------------------------- + | JWT time to live + |-------------------------------------------------------------------------- + | + | Specify the length of time (in minutes) that the token will be valid for. + | Defaults to 1 hour. + | + | You can also set this to null, to yield a never expiring token. + | Some people may want this behaviour for e.g. a mobile app. + | This is not particularly recommended, so make sure you have appropriate + | systems in place to revoke the token if necessary. + | Notice: If you set this to null you should remove 'exp' element from 'required_claims' list. + | + */ + + 'ttl' => env('JWT_TTL', 60), + + /* + |-------------------------------------------------------------------------- + | Refresh time to live + |-------------------------------------------------------------------------- + | + | Specify the length of time (in minutes) that the token can be refreshed + | within. I.E. The user can refresh their token within a 2 week window of + | the original token being created until they must re-authenticate. + | Defaults to 2 weeks. + | + | You can also set this to null, to yield an infinite refresh time. + | Some may want this instead of never expiring tokens for e.g. a mobile app. + | This is not particularly recommended, so make sure you have appropriate + | systems in place to revoke the token if necessary. + | + */ + + 'refresh_ttl' => env('JWT_REFRESH_TTL', 20160), + + /* + |-------------------------------------------------------------------------- + | JWT hashing algorithm + |-------------------------------------------------------------------------- + | + | Specify the hashing algorithm that will be used to sign the token. + | + | See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL + | for possible values. + | + */ + + 'algo' => env('JWT_ALGO', 'HS256'), + + /* + |-------------------------------------------------------------------------- + | Required Claims + |-------------------------------------------------------------------------- + | + | Specify the required claims that must exist in any token. + | A TokenInvalidException will be thrown if any of these claims are not + | present in the payload. + | + */ + + 'required_claims' => [ + 'iss', + 'iat', + 'exp', + 'nbf', + 'sub', + 'jti', + ], + + /* + |-------------------------------------------------------------------------- + | Persistent Claims + |-------------------------------------------------------------------------- + | + | Specify the claim keys to be persisted when refreshing a token. + | `sub` and `iat` will automatically be persisted, in + | addition to the these claims. + | + | Note: If a claim does not exist then it will be ignored. + | + */ + + 'persistent_claims' => [ + // 'foo', + // 'bar', + ], + + /* + |-------------------------------------------------------------------------- + | Lock Subject + |-------------------------------------------------------------------------- + | + | This will determine whether a `prv` claim is automatically added to + | the token. The purpose of this is to ensure that if you have multiple + | authentication models e.g. `App\User` & `App\OtherPerson`, then we + | should prevent one authentication request from impersonating another, + | if 2 tokens happen to have the same id across the 2 different models. + | + | Under specific circumstances, you may want to disable this behaviour + | e.g. if you only have one authentication model, then you would save + | a little on token size. + | + */ + + 'lock_subject' => true, + + /* + |-------------------------------------------------------------------------- + | Leeway + |-------------------------------------------------------------------------- + | + | This property gives the jwt timestamp claims some "leeway". + | Meaning that if you have any unavoidable slight clock skew on + | any of your servers then this will afford you some level of cushioning. + | + | This applies to the claims `iat`, `nbf` and `exp`. + | + | Specify in seconds - only if you know you need it. + | + */ + + 'leeway' => env('JWT_LEEWAY', 0), + + /* + |-------------------------------------------------------------------------- + | Blacklist Enabled + |-------------------------------------------------------------------------- + | + | In order to invalidate tokens, you must have the blacklist enabled. + | If you do not want or need this functionality, then set this to false. + | + */ + + 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true), + + /* + | ------------------------------------------------------------------------- + | Blacklist Grace Period + | ------------------------------------------------------------------------- + | + | When multiple concurrent requests are made with the same JWT, + | it is possible that some of them fail, due to token regeneration + | on every request. + | + | Set grace period in seconds to prevent parallel request failure. + | + */ + + 'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0), + + /* + |-------------------------------------------------------------------------- + | Cookies encryption + |-------------------------------------------------------------------------- + | + | By default Laravel encrypt cookies for security reason. + | If you decide to not decrypt cookies, you will have to configure Laravel + | to not encrypt your cookie token by adding its name into the $except + | array available in the middleware "EncryptCookies" provided by Laravel. + | see https://laravel.com/docs/master/responses#cookies-and-encryption + | for details. + | + | Set it to true if you want to decrypt cookies. + | + */ + + 'decrypt_cookies' => false, + + /* + |-------------------------------------------------------------------------- + | Providers + |-------------------------------------------------------------------------- + | + | Specify the various providers used throughout the package. + | + */ + + 'providers' => [ + + /* + |-------------------------------------------------------------------------- + | JWT Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to create and decode the tokens. + | + */ + + 'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class, + + /* + |-------------------------------------------------------------------------- + | Authentication Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to authenticate users. + | + */ + + 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class, + + /* + |-------------------------------------------------------------------------- + | Storage Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to store tokens in the blacklist. + | + */ + + 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class, + + ], + +]; diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 00000000..1aa06aa3 --- /dev/null +++ b/config/logging.php @@ -0,0 +1,105 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + 'ignore_exceptions' => false, + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => 14, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => env('LOG_LEVEL', 'critical'), + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => SyslogUdpHandler::class, + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + ], + ], + + 'stderr' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), + ], + ], + +]; diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 00000000..54299aab --- /dev/null +++ b/config/mail.php @@ -0,0 +1,110 @@ + env('MAIL_MAILER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | Mailer Configurations + |-------------------------------------------------------------------------- + | + | Here you may configure all of the mailers used by your application plus + | their respective settings. Several examples have been configured for + | you and you are free to add your own as your application requires. + | + | Laravel supports a variety of mail "transport" drivers to be used while + | sending an e-mail. You will specify which one you are using for your + | mailers below. You are free to add additional mailers as required. + | + | Supported: "smtp", "sendmail", "mailgun", "ses", + | "postmark", "log", "array" + | + */ + + 'mailers' => [ + 'smtp' => [ + 'transport' => 'smtp', + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + 'port' => env('MAIL_PORT', 587), + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + 'username' => env('MAIL_USERNAME'), + 'password' => env('MAIL_PASSWORD'), + 'timeout' => null, + 'auth_mode' => null, + ], + + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + ], + + 'postmark' => [ + 'transport' => 'postmark', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => '/usr/sbin/sendmail -bs', + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/config/pdf.php b/config/pdf.php new file mode 100644 index 00000000..3459543c --- /dev/null +++ b/config/pdf.php @@ -0,0 +1,27 @@ + '', + 'format' => 'A4', + 'default_font_size' => '12', + 'default_font' => 'sans-serif', + 'margin_left' => 10, + 'margin_right' => 10, + 'margin_top' => 10, + 'margin_bottom' => 10, + 'margin_header' => 0, + 'margin_footer' => 0, + 'orientation' => 'P', + 'title' => 'Laravel mPDF', + 'author' => '', + 'watermark' => '', + 'show_watermark' => false, + 'watermark_font' => 'sans-serif', + 'display_mode' => 'fullpage', + 'watermark_text_alpha' => 0.1, + 'custom_font_dir' => '', + 'custom_font_data' => [], + 'auto_language_detection' => false, + 'temp_dir' => rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR), + 'pdfa' => false, + 'pdfaauto' => false, +]; \ No newline at end of file diff --git a/config/permission.php b/config/permission.php new file mode 100644 index 00000000..e41ef0ec --- /dev/null +++ b/config/permission.php @@ -0,0 +1,143 @@ + [ + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * Eloquent model should be used to retrieve your permissions. Of course, it + * is often just the "Permission" model but you may use whatever you like. + * + * The model you want to use as a Permission model needs to implement the + * `Spatie\Permission\Contracts\Permission` contract. + */ + + 'permission' => App\Models\Permission::class, + + /* + * When using the "HasRoles" trait from this package, we need to know which + * Eloquent model should be used to retrieve your roles. Of course, it + * is often just the "Role" model but you may use whatever you like. + * + * The model you want to use as a Role model needs to implement the + * `Spatie\Permission\Contracts\Role` contract. + */ + + 'role' => App\Models\Role::class, + + ], + + 'table_names' => [ + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your roles. We have chosen a basic + * default value but you may easily change it to any table you like. + */ + + 'roles' => 'roles', + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * table should be used to retrieve your permissions. We have chosen a basic + * default value but you may easily change it to any table you like. + */ + + 'permissions' => 'permissions', + + /* + * When using the "HasPermissions" trait from this package, we need to know which + * table should be used to retrieve your models permissions. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'model_has_permissions' => 'model_has_permissions', + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your models roles. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'model_has_roles' => 'model_has_roles', + + /* + * When using the "HasRoles" trait from this package, we need to know which + * table should be used to retrieve your roles permissions. We have chosen a + * basic default value but you may easily change it to any table you like. + */ + + 'role_has_permissions' => 'role_has_permissions', + ], + + 'column_names' => [ + + /* + * Change this if you want to name the related model primary key other than + * `model_id`. + * + * For example, this would be nice if your primary keys are all UUIDs. In + * that case, name this `model_uuid`. + */ + + 'model_morph_key' => 'model_id', + ], + + /* + * When set to true, the required permission names are added to the exception + * message. This could be considered an information leak in some contexts, so + * the default setting is false here for optimum safety. + */ + + 'display_permission_in_exception' => false, + + /* + * When set to true, the required role names are added to the exception + * message. This could be considered an information leak in some contexts, so + * the default setting is false here for optimum safety. + */ + + 'display_role_in_exception' => false, + + /* + * By default wildcard permission lookups are disabled. + */ + + 'enable_wildcard_permission' => false, + + 'cache' => [ + + /* + * By default all permissions are cached for 24 hours to speed up performance. + * When permissions or roles are updated the cache is flushed automatically. + */ + + 'expiration_time' => \DateInterval::createFromDateString('24 hours'), + + /* + * The cache key used to store all permissions. + */ + + 'key' => 'spatie.permission.cache', + + /* + * When checking for a permission against a model by passing a Permission + * instance to the check, this key determines what attribute on the + * Permissions model is used to cache against. + * + * Ideally, this should match your preferred way of checking permissions, eg: + * `$user->can('view-posts')` would be 'name'. + */ + + 'model_key' => 'name', + + /* + * You may optionally indicate a specific cache driver to use for permission and + * role caching using any of the `store` drivers listed in the cache.php config + * file. Using 'default' here means to use the `default` set in cache.php. + */ + + 'store' => 'default', + ], +]; diff --git a/config/queue.php b/config/queue.php new file mode 100644 index 00000000..25ea5a81 --- /dev/null +++ b/config/queue.php @@ -0,0 +1,93 @@ + env('QUEUE_CONNECTION', 'sync'), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 90, + 'after_commit' => false, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, + 'block_for' => 0, + 'after_commit' => false, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'default'), + 'suffix' => env('SQS_SUFFIX'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => env('REDIS_QUEUE', 'default'), + 'retry_after' => 90, + 'block_for' => null, + 'after_commit' => false, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => [ + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), + 'database' => env('DB_CONNECTION', 'mysql'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/config/services.php b/config/services.php new file mode 100644 index 00000000..2a1d616c --- /dev/null +++ b/config/services.php @@ -0,0 +1,33 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + ], + + 'postmark' => [ + 'token' => env('POSTMARK_TOKEN'), + ], + + 'ses' => [ + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + ], + +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 00000000..ac0802b1 --- /dev/null +++ b/config/session.php @@ -0,0 +1,201 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => env('SESSION_LIFETIME', 120), + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => env('SESSION_CONNECTION', null), + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | While using one of the framework's cache driven session backends you may + | list a cache store that should be used for these sessions. This value + | must match with one of the application's configured cache "stores". + | + | Affects: "apc", "dynamodb", "memcached", "redis" + | + */ + + 'store' => env('SESSION_STORE', null), + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => env( + 'SESSION_COOKIE', + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + ), + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => env('SESSION_DOMAIN', null), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you when it can't be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE'), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + + /* + |-------------------------------------------------------------------------- + | Same-Site Cookies + |-------------------------------------------------------------------------- + | + | This option determines how your cookies behave when cross-site requests + | take place, and can be used to mitigate CSRF attacks. By default, we + | will set this value to "lax" since this is a secure default value. + | + | Supported: "lax", "strict", "none", null + | + */ + + 'same_site' => 'lax', + +]; diff --git a/config/view.php b/config/view.php new file mode 100644 index 00000000..22b8a18d --- /dev/null +++ b/config/view.php @@ -0,0 +1,36 @@ + [ + resource_path('views'), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => env( + 'VIEW_COMPILED_PATH', + realpath(storage_path('framework/views')) + ), + +]; diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 00000000..9b19b93c --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +*.sqlite* diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php new file mode 100644 index 00000000..a24ce53f --- /dev/null +++ b/database/factories/UserFactory.php @@ -0,0 +1,47 @@ + $this->faker->name(), + 'email' => $this->faker->unique()->safeEmail(), + 'email_verified_at' => now(), + 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password + 'remember_token' => Str::random(10), + ]; + } + + /** + * Indicate that the model's email address should be unverified. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function unverified() + { + return $this->state(function (array $attributes) { + return [ + 'email_verified_at' => null, + ]; + }); + } +} diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 00000000..621a24eb --- /dev/null +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users'); + } +} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 00000000..0ee0a36a --- /dev/null +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,32 @@ +string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('password_resets'); + } +} diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php new file mode 100644 index 00000000..6aa6d743 --- /dev/null +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('failed_jobs'); + } +} diff --git a/database/migrations/2021_06_17_041313_create_permission_tables.php b/database/migrations/2021_06_17_041313_create_permission_tables.php new file mode 100644 index 00000000..edf92e7a --- /dev/null +++ b/database/migrations/2021_06_17_041313_create_permission_tables.php @@ -0,0 +1,114 @@ +bigIncrements('id'); + $table->string('name'); // For MySQL 8.0 use string('name', 125); + $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); + $table->timestamps(); + + $table->unique(['name', 'guard_name']); + }); + + Schema::create($tableNames['roles'], function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('name'); // For MySQL 8.0 use string('name', 125); + $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); + $table->timestamps(); + + $table->unique(['name', 'guard_name']); + }); + + Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) { + $table->unsignedBigInteger('permission_id'); + + $table->string('model_type'); + $table->unsignedBigInteger($columnNames['model_morph_key']); + $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); + + $table->foreign('permission_id') + ->references('id') + ->on($tableNames['permissions']) + ->onDelete('cascade'); + + $table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + }); + + Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) { + $table->unsignedBigInteger('role_id'); + + $table->string('model_type'); + $table->unsignedBigInteger($columnNames['model_morph_key']); + $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); + + $table->foreign('role_id') + ->references('id') + ->on($tableNames['roles']) + ->onDelete('cascade'); + + $table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'], + 'model_has_roles_role_model_type_primary'); + }); + + Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { + $table->unsignedBigInteger('permission_id'); + $table->unsignedBigInteger('role_id'); + + $table->foreign('permission_id') + ->references('id') + ->on($tableNames['permissions']) + ->onDelete('cascade'); + + $table->foreign('role_id') + ->references('id') + ->on($tableNames['roles']) + ->onDelete('cascade'); + + $table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary'); + }); + + app('cache') + ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) + ->forget(config('permission.cache.key')); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + $tableNames = config('permission.table_names'); + + if (empty($tableNames)) { + throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); + } + + Schema::drop($tableNames['role_has_permissions']); + Schema::drop($tableNames['model_has_roles']); + Schema::drop($tableNames['model_has_permissions']); + Schema::drop($tableNames['roles']); + Schema::drop($tableNames['permissions']); + } +} diff --git a/database/migrations/2021_06_17_041406_create_activity_log_table.php b/database/migrations/2021_06_17_041406_create_activity_log_table.php new file mode 100644 index 00000000..d2743d38 --- /dev/null +++ b/database/migrations/2021_06_17_041406_create_activity_log_table.php @@ -0,0 +1,33 @@ +create(config('activitylog.table_name'), function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('log_name')->nullable(); + $table->text('description'); + $table->nullableMorphs('subject', 'subject'); + $table->nullableMorphs('causer', 'causer'); + $table->json('properties')->nullable(); + $table->timestamps(); + $table->index('log_name'); + }); + } + + /** + * Reverse the migrations. + */ + public function down() + { + Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name')); + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php new file mode 100644 index 00000000..57b73b54 --- /dev/null +++ b/database/seeders/DatabaseSeeder.php @@ -0,0 +1,18 @@ +create(); + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..694987df --- /dev/null +++ b/package.json @@ -0,0 +1,129 @@ +{ + "private": true, + "scripts": { + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "npm run development -- --watch", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + }, + "dependencies": { + "animate.css": "^4.1.1", + "bootstrap": "^4.0.0", + "bootstrap-datepicker": "^1.7.1", + "chart.js": "^2.9.4", + "dropzone": "^5.7.2", + "epic-spinners": "^1.1.0", + "flag-icon-css": "^3.5.0", + "font-awesome": "^4.7.0", + "intro.js": "^3.1.0", + "jquery": "^3.2", + "jquery.scrollbar": "^0.2.11", + "jwt-decode": "^3.1.2", + "noty": "^3.2.0-beta", + "perfect-scrollbar": "^1.5.0", + "popper.js": "^1.12", + "sass-loader": "10.1.0", + "select2": "^4.0.6-rc.1", + "v-money": "^0.8.1", + "vue": "^2.6.10", + "vue-avatar": "^2.1.8", + "vue-debounce": "^2.6.0", + "vue-template-compiler": "^2.6.10", + "vue-the-mask": "^0.11.1", + "vuelidate": "^0.7.4", + "vuex": "^3.1.1" + }, + "devDependencies": { + "axios": "^0.21", + "laravel-mix": "^5.0.9", + "lodash": "^4.17.19", + "postcss": "^8.1.14", + "cross-env": "^7.0.2", + "del": "^6.0.0", + "fancy-log": "^1.3.0", + "gulp": "^4.0.2", + "gulp-autoprefixer": "^7.0.1", + "gulp-clean-css": "^4.3.0", + "gulp-concat": "^2.6.1", + "gulp-concat-css": "^3.1.0", + "gulp-copy": "^4.0.1", + "gulp-livereload": "^4.0.2", + "gulp-load-plugins": "^2.0.6", + "gulp-newer": "^1.3.0", + "gulp-plumber": "^1.1.0", + "gulp-print": "^5.0.2", + "gulp-rename": "^2.0.0", + "gulp-replace": "^1.0.0", + "gulp-sass": "^4.1.0", + "gulp-streamify": "^1.0.2", + "gulp-uglify": "^3.0.0", + "gulp-uglify-es": "^2.0.0", + "resolve-url-loader": "^3.1.2" + }, + "paths": { + "build": { + "css": "./public/css/", + "js": "./public/js/", + "images": "./public/images/", + "fonts": "./public/fonts/", + "flags": "./public/flag-icon-css/flags", + "main": "./public/" + } + }, + "globs": { + "vendorJs": [ + "./node_modules/jquery/dist/jquery.min.js", + "./node_modules/popper.js/dist/umd/popper.min.js", + "./node_modules/bootstrap/dist/js/bootstrap.min.js", + "./node_modules/jquery.scrollbar/jquery.scrollbar.min.js", + "./node_modules/select2/dist/js/select2.full.min.js", + "./node_modules/dropzone/dist/dropzone.js", + "./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js", + "./node_modules/noty/lib/noty.js", + "./node_modules/intro.js/intro.js", + "./node_modules/vue/dist/vue.min.js" + ], + "vendorCss": [ + "./node_modules/font-awesome/css/font-awesome.min.css", + "./node_modules/flag-icon-css/css/flag-icon.min.css", + "./node_modules/jquery.scrollbar/jquery.scrollbar.css", + "./node_modules/select2/dist/css/select2.min.css", + "./node_modules/dropzone/dist/dropzone.css", + "./node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css", + "./node_modules/noty/lib/noty.css", + "./node_modules/noty/lib/themes/*.css", + "./node_modules/animate.css/animate.css", + "./node_modules/intro.js/introjs.css", + "./node_modules/bootstrap/dist/css/bootstrap.min.css" + ], + "vendorFonts": [ + "./node_modules/font-awesome/fonts/**/*" + ], + "vendorFlags": [ + "./node_modules/flag-icon-css/flags/**/*" + ], + "vendorImages": [ + "./node_modules/jquery-ui-dist/images/**/*.png", + "./node_modules/datatables.net-dt/images/**/*.png" + ], + "sourceCss": [ + "./resources/assets/sass/**/*.scss", + "./resources/assets/css/**/*.css" + ], + "sourceImages": [ + "./resources/assets/images/**/*" + ], + "sourceJs": [ + "./resources/assets/js/pages*.js", + "./resources/assets/js/three.r92.min.js", + "./resources/assets/js/vanta.birds.min.js", + "./resources/assets/js/scripts.js" + ], + "sourceFonts": [ + "./resources/assets/fonts/**/*" + ] + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..4ae4d979 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,31 @@ + + + + + ./tests/Unit + + + ./tests/Feature + + + + + ./app + + + + + + + + + + + + + + diff --git a/resources/assets/fonts/montserrat/Montserrat-Bold.ttf b/resources/assets/fonts/montserrat/Montserrat-Bold.ttf new file mode 100644 index 00000000..b4c25f44 Binary files /dev/null and b/resources/assets/fonts/montserrat/Montserrat-Bold.ttf differ diff --git a/resources/assets/fonts/montserrat/Montserrat-Regular.ttf b/resources/assets/fonts/montserrat/Montserrat-Regular.ttf new file mode 100644 index 00000000..7648363a Binary files /dev/null and b/resources/assets/fonts/montserrat/Montserrat-Regular.ttf differ diff --git a/resources/assets/fonts/montserrat/montserrat-bold-webfont.svg b/resources/assets/fonts/montserrat/montserrat-bold-webfont.svg new file mode 100644 index 00000000..82f5ddb9 --- /dev/null +++ b/resources/assets/fonts/montserrat/montserrat-bold-webfont.svg @@ -0,0 +1,1462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/fonts/montserrat/montserrat-regular-webfont.svg b/resources/assets/fonts/montserrat/montserrat-regular-webfont.svg new file mode 100644 index 00000000..66cffa36 --- /dev/null +++ b/resources/assets/fonts/montserrat/montserrat-regular-webfont.svg @@ -0,0 +1,1317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/assets/images/2829248.png b/resources/assets/images/2829248.png new file mode 100644 index 00000000..50a0280f Binary files /dev/null and b/resources/assets/images/2829248.png differ diff --git a/resources/assets/images/2853457.png b/resources/assets/images/2853457.png new file mode 100644 index 00000000..b9107cf8 Binary files /dev/null and b/resources/assets/images/2853457.png differ diff --git a/resources/assets/images/2942005.jpg b/resources/assets/images/2942005.jpg new file mode 100644 index 00000000..83908287 Binary files /dev/null and b/resources/assets/images/2942005.jpg differ diff --git a/resources/assets/images/3231370.jpg b/resources/assets/images/3231370.jpg new file mode 100644 index 00000000..41002f1b Binary files /dev/null and b/resources/assets/images/3231370.jpg differ diff --git a/resources/assets/images/3568950.png b/resources/assets/images/3568950.png new file mode 100644 index 00000000..9003367b Binary files /dev/null and b/resources/assets/images/3568950.png differ diff --git a/resources/assets/images/favicon/android-chrome-192x192.png b/resources/assets/images/favicon/android-chrome-192x192.png new file mode 100644 index 00000000..689afd0f Binary files /dev/null and b/resources/assets/images/favicon/android-chrome-192x192.png differ diff --git a/resources/assets/images/favicon/android-chrome-512x512.png b/resources/assets/images/favicon/android-chrome-512x512.png new file mode 100644 index 00000000..c338a460 Binary files /dev/null and b/resources/assets/images/favicon/android-chrome-512x512.png differ diff --git a/resources/assets/images/favicon/apple-touch-icon.png b/resources/assets/images/favicon/apple-touch-icon.png new file mode 100644 index 00000000..4581fe13 Binary files /dev/null and b/resources/assets/images/favicon/apple-touch-icon.png differ diff --git a/resources/assets/images/favicon/favicon-16x16.png b/resources/assets/images/favicon/favicon-16x16.png new file mode 100644 index 00000000..b96d9bad Binary files /dev/null and b/resources/assets/images/favicon/favicon-16x16.png differ diff --git a/resources/assets/images/favicon/favicon-32x32.png b/resources/assets/images/favicon/favicon-32x32.png new file mode 100644 index 00000000..d25a2aee Binary files /dev/null and b/resources/assets/images/favicon/favicon-32x32.png differ diff --git a/resources/assets/images/favicon/favicon.ico b/resources/assets/images/favicon/favicon.ico new file mode 100644 index 00000000..e14ee43a Binary files /dev/null and b/resources/assets/images/favicon/favicon.ico differ diff --git a/resources/assets/images/favicon/site.webmanifest b/resources/assets/images/favicon/site.webmanifest new file mode 100644 index 00000000..45dc8a20 --- /dev/null +++ b/resources/assets/images/favicon/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/resources/assets/images/icons/packing-icon.png b/resources/assets/images/icons/packing-icon.png new file mode 100644 index 00000000..bc9a3784 Binary files /dev/null and b/resources/assets/images/icons/packing-icon.png differ diff --git a/resources/assets/images/icons/pdf.png b/resources/assets/images/icons/pdf.png new file mode 100644 index 00000000..0d709405 Binary files /dev/null and b/resources/assets/images/icons/pdf.png differ diff --git a/resources/assets/images/icons/processing-icon.png b/resources/assets/images/icons/processing-icon.png new file mode 100644 index 00000000..44ec0ff5 Binary files /dev/null and b/resources/assets/images/icons/processing-icon.png differ diff --git a/resources/assets/images/icons/xlsx.png b/resources/assets/images/icons/xlsx.png new file mode 100644 index 00000000..314df478 Binary files /dev/null and b/resources/assets/images/icons/xlsx.png differ diff --git a/resources/assets/js/pages.js b/resources/assets/js/pages.js new file mode 100644 index 00000000..2455508d --- /dev/null +++ b/resources/assets/js/pages.js @@ -0,0 +1,2036 @@ +(function($) { + 'use strict'; + + /** + * Pages. + * @constructor + * @property {string} pageScrollElement - Scroll Element in Page. + * @property {object} $body - Cache Body. + */ + var Pages = function() { + this.pageScrollElement = 'html, body'; + this.$body = $('body'); + + this.setUserOS(); + this.setUserAgent(); + }; + + /** @function setUserOS + * @description SET User Operating System eg: mac,windows,etc + * @returns {string} - Appends OSName to Pages.$body + */ + Pages.prototype.setUserOS = function() { + var OSName = ""; + if (navigator.appVersion.indexOf("Win") != -1) OSName = "windows"; + if (navigator.appVersion.indexOf("Mac") != -1) OSName = "mac"; + if (navigator.appVersion.indexOf("X11") != -1) OSName = "unix"; + if (navigator.appVersion.indexOf("Linux") != -1) OSName = "linux"; + + this.$body.addClass(OSName); + }; + + /** @function setUserAgent + * @description SET User Device Name to mobile | desktop + * @returns {string} - Appends Device to Pages.$body + */ + Pages.prototype.setUserAgent = function() { + if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { + this.$body.addClass('mobile'); + } else { + this.$body.addClass('desktop'); + if (navigator.userAgent.match(/MSIE 9.0/)) { + this.$body.addClass('ie9'); + } + } + }; + + /** @function isVisibleXs + * @description Checks if the screen size is XS - Extra Small i.e below W480px + * @returns {$Element} - Appends $('#pg-visible-xs') to Body + */ + Pages.prototype.isVisibleXs = function() { + (!$('#pg-visible-xs').length) && this.$body.append('
'); + return $('#pg-visible-xs').is(':visible'); + }; + + /** @function isVisibleSm + * @description Checks if the screen size is SM - Small Screen i.e Above W480px + * @returns {$Element} - Appends $('#pg-visible-sm') to Body + */ + Pages.prototype.isVisibleSm = function() { + (!$('#pg-visible-sm').length) && this.$body.append('
'); + return $('#pg-visible-sm').is(':visible'); + }; + + /** @function isVisibleMd + * @description Checks if the screen size is MD - Medium Screen i.e Above W1024px + * @returns {$Element} - Appends $('#pg-visible-md') to Body + */ + Pages.prototype.isVisibleMd = function() { + (!$('#pg-visible-md').length) && this.$body.append('
'); + return $('#pg-visible-md').is(':visible'); + }; + + /** @function isVisibleLg + * @description Checks if the screen size is LG - Large Screen i.e Above W1200px + * @returns {$Element} - Appends $('#pg-visible-lg') to Body + */ + Pages.prototype.isVisibleLg = function() { + (!$('#pg-visible-lg').length) && this.$body.append('
'); + return $('#pg-visible-lg').is(':visible'); + }; + + /** @function getUserAgent + * @description Get Current User Agent. + * @returns {string} - mobile | desktop + */ + Pages.prototype.getUserAgent = function() { + return $('body').hasClass('mobile') ? "mobile" : "desktop"; + }; + + /** @function setFullScreen + * @description Make Browser fullscreen. + */ + Pages.prototype.setFullScreen = function(element) { + // Supports most browsers and their versions. + var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; + + if (requestMethod) { // Native full screen. + requestMethod.call(element); + } else if (typeof window.ActiveXObject !== "undefined") { // Older IE. + var wscript = new ActiveXObject("WScript.Shell"); + if (wscript !== null) { + wscript.SendKeys("{F11}"); + } + } + }; + + /** @function getColor + * @description Get Color from CSS + * @param {string} color - pages color class eg: primary,master,master-light etc. + * @param {int} opacity + * @returns {rgba} + */ + Pages.prototype.getColor = function(color, opacity) { + opacity = parseFloat(opacity) || 1; + + var elem = $('.pg-colors').length ? $('.pg-colors') : $('
').appendTo('body'); + + var colorElem = elem.find('[data-color="' + color + '"]').length ? elem.find('[data-color="' + color + '"]') : $('
').appendTo(elem); + + var color = colorElem.css('background-color'); + + var rgb = color.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); + var rgba = "rgba(" + rgb[1] + ", " + rgb[2] + ", " + rgb[3] + ', ' + opacity + ')'; + + return rgba; + }; + + /** @function initSidebar + * @description Initialize side bar to open and close + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @requires ui/sidebar.js + */ + Pages.prototype.initSidebar = function(context) { + $('[data-pages="sidebar"]', context).each(function() { + var $sidebar = $(this); + $sidebar.sidebar($sidebar.data()) + }) + }; + + /** @function initDropDown + * @description Initialize Boot-Strap dropdown Menue + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @requires bootstrap.js + */ + Pages.prototype.initDropDown = function(context) { + // adjust width of each dropdown to match content width + $('.dropdown-default', context).each(function() { + var btn = $(this).find('.dropdown-menu').siblings('.dropdown-toggle'); + var offset = 0; + + var menuWidth = $(this).find('.dropdown-menu').actual('outerWidth'); + + if (btn.actual('outerWidth') < menuWidth) { + btn.width(menuWidth - offset); + $(this).find('.dropdown-menu').width(btn.actual('outerWidth')); + } else { + $(this).find('.dropdown-menu').width(btn.actual('outerWidth')); + } + }); + }; + + /** @function initFormGroupDefault + * @description Initialize Pages form group input + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + */ + Pages.prototype.initFormGroupDefault = function(context) { + $('.form-group.form-group-default', context).click(function() { + $(this).find('input').focus(); + }); + + if (!this.initFormGroupDefaultRun) { + $('body').on('focus', '.form-group.form-group-default :input', function() { + $('.form-group.form-group-default').removeClass('focused'); + $(this).parents('.form-group').addClass('focused'); + }); + + $('body').on('blur', '.form-group.form-group-default :input', function() { + $(this).parents('.form-group').removeClass('focused'); + if ($(this).val()) { + $(this).closest('.form-group').find('label').addClass('fade'); + } else { + $(this).closest('.form-group').find('label').removeClass('fade'); + } + }); + + // Only run the above code once. + this.initFormGroupDefaultRun = true; + } + + $('.form-group.form-group-default .checkbox, .form-group.form-group-default .radio', context).hover(function() { + $(this).parents('.form-group').addClass('focused'); + }, function() { + $(this).parents('.form-group').removeClass('focused'); + }); + }; + + /** @function initSlidingTabs + * @description Initialize Bootstrap Custom Sliding Tabs + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @requires bootstrap.js + */ + Pages.prototype.initSlidingTabs = function(context) { + $('a[data-toggle="tab"]', context).on('show.bs.tab', function(e) { + e = $(e.target).parent().find('a[data-toggle=tab]'); + + var hrefCurrent = e.data('target'); + if(hrefCurrent === undefined){ + hrefCurrent = e.attr('href'); + } + + if (!$(hrefCurrent).is('.slide-left, .slide-right')) return; + $(hrefCurrent).addClass('sliding'); + + setTimeout(function() { + $(hrefCurrent).removeClass('sliding'); + }, 100); + }); + }; + /** @function reponsiveTabs + * @description Responsive handlers for Bootstrap Tabs + */ + Pages.prototype.reponsiveTabs = function() { + //Dropdown FX + $('[data-init-reponsive-tabs="dropdownfx"]').each(function() { + var drop = $(this); + drop.addClass("hidden-sm-down"); + var content = ''; + drop.after(content); + var select = drop.next()[0]; + $(select).on('change', function (e) { + var optionSelected = $("option:selected", this); + var valueSelected = this.value; + var tabLink = drop.find('a[data-target="'+valueSelected+'"]'); + if(tabLink.length == 0){ + tabLink = drop.find('a[data-target="'+valueSelected+'"]') + } + tabLink.tab('show') + }); + $(select).wrap(''); + new SelectFx(select); + }); + }; + + /** @function initNotificationCenter + * @description Initialize Pages Header Notifcation Dropdown + */ + Pages.prototype.initNotificationCenter = function() { + $('body').on('click', '.notification-list .dropdown-menu', function(event) { + event.stopPropagation(); + }); + $('body').on('click', '.toggle-more-details', function(event) { + var p = $(this).closest('.heading'); + p.closest('.heading').children('.more-details').stop().slideToggle('fast', function() { + p.toggleClass('open'); + }); + }); + }; + + /** @function initProgressBars + * @description Initialize Pages ProgressBars + */ + Pages.prototype.initProgressBars = function() { + $(window).on('load', function() { + // Hack: FF doesn't play SVG animations set as background-image + $('.progress-bar-indeterminate, .progress-circle-indeterminate, .mapplic-pin').hide().show(0); + }); + }; + + /** @function initInputFile + * @description Initialize File Input for Bootstrap Buttons and Input groups + */ + Pages.prototype.initInputFile = function() { + $(document).on('change', '.btn-file :file', function() { + var input = $(this), + numFiles = input.get(0).files ? input.get(0).files.length : 1, + label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); + input.trigger('fileselect', [numFiles, label]); + }); + + $('.btn-file :file').on('fileselect', function(event, numFiles, label) { + var input = $(this).parents('.input-group').find(':text'), + log = numFiles > 1 ? numFiles + ' files selected' : label; + if( input.length ) { + input.val(log); + } else { + $(this).parent().html(log); + } + }); + }; + /** @function initHorizontalMenu + * @description Initialize Horizontal Dropdown Menu + */ + Pages.prototype.initHorizontalMenu = function(){ + var animationTimer; + + var hMenu = $("[data-pages-init='horizontal-menu']"); + autoHideLi(); + $(document).on('click', '.menu-bar > ul > li', function(){ + if($(this).children("ul").length == 0){ + return; + } + if($(window).width() < 992) { + var menubar = $('.menu-bar'); + var el = $(this); + var li = menubar.find('li'); + var sub = $(this).children('ul'); + + if(el.hasClass("open active")){ + el.find('.arrow').removeClass("open active"); + sub.slideUp(200, function() { + el.removeClass("open active"); + }); + + }else{ + menubar.find('li.open').find('ul').slideUp(200); + menubar.find('li.open').find('a').find('.arrow').removeClass('open active'); + menubar.find('li.open').removeClass("open active"); + el.find('.arrow').addClass("open active"); + sub.slideDown(200, function() { + el.addClass("open active"); + }); + } + } else { + if($(this).hasClass('opening')){ + _hideMenu($(this)); + } + else{ + _showMenu($(this)); + } + } + + }); + + var resizeTimer; + $(window).on('resize', function(e) { + clearTimeout(resizeTimer); + resizeTimer = setTimeout(function() { + autoHideLi(); + }, 250); + }); + + $('.content').on('click', function () { + $('.horizontal-menu .bar-inner > ul > li').removeClass('open'); + $('.menu-bar > ul > li').removeClass('open opening').children("ul").removeAttr("style"); + $("body").find(".ghost-nav-dropdown").remove(); + }); + + $('[data-toggle="horizontal-menu"]').on('click touchstart', function(e) { + e.preventDefault(); + $('body').toggleClass('horizontal-menu-open'); + if(!$('.horizontal-menu-backdrop').length){ + $('.header').append('
'); + $('.horizontal-menu-backdrop').fadeToggle('fast'); + } else { + $('.horizontal-menu-backdrop').fadeToggle('fast', function(){ + $(this).remove(); + }); + } + + $('.menu-bar').toggleClass('open'); + }); + + function autoHideLi(){ + var hMenu = $("[data-pages-init='horizontal-menu']"); + var extraLiHide = parseInt(hMenu.data("hideExtraLi")) || 0; + if(hMenu.length == 0){ + return + } + var hMenuRect = hMenu[0].getBoundingClientRect(); + var liTotalWidth = 0; + var liCount = 0; + hMenu.children('ul').children('li.more').remove(); + hMenu.children('ul').children('li').each(function( index ) { + $(this).removeAttr("style"); + liTotalWidth = liTotalWidth + $(this).outerWidth(true); + liCount++; + }); + + if($(window).width() < 992) { + return; + } + + var possibleLi = parseInt(hMenuRect.width / (liTotalWidth / liCount)) - 1; + possibleLi = possibleLi - extraLiHide; + + if(liCount > possibleLi){ + var wrapper = createWrapperLI(hMenu); + for(var i = possibleLi; i < liCount; i++){ + var currentLi = hMenu.children('ul').children('li').eq(i); + var clone = currentLi.clone(); + clone.children("ul").addClass("sub-menu"); + wrapper.children("ul").append(clone); + currentLi.hide(); + } + } + + } + + function createWrapperLI(hMenu){ + var li =hMenu.children('ul').append("
    • "); + li = hMenu.children('ul').children('li.more'); + return li; + } + + function _hideMenu($el){ + var ul = $($el.children("ul")[0]); + var ghost = $("
      "); + if(ul.length == 0){ + return; + } + var rect = ul[0].getBoundingClientRect(); + ghost.css({ + "width":rect.width+"px", + "height":rect.height+"px", + "z-index":"auto" + }); + $el.append(ghost); + var timingSpeed = ul.children("li").css('transition-duration'); + + timingSpeed = parseInt(parseFloat(timingSpeed) * 1000); + $el.addClass('closing'); + window.clearTimeout(animationTimer); + animationTimer = window.setTimeout(function(){ + ghost.height(0); + $el.removeClass('open opening closing'); + },timingSpeed - 80); + } + function _showMenu($el){ + + var ul = $($el.children("ul")[0]); + var ghost = $("
      "); + $el.children(".ghost-nav-dropdown").remove(); + $el.addClass('open').siblings().removeClass('open opening'); + if(ul.length == 0){ + return; + } + var rect = ul[0].getBoundingClientRect(); + ghost.css({ + "width":rect.width+"px", + "height":"0px" + }); + $el.append(ghost); + ghost.height(rect.height); + var timingSpeed = ghost.css('transition-duration'); + + timingSpeed = parseInt(parseFloat(timingSpeed) * 1000); + window.clearTimeout(animationTimer); + animationTimer = window.setTimeout(function(){ + $el.addClass('opening'); + ghost.remove() + },timingSpeed); + } + }; + /** @function initTooltipPlugin + * @description Initialize Bootstrap tooltip + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @requires bootstrap.js + */ + Pages.prototype.initTooltipPlugin = function(context) { + $.fn.tooltip && $('[data-toggle="tooltip"]', context).tooltip(); + }; + /** @function initSelect2Plugin + * @description Initialize select2 dropdown + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @requires select2.js version 4.0.x + */ + Pages.prototype.initSelect2Plugin = function(context) { + $.fn.select2 && $('[data-init-plugin="select2"]', context).each(function() { + $(this).select2({ + minimumResultsForSearch: ($(this).attr('data-disable-search') == 'true' ? -1 : 1) + }).on('select2:open', function() { + $.fn.scrollbar && $('.select2-results__options').scrollbar({ + ignoreMobile: false + }) + }); + }); + }; + /** @function initScrollBarPlugin + * @description Initialize Global Scroller + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @requires jquery-scrollbar.js + */ + Pages.prototype.initScrollBarPlugin = function(context) { + $.fn.scrollbar && $('.scrollable', context).scrollbar({ + ignoreOverlay: false + }); + }; + /** @function initListView + * @description Initialize iOS like List view plugin + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @example data-init-list-view="ioslist" + * @requires jquery-ioslist.js + */ + Pages.prototype.initListView = function(context) { + $.fn.ioslist && $('[data-init-list-view="ioslist"]', context).ioslist(); + $.fn.scrollbar && $('.list-view-wrapper', context).scrollbar({ + ignoreOverlay: false + }); + }; + + /** @function initSwitcheryPlugin + * @description Initialize iOS like List view plugin + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @example data-init-plugin="switchery" + * @requires Switchery.js + */ + Pages.prototype.initSwitcheryPlugin = function(context) { + // Switchery - ios7 switch + window.Switchery && $('[data-init-plugin="switchery"]', context).each(function() { + var el = $(this); + new Switchery(el.get(0), { + color: (el.data("color") != null ? $.Pages.getColor(el.data("color")) : $.Pages.getColor('success')), + size : (el.data("size") != null ? el.data("size") : "default") + }); + }); + }; + + /** @function initSelectFxPlugin + * @description Initialize iOS like List view plugin + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + * @example select[data-init-plugin="cs-select"] + */ + Pages.prototype.initSelectFxPlugin = function(context) { + window.SelectFx && $('select[data-init-plugin="cs-select"]', context).each(function() { + var el = $(this).get(0); + $(el).wrap('
      '); + new SelectFx(el); + }); + }; + /** @function initUnveilPlugin + * @description To load retina images to img tag + * @param {(Element|JQuery)} [context] - A DOM Element, Document, or jQuery to use as context. + */ + Pages.prototype.initUnveilPlugin = function(context) { + // lazy load retina images + $.fn.unveil && $("img", context).unveil(); + }; + + /** @function initValidatorPlugin + * @description Inintialize and Overide exsisting jquery-validate methods. + * @requires jquery-validate.js + */ + Pages.prototype.initValidatorPlugin = function() { + /** + * Open the socket. + * @override + */ + $.validator && $.validator.setDefaults({ + ignore: "", // validate hidden fields, required for cs-select + showErrors: function(errorMap, errorList) { + var $this = this; + $.each(this.successList, function(index, value) { + var parent = $(this).closest('.form-group-attached'); + if (parent.length) return $(value).popover("hide"); + }); + return $.each(errorList, function(index, value) { + + var parent = $(value.element).closest('.form-group-attached'); + if (!parent.length) { + return $this.defaultShowErrors(); + } + var _popover; + _popover = $(value.element).popover({ + trigger: "manual", + placement: "top", + html: true, + container: parent.closest('form'), + content: value.message + }); + var parent = $(value.element).closest('.form-group'); + parent.addClass('has-error'); + $(value.element).popover("show"); + }); + }, + onfocusout: function(element) { + var parent = $(element).closest('.form-group'); + if ($(element).valid()) { + parent.removeClass('has-error'); + parent.next('.error').remove(); + } + }, + onkeyup: function(element) { + var parent = $(element).closest('.form-group'); + if ($(element).valid()) { + $(element).removeClass('error'); + parent.removeClass('has-error'); + parent.next('label.error').remove(); + parent.find('label.error').remove(); + } else { + parent.addClass('has-error'); + } + }, + errorPlacement: function(error, element) { + var parent = $(element).closest('.form-group'); + if (parent.hasClass('form-group-default')) { + parent.addClass('has-error'); + error.insertAfter(parent); + } else { + error.insertAfter(element); + } + } + }); + }; + + /** @function setBackgroundImage + * @description load images to div using data API + */ + Pages.prototype.setBackgroundImage = function() { + $('[data-pages-bg-image]').each(function() { + var _elem = $(this); + var defaults = { + pagesBgImage: "", + lazyLoad: 'true', + progressType: '', + progressColor:'', + bgOverlay:'', + bgOverlayClass:'', + overlayOpacity:0, + }; + var data = _elem.data(); + $.extend( defaults, data ); + var url = defaults.pagesBgImage; + var color = defaults.bgOverlay; + var opacity = defaults.overlayOpacity; + + var overlay = $('
      '); + overlay.addClass(defaults.bgOverlayClass); + overlay.css({ + 'background-color': color, + 'opacity': 1 + }); + _elem.append(overlay); + + var img = new Image(); + img.src = url; + img.onload = function(){ + _elem.css({ + 'background-image': 'url(' + url + ')' + }); + _elem.children('.bg-overlay').css({'opacity': opacity}); + } + + }) + }; + /** @function secondarySidebar + * @description dropdown Toggle and responive toggle for secondary sidebar + */ + Pages.prototype.secondarySidebar =function(){ + $('[data-init="secondary-sidebar"]').each(function() { + $(this).on('click', '.main-menu li a', function(e) { + + if ($(this).parent().children('.sub-menu') === false) { + return; + } + var el = $(this); + var parent = $(this).parent().parent(); + var li = $(this).parent(); + var sub = $(this).parent().children('.sub-menu'); + + if(li.hasClass("open active")){ + el.children('.arrow').removeClass("open active"); + sub.slideUp(200, function() { + li.removeClass("open active"); + }); + + }else{ + parent.children('li.open').children('.sub-menu').slideUp(200); + parent.children('li.open').children('a').children('.arrow').removeClass('open active'); + parent.children('li.open').removeClass("open active"); + el.children('.arrow').addClass("open active"); + sub.slideDown(200, function() { + li.addClass("open active"); + + }); + } + //e.preventDefault(); + }); + + }); + + $('[data-init="secondary-sidebar-toggle"]').each(function() { + $(this).on("click", function(e) { + var toggleRect = $(this).get(0).getBoundingClientRect(); + var menu = $('[data-init="secondary-sidebar"]'); + if(menu.hasClass("open")){ + menu.removeClass("open"); + menu.removeAttr("style"); + } + else{ + menu.addClass("open"); + var menuRect = menu.get(0).getBoundingClientRect(); + menu.css({ + top : toggleRect.bottom, + 'max-height': ($(window).height() - toggleRect.bottom), + left: $(window).width() / 2 - menuRect.width/ 2, + 'visibility': 'visible' + }); + + } + }) + + }); + + }; + /** @function init + * @description Inintialize all core components. + */ + Pages.prototype.init = function() { + // init layout + this.initSidebar(); + this.setBackgroundImage(); + this.initDropDown(); + this.initFormGroupDefault(); + this.initSlidingTabs(); + this.initNotificationCenter(); + this.initProgressBars(); + this.initHorizontalMenu(); + // init plugins + this.initTooltipPlugin(); + this.initSelect2Plugin(); + this.initScrollBarPlugin(); + this.initSwitcheryPlugin(); + this.initSelectFxPlugin(); + this.initUnveilPlugin(); + this.initValidatorPlugin(); + this.initListView(); + this.initInputFile(); + this.reponsiveTabs(); + this.secondarySidebar(); + }; + + $.Pages = new Pages(); + $.Pages.Constructor = Pages; + +})(window.jQuery); + +(function(window) { + + 'use strict'; + + /** + * based on from https://github.com/inuyaksa/jquery.nicescroll/blob/master/jquery.nicescroll.js + */ + function hasParent(e, p) { + if (!e) return false; + var el = e.target || e.srcElement || e || false; + while (el && el != p) { + el = el.parentNode || false; + } + return (el !== false); + } + /** + * extend obj function + */ + function extend(a, b) { + for (var key in b) { + if (b.hasOwnProperty(key)) { + a[key] = b[key]; + } + } + return a; + } + + /** + * SelectFx function + */ + function SelectFx(el, options) { + this.el = el; + this.options = extend({}, this.options); + extend(this.options, options); + this._init(); + } + + /** + * Pure-JS alternative to jQuery closest() + */ + function closest(elem, selector) { + var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector; + while (elem) { + if (matchesSelector.bind(elem)(selector)) { + return elem; + } else { + elem = elem.parentElement; + } + } + return false; + } + + /** + * jQuery offset() in pure JS + */ + function offset(el) { + return { + left: el.getBoundingClientRect().left + window.pageXOffset - el.ownerDocument.documentElement.clientLeft, + top: el.getBoundingClientRect().top + window.pageYOffset - el.ownerDocument.documentElement.clientTop + } + + } + + /** + * jQuery after() in pure JS + */ + function insertAfter(newNode, referenceNode) { + referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); + } + /** + * SelectFx options + */ + SelectFx.prototype.options = { + // if true all the links will open in a new tab. + // if we want to be redirected when we click an option, we need to define a data-link attr on the option of the native select element + newTab: true, + // when opening the select element, the default placeholder (if any) is shown + stickyPlaceholder: true, + // default container is body + container: 'body', + // callback when changing the value + onChange: function(el) { + var event = document.createEvent('HTMLEvents'); + event.initEvent('change', true, false); + el.dispatchEvent(event); + } + }; + + /** + * init function + * initialize and cache some vars + */ + SelectFx.prototype._init = function() { + // check if we are using a placeholder for the native select box + // we assume the placeholder is disabled and selected by default + var selectedOpt = document.querySelector('option[selected]'); + this.hasDefaultPlaceholder = selectedOpt && selectedOpt.disabled; + + // get selected option (either the first option with attr selected or just the first option) + this.selectedOpt = selectedOpt || this.el.querySelector('option'); + + // create structure + this._createSelectEl(); + + // all options + this.selOpts = [].slice.call(this.selEl.querySelectorAll('li[data-option]')); + + // total options + this.selOptsCount = this.selOpts.length; + + // current index + this.current = this.selOpts.indexOf(this.selEl.querySelector('li.cs-selected')) || -1; + + // placeholder elem + this.selPlaceholder = this.selEl.querySelector('span.cs-placeholder'); + + // init events + this._initEvents(); + + this.el.onchange = function() { + var index = this.selectedIndex; + var inputText = this.children[index].innerHTML.trim(); + } + + }; + + /** + * creates the structure for the select element + */ + SelectFx.prototype._createSelectEl = function() { + var self = this, + options = '', + createOptionHTML = function(el) { + var optclass = '', + classes = '', + link = ''; + + if (el.selectedOpt && !this.foundSelected && !this.hasDefaultPlaceholder) { + classes += 'cs-selected '; + this.foundSelected = true; + } + // extra classes + if (el.getAttribute('data-class')) { + classes += el.getAttribute('data-class'); + } + // link options + if (el.getAttribute('data-link')) { + link = 'data-link=' + el.getAttribute('data-link'); + } + + if (classes !== '') { + optclass = 'class="' + classes + '" '; + } + + return '
    • ' + el.textContent + '
    • '; + }; + + [].slice.call(this.el.children).forEach(function(el) { + if (el.disabled) { + return; + } + + var tag = el.tagName.toLowerCase(); + + if (tag === 'option') { + options += createOptionHTML(el); + } else if (tag === 'optgroup') { + options += '
    • ' + el.label + '
        '; + [].slice.call(el.children).forEach(function(opt) { + options += createOptionHTML(opt); + }); + options += '
    • '; + } + }); + + var opts_el = '
        ' + options + '
      '; + this.selEl = document.createElement('div'); + this.selEl.className = this.el.className; + this.selEl.tabIndex = this.el.tabIndex; + this.selEl.innerHTML = '' + this.selectedOpt.textContent + '' + opts_el; + this.el.parentNode.appendChild(this.selEl); + this.selEl.appendChild(this.el); + + // backdrop to support dynamic heights of the dropdown + var backdrop = document.createElement('div'); + backdrop.className = 'cs-backdrop'; + this.selEl.appendChild(backdrop); + }; + + /** + * initialize the events + */ + SelectFx.prototype._initEvents = function() { + var self = this; + + // open/close select + this.selPlaceholder.addEventListener('click', function() { + self._toggleSelect(); + }); + + // clicking the options + this.selOpts.forEach(function(opt, idx) { + opt.addEventListener('click', function() { + self.current = idx; + self._changeOption(); + // close select elem + self._toggleSelect(); + }); + }); + + // close the select element if the target it´s not the select element or one of its descendants.. + document.addEventListener('click', function(ev) { + var target = ev.target; + if (self._isOpen() && target !== self.selEl && !hasParent(target, self.selEl)) { + self._toggleSelect(); + } + }); + + // keyboard navigation events + this.selEl.addEventListener('keydown', function(ev) { + var keyCode = ev.keyCode || ev.which; + + switch (keyCode) { + // up key + case 38: + ev.preventDefault(); + self._navigateOpts('prev'); + break; + // down key + case 40: + ev.preventDefault(); + self._navigateOpts('next'); + break; + // space key + case 32: + ev.preventDefault(); + if (self._isOpen() && typeof self.preSelCurrent != 'undefined' && self.preSelCurrent !== -1) { + self._changeOption(); + } + self._toggleSelect(); + break; + // enter key + case 13: + ev.preventDefault(); + if (self._isOpen() && typeof self.preSelCurrent != 'undefined' && self.preSelCurrent !== -1) { + self._changeOption(); + self._toggleSelect(); + } + break; + // esc key + case 27: + ev.preventDefault(); + if (self._isOpen()) { + self._toggleSelect(); + } + break; + } + }); + }; + + /** + * navigate with up/dpwn keys + */ + SelectFx.prototype._navigateOpts = function(dir) { + if (!this._isOpen()) { + this._toggleSelect(); + } + + var tmpcurrent = typeof this.preSelCurrent != 'undefined' && this.preSelCurrent !== -1 ? this.preSelCurrent : this.current; + + if (dir === 'prev' && tmpcurrent > 0 || dir === 'next' && tmpcurrent < this.selOptsCount - 1) { + // save pre selected current - if we click on option, or press enter, or press space this is going to be the index of the current option + this.preSelCurrent = dir === 'next' ? tmpcurrent + 1 : tmpcurrent - 1; + // remove focus class if any.. + this._removeFocus(); + // add class focus - track which option we are navigating + classie.add(this.selOpts[this.preSelCurrent], 'cs-focus'); + } + }; + + /** + * open/close select + * when opened show the default placeholder if any + */ + SelectFx.prototype._toggleSelect = function() { + var backdrop = this.selEl.querySelector('.cs-backdrop'); + var container = document.querySelector(this.options.container); + var mask = container.querySelector('.dropdown-mask'); + var csOptions = this.selEl.querySelector('.cs-options'); + var csPlaceholder = this.selEl.querySelector('.cs-placeholder'); + + var csPlaceholderWidth = csPlaceholder.offsetWidth; + var csPlaceholderHeight = csPlaceholder.offsetHeight; + var csOptionsWidth = csOptions.scrollWidth; + + if (this._isOpen()) { + if (this.current !== -1) { + // update placeholder text + this.selPlaceholder.textContent = this.selOpts[this.current].textContent; + } + + var dummy = this.selEl.data; + + var parent = dummy.parentNode; + //parent.appendChild(this.selEl); + insertAfter(this.selEl, dummy); + this.selEl.removeAttribute('style'); + + parent.removeChild(dummy); + + // Hack for FF + // http://stackoverflow.com/questions/12088819/css-transitions-on-new-elements + var x = this.selEl.clientHeight; + + // reset backdrop + backdrop.style.transform = backdrop.style.webkitTransform = backdrop.style.MozTransform = backdrop.style.msTransform = backdrop.style.OTransform = 'scale3d(1,1,1)'; + classie.remove(this.selEl, 'cs-active'); + + mask.style.display = 'none'; + csOptions.style.overflowY = 'hidden'; + csOptions.style.width = 'auto'; + + var parentFormGroup = closest(this.selEl, '.form-group'); + parentFormGroup && classie.removeClass(parentFormGroup, 'focused'); + + } else { + if (this.hasDefaultPlaceholder && this.options.stickyPlaceholder) { + // everytime we open we wanna see the default placeholder text + this.selPlaceholder.textContent = this.selectedOpt.textContent; + } + + var dummy; + if (this.selEl.parentNode.querySelector('.dropdown-placeholder')) { + dummy = this.selEl.parentNode.querySelector('.dropdown-placeholder'); + } else { + dummy = document.createElement('div'); + classie.add(dummy, 'dropdown-placeholder'); + //this.selEl.parentNode.appendChild(dummy); + insertAfter(dummy, this.selEl); + + } + + + dummy.style.height = csPlaceholderHeight + 'px'; + dummy.style.width = this.selEl.offsetWidth + 'px'; + + this.selEl.data = dummy; + + + + this.selEl.style.position = 'absolute'; + var offsetselEl = offset(this.selEl); + + this.selEl.style.left = offsetselEl.left + 'px'; + this.selEl.style.top = offsetselEl.top + 'px'; + + container.appendChild(this.selEl); + + // decide backdrop's scale factor depending on the content height + var contentHeight = csOptions.offsetHeight; + var originalHeight = csPlaceholder.offsetHeight; + + var contentWidth = csOptions.offsetWidth; + var originalWidth = csPlaceholder.offsetWidth; + + var scaleV = contentHeight / originalHeight; + var scaleH = (contentWidth > originalWidth) ? contentWidth / originalWidth : 1.05; + //backdrop.style.transform = backdrop.style.webkitTransform = backdrop.style.MozTransform = backdrop.style.msTransform = backdrop.style.OTransform = 'scale3d(' + scaleH + ', ' + scaleV + ', 1)'; + backdrop.style.transform = backdrop.style.webkitTransform = backdrop.style.MozTransform = backdrop.style.msTransform = backdrop.style.OTransform = 'scale3d(' + 1 + ', ' + scaleV + ', 1)'; + + if (!mask) { + mask = document.createElement('div'); + classie.add(mask, 'dropdown-mask'); + container.appendChild(mask); + } + + mask.style.display = 'block'; + + classie.add(this.selEl, 'cs-active'); + + var resizedWidth = (csPlaceholderWidth < csOptionsWidth) ? csOptionsWidth : csPlaceholderWidth; + + this.selEl.style.width = resizedWidth + 'px'; + this.selEl.style.height = originalHeight + 'px'; + csOptions.style.width = '100%'; + + setTimeout(function() { + csOptions.style.overflowY = 'auto'; + }, 300); + + } + }; + + /** + * change option - the new value is set + */ + SelectFx.prototype._changeOption = function() { + // if pre selected current (if we navigate with the keyboard)... + if (typeof this.preSelCurrent != 'undefined' && this.preSelCurrent !== -1) { + this.current = this.preSelCurrent; + this.preSelCurrent = -1; + } + + // current option + var opt = this.selOpts[this.current]; + + // update current selected value + this.selPlaceholder.textContent = opt.textContent; + + // change native select element´s value + this.el.value = opt.getAttribute('data-value'); + + // remove class cs-selected from old selected option and add it to current selected option + var oldOpt = this.selEl.querySelector('li.cs-selected'); + if (oldOpt) { + classie.remove(oldOpt, 'cs-selected'); + } + classie.add(opt, 'cs-selected'); + + // if there´s a link defined + if (opt.getAttribute('data-link')) { + // open in new tab? + if (this.options.newTab) { + window.open(opt.getAttribute('data-link'), '_blank'); + } else { + window.location = opt.getAttribute('data-link'); + } + } + + // callback + this.options.onChange(this.el); + }; + + /** + * returns true if select element is opened + */ + SelectFx.prototype._isOpen = function(opt) { + return classie.has(this.selEl, 'cs-active'); + }; + + /** + * removes the focus class from the option + */ + SelectFx.prototype._removeFocus = function(opt) { + var focusEl = this.selEl.querySelector('li.cs-focus'); + if (focusEl) { + classie.remove(focusEl, 'cs-focus'); + } + }; + + /** + * add to global namespace + */ + window.SelectFx = SelectFx; + +})(window); + +/* ============================================================ + * Pages Circular Progress + * ============================================================ */ + +(function($) { + 'use strict'; + // CIRCULAR PROGRESS CLASS DEFINITION + // ====================== + + var Progress = function(element, options) { + this.$element = $(element); + this.options = $.extend(true, {}, $.fn.circularProgress.defaults, options); + + + // start adding to to DOM + this.$container = $('
      '); + + this.$element.attr('data-color') && this.$container.addClass('progress-circle-' + this.$element.attr('data-color')); + this.$element.attr('data-thick') && this.$container.addClass('progress-circle-thick'); + + this.$pie = $('
      '); + + this.$pie.$left = $('
      '); + this.$pie.$right = $('
      '); + + this.$pie.append(this.$pie.$left).append(this.$pie.$right); + + this.$container.append(this.$pie).append('
      '); + + this.$element.after(this.$container); + // end DOM adding + + this.val = this.$element.val(); + var deg = perc2deg(this.val); + + + if (this.val <= 50) { + this.$pie.$right.css('transform', 'rotate(' + deg + 'deg)'); + } else { + this.$pie.css('clip', 'rect(auto, auto, auto, auto)'); + this.$pie.$right.css('transform', 'rotate(180deg)'); + this.$pie.$left.css('transform', 'rotate(' + deg + 'deg)'); + } + + }; + Progress.VERSION = "1.0.0"; + + Progress.prototype.value = function(val) { + if (typeof val == 'undefined') return; + + var deg = perc2deg(val); + + this.$pie.removeAttr('style'); + + this.$pie.$right.removeAttr('style'); + this.$pie.$left.removeAttr('style'); + + if (val <= 50) { + this.$pie.$right.css('transform', 'rotate(' + deg + 'deg)'); + } else { + this.$pie.css('clip', 'rect(auto, auto, auto, auto)'); + this.$pie.$right.css('transform', 'rotate(180deg)'); + this.$pie.$left.css('transform', 'rotate(' + deg + 'deg)'); + } + + }; + + // CIRCULAR PROGRESS PLUGIN DEFINITION + // ======================= + function Plugin(option) { + return this.filter(':input').each(function() { + var $this = $(this); + var data = $this.data('pg.circularProgress'); + var options = typeof option == 'object' && option; + + if (!data) $this.data('pg.circularProgress', (data = new Progress(this, options))); + if (typeof option == 'string') data[option](); + else if (options.hasOwnProperty('value')) data.value(options.value); + }) + } + + var old = $.fn.circularProgress; + + $.fn.circularProgress = Plugin; + $.fn.circularProgress.Constructor = Progress; + + + $.fn.circularProgress.defaults = { + value: 0 + }; + + // CIRCULAR PROGRESS NO CONFLICT + // ==================== + + $.fn.circularProgress.noConflict = function() { + $.fn.circularProgress = old; + return this; + }; + + // CIRCULAR PROGRESS DATA API + //=================== + + $(window).on('load', function() { + $('[data-pages-progress="circle"]').each(function() { + var $progress = $(this); + $progress.circularProgress($progress.data()) + }) + }); + + function perc2deg(p) { + return parseInt(p / 100 * 360); + } + + // TODO: Add API to change size, stroke width, color + +})(window.jQuery); + +/* ============================================================ + * Pages Notifications + * ============================================================ */ + +(function($) { + + 'use strict'; + + var Notification = function(container, options) { + + var self = this; + + // Element collection + self.container = $(container); // 'body' recommended + self.notification = $('
      '); + self.options = $.extend(true, {}, $.fn.pgNotification.defaults, options); + + if (!self.container.find('.pgn-wrapper[data-position=' + this.options.position + ']').length) { + self.wrapper = $('
      '); + self.container.append(self.wrapper); + } else { + self.wrapper = $('.pgn-wrapper[data-position=' + this.options.position + ']'); + } + + self.alert = $('
      '); + self.alert.addClass('alert-' + self.options.type); + + if (self.options.style == 'bar') { + new BarNotification(); + } else if (self.options.style == 'flip') { + new FlipNotification(); + } else if (self.options.style == 'circle') { + new CircleNotification(); + } else if (self.options.style == 'simple') { + new SimpleNotification(); + } else { // default = 'simple' + new SimpleNotification(); + } + + // Notification styles + function SimpleNotification() { + + self.notification.addClass('pgn-simple'); + + self.alert.append(self.options.message); + if (self.options.showClose) { + var close = $('') + .append('') + .append('Close'); + + self.alert.prepend(close); + } + + } + + function BarNotification() { + + self.notification.addClass('pgn-bar'); + self.alert.addClass('alert-' + self.options.type); + + var container = $('
      '); + + container.append('' + self.options.message + ''); + + if (self.options.showClose) { + var close = $('') + .append('') + .append('Close'); + container.append(close) + } + self.alert.append(container); + + } + + function CircleNotification() { + + self.notification.addClass('pgn-circle'); + + var table = '
      '; + if (self.options.thumbnail) { + table += '
      ' + self.options.thumbnail + '
      '; + } + + table += '
      '; + + if (self.options.title) { + table += '

      ' + self.options.title + '

      '; + } + table += '

      ' + self.options.message + '

      '; + table += '
      '; + + if (self.options.showClose) { + table += ''; + } + + + self.alert.append(table); + self.alert.after('
      '); + + } + + function FlipNotification() { + + self.notification.addClass('pgn-flip'); + self.alert.append("" + self.options.message + ""); + if (self.options.showClose) { + var close = $('') + .append('') + .append('Close'); + + self.alert.prepend(close); + } + + } + + self.notification.append(self.alert); + + function alignWrapperToContainer(){ + var containerPosition = self.container.position(); + var containerHeight = self.container.height(); + var containerWidth = self.container.width(); + + var containerTop = containerPosition.top; + var containerBottom = self.container.parent().height() - (containerTop + containerHeight); + var containerLeft = containerPosition.left; + var containerRight = self.container.parent().width() - (containerLeft + containerWidth); + + if(/top/.test(self.options.position)){ + self.wrapper.css('top', containerTop) + } + if(/bottom/.test(self.options.position)){ + self.wrapper.css('bottom', containerBottom) + } + if(/left/.test(self.options.position)){ + self.wrapper.css('left', containerLeft) + } + if(/right/.test(self.options.position)){ + self.wrapper.css('right', containerRight) + } + } + if($('body').hasClass('horizontal-menu')){ + alignWrapperToContainer(); + $(window).on('resize', alignWrapperToContainer) + } + + // bind to Bootstrap closed event for alerts + self.alert.on('closed.bs.alert', function() { + self.notification.remove(); + self.options.onClosed(); + // refresh layout after removal + }); + + return this; // enable chaining + }; + + Notification.VERSION = "1.0.0"; + + Notification.prototype.show = function() { + + // TODO: add fadeOut animation on show as option + this.wrapper.prepend(this.notification); + + this.options.onShown(); + + if (this.options.timeout != 0) { + var _this = this; + // settimeout removes scope. use .bind(this) + setTimeout(function() { + this.notification.fadeOut("slow", function() { + $(this).remove(); + _this.options.onClosed(); + }); + }.bind(this), this.options.timeout); + } + + }; + + $.fn.pgNotification = function(options) { + return new Notification(this, options); + }; + + $.fn.pgNotification.defaults = { + style: 'simple', + message: null, + position: 'top-right', + type: 'info', + showClose: true, + timeout: 4000, + onShown: function() {}, + onClosed: function() {} + } +})(window.jQuery); + +/* ============================================================ + * Pages Cards + * ============================================================ */ + +(function($) { + 'use strict'; + // CARDS CLASS DEFINITION + // ====================== + + var Card = function(element, options) { + this.$element = $(element); + this.options = $.extend(true, {}, $.fn.card.defaults, options); + this.$loader = null; + this.$body = this.$element.find('.card-block'); + }; + Card.VERSION = "1.0.0"; + // Button actions + Card.prototype.collapse = function() { + var icon = this.$element.find('.collapse-icon'); + var heading = this.$element.find('.card-header'); + + this.$body.stop().slideToggle("fast"); + + if (this.$element.hasClass('card-collapsed')) { + this.$element.removeClass('card-collapsed'); + icon.removeClass().addClass('fa-chevron-down'); + $.isFunction(this.options.onExpand) && this.options.onExpand(this); + return + } + this.$element.addClass('card-collapsed'); + icon.removeClass().addClass('fa-chevron-right'); + $.isFunction(this.options.onCollapse) && this.options.onCollapse(this); + }; + + Card.prototype.close = function() { + this.$element.remove(); + $.isFunction(this.options.onClose) && this.options.onClose(this); + }; + + Card.prototype.error = function(error) { + if (error) { + var _this = this; + this.$element.pgNotification({ + style: 'bar', + message: error, + position: 'top', + timeout: 0, + type: 'danger', + onShown: function() { + _this.$loader.find('> div').fadeOut() + }, + onClosed: function() { + _this.refresh(false) + } + }).show(); + } + }; + + // CARD PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function() { + var $this = $(this); + var data = $this.data('pg.card'); + var options = typeof option == 'object' && option; + + if (!data) $this.data('pg.card', (data = new Card(this, options))); + if (typeof option == 'string') data[option](); + else if (options.hasOwnProperty('refresh')) data.refresh(options.refresh); + else if (options.hasOwnProperty('error')) data.error(options.error); + }) + } + + var old = $.fn.card; + + $.fn.card = Plugin; + $.fn.card.Constructor = Card; + + + $.fn.card.defaults = { + progress: 'circle', + progressColor: 'master', + refresh: false, + error: null, + overlayColor: '255,255,255', + overlayOpacity: 0.8, + refreshButton: '[data-toggle="refresh"]', + maximizeButton: '[data-toggle="maximize"]', + collapseButton: '[data-toggle="collapse"]', + closeButton: '[data-toggle="close"]' + + // onRefresh: function(portlet) {}, + // onCollapse: function(portlet) {}, + // onExpand: function(portlet) {}, + // onMaximize: function(portlet) {}, + // onRestore: function(portlet) {}, + // onClose: function(portlet) {} + }; + + // CARD NO CONFLICT + // ==================== + + $.fn.card.noConflict = function() { + $.fn.card = old; + return this; + } + +})(window.jQuery); + +/* ============================================================ + * Pages Mobile View + * ============================================================ */ +(function($) { + 'use strict'; + + var MobileView = function(element, options) { + var self = this; + self.options = $.extend(true, {}, $.fn.pgMobileViews.defaults, options); + self.element = $(element); + self.element.on('click', function(e) { + e.preventDefault(); + var data = self.element.data(); + var el = $(data.viewPort); + var toView = data.toggleView; + if (data.toggleView != null) { + el.children().last().children('.view').hide(); + $(data.toggleView).show(); + } + else{ + toView = el.last(); + } + el.toggleClass(data.viewAnimation); + self.options.onNavigate(toView, data.viewAnimation); + return false; + }); + return this; // enable chaining + }; + $.fn.pgMobileViews = function(options) { + return new MobileView(this, options); + }; + + $.fn.pgMobileViews.defaults = { + //Returns Target View & Animation Type + onNavigate: function(view, animation) {} + }; + // MOBILE VIEW DATA API + //=================== + + $(window).on('load', function() { + $('[data-navigate="view"]').each(function() { + var $mobileView = $(this); + $mobileView.pgMobileViews(); + }) + }); +})(window.jQuery); +/* ============================================================ + * Pages Quickview Plugin + * ============================================================ */ + +(function($) { + 'use strict'; + // QUICKVIEW CLASS DEFINITION + // ====================== + + var Quickview = function(element, options) { + this.$element = $(element); + this.options = $.extend(true, {}, $.fn.quickview.defaults, options); + this.bezierEasing = [.05, .74, .27, .99]; + var _this = this; + + $(this.options.notes).on('click', '.list > ul > li', function(e) { + var note = $(this).find('.note-preview'); + var note = $(this).find('.note-preview'); + $(_this.options.noteEditor).html(note.html()); + $(_this.options.notes).toggleClass('push'); + }); + $(this.options.notes).on('click', '.list > ul > li .checkbox', function(e) { + e.stopPropagation(); + }); + $(this.options.notes).on('click', _this.options.backButton, function(e) { + $(_this.options.notes).find('.toolbar > li > a').removeClass('active'); + $(_this.options.notes).toggleClass('push'); + }); + $(this.options.deleteNoteButton).click(function(e) { + e.preventDefault(); + $(this).toggleClass('selected'); + $(_this.options.notes).find('.list > ul > li .checkbox').fadeToggle("fast"); + $(_this.options.deleteNoteConfirmButton).fadeToggle("fast").removeClass('hide'); + }); + $(this.options.newNoteButton).click(function(e) { + e.preventDefault(); + $(_this.options.noteEditor).html(''); + }); + + $(this.options.deleteNoteConfirmButton).click(function() { + var checked = $(_this.options.notes).find('input[type=checkbox]:checked'); + checked.each(function() { + $(this).parents('li').remove(); + }); + }); + $(this.options.notes).on('click', '.toolbar > li > a', function(e) { + //e.preventDefault(); + var command = $(this).attr('data-action'); + document.execCommand(command, false, null); + $(this).toggleClass('active'); + }); + + }; + Quickview.VERSION = "1.0.0"; + + // QUICKVIEW PLUGIN DEFINITION + // ======================= + function Plugin(option) { + return this.each(function() { + var $this = $(this); + var data = $this.data('pg.quickview'); + var options = typeof option == 'object' && option; + + if (!data) $this.data('pg.quickview', (data = new Quickview(this, options))); + if (typeof option == 'string') data[option](); + }) + } + + var old = $.fn.quickview; + + $.fn.quickview = Plugin; + $.fn.quickview.Constructor = Quickview; + + + $.fn.quickview.defaults = { + notes: '#note-views', + alerts: '#alerts', + chat: '#chat', + notesList: '.list', + noteEditor: '.quick-note-editor', + deleteNoteButton: '.delete-note-link', + deleteNoteConfirmButton: '.btn-remove-notes', + newNoteButton: '.new-note-link', + backButton: '.close-note-link' + }; + + // QUICKVIEW NO CONFLICT + // ==================== + + $.fn.quickview.noConflict = function() { + $.fn.quickview = old; + return this; + }; + + // QUICKVIEW DATA API + //=================== + + $(window).on('load', function() { + + $('[data-pages="quickview"]').each(function() { + var $quickview = $(this); + $quickview.quickview($quickview.data()) + }) + }); + + + $(document).on('click.pg.quickview.data-api touchstart', '[data-toggle="quickview"]', function(e) { + var elem = $(this).attr('data-toggle-element'); + $(elem).toggleClass('open'); + e.preventDefault(); + }) + +})(window.jQuery); + + /* ============================================================ + * Pages Sidebar + * ============================================================ */ + + (function($) { + 'use strict'; + // SIDEBAR CLASS DEFINITION + // ====================== + + var Sidebar = function(element, options) { + this.$element = $(element); + this.$body = $('body'); + this.options = $.extend(true, {}, $.fn.sidebar.defaults, options); + + this.bezierEasing = [.05, .74, .27, .99]; + this.cssAnimation = true; + this.css3d = true; + + this.sideBarWidth = this.$element.width(); + this.sideBarWidthCondensed = - this.$element.offset().left; + + + this.$sidebarMenu = this.$element.find(".sidebar-menu > ul"); + this.$pageContainer = $(this.options.pageContainer); + + + if (!this.$sidebarMenu.length) return; + + // apply perfectScrollbar plugin only for desktops + ($.Pages.getUserAgent() == 'desktop') && this.$sidebarMenu.scrollbar({ + ignoreOverlay: false, + disableBodyScroll :(this.$element.data("disableBodyScroll") == true)? true : false + }); + + + if (!Modernizr.csstransitions) + this.cssAnimation = false; + if (!Modernizr.csstransforms3d) + this.css3d = false; + + // Bind events + // Toggle sub menus + // In Angular Binding is done using a pg-sidebar directive + (typeof angular === 'undefined') && $(document).on('click', '.sidebar-menu a', function(e) { + + if ($(this).parent().children('.sub-menu') === false) { + return; + } + var el = $(this); + var parent = $(this).parent().parent(); + var li = $(this).parent(); + var sub = $(this).parent().children('.sub-menu'); + + if(li.hasClass("open active")){ + el.children('.arrow').removeClass("open active"); + sub.slideUp(200, function() { + li.removeClass("open active"); + }); + + }else{ + parent.children('li.open').children('.sub-menu').slideUp(200); + parent.children('li.open').children('a').children('.arrow').removeClass('open active'); + parent.children('li.open').removeClass("open active"); + el.children('.arrow').addClass("open active"); + sub.slideDown(200, function() { + li.addClass("open active"); + + }); + } + //e.preventDefault(); + }); + + // Toggle sidebar + $('.sidebar-slide-toggle').on('click touchend', function(e) { + e.preventDefault(); + $(this).toggleClass('active'); + var el = $(this).attr('data-pages-toggle'); + if (el != null) { + $(el).toggleClass('show'); + } + }); + + var _this = this; + + function sidebarMouseEnter(e) { + + var menuOpenCSS = (this.css3d == true ? 'translate3d(' + _this.sideBarWidthCondensed + 'px, 0,0)' : 'translate(' + _this.sideBarWidthCondensed + 'px, 0)'); + + if ($.Pages.isVisibleSm() || $.Pages.isVisibleXs()) { + return false + } + if ($('.close-sidebar').data('clicked')) { + return; + } + if (_this.$body.hasClass('menu-pin')) + return; + + _this.$element.css({ + 'transform': menuOpenCSS + }); + _this.$body.addClass('sidebar-visible'); + } + + function sidebarMouseLeave(e) { + var menuClosedCSS = (_this.css3d == true ? 'translate3d(0, 0,0)' : 'translate(0, 0)'); + + if ($.Pages.isVisibleSm() || $.Pages.isVisibleXs()) { + return false + } + if (typeof e != 'undefined') { + var target = $(e.target); + if (target.parent('.page-sidebar').length) { + return; + } + } + if (_this.$body.hasClass('menu-pin')) + return; + + if ($('.sidebar-overlay-slide').hasClass('show')) { + $('.sidebar-overlay-slide').removeClass('show'); + $("[data-pages-toggle]").removeClass('active') + + } + + _this.$element.css({ + 'transform': menuClosedCSS + }); + _this.$body.removeClass('sidebar-visible'); + } + + + this.$element.bind('mouseenter mouseleave', sidebarMouseEnter); + this.$pageContainer.bind('mouseover', sidebarMouseLeave); + + function toggleMenuPin(){ + var width = $(window).width(); + if(width < 1200){ + if($('body').hasClass('menu-pin')){ + $('body').removeClass('menu-pin'); + $('body').addClass('menu-unpinned') + } + } else { + if($('body').hasClass('menu-unpinned')){ + $('body').addClass('menu-pin') + } + } + } + + $(document).bind('ready', toggleMenuPin); + $(window).bind('resize', toggleMenuPin); + + }; + + // Toggle sidebar for mobile view + Sidebar.prototype.toggleSidebar = function(toggle) { + var timer; + var bodyColor = $('body').css('background-color'); + $('.page-container').css('background-color', bodyColor); + if (this.$body.hasClass('sidebar-open')) { + this.$body.removeClass('sidebar-open'); + timer = setTimeout(function() { + this.$element.removeClass('visible'); + }.bind(this), 400); + } else { + clearTimeout(timer); + this.$element.addClass('visible'); + setTimeout(function() { + this.$body.addClass('sidebar-open'); + }.bind(this), 10); + setTimeout(function(){ + // remove background color + $('.page-container').css({'background-color': ''}); + },1000); + + } + + }; + + Sidebar.prototype.togglePinSidebar = function(toggle) { + if (toggle == 'hide') { + this.$body.removeClass('menu-pin'); + } else if (toggle == 'show') { + this.$body.addClass('menu-pin'); + } else { + this.$body.toggleClass('menu-pin'); + } + + }; + + + // SIDEBAR PLUGIN DEFINITION + // ======================= + function Plugin(option) { + return this.each(function() { + var $this = $(this); + var data = $this.data('pg.sidebar'); + var options = typeof option == 'object' && option; + + if (!data) $this.data('pg.sidebar', (data = new Sidebar(this, options))); + if (typeof option == 'string') data[option](); + }) + } + + var old = $.fn.sidebar; + + $.fn.sidebar = Plugin; + $.fn.sidebar.Constructor = Sidebar; + + + $.fn.sidebar.defaults = { + pageContainer: '.page-container' + }; + + // SIDEBAR PROGRESS NO CONFLICT + // ==================== + + $.fn.sidebar.noConflict = function() { + $.fn.sidebar = old; + return this; + }; + + // SIDEBAR PROGRESS DATA API + //=================== + + $(document).on('click.pg.sidebar.data-api', '[data-toggle-pin="sidebar"]', function(e) { + var $this = $(this); + var $target = $('[data-pages="sidebar"]'); + $target.data('pg.sidebar').togglePinSidebar(); + return false; + }); + $(document).on('click.pg.sidebar.data-api touchstart', '[data-toggle="sidebar"]', function(e) { + var $this = $(this); + var $target = $('[data-pages="sidebar"]'); + $target.data('pg.sidebar').toggleSidebar(); + return false + }) + + })(window.jQuery); + + +(function($) { + 'use strict'; + // Initialize layouts and plugins + (typeof angular === 'undefined') && $.Pages.init(); +})(window.jQuery); \ No newline at end of file diff --git a/resources/assets/js/pdfThumbnail.js b/resources/assets/js/pdfThumbnail.js new file mode 100644 index 00000000..3ef6c079 --- /dev/null +++ b/resources/assets/js/pdfThumbnail.js @@ -0,0 +1,90 @@ +/** + * Find all img elements with data-pdf-thumbnail-file attribute, + * then load pdf file given in the attribute, + * then use pdf.js to draw the first page on a canvas, + * then convert it to base64, + * then set it as the img src. + */ +var createPDFThumbnails = function(){ + + var worker = null; + var loaded = false; + var renderQueue = []; + + // select all img elements with data-pdf-thumbnail-file attribute + var nodesArray = Array.prototype.slice.call(document.querySelectorAll('img[data-pdf-thumbnail-file]')); + + if (!nodesArray.length) { + // No PDF found, don't load PDF.js + return; + } + + if (!loaded && typeof(pdfjsLib) === 'undefined') { + var src = document.querySelector('script[data-pdfjs-src]').getAttribute('data-pdfjs-src'); + + if (!src) { + throw Error('PDF.js URL not set in "data-pdfjs-src" attribute: cannot load PDF.js'); + } + + var script = document.createElement('script'); + script.src = src; + document.head.appendChild(script).onload = renderThumbnails; + loaded = true; + } + else { + renderThumbnails(); + } + + function renderThumbnails() { + if (!pdfjsLib) { + throw Error("pdf.js failed to load. Check data-pdfjs-src attribute."); + } + + nodesArray.forEach(function(element) { + if (null === worker) { + worker = new pdfjsLib.PDFWorker(); + } + + var filePath = element.getAttribute('data-pdf-thumbnail-file'); + var imgWidth = element.getAttribute('data-pdf-thumbnail-width'); + var imgHeight = element.getAttribute('data-pdf-thumbnail-height'); + + pdfjsLib.getDocument({url: filePath, worker: worker}).promise.then(function (pdf) { + pdf.getPage(1).then(function (page) { + var canvas = document.createElement("canvas"); + var viewport = page.getViewport({scale: 1.0}); + var context = canvas.getContext('2d'); + + if (imgWidth) { + viewport = page.getViewport({scale: imgWidth / viewport.width}); + } else if (imgHeight) { + viewport = page.getViewport({scale: imgHeight / viewport.height}); + } + + canvas.height = viewport.height; + canvas.width = viewport.width; + + page.render({ + canvasContext: context, + viewport: viewport + }).promise.then(function () { + element.src = canvas.toDataURL(); + }); + }).catch(function() { + console.log("pdfThumbnails error: could not open page 1 of document " + filePath + ". Not a pdf ?"); + }); + }).catch(function() { + console.log("pdfThumbnails error: could not find or open document " + filePath + ". Not a pdf ?"); + }); + }); + } +}; + +if ( + document.readyState === "complete" || + (document.readyState !== "loading" && !document.documentElement.doScroll) +) { + createPDFThumbnails(); +} else { + document.addEventListener("DOMContentLoaded", createPDFThumbnails); +} \ No newline at end of file diff --git a/resources/assets/js/scripts.js b/resources/assets/js/scripts.js new file mode 100644 index 00000000..64282038 --- /dev/null +++ b/resources/assets/js/scripts.js @@ -0,0 +1,56 @@ +$(function() { + $('.page-container').scrollbar().addClass('scrollbar-macosx'); + $('.scrollable').scrollbar().addClass('scrollbar-macosx'); + $.fn.selectListTrigger = function(eventName) { + return this.each(function() { + var el = $(this).get(0); + triggerNativeEvent(el, eventName); + }); + }; + + function triggerNativeEvent(el, eventName){ + if (el.fireEvent) { // < IE9 + (el.fireEvent('on' + eventName)); + } else { + var evt = document.createEvent('Events'); + evt.initEvent(eventName, true, false); + el.dispatchEvent(evt); + } + } + + $('[data-init-plugin="select2"]').on('select2:select', function (e) { + $(this).selectListTrigger('change'); + }); + + $('body').on('click', '.requestModal', function () { + let type = $(this).attr('data-type'); + if(type){ $(this).closest('.parentContainer').find('.modalContainer[data-type="'+type+'"]').modal('show'); } + }); + + $('body').on('click', '.tabButton', function(){ + let tabName = $(this).attr('tab-name'); + $(this).closest('.tabsContainer').find('.tabButton').not($(this).closest('.tabsContainer').find('.tabsContainer .tabButton')).removeClass('active'); + $(this).addClass('active'); + + $(this).closest('.tabsContainer').find('.tabContent:not(.hide)').not($(this).closest('.tabsContainer').find('.tabsContainer .tabContent')).addClass('hide'); + $(this).closest('.tabsContainer').find('.tabContent[tab-name="'+tabName+'"]').not($(this).closest('.tabsContainer').find('.tabsContainer .tabContent')).removeClass('hide'); + }); + + $('.scrollable').scrollbar().addClass('scrollbar-macosx'); + + if($('#maintenanceContainer').length >0 ){ + VANTA.BIRDS({ + el: "#maintenanceContainer", + backgroundColor: 0xf9f9f9, + wingSpan: 40.00, + separation: 100.00, + alignment: 100.00, + cohesion: 100.00, + quantity: 2.00 + }) + } + + $.fn.select2.defaults.set( "theme", "bootstrap" ); + $.fn.select2.defaults.set( "containerCssClass", "form-control" ); + +}); \ No newline at end of file diff --git a/resources/assets/js/three.r92.min.js b/resources/assets/js/three.r92.min.js new file mode 100644 index 00000000..0d8b21ea --- /dev/null +++ b/resources/assets/js/three.r92.min.js @@ -0,0 +1,927 @@ +// threejs.org/license +(function(k,xa){"object"===typeof exports&&"undefined"!==typeof module?xa(exports):"function"===typeof define&&define.amd?define(["exports"],xa):xa(k.THREE={})})(this,function(k){function xa(){}function A(a,b){this.x=a||0;this.y=b||0}function K(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0b&&(b=a[c]);return b}function I(){Object.defineProperty(this,"id",{value:Bf+=2});this.uuid=R.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange= +{start:0,count:Infinity}}function Kb(a,b,c,d,e,f){M.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new nb(a,b,c,d,e,f));this.mergeVertices()}function nb(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,k,O,G,Lb){var q=f/O,u=g/G,x=f/2,N=g/2,v=k/2;g=O+1;var y=G+1,C=f=0,F,A,z=new p;for(A=0;Am;m++){if(n=d[m])if(h=n[0],l=n[1]){w&&e.addAttribute("morphTarget"+m,w[h]);f&&e.addAttribute("morphNormal"+m,f[h]);c[m]=l;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Nf(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function bb(a,b,c,d,e,f,g,h,l,m){a= +void 0!==a?a:[];X.call(this,a,void 0!==b?b:301,c,d,e,f,g,h,l,m);this.flipY=!1}function Ob(a,b,c){var d=a[0];if(0>=d||0/gm,function(a,c){a=W[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return Vd(a)})}function Te(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g, +function(a,c,d,e){a="";for(c=parseInt(c);c 0 ) {\n\t\tfloat fogFactor = 0.0;\n\t\tif ( fogType == 1 ) {\n\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t\t} else {\n\t\t\tconst float LOG2 = 1.442695;\n\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );\n\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n\t\t}\n\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\t}\n}"].join("\n")); +b.compileShader(Da);b.compileShader(D);b.attachShader(T,Da);b.attachShader(T,D);b.linkProgram(T);ha=T;N=b.getAttribLocation(ha,"position");O=b.getAttribLocation(ha,"uv");f=b.getUniformLocation(ha,"uvOffset");g=b.getUniformLocation(ha,"uvScale");h=b.getUniformLocation(ha,"rotation");l=b.getUniformLocation(ha,"center");m=b.getUniformLocation(ha,"scale");w=b.getUniformLocation(ha,"color");n=b.getUniformLocation(ha,"map");t=b.getUniformLocation(ha,"opacity");r=b.getUniformLocation(ha,"modelViewMatrix"); +k=b.getUniformLocation(ha,"projectionMatrix");u=b.getUniformLocation(ha,"fogType");x=b.getUniformLocation(ha,"fogDensity");y=b.getUniformLocation(ha,"fogNear");v=b.getUniformLocation(ha,"fogFar");C=b.getUniformLocation(ha,"fogColor");b.getUniformLocation(ha,"fogDepth");F=b.getUniformLocation(ha,"alphaTest");T=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");T.width=8;T.height=8;Da=T.getContext("2d");Da.fillStyle="white";Da.fillRect(0,0,8,8);z=new Cc(T)}c.useProgram(ha);c.initAttributes(); +c.enableAttribute(N);c.enableAttribute(O);c.disableUnusedAttributes();c.disable(b.CULL_FACE);c.enable(b.BLEND);b.bindBuffer(b.ARRAY_BUFFER,A);b.vertexAttribPointer(N,2,b.FLOAT,!1,16,0);b.vertexAttribPointer(O,2,b.FLOAT,!1,16,8);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,ob);b.uniformMatrix4fv(k,!1,Lb.projectionMatrix.elements);c.activeTexture(b.TEXTURE0);b.uniform1i(n,0);Da=T=0;(D=p.fog)?(b.uniform3f(C,D.color.r,D.color.g,D.color.b),D.isFog?(b.uniform1f(y,D.near),b.uniform1f(v,D.far),b.uniform1i(u,1),Da= +T=1):D.isFogExp2&&(b.uniform1f(x,D.density),b.uniform1i(u,2),Da=T=2)):(b.uniform1i(u,0),Da=T=0);D=0;for(var J=q.length;Db||a.height>b){if("data"in a){console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+a.width+"x"+a.height+").");return}b/=Math.max(a.width,a.height);var c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");c.width=Math.floor(a.width*b);c.height=Math.floor(a.height* +b);c.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,c.width,c.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+c.width+"x"+c.height,a);return c}return a}function l(a){return R.isPowerOfTwo(a.width)&&R.isPowerOfTwo(a.height)}function m(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function w(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function n(b){return 1003===b||1004=== +b||1005===b?a.NEAREST:a.LINEAR}function t(b){b=b.target;b.removeEventListener("dispose",t);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.remove(b)}b.isVideoTexture&&delete C[b.id];g.memory.textures--}function k(b){b=b.target;b.removeEventListener("dispose",k);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&& +b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function q(b,n){var k=d.get(b);if(b.isVideoTexture){var r=b.id,q=g.render.frame;C[r]!==q&&(C[r]=q,b.update())}if(0p;p++)q[p]=n||r?r?b.image[p].image:b.image[p]:h(b.image[p],e.maxCubemapSize);var x=q[0],v=l(x),N=f.convert(b.format),y=f.convert(b.type);u(a.TEXTURE_CUBE_MAP,b,v);for(p=0;6>p;p++)if(n)for(var C,F=q[p].mipmaps,O=0,A=F.length;Ot;t++)e.__webglFramebuffer[t]=a.createFramebuffer()}else e.__webglFramebuffer=a.createFramebuffer();if(h){c.bindTexture(a.TEXTURE_CUBE_MAP,f.__webglTexture);u(a.TEXTURE_CUBE_MAP,b.texture,n);for(t=0;6>t;t++)p(e.__webglFramebuffer[t],b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+t);m(b.texture,n)&&w(a.TEXTURE_CUBE_MAP,b.texture,b.width,b.height);c.bindTexture(a.TEXTURE_CUBE_MAP,null)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),u(a.TEXTURE_2D,b.texture,n),p(e.__webglFramebuffer, +b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),m(b.texture,n)&&w(a.TEXTURE_2D,b.texture,b.width,b.height),c.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets");if(b&&b.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture"); +d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);q(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_2D,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,e, +0);else throw Error("Unknown depthTexture format");}else if(f)for(e.__webglDepthbuffer=[],f=0;6>f;f++)a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),y(e.__webglDepthbuffer[f],b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),y(e.__webglDepthbuffer,b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture,f=l(b);if(m(e,f)){f=b.isWebGLRenderTargetCube? +a.TEXTURE_CUBE_MAP:a.TEXTURE_2D;var g=d.get(e).__webglTexture;c.bindTexture(f,g);w(f,e,b.width,b.height);c.bindTexture(f,null)}}}function Ve(a,b){return{convert:function(c){if(1E3===c)return a.REPEAT;if(1001===c)return a.CLAMP_TO_EDGE;if(1002===c)return a.MIRRORED_REPEAT;if(1003===c)return a.NEAREST;if(1004===c)return a.NEAREST_MIPMAP_NEAREST;if(1005===c)return a.NEAREST_MIPMAP_LINEAR;if(1006===c)return a.LINEAR;if(1007===c)return a.LINEAR_MIPMAP_NEAREST;if(1008===c)return a.LINEAR_MIPMAP_LINEAR; +if(1009===c)return a.UNSIGNED_BYTE;if(1017===c)return a.UNSIGNED_SHORT_4_4_4_4;if(1018===c)return a.UNSIGNED_SHORT_5_5_5_1;if(1019===c)return a.UNSIGNED_SHORT_5_6_5;if(1010===c)return a.BYTE;if(1011===c)return a.SHORT;if(1012===c)return a.UNSIGNED_SHORT;if(1013===c)return a.INT;if(1014===c)return a.UNSIGNED_INT;if(1015===c)return a.FLOAT;if(1016===c){var d=b.get("OES_texture_half_float");if(null!==d)return d.HALF_FLOAT_OES}if(1021===c)return a.ALPHA;if(1022===c)return a.RGB;if(1023===c)return a.RGBA; +if(1024===c)return a.LUMINANCE;if(1025===c)return a.LUMINANCE_ALPHA;if(1026===c)return a.DEPTH_COMPONENT;if(1027===c)return a.DEPTH_STENCIL;if(100===c)return a.FUNC_ADD;if(101===c)return a.FUNC_SUBTRACT;if(102===c)return a.FUNC_REVERSE_SUBTRACT;if(200===c)return a.ZERO;if(201===c)return a.ONE;if(202===c)return a.SRC_COLOR;if(203===c)return a.ONE_MINUS_SRC_COLOR;if(204===c)return a.SRC_ALPHA;if(205===c)return a.ONE_MINUS_SRC_ALPHA;if(206===c)return a.DST_ALPHA;if(207===c)return a.ONE_MINUS_DST_ALPHA; +if(208===c)return a.DST_COLOR;if(209===c)return a.ONE_MINUS_DST_COLOR;if(210===c)return a.SRC_ALPHA_SATURATE;if(33776===c||33777===c||33778===c||33779===c)if(d=b.get("WEBGL_compressed_texture_s3tc"),null!==d){if(33776===c)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===c)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===c)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===c)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===c||35841===c||35842===c||35843===c)if(d=b.get("WEBGL_compressed_texture_pvrtc"), +null!==d){if(35840===c)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===c)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===c)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===c)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===c&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;if(37808===c||37809===c||37810===c||37811===c||37812===c||37813===c||37814===c||37815===c||37816===c||37817===c||37818===c||37819===c||37820===c||37821===c)if(d=b.get("WEBGL_compressed_texture_astc"), +null!==d)return c;if(103===c||104===c)if(d=b.get("EXT_blend_minmax"),null!==d){if(103===c)return d.MIN_EXT;if(104===c)return d.MAX_EXT}return 1020===c&&(d=b.get("WEBGL_depth_texture"),null!==d)?d.UNSIGNED_INT_24_8_WEBGL:0}}}function Y(a,b,c,d){Qa.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function qd(a){Y.call(this); +this.cameras=a||[]}function We(a){function b(){if(null!==d&&!0===d.isPresenting){var b=d.getEyeParameters("left"),e=b.renderWidth;b=b.renderHeight;u=a.getPixelRatio();q=a.getSize();a.setDrawingBufferSize(2*e,b,1)}else c.enabled&&a.setDrawingBufferSize(q.width,q.height,u)}var c=this,d=null,e=null,f=null,g=new K,h=new K;"undefined"!==typeof window&&"VRFrameData"in window&&(e=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",b,!1));var l=new K,m=new ia,w=new p,n=new Y;n.bounds= +new da(0,0,.5,1);n.layers.enable(1);var t=new Y;t.bounds=new da(.5,0,.5,1);t.layers.enable(2);var k=new qd([n,t]);k.layers.enable(1);k.layers.enable(2);var q,u;this.enabled=!1;this.userHeight=1.6;this.getDevice=function(){return d};this.setDevice=function(a){void 0!==a&&(d=a)};this.setPoseTarget=function(a){void 0!==a&&(f=a)};this.getCamera=function(a){if(null===d)return a;d.depthNear=a.near;d.depthFar=a.far;d.getFrameData(e);var b=d.stageParameters;b?g.fromArray(b.sittingToStandingTransform):g.makeTranslation(0, +c.userHeight,0);b=e.pose;var r=null!==f?f:a;r.matrix.copy(g);r.matrix.decompose(r.position,r.quaternion,r.scale);null!==b.orientation&&(m.fromArray(b.orientation),r.quaternion.multiply(m));null!==b.position&&(m.setFromRotationMatrix(g),w.fromArray(b.position),w.applyQuaternion(m),r.position.add(w));r.updateMatrixWorld();if(!1===d.isPresenting)return a;n.near=a.near;t.near=a.near;n.far=a.far;t.far=a.far;k.matrixWorld.copy(a.matrixWorld);k.matrixWorldInverse.copy(a.matrixWorldInverse);n.matrixWorldInverse.fromArray(e.leftViewMatrix); +t.matrixWorldInverse.fromArray(e.rightViewMatrix);h.getInverse(g);n.matrixWorldInverse.multiply(h);t.matrixWorldInverse.multiply(h);a=r.parent;null!==a&&(l.getInverse(a.matrixWorld),n.matrixWorldInverse.multiply(l),t.matrixWorldInverse.multiply(l));n.matrixWorld.getInverse(n.matrixWorldInverse);t.matrixWorld.getInverse(t.matrixWorldInverse);n.projectionMatrix.fromArray(e.leftProjectionMatrix);t.projectionMatrix.fromArray(e.rightProjectionMatrix);k.projectionMatrix.copy(n.projectionMatrix);a=d.getLayers(); +a.length&&(a=a[0],null!==a.leftBounds&&4===a.leftBounds.length&&n.bounds.fromArray(a.leftBounds),null!==a.rightBounds&&4===a.rightBounds.length&&t.bounds.fromArray(a.rightBounds));return k};this.getStandingMatrix=function(){return g};this.submitFrame=function(){null!==d&&!0===d.isPresenting&&d.submitFrame()};this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",b)}}function Xd(a){function b(){la=new Hf(E);la.get("WEBGL_depth_texture");la.get("OES_texture_float"); +la.get("OES_texture_float_linear");la.get("OES_texture_half_float");la.get("OES_texture_half_float_linear");la.get("OES_standard_derivatives");la.get("OES_element_index_uint");la.get("ANGLE_instanced_arrays");ja=new Ve(E,la);Ra=new Ff(E,la,a);aa=new Eg(E,la,ja);aa.scissor(S.copy(Z).multiplyScalar(U));aa.viewport(W.copy(P).multiplyScalar(U));fb=new Kf(E);Ba=new tg;ca=new Fg(E,la,aa,Ba,Ra,ja,fb);qa=new yf(E);ra=new If(E,qa,fb);sa=new Nf(ra,fb);va=new Mf(E);oa=new sg(T,la,Ra);ta=new xg;pa=new Cg;ma= +new Df(T,aa,ra,O);wa=new Ef(E,la,fb);xa=new Jf(E,la,fb);ya=new Dg(T,E,aa,ca,Ra);fb.programs=oa.programs;T.context=E;T.capabilities=Ra;T.extensions=la;T.properties=Ba;T.renderLists=ta;T.state=aa;T.info=fb}function c(a){a.preventDefault();console.log("THREE.WebGLRenderer: Context Lost.");I=!0}function d(){console.log("THREE.WebGLRenderer: Context Restored.");I=!1;b()}function e(a){a=a.target;a.removeEventListener("dispose",e);f(a);Ba.remove(a)}function f(a){var b=Ba.get(a).program;a.program=void 0; +void 0!==b&&oa.releaseProgram(b)}function g(a,b,c){a.render(function(a){T.renderBufferImmediate(a,b,c)})}function h(){var a=na.getDevice();a&&a.isPresenting?a.requestAnimationFrame(l):window.requestAnimationFrame(l)}function l(a){!1!==ua&&(za(a),h())}function m(a,b,c){if(!1!==a.visible){if(a.layers.test(b.layers))if(a.isLight)B.pushLight(a),a.castShadow&&B.pushShadow(a);else if(a.isSprite)a.frustumCulled&&!ia.intersectsSprite(a)||B.pushSprite(a);else if(a.isImmediateRenderObject)c&&Pb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(pd), +z.push(a,null,a.material,Pb.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||ia.intersectsObject(a)){c&&Pb.setFromMatrixPosition(a.matrixWorld).applyMatrix4(pd);var d=sa.update(a),e=a.material;if(Array.isArray(e))for(var f=d.groups,g=0,h=f.length;ga.matrixWorld.determinant();aa.setMaterial(e,h);h=k(c,b.fog,e,a);Q="";g(a,h,e)}else T.renderBufferDirect(c,b.fog,d,e,a,f);a.onAfterRender(T,b,c,d,e,f);B=pa.get(b,Mb||c)}function t(a,b,c){var d=Ba.get(a),g=B.state.lights;c=oa.getParameters(a,g.state,B.state.shadowsArray,b,Y.numPlanes,Y.numIntersection,c);var h=oa.getProgramCode(a,c),l=d.program,m=!0;if(void 0===l)a.addEventListener("dispose",e);else if(l.code!==h)f(a);else{if(d.lightsHash!==g.state.hash)Ba.update(a, +"lightsHash",g.state.hash);else if(void 0!==c.shaderID)return;m=!1}m&&(c.shaderID?(l=rb[c.shaderID],d.shader={name:a.type,uniforms:Ca.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}):d.shader={name:a.type,uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader},a.onBeforeCompile(d.shader,T),l=oa.acquireProgram(a,d.shader,c,h),d.program=l,a.program=l);c=l.getAttributes();if(a.morphTargets)for(h=a.numSupportedMorphTargets=0;he.matrixWorld.determinant();aa.setMaterial(d,g);var h=k(a,b,d,e);a=c.id+"_"+h.id+"_"+(!0===d.wireframe);var l=!1;a!==Q&&(Q=a,l=!0);e.morphTargetInfluences&& +(va.update(e,c,d,h),l=!0);g=c.index;var m=c.attributes.position;b=1;!0===d.wireframe&&(g=ra.getWireframeAttribute(c),b=2);a=wa;if(null!==g){var n=qa.get(g);a=xa;a.setIndex(n)}if(l){if(c&&c.isInstancedBufferGeometry&&null===la.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");else{aa.initAttributes();l=c.attributes;h=h.getAttributes();var w=d.defaultAttributeValues; +for(F in h){var t=h[F];if(0<=t){var r=l[F];if(void 0!==r){var q=r.normalized,p=r.itemSize,u=qa.get(r);if(void 0!==u){var x=u.buffer,v=u.type;u=u.bytesPerElement;if(r.isInterleavedBufferAttribute){var y=r.data,C=y.stride;r=r.offset;y&&y.isInstancedInterleavedBuffer?(aa.enableAttributeAndDivisor(t,y.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=y.meshPerAttribute*y.count)):aa.enableAttribute(t);E.bindBuffer(E.ARRAY_BUFFER,x);E.vertexAttribPointer(t,p,v,q,C*u,r*u)}else r.isInstancedBufferAttribute? +(aa.enableAttributeAndDivisor(t,r.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=r.meshPerAttribute*r.count)):aa.enableAttribute(t),E.bindBuffer(E.ARRAY_BUFFER,x),E.vertexAttribPointer(t,p,v,q,0,0)}}else if(void 0!==w&&(q=w[F],void 0!==q))switch(q.length){case 2:E.vertexAttrib2fv(t,q);break;case 3:E.vertexAttrib3fv(t,q);break;case 4:E.vertexAttrib4fv(t,q);break;default:E.vertexAttrib1fv(t,q)}}}aa.disableUnusedAttributes()}null!==g&&E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,n.buffer)}n= +Infinity;null!==g?n=g.count:void 0!==m&&(n=m.count);g=c.drawRange.start*b;m=null!==f?f.start*b:0;var F=Math.max(g,m);f=Math.max(0,Math.min(n,g+c.drawRange.count*b,m+(null!==f?f.count*b:Infinity))-1-F+1);if(0!==f){if(e.isMesh)if(!0===d.wireframe)aa.setLineWidth(d.wireframeLinewidth*(null===L?U:1)),a.setMode(E.LINES);else switch(e.drawMode){case 0:a.setMode(E.TRIANGLES);break;case 1:a.setMode(E.TRIANGLE_STRIP);break;case 2:a.setMode(E.TRIANGLE_FAN)}else e.isLine?(d=d.linewidth,void 0===d&&(d=1),aa.setLineWidth(d* +(null===L?U:1)),e.isLineSegments?a.setMode(E.LINES):e.isLineLoop?a.setMode(E.LINE_LOOP):a.setMode(E.LINE_STRIP)):e.isPoints&&a.setMode(E.POINTS);c&&c.isInstancedBufferGeometry?0=Ra.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+a+" texture units while this GPU supports only "+Ra.maxTextures);Wd+=1;return a};this.setTexture2D=function(){var a=!1;return function(b, +c){b&&b.isWebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);ca.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),a=!0);ca.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."), +a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ca.setTextureCube(b,c):ca.setTextureCubeDynamic(b,c)}}();this.getRenderTarget=function(){return L};this.setRenderTarget=function(a){(L=a)&&void 0===Ba.get(a).__webglFramebuffer&&ca.setupRenderTarget(a);var b=null,c=!1;a?(b=Ba.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube&&(b=b[a.activeCubeFace],c=!0),W.copy(a.viewport),S.copy(a.scissor),V=a.scissorTest):(W.copy(P).multiplyScalar(U),S.copy(Z).multiplyScalar(U), +V=ea);J!==b&&(E.bindFramebuffer(E.FRAMEBUFFER,b),J=b);aa.viewport(W);aa.scissor(S);aa.setScissorTest(V);c&&(c=Ba.get(a.texture),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,c.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(a&&a.isWebGLRenderTarget){var g=Ba.get(a).__webglFramebuffer;if(g){var h=!1;g!==J&&(E.bindFramebuffer(E.FRAMEBUFFER,g),h=!0);try{var l=a.texture,m=l.format,n=l.type;1023!==m&&ja.convert(m)!== +E.getParameter(E.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===n||ja.convert(n)===E.getParameter(E.IMPLEMENTATION_COLOR_READ_TYPE)||1015===n&&(la.get("OES_texture_float")||la.get("WEBGL_color_buffer_float"))||1016===n&&la.get("EXT_color_buffer_half_float")?E.checkFramebufferStatus(E.FRAMEBUFFER)===E.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&E.readPixels(b,c,d,e, +ja.convert(m),ja.convert(n),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&E.bindFramebuffer(E.FRAMEBUFFER,J)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};this.copyFramebufferToTexture=function(a,b,c){var d=b.image.width, +e=b.image.height,f=ja.convert(b.format);this.setTexture2D(b,0);E.copyTexImage2D(E.TEXTURE_2D,c||0,f,a.x,a.y,d,e,0)};this.copyTextureToTexture=function(a,b,c,d){var e=b.image.width,f=b.image.height,g=ja.convert(c.format),h=ja.convert(c.type);b=b.isDataTexture?b.image.data:b.image;this.setTexture2D(c,0);E.texSubImage2D(E.TEXTURE_2D,d||0,a.x,a.y,e,f,g,h,b)}}function Qb(a,b){this.name="";this.color=new L(a);this.density=void 0!==b?b:2.5E-4}function Rb(a,b,c){this.name="";this.color=new L(a);this.near= +void 0!==b?b:1;this.far=void 0!==c?c:1E3}function rd(){B.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function gb(a){Q.call(this);this.type="SpriteMaterial";this.color=new L(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)}function Dc(a){B.call(this);this.type="Sprite";this.material=void 0!==a?a:new gb;this.center=new A(.5,.5)}function Ec(){B.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0, +value:[]}})}function Fc(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else for(console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[],a=0,b=this.bones.length;ac;c++){var n=w[h[c]];var t=w[h[(c+1)%3]];f[0]=Math.min(n,t);f[1]=Math.max(n,t);n=f[0]+","+f[1];void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]})}}for(n in g)m= +g[n],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new p,null!==a.index){l=a.attributes.position;w=a.index;var k=a.groups;0===k.length&&(k=[{start:0,count:w.count,materialIndex:0}]);a=0;for(e=k.length;ac;c++)n=w.getX(m+c),t=w.getX(m+(c+1)%3),f[0]=Math.min(n,t),f[1]=Math.max(n,t),n=f[0]+","+f[1],void 0===g[n]&&(g[n]={index1:f[0],index2:f[1]});for(n in g)m=g[n], +h.fromBufferAttribute(l,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(l,m.index2),b.push(h.x,h.y,h.z)}else for(l=a.attributes.position,m=0,d=l.count/3;mc;c++)g=3*m+c,h.fromBufferAttribute(l,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(l,g),b.push(h.x,h.y,h.z);this.addAttribute("position",new z(b,3))}function Hc(a,b,c){M.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Vb(a,b,c));this.mergeVertices()} +function Vb(a,b,c){I.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new p,l=new p,m=new p,w=new p,n=new p,t,k,q=b+1;for(t=0;t<=c;t++){var u=t/c;for(k=0;k<=b;k++){var x=k/b;a(x,u,l);e.push(l.x,l.y,l.z);0<=x-1E-5?(a(x-1E-5,u,m),w.subVectors(l,m)):(a(x+1E-5,u,m),w.subVectors(m,l));0<=u-1E-5?(a(x,u-1E-5,m),n.subVectors(l,m)):(a(x,u+1E-5,m),n.subVectors(m,l));h.crossVectors(w,n).normalize();f.push(h.x,h.y,h.z);g.push(x,u)}}for(t=0;t< +c;t++)for(k=0;kd&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}I.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var h=[],l=[];(function(a){for(var c=new p,d=new p,g=new p,h=0;he&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})(); +this.addAttribute("position",new z(h,3));this.addAttribute("normal",new z(h.slice(),3));this.addAttribute("uv",new z(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Jc(a,b){M.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Wb(a,b));this.mergeVertices()}function Wb(a,b){ma.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}} +function Kc(a,b){M.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new sb(a,b));this.mergeVertices()}function sb(a,b){ma.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Lc(a,b){M.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Xb(a,b));this.mergeVertices()} +function Xb(a,b){var c=(1+Math.sqrt(5))/2;ma.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Mc(a,b){M.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Yb(a,b));this.mergeVertices()} +function Yb(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;ma.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry"; +this.parameters={radius:a,detail:b}}function Nc(a,b,c,d,e,f){M.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new Zb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Zb(a,b,c,d,e){function f(e){w=a.getPointAt(e/b,w);var f=g.normals[e];e=g.binormals[e];for(k=0;k<=d;k++){var m= +k/d*Math.PI*2,n=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+n*e.x;l.y=m*f.y+n*e.y;l.z=m*f.z+n*e.z;l.normalize();q.push(l.x,l.y,l.z);h.x=w.x+c*l.x;h.y=w.y+c*l.y;h.z=w.z+c*l.z;r.push(h.x,h.y,h.z)}}I.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new p,l=new p,m=new A,w=new p,n,k,r=[],q=[],u=[], +x=[];for(n=0;n=b;e-=d)f=Ye(e,a[e],a[e+1],f);f&&tb(f,f.next)&&(Qc(f),f=f.next);return f} +function Rc(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!tb(a,a.next)&&0!==sa(a.prev,a,a.next))a=a.next;else{Qc(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function Sc(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,l=h;do null===l.z&&(l.z=Zd(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==h);l.prevZ.nextZ=null;l.prevZ=null;h=l;var m,w,n,k,r=1;do{l=h;var q=h=null;for(w=0;l;){w++;var p=l;for(m=n=0;mn.x?w.x>r.x?w.x:r.x:n.x>r.x?n.x:r.x,C=w.y>n.y?w.y>r.y?w.y:r.y:n.y>r.y?n.y:r.y;m=Zd(w.x=m;){if(x!==q.prev&&x!==q.next&&wd(w.x,w.y,n.x,n.y,r.x,r.y,x.x,x.y)&&0<=sa(x.prev,x,x.next)){q=!1;break a}x=x.prevZ}q=!0}}else a:if(q=a,w=q.prev,n=q,r=q.next,0<=sa(w,n,r))q=!1;else{for(m=q.next.next;m!==q.prev;){if(wd(w.x,w.y,n.x,n.y,r.x,r.y,m.x,m.y)&&0<=sa(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(l.i/c),b.push(a.i/c),b.push(p.i/c),Qc(a),h=a=p.next;else if(a=p,a===h){if(!g)Sc(Rc(a),b,c,d,e,f,1);else if(1=== +g){g=b;h=c;l=a;do p=l.prev,q=l.next.next,!tb(p,q)&&Ze(p,l,l.next,q)&&Tc(p,q)&&Tc(q,p)&&(g.push(p.i/h),g.push(l.i/h),g.push(q.i/h),Qc(l),Qc(l.next),l=a=q),l=l.next;while(l!==a);a=l;Sc(a,b,c,d,e,f,2)}else if(2===g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(l=g.i!==h.i){l=g;p=h;if(q=l.next.i!==p.i&&l.prev.i!==p.i){b:{q=l;do{if(q.i!==l.i&&q.next.i!==l.i&&q.i!==p.i&&q.next.i!==p.i&&Ze(q,q.next,l,p)){q=!0;break b}q=q.next}while(q!==l);q=!1}q=!q}if(q=q&&Tc(l,p)&&Tc(p,l)){q=l;w=!1;n=(l.x+p.x)/2;p=(l.y+p.y)/ +2;do q.y>p!==q.next.y>p&&q.next.y!==q.y&&n<(q.next.x-q.x)*(p-q.y)/(q.next.y-q.y)+q.x&&(w=!w),q=q.next;while(q!==l);q=w}l=q}if(l){a=$e(g,h);g=Rc(g,g.next);a=Rc(a,a.next);Sc(g,b,c,d,e,f);Sc(a,b,c,d,e,f);break a}h=h.next}g=g.next}while(g!==a)}break}}}}function Hg(a,b){return a.x-b.x}function Ig(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var h= +c.x=c.x&&c.x>=g&&d!==c.x&&wd(eh.x)&&Tc(c,a)&&(h=c,m=k)}c=c.next}return h}function Zd(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b| +b<<1)&1431655765)<<1}function Jg(a){var b=a,c=a;do b.xsa(a.prev,a,a.next)?0<=sa(a,b, +a.next)&&0<=sa(a,a.prev,b):0>sa(a,b,a.prev)||0>sa(a,a.next,b)}function $e(a,b){var c=new $d(a.i,a.x,a.y),d=new $d(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function Ye(a,b,c,d){a=new $d(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function Qc(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function $d(a,b,c){this.i=a;this.x=b;this.y= +c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function af(a){var b=a.length;2Number.EPSILON){var l=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new A(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(h)):(f=d,d=e,e=Math.sqrt(h/2));return new A(f/e,d/ +e)}function h(a,b){for(P=a.length;0<=--P;){var c=P;var f=P-1;0>f&&(f=a.length-1);var g,h=v+2*G;for(g=0;gk;k++){var n=m[f[k]];var t=m[f[(k+1)%3]];d[0]=Math.min(n,t);d[1]=Math.max(n,t);n=d[0]+","+d[1];void 0===e[n]?e[n]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[n].face2=h}for(n in e)if(d=e[n],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.addAttribute("position",new z(c,3))}function xb(a,b,c,d,e,f,g,h){M.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a, +radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Za(a,b,c,d,e,f,g,h));this.mergeVertices()}function Za(a,b,c,d,e,f,g,h){function l(c){var e,f=new A,l=new p,w=0,u=!0===c?a:b,v=!0===c?1:-1;var z=q;for(e=1;e<=d;e++)n.push(0,x*v,0),t.push(0,v,0),r.push(.5,.5),q++;var B=q;for(e=0;e<=d;e++){var D=e/d*h+g,H=Math.cos(D);D=Math.sin(D);l.x=u*D;l.y=x*v;l.z=u*H;n.push(l.x,l.y,l.z);t.push(0,v,0);f.x=.5*H+.5;f.y=.5*D*v+.5;r.push(f.x,f.y); +q++}for(e=0;ethis.duration&&this.resetDuration();this.optimize()}function Md(a){this.manager=void 0!==a?a:va;this.textures={}}function ee(a){this.manager=void 0!==a?a:va}function lc(){}function fe(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:va;this.withCredentials=!1}function ff(a){this.manager=void 0!==a?a:va;this.texturePath=""} +function ge(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:va;this.options=void 0}function he(){this.type="ShapePath";this.color=new L;this.subPaths=[];this.currentPath=null}function ie(a){this.type="Font";this.data=a}function gf(a){this.manager=void 0!==a?a:va}function je(a){this.manager=void 0!==a?a:va}function hf(){this.type= +"StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new Y;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new Y;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function fd(a,b,c){B.call(this);this.type="CubeCamera";var d=new Y(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new p(1,0,0));this.add(d);var e=new Y(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new p(-1,0,0));this.add(e);var f=new Y(90,1,a,b);f.up.set(0,0,1);f.lookAt(new p(0,1,0));this.add(f);var g=new Y(90, +1,a,b);g.up.set(0,0,-1);g.lookAt(new p(0,-1,0));this.add(g);var h=new Y(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new p(0,0,1));this.add(h);var l=new Y(90,1,a,b);l.up.set(0,-1,0);l.lookAt(new p(0,0,-1));this.add(l);this.renderTarget=new Ib(c,c,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name="CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,m=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b, +d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,f,c);c.activeCubeFace=3;a.render(b,g,c);c.activeCubeFace=4;a.render(b,h,c);c.texture.generateMipmaps=m;c.activeCubeFace=5;a.render(b,l,c);a.setRenderTarget(null)};this.clear=function(a,b,c,d){for(var e=this.renderTarget,f=0;6>f;f++)e.activeCubeFace=f,a.setRenderTarget(e),a.clear(b,c,d);a.setRenderTarget(null)}}function ke(){B.call(this);this.type="AudioListener";this.context=le.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination); +this.filter=null}function mc(a){B.call(this);this.type="Audio";this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.loop=!1;this.offset=this.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this.filters=[]}function me(a){mc.call(this,a);this.panner=this.context.createPanner();this.panner.connect(this.gain)}function ne(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize= +void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function oe(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function jf(a,b,c){c=c||ra.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b, +c)}function ra(a,b,c){this.path=b;this.parsedPath=c||ra.parseTrackName(b);this.node=ra.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function kf(){this.uuid=R.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length}, +get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function lf(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop= +2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function pe(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function Nd(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function qe(){I.call(this); +this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function re(a,b,c,d){this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function nc(a,b){this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function se(a,b,c){nc.call(this,a,b);this.meshPerAttribute=c||1}function te(a,b,c){H.call(this,a,b);this.meshPerAttribute=c||1}function mf(a,b,c,d){this.ray=new qb(a,b);this.near=c||0;this.far=d||Infinity; +this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function nf(a,b){return a.distance-b.distance}function ue(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;dc;c++,d++){var e= +c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new z(b,3));b=new S({fog:!1});this.cone=new V(a,b);this.add(this.cone);this.update()}function rf(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;ca?-1:0b;b++)a[b]=(16>b?"0":"")+b.toString(16);return function(){var b=4294967295*Math.random()|0,d=4294967295*Math.random()|0,e=4294967295*Math.random()|0,f=4294967295*Math.random()|0;return(a[b&255]+a[b>>8&255]+a[b>>16&255]+a[b>>24&255]+"-"+a[d&255]+a[d>>8&255]+"-"+a[d>>16&15|64]+a[d>>24&255]+"-"+a[e&63|128]+a[e>>8&255]+"-"+a[e>>16&255]+a[e>>24&255]+a[f&255]+a[f>>8&255]+a[f>>16&255]+ +a[f>>24&255]).toUpperCase()}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))}, +randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*R.DEG2RAD},radToDeg:function(a){return a*R.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))}};Object.defineProperties(A.prototype,{width:{get:function(){return this.x},set:function(a){this.x= +a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(A.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y; +default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a, +b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/= +a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},applyMatrix3:function(a){var b=this.x,c=this.y;a=a.elements;this.x=a[0]*b+a[3]*c+a[6];this.y=a[1]*b+a[4]*c+a[7];return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a= +new A,b=new A;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x): +Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var a=Math.atan2(this.y,this.x);0>a&& +(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x=== +this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y; +return this}});Object.assign(K.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,l,m,k,n,t,r,q,p){var w=this.elements;w[0]=a;w[4]=b;w[8]=c;w[12]=d;w[1]=e;w[5]=f;w[9]=g;w[13]=h;w[2]=l;w[6]=m;w[10]=k;w[14]=n;w[3]=t;w[7]=r;w[11]=q;w[15]=p;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new K).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6]; +b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a=new p;return function(b){var c= +this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b,2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;return this}}(),makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c); +var g=Math.cos(d);d=Math.sin(d);var h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*h;var l=f*e,m=c*h,k=c*e;b[0]=g*h;b[4]=-g*e;b[8]=d;b[1]=l+m*d;b[5]=a-k*d;b[9]=-c*g;b[2]=k-a*d;b[6]=m+l*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a+k*c,b[4]=m*c-l,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=l*c-m,b[6]=k+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,l=g*e,m=d*h,k=d*e,b[0]=a-k*c,b[4]=-f*e,b[8]=m+l*c,b[1]=l+m*c,b[5]=f*h,b[9]=k-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,l=f*e,m=c* +h,k=c*e,b[0]=g*h,b[4]=m*d-l,b[8]=a*d+k,b[1]=g*e,b[5]=k*d+a,b[9]=l*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,l=f*d,m=c*g,k=c*d,b[0]=g*h,b[4]=k-a*e,b[8]=m*e+l,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=l*e+m,b[10]=a-k*e):"XZY"===a.order&&(a=f*g,l=f*d,m=c*g,k=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+k,b[5]=f*h,b[9]=l*e-m,b[2]=m*e-l,b[6]=c*h,b[10]=k*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){var b=this.elements,c=a._x,d=a._y, +e=a._z,f=a._w,g=c+c,h=d+d,l=e+e;a=c*g;var m=c*h;c*=l;var k=d*h;d*=l;e*=l;g*=f;h*=f;f*=l;b[0]=1-(k+e);b[4]=m-f;b[8]=c+h;b[1]=m+f;b[5]=1-(a+e);b[9]=d-g;b[2]=c-h;b[6]=d+g;b[10]=1-(a+k);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},lookAt:function(){var a=new p,b=new p,c=new p;return function(d,e,f){var g=this.elements;c.subVectors(d,e);0===c.lengthSq()&&(c.z=1);c.normalize();a.crossVectors(f,c);0===a.lengthSq()&&(1===Math.abs(f.z)?c.x+=1E-4:c.z+=1E-4,c.normalize(),a.crossVectors(f, +c));a.normalize();b.crossVectors(c,a);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e= +c[4],f=c[8],g=c[12],h=c[1],l=c[5],m=c[9],k=c[13],n=c[2],t=c[6],r=c[10],q=c[14],p=c[3],x=c[7],y=c[11];c=c[15];var v=d[0],C=d[4],F=d[8],N=d[12],O=d[1],G=d[5],z=d[9],A=d[13],B=d[2],D=d[6],H=d[10],I=d[14],L=d[3],J=d[7],K=d[11];d=d[15];b[0]=a*v+e*O+f*B+g*L;b[4]=a*C+e*G+f*D+g*J;b[8]=a*F+e*z+f*H+g*K;b[12]=a*N+e*A+f*I+g*d;b[1]=h*v+l*O+m*B+k*L;b[5]=h*C+l*G+m*D+k*J;b[9]=h*F+l*z+m*H+k*K;b[13]=h*N+l*A+m*I+k*d;b[2]=n*v+t*O+r*B+q*L;b[6]=n*C+t*G+r*D+q*J;b[10]=n*F+t*z+r*H+q*K;b[14]=n*N+t*A+r*I+q*d;b[3]=p*v+x*O+y* +B+c*L;b[7]=p*C+x*G+y*D+c*J;b[11]=p*F+x*z+y*H+c*K;b[15]=p*N+x*A+y*I+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;cthis.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;f=1/h;var m=1/l;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=l;return this}}(),makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs."); +var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),l=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*l;g[9]=0;g[13]=-((c+d)*l);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements; +a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});Object.assign(ia,{slerp:function(a,b,c,d){return c.copy(a).slerp(b, +d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],l=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var k=e[f+1],n=e[f+2];e=e[f+3];if(c!==e||h!==d||l!==k||m!==n){f=1-g;var t=h*d+l*k+m*n+c*e,p=0<=t?1:-1,q=1-t*t;q>Number.EPSILON&&(q=Math.sqrt(q),t=Math.atan2(q,t*p),f=Math.sin(f*t)/q,g=Math.sin(g*t)/q);p*=g;h=h*f+d*p;l=l*f+k*p;m=m*f+n*p;c=c*f+e*p;f===1-g&&(g=1/Math.sqrt(h*h+l*l+m*m+c*c),h*=g,l*=g,m*=g,c*=g)}a[b]=h;a[b+1]=l;a[b+2]=m;a[b+3]=c}});Object.defineProperties(ia.prototype,{x:{get:function(){return this._x}, +set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this.onChangeCallback()}}});Object.assign(ia.prototype,{set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z, +this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,h=f(c/2),l=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);"XYZ"===a?(this._x=c*l*f+h*d*e,this._y=h*d*f-c*l*e,this._z=h*l*e+c*d*f,this._w=h*l*f-c*d*e):"YXZ"===a?(this._x=c*l*f+ +h*d*e,this._y=h*d*f-c*l*e,this._z=h*l*e-c*d*f,this._w=h*l*f+c*d*e):"ZXY"===a?(this._x=c*l*f-h*d*e,this._y=h*d*f+c*l*e,this._z=h*l*e+c*d*f,this._w=h*l*f-c*d*e):"ZYX"===a?(this._x=c*l*f-h*d*e,this._y=h*d*f+c*l*e,this._z=h*l*e-c*d*f,this._w=h*l*f+c*d*e):"YZX"===a?(this._x=c*l*f+h*d*e,this._y=h*d*f+c*l*e,this._z=h*l*e-c*d*f,this._w=h*l*f-c*d*e):"XZY"===a&&(this._x=c*l*f-h*d*e,this._y=h*d*f-c*l*e,this._z=h*l*e+c*d*f,this._w=h*l*f+c*d*e);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a, +b){b/=2;var c=Math.sin(b);this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this.onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],h=b[2],l=b[6];b=b[10];var m=c+f+b;0f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(l-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+h)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-h)/c,this._x=(a+e)/c,this._y= +.25*c,this._z=(g+l)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+h)/c,this._y=(g+l)/c,this._z=.25*c);this.onChangeCallback();return this},setFromUnitVectors:function(){var a=new p,b;return function(c,d){void 0===a&&(a=new p);b=c.dot(d)+1;1E-6>b?(b=0,Math.abs(c.x)>Math.abs(c.z)?a.set(-c.y,c.x,0):a.set(0,-c.z,c.y)):a.crossVectors(c,d);this._x=a.x;this._y=a.y;this._z=a.z;this._w=b;return this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){this._x*=-1;this._y*= +-1;this._z*=-1;this.onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this.onChangeCallback();return this},multiply:function(a, +b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;var f=b._x,g=b._y,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;this.onChangeCallback();return this}, +slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=Math.sqrt(1-g*g);if(.001>Math.abs(a))return this._w=.5*(f+this._w),this._x=.5*(c+this._x),this._y=.5*(d+this._y),this._z=.5*(e+this._z),this;var h=Math.atan2(a,g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/a;this._w=f*g+ +this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this.onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},onChange:function(a){this.onChangeCallback= +a;return this},onChangeCallback:function(){}});Object.assign(p.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x; +case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this}, +addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z= +a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(){var a=new ia;return function(b){b&&b.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."); +return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new ia;return function(b,c){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+ +a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var h=a*b+f*d-g*c,l=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*a+b*-e+l*-g-m*-f;this.y=l*a+b*-f+m*-e-h*-g;this.z=m*a+b*-g+h*-f-l*-e;return this},project:function(){var a=new K;return function(b){a.multiplyMatrices(b.projectionMatrix,a.getInverse(b.matrixWorld));return this.applyMatrix4(a)}}(),unproject:function(){var a=new K;return function(b){a.multiplyMatrices(b.matrixWorld, +a.getInverse(b.projectionMatrix));return this.applyMatrix4(a)}}(),transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x= +Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(){var a=new p,b=new p;return function(c,d){a.set(c,c,c);b.set(d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x= +Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x= +-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x- +this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){return void 0!==b?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b= +a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a=new p;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new p;return function(b){return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(R.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x- +a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=b*Math.cos(a.theta);return this},setFromCylindrical:function(a){this.x=a.radius*Math.sin(a.theta);this.y=a.y;this.z=a.radius*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y= +a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a= +[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});Object.assign(oa.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)}, +copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},applyToBufferAttribute:function(){var a=new p;return function(b){for(var c=0,d=b.count;cc;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c= +this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});var xf=0;X.DEFAULT_IMAGE=void 0;X.DEFAULT_MAPPING=300;X.prototype=Object.assign(Object.create(xa.prototype),{constructor:X,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name= +a.name;this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.center.copy(a.center);this.rotation=a.rotation;this.matrixAutoUpdate=a.matrixAutoUpdate;this.matrix.copy(a.matrix);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY= +a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){var b=void 0===a||"string"===typeof a;if(!b&&void 0!==a.textures[this.uuid])return a.textures[this.uuid];var c={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format, +minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var d=this.image;void 0===d.uuid&&(d.uuid=R.generateUUID());if(!b&&void 0===a.images[d.uuid]){var e=a.images,f=d.uuid,g=d.uuid;if(d instanceof HTMLCanvasElement)var h=d;else{h=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");h.width=d.width;h.height=d.height;var l=h.getContext("2d");d instanceof ImageData?l.putImageData(d,0,0):l.drawImage(d,0,0,d.width,d.height)}h= +2048a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}});Object.defineProperty(X.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(da.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this}, +setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z, +this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a, +b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*= +a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/ +b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var h=a[2];var l=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-h)&&.01>Math.abs(g-l)){if(.1>Math.abs(c+e)&&.1>Math.abs(d+h)&&.1>Math.abs(g+l)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI;b=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+h)/4;g=(g+l)/4;b>f&&b>m?.01>b?(l=0,c=h=.707106781):(l=Math.sqrt(b),h=c/l,c=d/l):f>m?.01>f?(l=.707106781,h=0,c=.707106781): +(h=Math.sqrt(f),l=c/h,c=g/h):.01>m?(h=l=.707106781,c=0):(c=Math.sqrt(m),l=d/c,h=g/c);this.set(l,h,c,a);return this}a=Math.sqrt((l-g)*(l-g)+(d-h)*(d-h)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(l-g)/a;this.y=(d-h)/a;this.z=(e-c)/a;this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z, +a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(){var a,b;return function(c,d){void 0===a&&(a=new da,b=new da);a.set(c,c,c,c);b.set(d,d,d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b, +c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y): +Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+ +Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0=== +b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});ib.prototype=Object.assign(Object.create(xa.prototype),{constructor:ib,isWebGLRenderTarget:!0, +setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}}); +Ib.prototype=Object.create(ib.prototype);Ib.prototype.constructor=Ib;Ib.prototype.isWebGLRenderTargetCube=!0;jb.prototype=Object.create(X.prototype);jb.prototype.constructor=jb;jb.prototype.isDataTexture=!0;Object.assign(Va.prototype,{isBox3:!0,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromArray:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,l=a.length;h +e&&(e=m);k>f&&(f=k);n>g&&(g=n)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,h=0,l=a.count;he&&(e=m);k>f&&(f=k);n>g&&(g=n)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"),b=new p);return b.set((a.x-this.min.x)/(this.max.x- +this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(){var a=new p;return function(b){this.clampPoint(b.center,a);return a.distanceToSquared(b.center)<=b.radius*b.radius}}(),intersectsPlane:function(a){if(0=a.constant},intersectsTriangle:function(){function a(a){var e;var f=0;for(e=a.length-3;f<=e;f+=3){h.fromArray(a,f);var g=m.x*Math.abs(h.x)+m.y*Math.abs(h.y)+m.z*Math.abs(h.z),l=b.dot(h),k=c.dot(h), +n=d.dot(h);if(Math.max(-Math.max(l,k,n),Math.min(l,k,n))>g)return!1}return!0}var b=new p,c=new p,d=new p,e=new p,f=new p,g=new p,h=new p,l=new p,m=new p,k=new p;return function(h){if(this.isEmpty())return!1;this.getCenter(l);m.subVectors(this.max,l);b.subVectors(h.a,l);c.subVectors(h.b,l);d.subVectors(h.c,l);e.subVectors(c,b);f.subVectors(d,c);g.subVectors(b,d);h=[0,-e.z,e.y,0,-f.z,f.y,0,-g.z,g.y,e.z,0,-e.x,f.z,0,-f.x,g.z,0,-g.x,-e.y,e.x,0,-f.y,f.x,0,-g.y,g.x,0];if(!a(h))return!1;h=[1,0,0,0,1,0,0, +0,1];if(!a(h))return!1;k.crossVectors(e,f);h=[k.x,k.y,k.z];return a(h)}}(),clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new p);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new p;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new p;return function(b){void 0===b&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),b=new Ga); +this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a=[new p,new p,new p,new p,new p,new p,new p,new p];return function(b){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b); +a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(b);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&& +a.max.equals(this.max)}});Object.assign(Ga.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(){var a=new Va;return function(b,c){var d=this.center;void 0!==c?d.copy(c):a.setFromPoints(b).getCenter(d);for(var e=c=0,f=b.length;e= +this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a); +void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),b=new p);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0===a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new Va);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this}, +translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});Object.assign(Ha.prototype,{set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new p,b=new p;return function(c,d,e){d= +a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)- +a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new p);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(){var a=new p;return function(b,c){void 0===c&&(console.warn("THREE.Plane: .intersectLine() target is now required"),c=new p);var d=b.delta(a),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(b.start))return c.copy(b.start)}else if(e=-(b.start.dot(this.normal)+this.constant)/ +e,!(0>e||1b&&0a&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],l=c[6],m=c[7],k=c[8],n=c[9],p=c[10],r=c[11],q=c[12],u=c[13],x=c[14];c=c[15];b[0].setComponents(f-a,m-g,r-k,c-q).normalize();b[1].setComponents(f+a,m+g,r+k,c+q).normalize();b[2].setComponents(f+d,m+h,r+n,c+u).normalize();b[3].setComponents(f-d,m-h,r-n,c- +u).normalize();b[4].setComponents(f-e,m-l,r-p,c-x).normalize();b[5].setComponents(f+e,m+l,r+p,c+x).normalize();return this},intersectsObject:function(){var a=new Ga;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Ga;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(), +intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)e;e++){var f=d[e];a.x=0 +g&&0>f)return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var W={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n", +aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n", +bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n", +clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n", +clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n", +color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n", +cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n", +defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n", +emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n", +envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n", +envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n", +envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n", +fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n", +gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n", +lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n", +lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n", +lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n", +lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n", +lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n", +lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n", +lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n", +lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n", +lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n", +logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n", +map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n", +metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif", +morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n", +normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n", +normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\t\tscale *= float( gl_FrontFacing ) * 2.0 - 1.0;\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy = normalScale * mapN.xy;\n\t\tmat3 tsn = mat3( S, T, N );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n", +packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n", +premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n", +roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n", +shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n", +shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n", +shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n", +skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n", +skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n", +specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n", +uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n", +uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif", +uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n", +cube_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n", +depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n", +distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}\n", +equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include \nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}\n", +linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}\n", +meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}\n", +normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n", +normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n", +points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n", +shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n}\n",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n"}, +Ca={merge:function(a){for(var b={},c=0;c>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b, +c,d){b=R.euclideanModulo(b,1);c=R.clamp(c,0,1);d=R.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r= +Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/ +360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0=h?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(cMath.abs(g)?(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(n,l),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.99999>Math.abs(m)? +(this._y=Math.atan2(g,e),this._z=Math.atan2(h,l)):(this._y=Math.atan2(-k,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(n,-1,1)),.99999>Math.abs(n)?(this._y=Math.atan2(-k,e),this._z=Math.atan2(-f,l)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(k,-1,1)),.99999>Math.abs(k)?(this._x=Math.atan2(n,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,l))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-m,l),this._y=Math.atan2(-k,a)):(this._x= +0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(n,l),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new K;return function(b,c,d){a.makeRotationFromQuaternion(b);return this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a,b){return this.set(a.x, +a.y,a.z,b||this._order)},reorder:function(){var a=new ia;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a? +a.set(this._x,this._y,this._z):new p(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(Sd.prototype,{set:function(a){this.mask=1<g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;cthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;0!==this.rotation&&(d.rotation=this.rotation);1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new p;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a=new p,b=new p,c=new p;return function(d, +e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),l=-this.direction.dot(b),m=c.dot(this.direction),k=-c.dot(b),n=c.lengthSq(),p=Math.abs(1-l*l);if(0=-r?e<=r?(h=1/p,d*=h,e*=h,l=d*(d+l*e+2*m)+e*(l*d+e+2*k)+n):(e=h,d=Math.max(0,-(l*e+m)),l=-d*d+e*(e+2*k)+n):(e=-h,d=Math.max(0,-(l*e+m)),l=-d*d+e*(e+2*k)+n):e<=-r?(d=Math.max(0,-(-l*h+m)),e=0b)return null;b=Math.sqrt(b-e);e= +d-b;d+=b;return 0>e&&0>d?null:0>e?this.at(d,c):this.at(e,c)}}(),intersectsSphere:function(a){return this.distanceToPoint(a.center)<=a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)* +b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var h=(a.min.y-f.y)*d;d*=a.max.y-f.y}else h=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||h>c)return null;if(h>g||g!==g)g=h;if(da||h>c)return null;if(h>g||g!==g)g=h;if(a +c?null:this.at(0<=g?g:c,b)},intersectsBox:function(){var a=new p;return function(b){return null!==this.intersectBox(b,a)}}(),intersectTriangle:function(){var a=new p,b=new p,c=new p,d=new p;return function(e,f,g,h,l){b.subVectors(f,e);c.subVectors(g,e);d.crossVectors(b,c);f=this.direction.dot(d);if(0f)h=-1,f=-f;else return null;a.subVectors(this.origin,e);e=h*this.direction.dot(c.crossVectors(a,c));if(0>e)return null;g=h*this.direction.dot(b.cross(a));if(0>g||e+ +g>f)return null;e=-h*a.dot(d);return 0>e?null:this.at(e/f,l)}}(),applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});Object.assign(Nb.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0=== +a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new p);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new p);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b= +new p);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new p,b=new p;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);c=b.dot(b);c=b.dot(a)/c;d&&(c=R.clamp(c,0,1));return c}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new p);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a); +this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});Object.assign(ja,{getNormal:function(){var a=new p;return function(b,c,d,e){void 0===e&&(console.warn("THREE.Triangle: .getNormal() target is now required"),e=new p);e.subVectors(d,c);a.subVectors(b,c);e.cross(a);b=e.lengthSq();return 0=a.x+a.y}}()});Object.assign(ja.prototype,{set:function(a,b,c){this.a.copy(a);this.b.copy(b); +this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){var a=new p,b=new p;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,this.b);return.5*a.cross(b).length()}}(),getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"), +a=new p);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return ja.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new p);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return ja.getBarycoord(a,this.a,this.b,this.c,b)},containsPoint:function(a){return ja.containsPoint(a,this.a,this.b,this.c)},intersectsBox:function(a){return a.intersectsTriangle(this)}, +closestPointToPoint:function(){var a=new Ha,b=[new Nb,new Nb,new Nb],c=new p,d=new p;return function(e,f){void 0===f&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),f=new p);var g=Infinity;a.setFromCoplanarPoints(this.a,this.b,this.c);a.projectPoint(e,c);if(!0===this.containsPoint(c))f.copy(c);else for(b[0].set(this.a,this.b),b[1].set(this.b,this.c),b[2].set(this.c,this.a),e=0;ec.far?null:{distance:b,point:y.clone(),object:a}}function c(c,d,e,f,m,k,n,p){g.fromBufferAttribute(f,k); +h.fromBufferAttribute(f,n);l.fromBufferAttribute(f,p);if(c=b(c,c.material,d,e,g,h,l,x))m&&(t.fromBufferAttribute(m,k),r.fromBufferAttribute(m,n),q.fromBufferAttribute(m,p),c.uv=a(x,g,h,l,t,r,q)),m=new Wa(k,n,p),ja.getNormal(g,h,l,m.normal),c.face=m,c.faceIndex=k;return c}var d=new K,e=new qb,f=new Ga,g=new p,h=new p,l=new p,m=new p,k=new p,n=new p,t=new A,r=new A,q=new A,u=new p,x=new p,y=new p;return function(p,w){var u=this.geometry,v=this.material,y=this.matrixWorld;if(void 0!==v&&(null===u.boundingSphere&& +u.computeBoundingSphere(),f.copy(u.boundingSphere),f.applyMatrix4(y),!1!==p.ray.intersectsSphere(f)&&(d.getInverse(y),e.copy(p.ray).applyMatrix4(d),null===u.boundingBox||!1!==e.intersectsBox(u.boundingBox)))){var C;if(u.isBufferGeometry){v=u.index;var z=u.attributes.position;u=u.attributes.uv;var A;if(null!==v)for(y=0,A=v.count;yf||(f=d.ray.origin.distanceTo(a),fd.far||e.push({distance:f,point:a.clone(),face:null,object:this}))}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}, +copy:function(a){B.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});Ec.prototype=Object.assign(Object.create(B.prototype),{constructor:Ec,copy:function(a){B.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ef||(k.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(k),ud.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,q=r.length/3-1;gf||(k.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(k), +ud.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(l=g.vertices,m=l.length,g=0;gf||(k.applyMatrix4(this.matrixWorld),u=d.ray.origin.distanceTo(k),ud.far||e.push({distance:u,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry, +this.material)).copy(this)}});V.prototype=Object.assign(Object.create(pa.prototype),{constructor:V,isLineSegments:!0,computeLineDistances:function(){var a=new p,b=new p;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:n.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,l=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere(); +c.copy(h.boundingSphere);c.applyMatrix4(l);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(l);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+this.scale.z)/3;var k=m*m;m=new p;var n=new p;if(h.isBufferGeometry){var t=h.index;h=h.attributes.position.array;if(null!==t){var r=t.array;t=0;for(var q=r.length;t=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Tb.prototype=Object.create(X.prototype);Tb.prototype.constructor=Tb;Tb.prototype.isCompressedTexture=!0;Gc.prototype=Object.create(X.prototype);Gc.prototype.constructor=Gc;Gc.prototype.isDepthTexture=!0;Ub.prototype= +Object.create(I.prototype);Ub.prototype.constructor=Ub;Hc.prototype=Object.create(M.prototype);Hc.prototype.constructor=Hc;Vb.prototype=Object.create(I.prototype);Vb.prototype.constructor=Vb;Ic.prototype=Object.create(M.prototype);Ic.prototype.constructor=Ic;ma.prototype=Object.create(I.prototype);ma.prototype.constructor=ma;Jc.prototype=Object.create(M.prototype);Jc.prototype.constructor=Jc;Wb.prototype=Object.create(ma.prototype);Wb.prototype.constructor=Wb;Kc.prototype=Object.create(M.prototype); +Kc.prototype.constructor=Kc;sb.prototype=Object.create(ma.prototype);sb.prototype.constructor=sb;Lc.prototype=Object.create(M.prototype);Lc.prototype.constructor=Lc;Xb.prototype=Object.create(ma.prototype);Xb.prototype.constructor=Xb;Mc.prototype=Object.create(M.prototype);Mc.prototype.constructor=Mc;Yb.prototype=Object.create(ma.prototype);Yb.prototype.constructor=Yb;Nc.prototype=Object.create(M.prototype);Nc.prototype.constructor=Nc;Zb.prototype=Object.create(I.prototype);Zb.prototype.constructor= +Zb;Oc.prototype=Object.create(M.prototype);Oc.prototype.constructor=Oc;$b.prototype=Object.create(I.prototype);$b.prototype.constructor=$b;Pc.prototype=Object.create(M.prototype);Pc.prototype.constructor=Pc;ac.prototype=Object.create(I.prototype);ac.prototype.constructor=ac;var Mg={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=Xe(a,0,e,c,!0),g=[];if(!f)return g;var h;if(d){var l=c;d=[];var m;var k=0;for(m=b.length;k80*c){var r=h=a[0];var q=d=a[1];for(l=c;lh&&(h=k),b>d&&(d=b);h=Math.max(h-r,d-q);h=0!==h?1/h:0}Sc(f,g,c,r,q,h);return g}},Ya={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;eYa.area(a)},triangulateShape:function(a, +b){var c=[],d=[],e=[];af(a);bf(c,a);var f=a.length;b.forEach(af);for(a=0;aMath.abs(g-l)?[new A(a,1-c),new A(h,1-d),new A(m,1-e),new A(n,1-b)]:[new A(g,1-c),new A(l,1-d),new A(k,1-e),new A(p,1-b)]}};Uc.prototype=Object.create(M.prototype);Uc.prototype.constructor=Uc;cc.prototype=Object.create(Xa.prototype);cc.prototype.constructor=cc;Vc.prototype=Object.create(M.prototype);Vc.prototype.constructor=Vc;ub.prototype= +Object.create(I.prototype);ub.prototype.constructor=ub;Wc.prototype=Object.create(M.prototype);Wc.prototype.constructor=Wc;dc.prototype=Object.create(I.prototype);dc.prototype.constructor=dc;Xc.prototype=Object.create(M.prototype);Xc.prototype.constructor=Xc;ec.prototype=Object.create(I.prototype);ec.prototype.constructor=ec;vb.prototype=Object.create(M.prototype);vb.prototype.constructor=vb;vb.prototype.toJSON=function(){var a=M.prototype.toJSON.call(this);return cf(this.parameters.shapes,a)};wb.prototype= +Object.create(I.prototype);wb.prototype.constructor=wb;wb.prototype.toJSON=function(){var a=I.prototype.toJSON.call(this);return cf(this.parameters.shapes,a)};fc.prototype=Object.create(I.prototype);fc.prototype.constructor=fc;xb.prototype=Object.create(M.prototype);xb.prototype.constructor=xb;Za.prototype=Object.create(I.prototype);Za.prototype.constructor=Za;Yc.prototype=Object.create(xb.prototype);Yc.prototype.constructor=Yc;Zc.prototype=Object.create(Za.prototype);Zc.prototype.constructor=Zc; +$c.prototype=Object.create(M.prototype);$c.prototype.constructor=$c;gc.prototype=Object.create(I.prototype);gc.prototype.constructor=gc;var ua=Object.freeze({WireframeGeometry:Ub,ParametricGeometry:Hc,ParametricBufferGeometry:Vb,TetrahedronGeometry:Jc,TetrahedronBufferGeometry:Wb,OctahedronGeometry:Kc,OctahedronBufferGeometry:sb,IcosahedronGeometry:Lc,IcosahedronBufferGeometry:Xb,DodecahedronGeometry:Mc,DodecahedronBufferGeometry:Yb,PolyhedronGeometry:Ic,PolyhedronBufferGeometry:ma,TubeGeometry:Nc, +TubeBufferGeometry:Zb,TorusKnotGeometry:Oc,TorusKnotBufferGeometry:$b,TorusGeometry:Pc,TorusBufferGeometry:ac,TextGeometry:Uc,TextBufferGeometry:cc,SphereGeometry:Vc,SphereBufferGeometry:ub,RingGeometry:Wc,RingBufferGeometry:dc,PlaneGeometry:Ac,PlaneBufferGeometry:pb,LatheGeometry:Xc,LatheBufferGeometry:ec,ShapeGeometry:vb,ShapeBufferGeometry:wb,ExtrudeGeometry:bc,ExtrudeBufferGeometry:Xa,EdgesGeometry:fc,ConeGeometry:Yc,ConeBufferGeometry:Zc,CylinderGeometry:xb,CylinderBufferGeometry:Za,CircleGeometry:$c, +CircleBufferGeometry:gc,BoxGeometry:Kb,BoxBufferGeometry:nb});yb.prototype=Object.create(Q.prototype);yb.prototype.constructor=yb;yb.prototype.isShadowMaterial=!0;yb.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.color.copy(a.color);return this};hc.prototype=Object.create(za.prototype);hc.prototype.constructor=hc;hc.prototype.isRawShaderMaterial=!0;Sa.prototype=Object.create(Q.prototype);Sa.prototype.constructor=Sa;Sa.prototype.isMeshStandardMaterial=!0;Sa.prototype.copy=function(a){Q.prototype.copy.call(this, +a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap; +this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals= +a.morphNormals;return this};zb.prototype=Object.create(Sa.prototype);zb.prototype.constructor=zb;zb.prototype.isMeshPhysicalMaterial=!0;zb.prototype.copy=function(a){Sa.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ja.prototype=Object.create(Q.prototype);Ja.prototype.constructor=Ja;Ja.prototype.isMeshPhongMaterial=!0;Ja.prototype.copy=function(a){Q.prototype.copy.call(this, +a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale= +a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Ab.prototype= +Object.create(Ja.prototype);Ab.prototype.constructor=Ab;Ab.prototype.isMeshToonMaterial=!0;Ab.prototype.copy=function(a){Ja.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Bb.prototype=Object.create(Q.prototype);Bb.prototype.constructor=Bb;Bb.prototype.isMeshNormalMaterial=!0;Bb.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap; +this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Cb.prototype=Object.create(Q.prototype);Cb.prototype.constructor=Cb;Cb.prototype.isMeshLambertMaterial=!0;Cb.prototype.copy=function(a){Q.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity= +a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin; +this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Db.prototype=Object.create(S.prototype);Db.prototype.constructor=Db;Db.prototype.isLineDashedMaterial=!0;Db.prototype.copy=function(a){S.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Ng=Object.freeze({ShadowMaterial:yb,SpriteMaterial:gb,RawShaderMaterial:hc,ShaderMaterial:za,PointsMaterial:Ia,MeshPhysicalMaterial:zb,MeshStandardMaterial:Sa, +MeshPhongMaterial:Ja,MeshToonMaterial:Ab,MeshNormalMaterial:Bb,MeshLambertMaterial:Cb,MeshDepthMaterial:db,MeshDistanceMaterial:eb,MeshBasicMaterial:ya,LineDashedMaterial:Db,LineBasicMaterial:S,Material:Q}),Hb={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},va=new ae,ab={};Object.assign(Ka.prototype,{load:function(a,b,c,d){void 0===a&&(a= +"");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Hb.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==ab[a])ab[a].push({onLoad:b,onProgress:c,onError:d});else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var h=!!g[2];g=g[3];g=window.decodeURIComponent(g);h&&(g=window.atob(g));try{var l=(this.responseType||"").toLowerCase();switch(l){case "arraybuffer":case "blob":var m=new Uint8Array(g.length); +for(h=0;hg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(R.clamp(d[l-1].dot(d[l]),-1,1)),e[l].applyMatrix4(h.makeRotationAxis(g, +c))),f[l].crossVectors(d[l],e[l]);if(!0===b)for(c=Math.acos(R.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);ye.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);ze.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,l);Ae.initNonuniformCatmullRom(f.z, +g.z,h.z,c.z,d,e,l)}else"catmullrom"===this.curveType&&(ye.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),ze.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),Ae.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(ye.calc(a),ze.calc(a),Ae.calc(a));return b};ca.prototype.copy=function(a){J.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(ef(d,e.x,f.x,g.x, +c.x),ef(d,e.y,f.y,g.y,c.y));return b};Oa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[], +b=0,c=0,d=this.curves.length;c=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=qa.arraySlice(c,e,f),this.values=qa.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values; +var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&qa.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this, +f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gk.opacity&&(k.transparent=!0);d.setTextures(l);return d.parse(k)}}()});var Be={decodeText:function(a){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(a);for(var b="",c=0,d=a.length;cf;f++){var z=h[r++];var B=C[2*z];z=C[2*z+1];B=new A(B,z);2!==f&&c.faceVertexUvs[e][u].push(B);0!==f&&c.faceVertexUvs[e][u+1].push(B)}}x&&(x=3*h[r++],q.normal.set(k[x++],k[x++],k[x]),v.normal.copy(q.normal));if(y)for(e=0;4>e;e++)x=3*h[r++],y=new p(k[x++],k[x++],k[x]),2!==e&&q.vertexNormals.push(y), +0!==e&&v.vertexNormals.push(y);n&&(n=h[r++],n=w[n],q.color.setHex(n),v.color.setHex(n));if(l)for(e=0;4>e;e++)n=h[r++],n=w[n],2!==e&&q.vertexColors.push(new L(n)),0!==e&&v.vertexColors.push(new L(n));c.faces.push(q);c.faces.push(v)}else{q=new Wa;q.a=h[r++];q.b=h[r++];q.c=h[r++];u&&(u=h[r++],q.materialIndex=u);u=c.faces.length;if(e)for(e=0;ef;f++)z=h[r++],B=C[2*z],z=C[2*z+1],B=new A(B,z),c.faceVertexUvs[e][u].push(B);x&&(x=3*h[r++],q.normal.set(k[x++], +k[x++],k[x]));if(y)for(e=0;3>e;e++)x=3*h[r++],y=new p(k[x++],k[x++],k[x]),q.vertexNormals.push(y);n&&(n=h[r++],q.color.setHex(w[n]));if(l)for(e=0;3>e;e++)n=h[r++],q.vertexColors.push(new L(w[n]));c.faces.push(q)}}d=a;r=void 0!==d.influencesPerVertex?d.influencesPerVertex:2;if(d.skinWeights)for(g=0,h=d.skinWeights.length;gNumber.EPSILON){if(0>k&&(g=b[f],l=-l,h=b[e],k=-k),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=k*(a.x-g.x)-l*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<= +a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=Ya.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new hb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var k=[],p=[],n=0;k[n]=void 0;p[n]=[];for(var t=0,r=f.length;td&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]=a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){ia.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d, +e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(jf.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_, +c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(ra,{Composite:jf,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new ra.Composite(a,b,c):new ra(a,b,c)},sanitizeNodeName:function(){var a=/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", +"[^\\[\\]\\.:\\/]"),d=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),e=new RegExp("^"+b+a+c+d+"$"),f=["material","materials","bones"];return function(a){var b=e.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==f.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName= +d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+a);return b}}(),findNode:function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a;if(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c=b){var p=b++,n=a[p];c[n.uuid]=k;a[k]=n;c[l]=p;a[p]=h;h=0;for(l=e;h!==l;++h){n= +d[h];var t=n[k];n[k]=n[p];n[p]=t}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var l=arguments[g].uuid,k=d[l];if(void 0!==k)if(delete d[l],kb||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0]; +b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a;if(0===a)return b;var c=this._clip.duration,d=this.loop,e=this._loopCount;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else break a;this.clampWhenFinished?this.paused=!0:this.enabled=!1;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{d=2202===d;-1=== +e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,d)):this._setEndings(0===this.repetitions,!0,d));if(b>=c||0>b){var f=Math.floor(b/c);b-=c*f;e+=Math.abs(f);var g=this.repetitions-e;0>=g?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,b=0a,this._setEndings(a,!a,d)):this._setEndings(!1,!1,d),this._loopCount=e,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:f}))}if(d&&1===(e&1))return this.time= +b,c-b}return this.time=b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd=b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});pe.prototype=Object.assign(Object.create(xa.prototype), +{constructor:pe,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName,k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var m=d[h],p=m.name,n=k[p];if(void 0===n){n=f[h];if(void 0!==n){null===n._cacheIndex&&(++n.referenceCount,this._addInactiveBinding(n,g,p));continue}n=new oe(ra.create(c,p,b&&b._propertyBindings[h].binding.parsedPath),m.ValueTypeName,m.getValueSize());++n.referenceCount; +this._addInactiveBinding(n,g,p)}f[h]=n;a[h].resultBuffer=n.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid,c=a._clip.uuid,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b= +a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions=[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length}, +get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}},_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&athis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new A);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/ +(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new A);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new A;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min); +this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});gd.prototype=Object.create(B.prototype);gd.prototype.constructor=gd;gd.prototype.isImmediateRenderObject=!0;hd.prototype=Object.create(V.prototype);hd.prototype.constructor=hd;hd.prototype.update=function(){var a=new p,b=new p,c=new oa;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld); +var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,m=g=0,p=k.length;mMath.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.lookAt(this.plane.normal);B.prototype.updateMatrixWorld.call(this,a)};var Pd,we;Gb.prototype=Object.create(B.prototype);Gb.prototype.constructor=Gb;Gb.prototype.setDirection=function(){var a=new p,b;return function(c){.99999c.y?this.quaternion.set(1, +0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();Gb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};Gb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};nd.prototype=Object.create(V.prototype);nd.prototype.constructor=nd;J.create=function(a, +b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(J.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign($a.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); +a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new M,c=0,d=a.length;ce[Math.floor(Math.random()*e.length)];function s(e,t){return null==e&&(e=0),null==t&&(t=1),e+Math.random()*(t-e)}function a(e,t){return null==e&&(e=0),null==t&&(t=1),Math.floor(e+Math.random()*(t-e+1))}var l=e=>document.querySelector(e);const u=e=>"number"==typeof e?"#"+("00000"+e.toString(16)).slice(-6):e,h=(e,t=1)=>{const n=u(e),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),r=i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null;return"rgba("+r.r+","+r.g+","+r.b+","+t+")"}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(0);window&&!window.VANTA&&(window.VANTA={version:"0.3.1"});const r=window.VANTA||{};r.register||(r.register=((e,t)=>{r[e]=(e=>new t(e))}));var o=function(){return Array.prototype.unshift.call(arguments,"[VANTA]"),console.error.apply(this,arguments)};r.VantaBase=class{constructor(e={}){var t,n,s,a;if(r.current=this,this.onMouseMoveWrapper=this.onMouseMoveWrapper.bind(this),this.resize=this.resize.bind(this),this.animationLoop=this.animationLoop.bind(this),this.restart=this.restart.bind(this),this.options=Object(i.c)({},this.defaultOptions),e instanceof HTMLElement||"string"==typeof e?Object(i.c)(this.options,{el:e}):Object(i.c)(this.options,e),this.el=this.options.el,null==this.el)o('Instance needs "el" param!');else if(!(this.options.el instanceof HTMLElement||(a=this.el,this.el=Object(i.e)(a),this.el)))return void o("Cannot find element",a);for(s=0;s=0&&i>=0&&!this.options.mouseEase&&this.triggerMouseMove(n,i)}triggerMouseMove(e,t){this.uniforms&&(this.uniforms.u_mouse.value.x=e/this.scale,this.uniforms.u_mouse.value.y=t/this.scale);const n=e/this.width,i=t/this.height;"function"==typeof this.onMouseMove&&this.onMouseMove(n,i)}setSize(){this.scale||(this.scale=1),Object(i.d)()&&this.options.scaleMobile?this.scale=this.options.scaleMobile:this.options.scale&&(this.scale=this.options.scale),this.width=this.el.offsetWidth||window.innerWidth,this.height=this.el.offsetHeight||window.innerHeight}resize(){var e,t;this.setSize(),null!=(e=this.camera)&&(e.aspect=this.width/this.height),null!=(t=this.camera)&&"function"==typeof t.updateProjectionMatrix&&t.updateProjectionMatrix(),this.renderer&&(this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(window.devicePixelRatio/this.scale)),"function"==typeof this.onResize&&this.onResize()}animationLoop(){var e,t,n,i,r,o,s,a;return this.t||(this.t=0),this.t+=1,this.t2||(this.t2=0),this.t2+=null!=(o=this.options.speed)?o:1,this.uniforms&&(this.uniforms.u_time.value=.016667*this.t2),e=this.el.offsetHeight,t=this.el.getBoundingClientRect(),a=null!=(s=window.pageYOffset)?s:(document.documentElement||document.body.parentNode||document.body).scrollTop,i=(r=t.top+a)-window.innerHeight,n=r+e,this.options.mouseEase&&(this.mouseEaseX=this.mouseEaseX||this.mouseX||0,this.mouseEaseY=this.mouseEaseY||this.mouseY||0,Math.abs(this.mouseEaseX-this.mouseX)+Math.abs(this.mouseEaseY-this.mouseY)>.1&&(this.mouseEaseX=this.mouseEaseX+.05*(this.mouseX-this.mouseEaseX),this.mouseEaseY=this.mouseEaseY+.05*(this.mouseY-this.mouseEaseY),this.triggerMouseMove(this.mouseEaseX,this.mouseEaseY))),i<=a&&a<=n&&("function"==typeof this.onUpdate&&this.onUpdate(),this.scene&&this.camera&&(this.renderer.render(this.scene,this.camera),"transparent"==this.options.backgroundColor?this.renderer.setClearColor(this.options.backgroundColor,0):this.renderer.setClearColor(this.options.backgroundColor,this.options.backgroundAlpha)),this.fps&&this.fps.update&&this.fps.update()),this.req=window.requestAnimationFrame(this.animationLoop)}restart(){if(this.scene)for(;this.scene.children.length;)this.scene.remove(this.scene.children[0]);"function"==typeof this.onRestart&&this.onRestart(),this.init()}init(){"function"==typeof this.onInit&&this.onInit()}destroy(){"function"==typeof this.onDestroy&&this.onDestroy(),this.el.removeEventListener("mousemove",this.onMouseMoveWrapper),window.removeEventListener("scroll",this.onMouseMoveWrapper),window.removeEventListener("resize",this.resize),window.cancelAnimationFrame(this.req),this.renderer&&(this.el.removeChild(this.renderer.domElement),this.renderer=null,this.scene=null)}},t.b=r.VantaBase},,,function(e,t,n){"use strict";n.r(t);var i=n(1);let r=32,o=r*r;const s=800,a=s/2,l="uniform float time;\nuniform float delta;\n\nvoid main() {\n\n vec2 uv = gl_FragCoord.xy / resolution.xy;\n vec4 tmpPos = texture2D( texturePosition, uv );\n vec3 position = tmpPos.xyz;\n vec3 velocity = texture2D( textureVelocity, uv ).xyz;\n\n float phase = tmpPos.w;\n\n phase = mod( ( phase + delta +\n length( velocity.xz ) * delta * 3. +\n max( velocity.y, 0.0 ) * delta * 6. ), 62.83 );\n\n gl_FragColor = vec4( position + velocity * delta * 15. , phase );\n\n}",u="uniform float time;\nuniform float testing;\nuniform float delta; // about 0.016\nuniform float separationDistance; // 20\nuniform float alignmentDistance; // 40\nuniform float cohesionDistance;\nuniform float speedLimit;\nuniform float freedomFactor;\nuniform vec3 predator;\n\nconst float width = resolution.x;\nconst float height = resolution.y;\n\nconst float PI = 3.141592653589793;\nconst float PI_2 = PI * 2.0;\n// const float VISION = PI * 0.55;\n\nfloat zoneRadius = 40.0;\nfloat zoneRadiusSquared = 1600.0;\n\nfloat separationThresh = 0.45;\nfloat alignmentThresh = 0.65;\n\nconst float UPPER_BOUNDS = BOUNDS;\nconst float LOWER_BOUNDS = -UPPER_BOUNDS;\n\nfloat rand(vec2 co){\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvoid main() {\n\n zoneRadius = separationDistance + alignmentDistance + cohesionDistance;\n separationThresh = separationDistance / zoneRadius;\n alignmentThresh = ( separationDistance + alignmentDistance ) / zoneRadius;\n zoneRadiusSquared = zoneRadius * zoneRadius;\n\n\n vec2 uv = gl_FragCoord.xy / resolution.xy;\n vec3 birdPosition, birdVelocity;\n\n vec3 selfPosition = texture2D( texturePosition, uv ).xyz;\n vec3 selfVelocity = texture2D( textureVelocity, uv ).xyz;\n\n float dist;\n vec3 dir; // direction\n float distSquared;\n\n float separationSquared = separationDistance * separationDistance;\n float cohesionSquared = cohesionDistance * cohesionDistance;\n\n float f;\n float percent;\n\n vec3 velocity = selfVelocity;\n\n float limit = speedLimit;\n\n dir = predator * UPPER_BOUNDS - selfPosition;\n dir.z = 0.;\n // dir.z *= 0.6;\n dist = length( dir );\n distSquared = dist * dist;\n\n float preyRadius = 150.0;\n float preyRadiusSq = preyRadius * preyRadius;\n\n // move birds away from predator\n if (dist < preyRadius) {\n\n f = ( distSquared / preyRadiusSq - 1.0 ) * delta * 100.;\n velocity += normalize( dir ) * f;\n limit += 5.0;\n }\n\n // if (testing == 0.0) {}\n // if ( rand( uv + time ) < freedomFactor ) {}\n\n // Attract flocks to the center\n vec3 central = vec3( 0., 0., 0. );\n dir = selfPosition - central;\n dist = length( dir );\n\n dir.y *= 2.5;\n velocity -= normalize( dir ) * delta * 5.;\n\n for (float y=0.0;y zoneRadiusSquared ) continue;\n\n percent = distSquared / zoneRadiusSquared;\n\n if ( percent < separationThresh ) { // low\n\n // Separation - Move apart for comfort\n f = (separationThresh / percent - 1.0) * delta;\n velocity -= normalize(dir) * f;\n\n } else if ( percent < alignmentThresh ) { // high\n\n // Alignment - fly the same direction\n float threshDelta = alignmentThresh - separationThresh;\n float adjustedPercent = ( percent - separationThresh ) / threshDelta;\n\n birdVelocity = texture2D( textureVelocity, ref ).xyz;\n\n f = ( 0.5 - cos( adjustedPercent * PI_2 ) * 0.5 + 0.5 ) * delta;\n velocity += normalize(birdVelocity) * f;\n\n } else {\n\n // Attraction / Cohesion - move closer\n float threshDelta = 1.0 - alignmentThresh;\n float adjustedPercent = ( percent - alignmentThresh ) / threshDelta;\n\n f = ( 0.5 - ( cos( adjustedPercent * PI_2 ) * -0.5 + 0.5 ) ) * delta;\n\n velocity += normalize(dir) * f;\n\n }\n }\n }\n\n // this make tends to fly around than down or up\n // if (velocity.y > 0.) velocity.y *= (1. - 0.2 * delta);\n\n // Speed Limits\n if ( length( velocity ) > limit ) {\n velocity = normalize( velocity ) * limit;\n }\n\n gl_FragColor = vec4( velocity, 1.0 );\n\n}",h="attribute vec2 reference;\nattribute float birdVertex;\n\nattribute vec3 birdColor;\n\nuniform sampler2D texturePosition;\nuniform sampler2D textureVelocity;\n\nvarying vec4 vColor;\nvarying float z;\n\nuniform float time;\n\nvoid main() {\n\n vec4 tmpPos = texture2D( texturePosition, reference );\n vec3 pos = tmpPos.xyz;\n vec3 velocity = normalize(texture2D( textureVelocity, reference ).xyz);\n\n vec3 newPosition = position;\n\n if ( birdVertex == 4.0 || birdVertex == 7.0 ) {\n // flap wings\n newPosition.y = sin( tmpPos.w ) * 5.;\n }\n\n newPosition = mat3( modelMatrix ) * newPosition;\n\n velocity.z *= -1.;\n float xz = length( velocity.xz );\n float xyz = 1.;\n float x = sqrt( 1. - velocity.y * velocity.y );\n\n float cosry = velocity.x / xz;\n float sinry = velocity.z / xz;\n\n float cosrz = x / xyz;\n float sinrz = velocity.y / xyz;\n\n mat3 maty = mat3(\n cosry, 0, -sinry,\n 0 , 1, 0 ,\n sinry, 0, cosry\n );\n\n mat3 matz = mat3(\n cosrz , sinrz, 0,\n -sinrz, cosrz, 0,\n 0 , 0 , 1\n );\n newPosition = maty * matz * newPosition;\n newPosition += pos;\n z = newPosition.z;\n\n vColor = vec4( birdColor, 1.0 );\n gl_Position = projectionMatrix * viewMatrix * vec4( newPosition, 1.0 );\n}",c="varying vec4 vColor;\nvarying float z;\nuniform vec3 color;\nvoid main() {\n // Fake colors for now\n float rr = 0.2 + ( 1000. - z ) / 1000. * vColor.x;\n float gg = 0.2 + ( 1000. - z ) / 1000. * vColor.y;\n float bb = 0.2 + ( 1000. - z ) / 1000. * vColor.z;\n gl_FragColor = vec4( rr, gg, bb, 1. );\n}",d=function(e){const t=e.image.data;let n=0;const i=t.length;return(()=>{const e=[];for(;n{const e=[];for(;n1&&(e=1),this.last=this.now,this.positionUniforms.time.value=this.now,this.positionUniforms.delta.value=e,this.velocityUniforms.time.value=this.now,this.velocityUniforms.delta.value=e,this.birdUniforms.time.value=this.now,this.birdUniforms.delta.value=e,this.velocityUniforms.predator.value.set(this.mouseX,-this.mouseY,0),this.mouseX=1e4,this.mouseY=1e4,this.gpuCompute.compute(),this.birdUniforms.texturePosition.value=this.gpuCompute.getCurrentRenderTarget(this.positionVariable).texture,this.birdUniforms.textureVelocity.value=this.gpuCompute.getCurrentRenderTarget(this.velocityVariable).texture}onMouseMove(e,t){return this.mouseX=e-.5,this.mouseY=t-.5}onDestroy(){}onResize(){}}m.initClass(),i.a.register("BIRDS",m)}]); \ No newline at end of file diff --git a/resources/assets/sass/_color.scss b/resources/assets/sass/_color.scss new file mode 100644 index 00000000..810b63f1 --- /dev/null +++ b/resources/assets/sass/_color.scss @@ -0,0 +1,543 @@ +// Import the Compass Plugin +//-------------------------------- +// Normal +//-------------------------------- +@function blend-normal ($foreground, $background) { + $opacity: opacity($foreground); + $background-opacity: opacity($background); + + // calculate opacity + $bm-red: red($foreground) * $opacity + red($background) * $background-opacity * (1 - $opacity); + $bm-green: green($foreground) * $opacity + green($background) * $background-opacity * (1 - $opacity); + $bm-blue: blue($foreground) * $opacity + blue($background) * $background-opacity * (1 - $opacity); + @return rgb($bm-red, $bm-green, $bm-blue); +} + +//-------------------------------- +// Multiply +//-------------------------------- +@function blend-multiply ($foreground, $background) { + $bm-red: red($background) * red($foreground) / 255; + $bm-green: green($background) * green($foreground) / 255; + $bm-blue: blue($background) * blue($foreground) / 255; + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Lighten +//-------------------------------- +@function blend-lighten ($foreground, $background) { + $bm-red: blend-lighten-color(red($foreground), red($background)); + $bm-green: blend-lighten-color(green($foreground), green($background)); + $bm-blue: blend-lighten-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-lighten-color($foreground, $background) { + @if $background > $foreground { + $foreground: $background; + } + @return $foreground; +} + +//-------------------------------- +// Darken +//-------------------------------- +@function blend-darken ($foreground, $background) { + $bm-red: blend-darken-color(red($foreground), red($background)); + $bm-green: blend-darken-color(green($foreground), green($background)); + $bm-blue: blend-darken-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-darken-color($foreground, $background) { + @if $background < $foreground { + $foreground: $background; + } + @return $foreground; +} + +//-------------------------------- +// Darker Color +//-------------------------------- +@function blend-darkercolor ($foreground, $background) { + $bm-red: red($foreground); + $bm-green: green($foreground); + $bm-blue: blue($foreground); + $background-red: red($background); + $background-green: green($background); + $background-blue: blue($background); + + @if $background-red * 0.3 + $background-green * 0.59 + $background-blue * 0.11 <= $bm-red * 0.3 + $bm-green * 0.59 + $bm-blue * 0.11 { + $bm-red: $background-red; + $bm-green: $background-green; + $bm-blue: $background-blue; + } + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Lighter Color +//-------------------------------- +@function blend-lightercolor ($foreground, $background) { + $bm-red: red($foreground); + $bm-green: green($foreground); + $bm-blue: blue($foreground); + $background-red: red($background); + $background-green: green($background); + $background-blue: blue($background); + + @if $background-red * 0.3 + $background-green * 0.59 + $background-blue * 0.11 > $bm-red * 0.3 + $bm-green * 0.59 + $bm-blue * 0.11 { + $bm-red: $background-red; + $bm-green: $background-green; + $bm-blue: $background-blue; + } + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Linear Dodge +//-------------------------------- +@function blend-lineardodge ($foreground, $background) { + $bm-red: blend-lineardodge-color(red($foreground), red($background)); + $bm-green: blend-lineardodge-color(green($foreground), green($background)); + $bm-blue: blend-lineardodge-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-lineardodge-color($foreground, $background) { + @if $background + $foreground > 255 { + $foreground: 255; + } @else { + $foreground: $background + $foreground; + } + @return $foreground; +} + +//-------------------------------- +// Linear Burn +//-------------------------------- +@function blend-linearburn ($foreground, $background) { + $bm-red: blend-linearburn-color(red($foreground), red($background)); + $bm-green: blend-linearburn-color(green($foreground), green($background)); + $bm-blue: blend-linearburn-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-linearburn-color($foreground, $background) { + @if $background + $foreground < 255 { + $foreground: 0; + } @else { + $foreground: $background + $foreground - 255; + } + @return $foreground; +} + +//-------------------------------- +// Difference +//-------------------------------- +@function blend-difference ($foreground, $background) { + $bm-red: abs(red($background) - red($foreground)); + $bm-green: abs(green($background) - green($foreground)); + $bm-blue: abs(blue($background) - blue($foreground)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Screen +//-------------------------------- +@function blend-screen ($foreground, $background) { + $bm-red: blend-screen-color(red($foreground), red($background)); + $bm-green: blend-screen-color(green($foreground), green($background)); + $bm-blue: blend-screen-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-screen-color($foreground, $background) { + @return (255 - ( ( (255 - $foreground) * (255 - $background)) / 256)); +} + +//-------------------------------- +// Exclusion +//-------------------------------- +@function blend-exclusion ($foreground, $background) { + $bm-red: blend-exclusion-color(red($foreground), red($background)); + $bm-green: blend-exclusion-color(green($foreground), green($background)); + $bm-blue: blend-exclusion-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-exclusion-color($foreground, $background) { + @return $background - ($background * (2 / 255) - 1) * $foreground; +} + +//-------------------------------- +// Overlay +//-------------------------------- +@function blend-overlay ($foreground, $background) { + $bm-red: blend-overlay-color(red($foreground), red($background)); + $bm-green: blend-overlay-color(green($foreground), green($background)); + $bm-blue: blend-overlay-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-overlay-color($foreground, $background) { + @if $background <= 255 / 2 { + $foreground: (2 * $background * $foreground) / 255; + } @else { + $foreground: 255 - (255 - 2 * ($background - (255 / 2))) * (255 - $foreground) / 255; + } + @return $foreground; +} + +//-------------------------------- +// Soft Light +//-------------------------------- +@function blend-softlight ($foreground, $background) { + $bm-red: blend-softlight-color(red($foreground), red($background)); + $bm-green: blend-softlight-color(green($foreground), green($background)); + $bm-blue: blend-softlight-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-softlight-color($foreground, $background) { + @if $background < 128 { + $foreground: (($foreground / 2) + 64) * $background * (2 / 255); + } @else { + $foreground: 255 - (191 - ($foreground / 2)) * (255 - $background) * (2 / 255); + } + @return $foreground; +} + +//-------------------------------- +// Hard Light +//-------------------------------- +@function blend-hardlight ($foreground, $background) { + $bm-red: blend-hardlight-color(red($foreground), red($background)); + $bm-green: blend-hardlight-color(green($foreground), green($background)); + $bm-blue: blend-hardlight-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-hardlight-color($foreground, $background) { + $tmp-blend: $foreground; + @if $tmp-blend < 128 { + $foreground: $background * $tmp-blend * (2 / 255); + } @else { + $foreground: 255 - (255-$background) * (255-$tmp-blend) * (2 / 255); + } + @return $foreground; +} + +//-------------------------------- +// Color Dodge +//-------------------------------- +@function blend-colordodge ($foreground, $background) { + $bm-red: blend-colordodge-color(red($foreground), red($background)); + $bm-green: blend-colordodge-color(green($foreground), green($background)); + $bm-blue: blend-colordodge-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-colordodge-color($foreground, $background) { + $tmp: $background * 256 / (255 - $foreground); + @if $tmp > 255 or $foreground == 255 { + $foreground: 255; + } @else { + $foreground: $tmp; + } + @return $foreground; +} + +//-------------------------------- +// Color Burn +//-------------------------------- +@function blend-colorburn ($foreground, $background) { + $bm-red: blend-colorburn-color(red($foreground), red($background)); + $bm-green: blend-colorburn-color(green($foreground), green($background)); + $bm-blue: blend-colorburn-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-colorburn-color($foreground, $background) { + $tmp: (255 - ((255 - $background) * 255) / $foreground); + + // TODO: hacked to replicate photoshop + @if $foreground == 0 { + $foreground: 255; + } @else if $tmp < 0 { + $foreground: 0; + } @else { + $foreground: $tmp; + } + @return $foreground; +} + +//-------------------------------- +// Linear Light +//-------------------------------- +@function blend-linearlight ($foreground, $background) { + $bm-red: blend-linearlight-color(red($foreground), red($background)); + $bm-green: blend-linearlight-color(green($foreground), green($background)); + $bm-blue: blend-linearlight-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-linearlight-color($foreground, $background) { + @if $foreground < 128 { + $foreground: blend-linearburn-color($background, 2 * $foreground); + } @else { + $foreground: blend-lineardodge-color($background, 2 * ($foreground - 128)); + } + @return $foreground; +} + +//-------------------------------- +// Vivid Light +//-------------------------------- +@function blend-vividlight ($foreground, $background) { + $bm-red: blend-vividlight-color(red($foreground), red($background)); + $bm-green: blend-vividlight-color(green($foreground), green($background)); + $bm-blue: blend-vividlight-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-vividlight-color($foreground, $background) { + @if $foreground < 128 { + $foreground: blend-colorburn-color(2 * $foreground, $background); + } @else { + $foreground: blend-colordodge-color(2 * ($foreground - 128), $background); + } + @return $foreground; +} + +//-------------------------------- +// Pin Light +//-------------------------------- +@function blend-pinlight ($foreground, $background) { + $bm-red: blend-pinlight-color(red($foreground), red($background)); + $bm-green: blend-pinlight-color(green($foreground), green($background)); + $bm-blue: blend-pinlight-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-pinlight-color($foreground, $background) { + @if $foreground < 128 { + $foreground: blend-darken-color($background, 2 * $foreground); + } @else { + $foreground: blend-lighten-color($background, 2 * ($foreground - 128)); + } + @return $foreground; +} + +//-------------------------------- +// Hard Mix +//-------------------------------- +@function blend-hardmix ($foreground, $background) { + $bm-red: blend-hardmix-color(red($foreground), red($background)); + $bm-green: blend-hardmix-color(green($foreground), green($background)); + $bm-blue: blend-hardmix-color(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-hardmix-color($foreground, $background) { + $tmp: blend-vividlight-color($foreground, $background); + @if $tmp < 128 { + $foreground: 0; + } @else { + $foreground: 255; + } + @return $foreground; +} + +// Unique to Photoshop + +//-------------------------------- +// Color Blend +//-------------------------------- +@function blend-colorblend ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + + $bm-hsv: nth($foreground-hsv, 1), nth($foreground-hsv, 2), nth($background-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Dissolve +//-------------------------------- +@function blend-dissolve ($foreground, $background) { + // The Dissolve blend mode acts on transparent and partially transparent pixels + // it treats transparency as a pixel pattern and applies a diffusion dither pattern. + // @see http://photoblogstop.com/photoshop/photoshop-blend-modes-explained + @return $foreground; +} + +//-------------------------------- +// Divide +//-------------------------------- +@function blend-divide ($foreground, $background) { + $bm-red: blend-divide-colors(red($foreground), red($background)); + $bm-green: blend-divide-colors(green($foreground), green($background)); + $bm-blue: blend-divide-colors(blue($foreground), blue($background)); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-divide-colors($foreground, $background) { + @return min((($background / 255) / ($foreground / 255)) * 255, 255); +} + +//-------------------------------- +// Hue +//-------------------------------- +@function blend-hue ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + + $bm-hsv: nth($foreground-hsv, 1), nth($background-hsv, 2), nth($background-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Luminosity +//-------------------------------- +@function blend-luminosity ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + + $bm-hsv: nth($background-hsv, 1), nth($background-hsv, 2), nth($foreground-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Saturation +//-------------------------------- +@function blend-saturation ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + + $bm-hsv: nth($background-hsv, 1), nth($foreground-hsv, 2), nth($background-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Subtract +//-------------------------------- +@function blend-subtract ($foreground, $background) { + $bm-red: max(red($background) - red($foreground), 0); + $bm-green: max(green($background) - green($foreground), 0); + $bm-blue: max(blue($background) - blue($foreground), 0); + + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// HSL and HSV +//-------------------------------- +// @see https://gist.github.com/1069204 +@function hsv-to-hsl($h, $s: 0, $v: 0) { + @if type-of($h) == 'list' { + $v: nth($h, 3); + $s: nth($h, 2); + $h: nth($h, 1); + } + + @if unit($h) == 'deg' { + $h: 3.1415 * 2 * ($h / 360deg); + } + @if unit($s) == '%' { + $s: 0 + ($s / 100%); + } + @if unit($v) == '%' { + $v: 0 + ($v / 100%); + } + + $ss: $s * $v; + $ll: (2 - $s) * $v; + + @if $ll <= 1 and $ll != 0 { + $ss: $ss / $ll; + } @else if ($ll == 2) { + $ss: 0; + } @else { + $ss: $ss / (2 - $ll); + } + + $ll: $ll / 2; + + @return 360deg * $h / (3.1415 * 2), percentage(max(0, min(1, $ss))), percentage(max(0, min(1, $ll))); +} + +@function hsl-to-hsv($h, $ss: 0, $ll: 0) { + @if type-of($h) == 'list' { + $ll: nth($h, 3); + $ss: nth($h, 2); + $h: nth($h, 1); + } @else if type-of($h) == 'color' { + $ll: lightness($h); + $ss: saturation($h); + $h: hue($h); + } + + @if unit($h) == 'deg' { + $h: 3.1415 * 2 * ($h / 360deg); + } + @if unit($ss) == '%' { + $ss: 0 + ($ss / 100%); + } + @if unit($ll) == '%' { + $ll: 0 + ($ll / 100%); + } + + $ll: $ll * 2; + + @if $ll <= 1 { + $ss: $ss * $ll; + } @else { + $ss: $ss * (2 - $ll); + } + + $v: ($ll + $ss) / 2; + $s: if($ll + $ss == 0, 0, (2 * $ss) / ($ll + $ss)); + + @return 360deg * $h / (3.1415 * 2), percentage(max(0, min(1, $s))), percentage(max(0, min(1, $v))); +} + +@function color-to-hsv($color) { + @return hsl-to-hsv($color); +} + +@function hsv-to-color($h, $s: 0, $v: 0) { + $hsl: hsv-to-hsl($h, $s, $v); + @return hsl(nth($hsl, 1), nth($hsl, 2), nth($hsl, 3)); +} + +@function fade($color, $opacity) { + @return fade-in($color, $opacity/100%) +} \ No newline at end of file diff --git a/resources/assets/sass/_mixins.scss b/resources/assets/sass/_mixins.scss new file mode 100644 index 00000000..7a4aba5c --- /dev/null +++ b/resources/assets/sass/_mixins.scss @@ -0,0 +1,903 @@ +@mixin clearfix() { + &:before, + &:after { + content: " "; /* 1 */ + display: table; /* 2 */ + } + &:after { + clear: both; + } +} + +// Webkit-style focus +@mixin tab-focus() { + // Default + outline: thin dotted #000; + outline-offset: -2px; +} + +// Center-align a block level element +@mixin center-block() { + display: block; + margin-left: auto; + margin-right: auto; +} + +// Sizing shortcuts +@mixin size($width, $height) { + width: $width; + height: $height; +} + +@mixin square($size) { + @include size($size, $size); +} + +@mixin flexbox() { + display: flex; +} + +@mixin flex-inline() { + display: inline-flex; +} + +@mixin align-items($argument) { + align-items: $argument; +} + +@mixin flex-column { + flex-direction: column; +} + +@mixin flex-row { + flex-direction: row; +} + +// Placeholder text +@mixin placeholder($color: $input-color-placeholder) { + &.placeholder { + color: $color; + } +} + +// Placeholder text +@mixin selected($color, $background) { + &::selection { + background: $background; /* Safari */ + color: $color; + } +} + +@mixin placeholder-height($height) { + &.placeholder { + line-height: $height; + } +} + +// Text overflow +// Requires inline-block or block for proper styling +@mixin text-overflow() { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +// CSS image replacement +@mixin text-hide() { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +@mixin invisible() { + visibility: hidden; +} + +//Padding Helper Classes +@mixin generate-paddings-options-prefix($prefix,$n, $j: 0) { + @if $j <= $n { + @for $i from $j through $n { + $step: $i*5; + .#{$prefix}-p-t-#{$step} { + margin-top: ($step*1px) !important; + } + .#{$prefix}-p-r-#{$step} { + margin-right: ($step*1px) !important; + } + .#{$prefix}-p-l-#{$step} { + margin-left: ($step*1px) !important; + } + .#{$prefix}-p-b-#{$step} { + margin-bottom: ($step*1px) !important; + } + //@include generate-margin-options($n, ($i + 1)); + } + } +} + +//Margins Helper Classes +@mixin generate-margin-options-prefix($prefix,$n, $j: 0) { + @if $j <= $n { + @for $i from $j through $n { + $step: $i*5; + .#{$prefix}-m-t-#{$step} { + margin-top: ($step*1px) !important; + } + .#{$prefix}-m-r-#{$step} { + margin-right: ($step*1px) !important; + } + .#{$prefix}-m-l-#{$step} { + margin-left: ($step*1px) !important; + } + .#{$prefix}-m-b-#{$step} { + margin-bottom: ($step*1px) !important; + } + //@include generate-margin-options($n, ($i + 1)); + } + } +} + +// CSS3 PROPERTIES +// -------------------------------------------------- +@mixin mask($arguments) { + mask: $arguments; +} + +@mixin box_scale($scale) { + transform: scale($scale); +} + +// Single side border-radius +@mixin border-top-radius($radius) { + border-top-right-radius: $radius; + border-top-left-radius: $radius; +} + +@mixin border-right-radius($radius) { + border-bottom-right-radius: $radius; + border-top-right-radius: $radius; +} + +@mixin border-bottom-radius($radius) { + border-bottom-right-radius: $radius; + border-bottom-left-radius: $radius; +} + +@mixin border-left-radius($radius) { + border-bottom-left-radius: $radius; + border-top-left-radius: $radius; +} + +@mixin border-radius($radius) { + border-radius: $radius; +} + +// Drop shadows +@mixin box-shadow($shadow) { + box-shadow: $shadow; +} + +@mixin animation($properties) { + animation: $properties; +} + +// Transitions +@mixin transition($transition) { + transition: $transition; +} + +@mixin transition-property($transition-property) { + transition-property: $transition-property; +} + +@mixin transition-delay($transition-delay) { + transition-delay: $transition-delay; +} + +@mixin transition-duration($transition-duration) { + transition-duration: $transition-duration; +} + +@mixin transition-transform($transition) { + transition: transform $transition; +} + +// Transformations +@mixin rotate($degrees) { + transform: rotate($degrees); +} + +@mixin scale($ratio) { + transform: scale($ratio); +} + +@mixin translate($x, $y) { + transform: translate($x, $y); +} + +@mixin translateY($y) { + transform: translateY($y); +} + +@mixin translateX($x) { + transform: translateX($x); +} + +@mixin skew($x, $y) { + transform: skew($x, $y); +} + +@mixin translate3d($x, $y, $z) { + transform: translate3d($x, $y, $z); +} + +@mixin rotateX($degrees) { + transform: rotateX($degrees); +} + +@mixin rotateY($degrees) { + transform: rotateY($degrees); +} + +@mixin perspective($perspective) { + perspective: $perspective; +} + +@mixin perspective-origin($perspective) { + perspective-origin: $perspective; +} + +@mixin transform-origin($origin) { + transform-origin: $origin; +} + +@mixin transform-style($style) { + transform-style: $style; +} + +// Backface visibility +// Prevent browsers from flickering when using CSS 3D transforms. +// Default value is `visible`, but can be changed to `hidden` +// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples +@mixin backface-visibility($visibility) { + backface-visibility: $visibility; +} + +// Background clip +@mixin background-clip($clip: border-box) { + background-clip: $clip; +} + +// Box sizing +@mixin box-sizing($boxmodel) { + box-sizing: $boxmodel; +} + +// User select +// For selecting text on the page +@mixin user-select($select) { + user-select: $select; +} + +// Resize anything +@mixin resizable($direction) { + resize: $direction; // Options: horizontal, vertical, both + overflow: auto; // Safari fix +} + +// CSS3 Content Columns +@mixin content-columns($column-count, $column-gap: $grid-gutter-width) { + column-count: $column-count; + column-gap: $column-gap; +} + +// Optional hyphenation +@mixin hyphens($mode: auto) { + word-wrap: break-word; + hyphens: $mode; +} + +// Opacity +@mixin opacity($opacity) { + opacity: $opacity; + // IE8 filter + $opacity-ie: ($opacity * 100); + filter: alpha(opacity=$opacity-ie); +} + +// GRADIENTS +// -------------------------------------------------- +@mixin linear-gradient($from, $to) { + background: $to; + background: linear-gradient(to bottom, $from 0%, $to 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#{$from}, endColorstr=#{$to}) +} + +#gradient { + // Horizontal gradient, from left to right + // + // Creates two color stops, start and end, by specifying a color and position for each color stop. + // Color stops are not available in IE9 and below. + @mixin horizontal($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) { + // Standard, IE10 + background: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent) repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down + } + // Vertical gradient, from top to bottom + // + // Creates two color stops, start and end, by specifying a color and position for each color stop. + // Color stops are not available in IE9 and below. + @mixin vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) { + // Standard, IE10 + background: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent) repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down + } + @mixin directional($start-color: #555, $end-color: #333, $deg: 45deg) { + // Standard, IE10 + background: linear-gradient($deg, $start-color, $end-color) repeat-x; + } + @mixin horizontal-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) { + background: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color) no-repeat; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=1); // IE9 and down, gets no color-stop at all for proper fallback + } + @mixin vertical-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) { + background: linear-gradient($start-color, $mid-color $color-stop, $end-color) no-repeat; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down, gets no color-stop at all for proper fallback + } + @mixin radial($inner-color: #555, $outer-color: #333) { + background: radial-gradient(circle, $inner-color, $outer-color) no-repeat; + } + @mixin striped($color: rgba(255,255,255,.15), $angle: 45deg) { + background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent); + } +} + +// Reset filters for IE +// +// When you need to remove a gradient background, do not forget to use this to reset +// the IE filter for IE9 and below. +@mixin reset-filter() { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} + +// Retina images +// +// Short retina mixin for setting background-image and -size +@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { + background-image: url("${file-1x}"); + @media only screen and (min-device-pixel-ratio: 2), + only screen and (min-resolution: 192dpi), + only screen and (min-resolution: 2dppx) { + background-image: url("${file-2x}"); + background-size: $width-1x $height-1x; + } +} + +// Responsive image +// +// Keep images from scaling beyond the width of their parents. +@mixin img-responsive($display: block) { + display: $display; + max-width: 100%; // Part 1: Set a maximum relative to the parent + height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching +} + +@mixin keyframe ($animation_name) { + @-webkit-keyframes #{$animation_name} { + @content; + } + + @-moz-keyframes #{$animation_name} { + @content; + } + + @-o-keyframes #{$animation_name} { + @content; + } + + @keyframes #{$animation_name} { + @content; + } +} + +// Import the Compass Plugin +//-------------------------------- +// Normal +//-------------------------------- +@function blend-normal ($foreground, $background) { + $opacity: opacity($foreground); + $background-opacity: opacity($background); + // calculate opacity + $bm-red: red($foreground) * $opacity + red($background) * $background-opacity * (1 - $opacity); + $bm-green: green($foreground) * $opacity + green($background) * $background-opacity * (1 - $opacity); + $bm-blue: blue($foreground) * $opacity + blue($background) * $background-opacity * (1 - $opacity); + @return rgb($bm-red, $bm-green, $bm-blue); +} + +//-------------------------------- +// Multiply +//-------------------------------- +@function blend-multiply ($foreground, $background) { + $bm-red: red($background) * red($foreground) / 255; + $bm-green: green($background) * green($foreground) / 255; + $bm-blue: blue($background) * blue($foreground) / 255; + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Lighten +//-------------------------------- +@function blend-lighten ($foreground, $background) { + $bm-red: blend-lighten-color(red($foreground), red($background)); + $bm-green: blend-lighten-color(green($foreground), green($background)); + $bm-blue: blend-lighten-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-lighten-color($foreground, $background) { + @if $background > $foreground { + $foreground: $background; + } + @return $foreground; +} + +//-------------------------------- +// Darken +//-------------------------------- +@function blend-darken ($foreground, $background) { + $bm-red: blend-darken-color(red($foreground), red($background)); + $bm-green: blend-darken-color(green($foreground), green($background)); + $bm-blue: blend-darken-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-darken-color($foreground, $background) { + @if $background < $foreground { + $foreground: $background; + } + @return $foreground; +} + +//-------------------------------- +// Darker Color +//-------------------------------- +@function blend-darkercolor ($foreground, $background) { + $bm-red: red($foreground); + $bm-green: green($foreground); + $bm-blue: blue($foreground); + $background-red: red($background); + $background-green: green($background); + $background-blue: blue($background); + @if $background-red * 0.3 + $background-green * 0.59 + $background-blue * 0.11 <= $bm-red * 0.3 + $bm-green * 0.59 + $bm-blue * 0.11 { + $bm-red: $background-red; + $bm-green: $background-green; + $bm-blue: $background-blue; + } + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Lighter Color +//-------------------------------- +@function blend-lightercolor ($foreground, $background) { + $bm-red: red($foreground); + $bm-green: green($foreground); + $bm-blue: blue($foreground); + $background-red: red($background); + $background-green: green($background); + $background-blue: blue($background); + @if $background-red * 0.3 + $background-green * 0.59 + $background-blue * 0.11 > $bm-red * 0.3 + $bm-green * 0.59 + $bm-blue * 0.11 { + $bm-red: $background-red; + $bm-green: $background-green; + $bm-blue: $background-blue; + } + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Linear Dodge +//-------------------------------- +@function blend-lineardodge ($foreground, $background) { + $bm-red: blend-lineardodge-color(red($foreground), red($background)); + $bm-green: blend-lineardodge-color(green($foreground), green($background)); + $bm-blue: blend-lineardodge-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-lineardodge-color($foreground, $background) { + @if $background + $foreground > 255 { + $foreground: 255; + } @else { + $foreground: $background + $foreground; + } + @return $foreground; +} + +//-------------------------------- +// Linear Burn +//-------------------------------- +@function blend-linearburn ($foreground, $background) { + $bm-red: blend-linearburn-color(red($foreground), red($background)); + $bm-green: blend-linearburn-color(green($foreground), green($background)); + $bm-blue: blend-linearburn-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-linearburn-color($foreground, $background) { + @if $background + $foreground < 255 { + $foreground: 0; + } @else { + $foreground: $background + $foreground - 255; + } + @return $foreground; +} + +//-------------------------------- +// Difference +//-------------------------------- +@function blend-difference ($foreground, $background) { + $bm-red: abs(red($background) - red($foreground)); + $bm-green: abs(green($background) - green($foreground)); + $bm-blue: abs(blue($background) - blue($foreground)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// Screen +//-------------------------------- +@function blend-screen ($foreground, $background) { + $bm-red: blend-screen-color(red($foreground), red($background)); + $bm-green: blend-screen-color(green($foreground), green($background)); + $bm-blue: blend-screen-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-screen-color($foreground, $background) { + @return (255 - ( ( (255 - $foreground) * (255 - $background)) / 256)); +} + +//-------------------------------- +// Exclusion +//-------------------------------- +@function blend-exclusion ($foreground, $background) { + $bm-red: blend-exclusion-color(red($foreground), red($background)); + $bm-green: blend-exclusion-color(green($foreground), green($background)); + $bm-blue: blend-exclusion-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-exclusion-color($foreground, $background) { + @return $background - ($background * (2 / 255) - 1) * $foreground; +} + +//-------------------------------- +// Overlay +//-------------------------------- +@function blend-overlay ($foreground, $background) { + $bm-red: blend-overlay-color(red($foreground), red($background)); + $bm-green: blend-overlay-color(green($foreground), green($background)); + $bm-blue: blend-overlay-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-overlay-color($foreground, $background) { + @if $background <= 255 / 2 { + $foreground: (2 * $background * $foreground) / 255; + } @else { + $foreground: 255 - (255 - 2 * ($background - (255 / 2))) * (255 - $foreground) / 255; + } + @return $foreground; +} + +//-------------------------------- +// Soft Light +//-------------------------------- +@function blend-softlight ($foreground, $background) { + $bm-red: blend-softlight-color(red($foreground), red($background)); + $bm-green: blend-softlight-color(green($foreground), green($background)); + $bm-blue: blend-softlight-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-softlight-color($foreground, $background) { + @if $background < 128 { + $foreground: (($foreground / 2) + 64) * $background * (2 / 255); + } @else { + $foreground: 255 - (191 - ($foreground / 2)) * (255 - $background) * (2 / 255); + } + @return $foreground; +} + +//-------------------------------- +// Hard Light +//-------------------------------- +@function blend-hardlight ($foreground, $background) { + $bm-red: blend-hardlight-color(red($foreground), red($background)); + $bm-green: blend-hardlight-color(green($foreground), green($background)); + $bm-blue: blend-hardlight-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-hardlight-color($foreground, $background) { + $tmp-blend: $foreground; + @if $tmp-blend < 128 { + $foreground: $background * $tmp-blend * (2 / 255); + } @else { + $foreground: 255 - (255-$background) * (255-$tmp-blend) * (2 / 255); + } + @return $foreground; +} + +//-------------------------------- +// Color Dodge +//-------------------------------- +@function blend-colordodge ($foreground, $background) { + $bm-red: blend-colordodge-color(red($foreground), red($background)); + $bm-green: blend-colordodge-color(green($foreground), green($background)); + $bm-blue: blend-colordodge-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-colordodge-color($foreground, $background) { + $tmp: $background * 256 / (255 - $foreground); + @if $tmp > 255 or $foreground == 255 { + $foreground: 255; + } @else { + $foreground: $tmp; + } + @return $foreground; +} + +//-------------------------------- +// Color Burn +//-------------------------------- +@function blend-colorburn ($foreground, $background) { + $bm-red: blend-colorburn-color(red($foreground), red($background)); + $bm-green: blend-colorburn-color(green($foreground), green($background)); + $bm-blue: blend-colorburn-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-colorburn-color($foreground, $background) { + $tmp: (255 - ((255 - $background) * 255) / $foreground); + // TODO: hacked to replicate photoshop + @if $foreground == 0 { + $foreground: 255; + } @else if $tmp < 0 { + $foreground: 0; + } @else { + $foreground: $tmp; + } + @return $foreground; +} + +//-------------------------------- +// Linear Light +//-------------------------------- +@function blend-linearlight ($foreground, $background) { + $bm-red: blend-linearlight-color(red($foreground), red($background)); + $bm-green: blend-linearlight-color(green($foreground), green($background)); + $bm-blue: blend-linearlight-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-linearlight-color($foreground, $background) { + @if $foreground < 128 { + $foreground: blend-linearburn-color($background, 2 * $foreground); + } @else { + $foreground: blend-lineardodge-color($background, 2 * ($foreground - 128)); + } + @return $foreground; +} + +//-------------------------------- +// Vivid Light +//-------------------------------- +@function blend-vividlight ($foreground, $background) { + $bm-red: blend-vividlight-color(red($foreground), red($background)); + $bm-green: blend-vividlight-color(green($foreground), green($background)); + $bm-blue: blend-vividlight-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-vividlight-color($foreground, $background) { + @if $foreground < 128 { + $foreground: blend-colorburn-color(2 * $foreground, $background); + } @else { + $foreground: blend-colordodge-color(2 * ($foreground - 128), $background); + } + @return $foreground; +} + +//-------------------------------- +// Pin Light +//-------------------------------- +@function blend-pinlight ($foreground, $background) { + $bm-red: blend-pinlight-color(red($foreground), red($background)); + $bm-green: blend-pinlight-color(green($foreground), green($background)); + $bm-blue: blend-pinlight-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-pinlight-color($foreground, $background) { + @if $foreground < 128 { + $foreground: blend-darken-color($background, 2 * $foreground); + } @else { + $foreground: blend-lighten-color($background, 2 * ($foreground - 128)); + } + @return $foreground; +} + +//-------------------------------- +// Hard Mix +//-------------------------------- +@function blend-hardmix ($foreground, $background) { + $bm-red: blend-hardmix-color(red($foreground), red($background)); + $bm-green: blend-hardmix-color(green($foreground), green($background)); + $bm-blue: blend-hardmix-color(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-hardmix-color($foreground, $background) { + $tmp: blend-vividlight-color($foreground, $background); + @if $tmp < 128 { + $foreground: 0; + } @else { + $foreground: 255; + } + @return $foreground; +} + +// Unique to Photoshop +//-------------------------------- +// Color Blend +//-------------------------------- +@function blend-colorblend ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + $bm-hsv: nth($foreground-hsv, 1), nth($foreground-hsv, 2), nth($background-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Dissolve +//-------------------------------- +@function blend-dissolve ($foreground, $background) { + // The Dissolve blend mode acts on transparent and partially transparent pixels + // it treats transparency as a pixel pattern and applies a diffusion dither pattern. + // @see http://photoblogstop.com/photoshop/photoshop-blend-modes-explained + @return $foreground; +} + +//-------------------------------- +// Divide +//-------------------------------- +@function blend-divide ($foreground, $background) { + $bm-red: blend-divide-colors(red($foreground), red($background)); + $bm-green: blend-divide-colors(green($foreground), green($background)); + $bm-blue: blend-divide-colors(blue($foreground), blue($background)); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +@function blend-divide-colors($foreground, $background) { + @return min((($background / 255) / ($foreground / 255)) * 255, 255); +} + +//-------------------------------- +// Hue +//-------------------------------- +@function blend-hue ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + $bm-hsv: nth($foreground-hsv, 1), nth($background-hsv, 2), nth($background-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Luminosity +//-------------------------------- +@function blend-luminosity ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + $bm-hsv: nth($background-hsv, 1), nth($background-hsv, 2), nth($foreground-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Saturation +//-------------------------------- +@function blend-saturation ($foreground, $background) { + $foreground-hsv: color-to-hsv($foreground); + $background-hsv: color-to-hsv($background); + $bm-hsv: nth($background-hsv, 1), nth($foreground-hsv, 2), nth($background-hsv, 3); + $bm-color: hsv-to-color($bm-hsv); + @return blend-normal(rgba(red($bm-color), green($bm-color), blue($bm-color), opacity($foreground)), $background); +} + +//-------------------------------- +// Subtract +//-------------------------------- +@function blend-subtract ($foreground, $background) { + $bm-red: max(red($background) - red($foreground), 0); + $bm-green: max(green($background) - green($foreground), 0); + $bm-blue: max(blue($background) - blue($foreground), 0); + @return blend-normal(rgba($bm-red, $bm-green, $bm-blue, opacity($foreground)), $background); +} + +//-------------------------------- +// HSL and HSV +//-------------------------------- +// @see https://gist.github.com/1069204 +@function hsv-to-hsl($h, $s: 0, $v: 0) { + @if type-of($h) == 'list' { + $v: nth($h, 3); + $s: nth($h, 2); + $h: nth($h, 1); + } + @if unit($h) == 'deg' { + $h: 3.1415 * 2 * ($h / 360deg); + } + @if unit($s) == '%' { + $s: 0 + ($s / 100%); + } + @if unit($v) == '%' { + $v: 0 + ($v / 100%); + } + $ss: $s * $v; + $ll: (2 - $s) * $v; + @if $ll <= 1 and $ll != 0 { + $ss: $ss / $ll; + } @else if ($ll == 2) { + $ss: 0; + } @else { + $ss: $ss / (2 - $ll); + } + $ll: $ll / 2; + @return 360deg * $h / (3.1415 * 2), percentage(max(0, min(1, $ss))), percentage(max(0, min(1, $ll))); +} + +@function hsl-to-hsv($h, $ss: 0, $ll: 0) { + @if type-of($h) == 'list' { + $ll: nth($h, 3); + $ss: nth($h, 2); + $h: nth($h, 1); + } @else if type-of($h) == 'color' { + $ll: lightness($h); + $ss: saturation($h); + $h: hue($h); + } + @if unit($h) == 'deg' { + $h: 3.1415 * 2 * ($h / 360deg); + } + @if unit($ss) == '%' { + $ss: 0 + ($ss / 100%); + } + @if unit($ll) == '%' { + $ll: 0 + ($ll / 100%); + } + $ll: $ll * 2; + @if $ll <= 1 { + $ss: $ss * $ll; + } @else { + $ss: $ss * (2 - $ll); + } + $v: ($ll + $ss) / 2; + $s: if($ll + $ss == 0, 0, (2 * $ss) / ($ll + $ss)); + @return 360deg * $h / (3.1415 * 2), percentage(max(0, min(1, $s))), percentage(max(0, min(1, $v))); +} + +@function color-to-hsv($color) { + @return hsl-to-hsv($color); +} + +@function hsv-to-color($h, $s: 0, $v: 0) { + $hsl: hsv-to-hsl($h, $s, $v); + @return hsl(nth($hsl, 1), nth($hsl, 2), nth($hsl, 3)); +} + + diff --git a/resources/assets/sass/_modules.scss b/resources/assets/sass/_modules.scss new file mode 100644 index 00000000..964102c1 --- /dev/null +++ b/resources/assets/sass/_modules.scss @@ -0,0 +1,96 @@ +// Structure +// -------------------------------------------------- + +//Z-indexes +@import "modules/z_index"; + +//Main Layout +@import "modules/layout"; + +//View +@import "modules/view"; + +//Chat +@import "modules/chat"; + +//Cards +@import "modules/cards"; + +//Typography +@import "modules/typography"; + +//Buttons +@import "modules/buttons"; + +//Alerts +@import "modules/alerts"; + +//Notification +@import "modules/notifications"; + +//Progress indicators +@import "modules/progress_indicators"; + +//Modals +@import "modules/modals"; + +//Tabs & Accordians +@import "modules/tabs_accordian"; + +//Sliders +@import "modules/sliders"; + +//Tree View +@import "modules/treeview"; + +//Nestables +@import "modules/nestables"; + +//Form Elements +@import "modules/form_elements"; + +//Tables +@import "modules/tables"; + +//Charts +@import "modules/charts"; + +//List +@import "modules/list"; + +//Social +@import "modules/social"; + +//Email +@import "modules/email"; + +//Calender +@import "modules/calendar"; + +//Login +@import "modules/login"; + +//Lock screen +@import "modules/lock_screen"; + +//Timeline +@import "modules/timeline"; + +//Gallery +@import "modules/gallery"; + +//Vector map +@import "modules/vector_map"; + +// Widgets +@import "modules/widgets"; + +//Misc +@import "modules/misc"; + +//Print +@import "modules/print"; + +//Print +@import "modules/animation"; + diff --git a/resources/assets/sass/_responsive.scss b/resources/assets/sass/_responsive.scss new file mode 100644 index 00000000..622c734a --- /dev/null +++ b/resources/assets/sass/_responsive.scss @@ -0,0 +1,1187 @@ +.visible-xlg { + display: none; +} + +.hidden-xlg { + display: block; +} + +/*** Large screens ***/ +@media (min-width: 1824px) { + + .visible-xlg { + display: block !important; + } + .hidden-xlg { + display: none !important; + } + + .quickview-wrapper .tab-content #quickview-notes > .inner { + width: 570px; + } + + .container-fluid { + &.container-fixed-lg { + width: $layout-container-fixed-lg; + margin-right: auto; + margin-left: auto; + } + } + .menu-pin .container-fluid.container-fixed-lg { + width: $layout-container-fixed-lg - $layout-sidepanel-pin-width; + } + // .visible-xlg { + // display: block !important; + // } + // .hidden-xlg { + // display: none !important; + // } + + .col-xlg-1, .col-xlg-2, .col-xlg-3, .col-xlg-4, .col-xlg-5, .col-xlg-6, .col-xlg-7, .col-xlg-8, .col-xlg-9, .col-xlg-10, .col-xlg-11 { + // float: left; + min-height: 1px; + padding-left: 15px; + padding-right: 15px; + position: relative; + } + .col-xlg-12 { + // float: left; + min-height: 1px; + padding-left: 15px; + padding-right: 15px; + position: relative; + // width: 100%; + flex: 0 0 100%; + max-width: 100%; + } + .col-xlg-11 { + // width: 91.6667%; + flex: 0 0 91.6667%; + max-width: 91.6667%; + } + .col-xlg-10 { + width: 83.3333%; + flex: 0 0 83.3333%; + max-width: 83.3333%; + } + .col-xlg-9 { + // width: 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-xlg-8 { + // width: 66.6667%; + flex: 0 0 66.6667%; + max-width: 66.6667%; + } + .col-xlg-7 { + // width: 58.3333%; + flex: 0 0 58.3333%; + max-width: 58.3333%; + } + .col-xlg-6 { + // width: 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-xlg-5 { + // width: 41.6667%; + flex: 0 0 41.6667%; + max-width: 41.6667%; + } + .col-xlg-4 { + // width: 33.3333%; + flex: 0 0 33.3333%; + max-width: 33.3333%; + } + .col-xlg-3 { + // width: 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-xlg-2 { + // width: 16.6667%; + flex: 0 0 16.6667%; + max-width: 16.6667%; + } + .col-xlg-1 { + // width: 8.33333%; + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .col-xlg-pull-12 { + right: 100%; + } + .col-xlg-pull-11 { + right: 91.6667%; + } + .col-xlg-pull-10 { + right: 83.3333%; + } + .col-xlg-pull-9 { + right: 75%; + } + .col-xlg-pull-8 { + right: 66.6667%; + } + .col-xlg-pull-7 { + right: 58.3333%; + } + .col-xlg-pull-6 { + right: 50%; + } + .col-xlg-pull-5 { + right: 41.6667%; + } + .col-xlg-pull-4 { + right: 33.3333%; + } + .col-xlg-pull-3 { + right: 25%; + } + .col-xlg-pull-2 { + right: 16.6667%; + } + .col-xlg-pull-1 { + right: 8.33333%; + } + .col-xlg-pull-0 { + right: 0; + } + .col-xlg-push-12 { + left: 100%; + } + .col-xlg-push-11 { + left: 91.6667%; + } + .col-xlg-push-10 { + left: 83.3333%; + } + .col-xlg-push-9 { + left: 75%; + } + .col-xlg-push-8 { + left: 66.6667%; + } + .col-xlg-push-7 { + left: 58.3333%; + } + .col-xlg-push-6 { + left: 50%; + } + .col-xlg-push-5 { + left: 41.6667%; + } + .col-xlg-push-4 { + left: 33.3333%; + } + .col-xlg-push-3 { + left: 25%; + } + .col-xlg-push-2 { + left: 16.6667%; + } + .col-xlg-push-1 { + left: 8.33333%; + } + .col-xlg-push-0 { + left: 0; + } + .col-xlg-offset-12 { + margin-left: 100%; + } + .col-xlg-offset-11 { + margin-left: 91.6667%; + } + .col-xlg-offset-10 { + margin-left: 83.3333%; + } + .col-xlg-offset-9 { + margin-left: 75%; + } + .col-xlg-offset-8 { + margin-left: 66.6667%; + } + .col-xlg-offset-7 { + margin-left: 58.3333%; + } + .col-xlg-offset-6 { + margin-left: 50%; + } + .col-xlg-offset-5 { + margin-left: 41.6667%; + } + .col-xlg-offset-4 { + margin-left: 33.3333%; + } + .col-xlg-offset-3 { + margin-left: 25%; + } + .col-xlg-offset-2 { + margin-left: 16.6667%; + } + .col-xlg-offset-1 { + margin-left: 8.33333%; + } + .col-xlg-offset-0 { + margin-left: 0; + } + +} + +/*** Desktops ***/ +@media (min-width: 1600px) { +} + +/*** Medium Size Screen ***/ +@media only screen and (max-width: 1400px) { + + .page-sidebar .page-sidebar-inner .sidebar-slide { + .sidebar-menu { + bottom: 50px; + } + .sidebar-widgets { + display: none + } + } + .footer-widget { + padding: 11px 21px !important; + } +} + +@media only screen and (max-width: 1199px) { + .visible-xl-down { + display: block !important; + } +} + +/*** Desktops & Laptops ***/ +@media only screen and (min-width: 980px) { + body { + &.ie9.menu-pin { + .page-sidebar { + transform: none !important; + + } + } + &.menu-pin { + .header .brand { + width: 245px; + } + .page-container { + padding-left: 0; + .page-content-wrapper { + .content { + padding-left: $layout-sidepanel-pin-width; + } + .footer { + left: $layout-sidepanel-pin-width; + } + } + } + [data-toggle-pin="sidebar"] { + & > i:before { + content: "\f192"; + } + } + .page-sidebar { + transform: translate($layout-sidepanel-width - $layout-sidepanel-width-collapsed, 0) !important; + width: $layout-sidepanel-pin-width; + .sidebar-header .sidebar-header-controls { + transform: translateX(18px); + } + .menu-items .icon-thumbnail { + transform: translate3d(-14px, 0, 0); + } + } + } + &.menu-behind { + .page-sidebar { + //z-index: $zIndex-navbar - 1; + } + .header .brand { + width: 200px; + text-align: left; + padding-left: 32px; + } + } + &.box-layout { + background-color: $color-white; + & > .container { + height: 100%; + padding: 0; + background-color: $color-master-lightest; + } + .header { + background-color: transparent; + border: 0; + padding: 0; + & > .container { + background-color: #fff; + border-bottom: 1px solid rgba(230, 230, 230, 0.7); + padding: 0 20px 0 0; + height: 100%; + } + } + .page-sidebar { + left: auto; + transform: none !important; + + } + .page-container .page-content-wrapper .footer { + width: auto; + } + + } + } + + .header { + .brand { + position: relative; + } + .dropdown-menu { + top: $layout-header-height - 20px; + } + .user-info-wrapper { + .user-details { + .user-name { + font-size: 16px; + } + .user-other { + font-size: 10px; + } + } + .user-pic { + position: relative; + top: -6px; + } + } + } + + .notification-panel { + width: 400px; + } + +} + +/*** General Small Screen Desktops ***/ + +/*** General tablets and phones ***/ +@media (max-width: 991px) { + + .hidden-lg-down { + display: none !important; + } + + .page-container { + padding-left: 0; + } + + .d-flex-lg-down { + display: flex; + } + .justify-between-lg-down { + + justify-content: space-between; + } + + body { + &.sidebar-open { + .page-container { + @include translate3d(250px, 0, 0); + overflow: hidden; + position: fixed; + } + } + &.box-layout { + & > .container { + padding: 0; + height: 100%; + } + .header { + & > .container { + padding: 0; + .pull-right .sm-action-bar { + right: 0; + } + } + } + } + &.horizontal-app-menu { + .header { + & > .container { + padding: 0; + } + } + .secondary-sidebar { + margin-left: 0; + } + } + } + .header { + padding: 0 15px; + width: 100%; + border-bottom: 1px solid rgba(0, 0, 0, .07); + background: #fff !important; + .header-inner { + text-align: center; + .toggle-sidebar { + display: block; + left: 23px; + } + .mark-email { + left: 45px; + position: absolute; + top: 23px; + } + .quickview-link { + position: absolute; + right: 0; + top: 12px; + } + } + .brand { + width: auto; + } + .dropdown-menu { + top: $layout-mobile-header-height - 20px; + } + .notification-list, .search-link { + display: none; + } + + & > .pull-left, & > .pull-right { + position: relative; + } + & > .pull-right { + .sm-action-bar { + right: 0; + } + } + } + .sm-action-bar { + position: absolute; + top: 50%; + + transform: translateY(-50%); + z-index: 10; + & > a { + padding: 10px; + display: inline-block; + } + } + .pace .pace-activity { + top: 60px; + } + .page-sidebar { + width: 250px; + z-index: auto; + left: 0 !important; + + transform: translate3d(0, 0px, 0px) !important; + .sidebar-menu .menu-items > li ul.sub-menu > li { + padding: 0 30px 0 36px; + } + } + + .page-container { + padding-left: 0; + // z-index: 100; + position: relative; + transition: transform .25s ease; + + .page-content-wrapper .content { + overflow-x: hidden; + height: auto; // minimizes address bar on scroll + } + } + + .icon-thumbnail { + margin-right: 24px; + } + .page-sidebar { + display: none; + z-index: auto; + &.visible { + display: block; + } + .page-sidebar-inner { + z-index: 1; + left: 0 !important; + width: 260px; + .sidebar-slide { + .sidebar-menu { + overflow: scroll; + + top: 40px; + bottom: 0; + ul > li > a > .badge { + display: inline-block; + } + } + } + } + } + .secondary-sidebar { + float: none; + height: auto; + left: 50%; + margin-left: -125px; + padding: 20px; + position: absolute; + right: 0; + top: 60px; + z-index: 9999; + display: none; + border-radius: 10px; + .btn-compose { + display: none; + } + } + .horizontal-app-menu .secondary-sidebar { + display: inline-block; + position: relative; + top: inherit; + left: inherit; + right: inherit; + padding: 20px 0; + border-radius: 0; + float: left; + height: 100%; + } + .inner-content, .horizontal-app-menu .inner-content { + margin: 0; + } + .breadcrumb { + padding-left: 15px; + padding-right: 15px; + } + .copyright { + padding-left: 15px; + padding-right: 15px; + } + + // Pages Notification customizations + body > .pgn-wrapper[data-position="top"] { + top: $layout-mobile-header-height; + left: 0; + } + body > .pgn-wrapper[data-position="bottom"] { + left: 0; + } + + body > .pgn-wrapper[data-position$='-left'] { + left: 20px; + right: auto; + } + + .sm-table { + display: table; + width: 100%; + } + .user-profile-wrapper { + position: absolute; + right: 50px; + top: -9px; + } + + .container { + width: 100%; + } + + //Table Block + .table-responsive-block { + table, thead, tbody, th, td, tr { + display: block; + } + thead tr { + position: absolute; + top: -9999px; + left: -9999px; + + } + tr { + border: 1px solid rgba(230, 230, 230, 0.7); + margin-bottom: 15px; + } + td { + /* Behave like a "row" */ + border: none; + border-bottom: 1px solid #eee; + position: relative; + padding-left: 50%; + white-space: normal; + text-align: left; + &:last-child { + border-bottom: 0; + } + &:before { + /* Now like a table header */ + position: absolute; + /* Top/left values mimic padding */ + top: 6px; + left: 6px; + width: 45%; + padding-right: 10px; + white-space: nowrap; + text-align: left; + font-weight: bold; + } + &:before { + content: attr(data-title); + } + } + + } + .kill-pull-md-down { + position: relative; + display: block; + width: inherit; + .toggle-secondary-sidebar { + display: inline-block; + font-size: 18px; + } + } + + //set a min hieght for dropdown tabs + .nav-tabs-header.nav-tabs-linetriangle { + height: 61px; + } + + .overlay { + padding-left: 15px; + } +} + +/* Landscape view of all tablet devices */ +@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) { + .page-sidebar .sidebar-menu .menu-items ul { + + } + .page-container { + .page-content-wrapper { + .content { + padding-top: $layout-header-height; + } + } + } + body.box-layout > .container { + width: 100%; + } + .error-page { + .error-container { + width: auto; + } + } +} + +// Resolution specific borders +@media (max-width: 991px) { + .sm-b-r, + .sm-b-l, + .sm-b-t, + .sm-b-b { + border-width: 0; + } + .sm-b-r { + border-right-width: 1px; + } + .sm-b-l { + border-left-width: 1px; + } + .sm-b-t { + border-top-width: 1px; + } + .sm-b-b { + border-bottom-width: 1px; + } + .sidebar-menu { + .icon-thumbnail { + margin-right: 15px; + } + } +} + +// Make all columns equal height +// (Not applied for resolutions lowers than mentioned ex:lg,md,sm +// because they stack up) +@media (min-width: 1200px) { + .row-same-height { + overflow: hidden; + & > [class*="col-lg"] { + margin-bottom: -99999px; + padding-bottom: 99999px; + } + } +} + +@media (max-width: 1199px) and (min-width: 992px) { + //@TODO : Old Media Query current BS4 doesnt not allow this. + .visible-md { + display: block !important; + } +} + +@media (min-width: 992px) { + .row-same-height { + overflow: hidden; + & > [class*="col-md"] { + margin-bottom: -99999px; + padding-bottom: 99999px; + } + } +} + +@media (min-width: 768px) { + .row-same-height { + overflow: hidden; + & > [class*="col-sm"] { + margin-bottom: -99999px; + padding-bottom: 99999px; + } + } + .box-layout .container .jumbotron, .container-fluid .jumbotron { + padding: 0; + } + .d-flex-md-up { + display: flex; + } + + .navbar-toggle { + display: none; + } + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; + } + .dataTables_wrapper.form-inline .checkbox input[type=checkbox], .form-inline .radio input[type=radio] { + position: absolute; + } + .justify-end-md-up { + + justify-content: flex-end; + } +} + +@media (min-width: 700px) { + .dd { + float: none; + } +} + +/* Portrait view of all tablet devices */ +@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) { + + .page-sidebar .sidebar-menu .menu-items > li { + & > a { + padding-left: 27px; + } + ul.sub-menu > li { + padding: 0 27px 0 31px; + } + } + + .icon-thumbnail { + margin-right: 21px; + } + .error-page { + .error-container { + width: auto; + } + } +} + +//MD Screen +@media (max-width: 991px) and (min-width: 768px) { + //OLD BS classes Remove later + .visible-sm { + display: block; + } + .hidden-sm { + display: none; + } + .visible-sm-inline-block { + display: inline-block !important; + } + //New Screen Prefix padding and margin + @include generate-paddings-options-prefix("md", 3); + @include generate-paddings-options-prefix("md", 3); +} + +@media (max-width: 979px) { + .toggle-secondary-sidebar { + + font-size: 18px; + position: static; + display: block; + & ~ .brand { + display: none !important; + } + } + + .secondary-sidebar { + float: none; + height: auto; + left: 50%; + margin-left: -125px; + padding: 20px; + position: absolute; + right: 0; + top: $layout-header-height; + z-index: 9999; + display: none; + border-radius: 10px; + .btn-compose { + display: none; + } + } + + .split-view { + .split-list { + width: 100%; + height: auto; + bottom: 50px; + left: 0; + top: 0; + position: absolute; + z-index: 1000; + float: none; + .item { + padding: 8px; + .inline { + margin-left: 5px; + width: 188px; + } + } + } + + .split-details { + margin-left: 0; + width: 100%; + + .email-content-wrapper { + overflow: auto; + padding: 0; + height: calc(100% - 50px); + .email-content { + width: 90%; + } + } + } + + } + + .compose-wrapper { + display: block !important; + .btn-compose { + display: block !important; + } + } +} + +@media (max-width: 767px) { + + .header { + height: $layout-mobile-header-height; + .notification-list, .search-link { + display: none; + } + .header-inner { + height: $layout-mobile-header-height; + } + } + .header .user-info-wrapper { + display: none; + } + .header .search-link { + height: 19px; + width: 16px; + overflow: hidden; + } + + .jumbotron, .container-fluid { + padding-left: 0; + padding-right: 0; + + } + + .page-container .page-content-wrapper .content { + padding-top: $layout-mobile-header-height; + padding-bottom: 100px; + } + .page-sidebar .sidebar-header { + padding: 0 12px; + } + + .page-sidebar .sidebar-menu .menu-items > li { + & > a { + padding-left: 20px; + } + ul.sub-menu > li { + padding: 0 25px 0 28px; + } + } + + .icon-thumbnail { + margin-right: 20px; + } + + .sm-pull-bottom, .sm-pull-up { + position: relative !important; + } + + //Generate Margin and Paddings. + @include generate-paddings-options-prefix("sm", 10); + @include generate-paddings-options-prefix("sm", 10); + + .sm-no-margin { + margin: 0; + } + .sm-no-padding { + padding: 0; + } + .sm-text-right { + text-align: right !important; + } + .sm-text-left { + text-align: left !important; + } + .sm-text-center { + text-align: center !important; + } + .sm-pull-right { + float: right !important; + } + .sm-pull-left { + float: left !important; + } + .sm-pull-reset { + float: none !important; + } + .sm-block { + display: block; + } + + .error-container { + width: auto; + } + .sm-image-responsive-height { + width: 100%; + height: auto; + } + .email-composer { + padding-left: 30px; + padding-right: 30px; + } + + .sm-padding-10 { + padding: 10px !important; + } + + .lock-box { + align-items: flex-start; + height: auto; + } + .login-box { + padding-right: 15px; + padding-left: 15px; + } + + .visible-xs-inline-block { + display: inline-block !important; + } + + .nav-tabs-linetriangle { + &.nav-cust { + flex-direction: column; + } + li { + a.active:after, a.active:before { + display: none; + } + } + } + + //View Port Heights + .sm-vh-25 { + height: 25vh; + } + .sm-vh-50 { + height: 50vh; + } + .sm-vh-75 { + height: 75vh; + } + .sm-vh-100 { + height: 100vh; + } +} + +/*** Phones ***/ +@media (max-width: 480px) { + body { + width: 100%; + .header { + width: 100%; + height: $layout-mobile-header-height; + border-bottom: 1px solid rgba(0, 0, 0, .07); + .header-inner { + height: $layout-mobile-header-height; + text-align: center; + .toggle-email-sidebar { + font-size: 16px; + top: 12px; + } + .toggle-sidebar { + left: 14px; + } + .mark-email { + left: 35px; + top: 14px; + } + .quickview-link { + top: 14px; + } + + } + .notification-list, .search-link { + display: none; + } + + .dropdown-submenu { + top: 12px; + } + .notification-list, .search-link { + display: none; + } + + } + + #overlay-search { + font-size: 48px; + height: 118px; + line-height: 46px; + } + } + .page-sidebar .sidebar-header { + height: $layout-mobile-header-height; + line-height: $layout-mobile-header-height; + } + .panel { + .panel-heading { + padding-left: 15px; + } + .panel-body { + padding: 0 15px 15px; + } + } + .error-page { + padding: 15px; + .error-container { + margin-top: 30px; + width: auto; + } + .pull-bottom { + position: relative; + } + } + + .map-controls { + left: 10px; + } + .register-container { + height: auto !important; + } + .error-container-innner { + width: auto; + } +} + +/*** Retina Display Images **/ +@media only screen and (min-device-pixel-ratio: 2.0) { + .editor-icon { + background-image: url("#{$base-img-url}/editor_tray_2x.png"); + background-size: 480px 40px; + } + .alert .close { + background: transparent url("#{$base-img-url}/icons/noti-cross-2x.png") no-repeat scroll -9px -10px; + width: 10px; + height: 9px; + position: relative; + opacity: 0.8; + background-size: 114px 29px; + } + +} + +.hidden { + display: none; +} + +.visible-sm, .visible-xs { + display: none; +} + +@media (max-width: 767px) { + .visible-xs { + display: block; + } + .hidden-xs { + display: none; + } +} + + +.upload-box { + width: 250px; + /*margin: auto;*/ + position: relative; +} + +.file-container { + overflow: hidden; + position: relative; +} + +.file-container [type=file] { + cursor: inherit; + display: block; + filter: alpha(opacity=0); + min-height: 100%; + min-width: 100%; + opacity: 0; + position: absolute; + right: 0; + text-align: right; + top: 0; +} + +.file-container { + text-align: center; + border: 1px dashed #d9d9d9; + background: #f3f3f4; + /*border-radius: 10px;*/ + /* float: left; */ + padding: .5em; +} + +.file-container:hover { + border-color: #1AB394; +} + +.file-container [type=file] { + cursor: pointer; +} + +.upload-img { + margin: 0 !important; +} + +.upload-img img { + width: 100%; + border: 1px solid #d9d9d9; + border-top: none; + pointer-events: none; +} \ No newline at end of file diff --git a/resources/assets/sass/_var.scss b/resources/assets/sass/_var.scss new file mode 100644 index 00000000..6c0da668 --- /dev/null +++ b/resources/assets/sass/_var.scss @@ -0,0 +1,168 @@ +// Pages Default Theme +// -------------------------------------------------- +// Copyright Reserved Revox - 2014 +// -------------------------------------------------- + +$base-img-url: "../images" !default; +$assets-url: "../../assets" !default; + +// Global Color +// -------------------------------------------------- +// Base Grey Guided Color * change only $base-light +// -------------------------------------------------- + +//Base Grey Color +$color-master: #3a3a3a !default; + +// Lighter Grey colors +$color-master-light:mix($color-master, #fff, 16%) !default; +$color-master-lighter:mix($color-master, #fff, 9.5%) !default; +$color-master-lightest:mix($color-master, #fff, 3%) !default; + +// Darker Grey colors +$color-master-dark:mix($color-master, #000, 45%) !default; +$color-master-darker:mix($color-master, #000, 27%) !default; +$color-master-darkest:mix($color-master, #000, 18%) !default; + +$color-white: #fff !default; +$color-black: #000 !default; + +$color-success: #1ac86f !default; +$color-complete : #009add !default; +$color-primary: #00baa4 !default; +$color-warning: #ffca00 !default; +$color-danger: #ed5335 !default; +$color-info: #4d6286 !default; + +$base-font-family: wf_segoe-ui_light,wf_segoe-ui_normal,"Helvetica Neue", Helvetica, Arial, sans-serif !default; + +// Menu Vars +// -------------------------------------------------- +//Menu Animation Curve +$menu-bezier:.05, .74, .27, .99 !default; +$menu-icon-size:40px !default; +$color-menu :#2a2e35 !default; +$color-menu-dark :mix($color-menu, #000, 77%) !default; +$color-menu-darker :mix($color-menu, #000, 90%) !default; + +//Generating Menu font color +$menu-mix-temp : mix($color-menu, #fff, 92%) !default; +$menu :blend-hardlight($menu-mix-temp,#fff) !default; +$color-menu-light :$menu !default; +//Menu Font Color +$color-menu-link-hover:#fff !default; + +// Body +// -------------------------------------------------- +$body-background: $color-master-lightest !default; +$body-color: $color-master !default; +$body-font-family : $base-font-family !default; +$body-font-size : 13px !default; + +// Layout +// -------------------------------------------------- +$layout-header-height:60px !default; +$layout-mobile-header-height:48px !default; +$layout-mobile-logo-scale:0.8 !default; +$layout-sidepanel-width-collapsed : 70px !default; +$layout-sidepanel-width:280px !default; +$layout-sidepanel-pin-width:250px !default; +$layout-right-quickview-width: 285px !default; +$layout-user-profile-margin:25px !default; +$layout-container-fixed-lg: 1700px !default; + +$layout-gutter-sm : 5px !default; + +//Horizontal Dropdown +//--------------------------------------------------- +$navbar-width:45px; +$menu-padding:25px; + +$header-lg-height:75px; +$header-md-height:51px; +$header-sm-height:50px; + +// Panels +$panel-border-color: rgba(0, 0, 0, 0.07) !default; +$panel-padding: 20px !default; +$panel-heading-padding: $panel-padding $panel-padding 7px $panel-padding !default; +$panel-heading-min-height: 48px !default; +$panel-condensed-heading-padding: 13px 13px 0 13px !default; +$panel-condensed-body-padding: 13px !default; +$panel-condensed-heading-min-height: 48px !default; + +//Forms +$form-group-height: 54px !default; +$form-control-border-color: rgba($color-black, .07) !default; + +//Dashboard +$dashboard-background : #f5f5f5 !default; + +//Mixing Color varriable for creating both light and dark colors +$mix-percentage-dark: 81% !default; +$mix-percentage-darker: 60% !default; +$mix-percentage-light: 80% !default; +$mix-percentage-lighter: 20% !default; + +//Lighter colors +$color-success-light: mix($color-success, $color-white, $mix-percentage-light) !default; +$color-success-lighter: mix($color-success, $color-white, $mix-percentage-lighter) !default; + +$color-complete-light: mix($color-complete, $color-white, $mix-percentage-light) !default; +$color-complete-lighter: mix($color-complete, $color-white, $mix-percentage-lighter) !default; + +$color-primary-light: mix($color-primary, $color-white, $mix-percentage-light) !default; +$color-primary-lighter: mix($color-primary, $color-white, $mix-percentage-lighter) !default; + +$color-warning-light: mix($color-warning, $color-white, $mix-percentage-light) !default; +$color-warning-lighter: mix($color-warning, $color-white, $mix-percentage-lighter) !default; + +$color-danger-light: mix($color-danger, $color-white, $mix-percentage-light) !default; +$color-danger-lighter: mix($color-danger, $color-white, $mix-percentage-lighter) !default; + +$color-info-light: mix($color-info, $color-white, $mix-percentage-light) !default; +$color-info-lighter: mix($color-info, $color-white, $mix-percentage-lighter) !default; + +//Darker colors +$color-success-dark: mix($color-success, $color-black, $mix-percentage-dark) !default; +$color-success-darker: mix($color-success, $color-black, $mix-percentage-darker) !default; + +$color-complete-dark: mix($color-complete, $color-black, $mix-percentage-dark) !default; +$color-complete-darker: mix($color-complete, $color-black, $mix-percentage-darker) !default; + +$color-primary-dark: mix($color-primary, $color-black, $mix-percentage-dark) !default; +$color-primary-darker: mix($color-primary, $color-black, $mix-percentage-darker) !default; + +$color-warning-dark: mix($color-warning, $color-black, $mix-percentage-dark) !default; +$color-warning-darker: mix($color-warning, $color-black, $mix-percentage-darker) !default; + +$color-danger-dark: mix($color-danger, $color-black, $mix-percentage-dark) !default; +$color-danger-darker: mix($color-danger, $color-black, $mix-percentage-darker) !default; + +$color-info-dark: mix($color-info, $color-black, $mix-percentage-dark) !default; +$color-info-darker: mix($color-info, $color-black, $mix-percentage-darker) !default; + +// Email colors +// $sidebar-background-color : $color-menu-dark !default; +$_sidebar-background-color: blend-multiply($color-menu-light, $color-menu-light); +$sidebar-background-color : mix($_sidebar-background-color , #000, 80%); + +$secondary-sidebar-width : 250px; +// Components +// -------------------------------------------------- +//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start). + +//$padding-base-vertical: 6px !default; +$padding-base-horizontal: 17px !default; + +// $padding-lg-vertical: 28px !default; +$padding-lg-horizontal: 28px !default; + +// $padding-sm-vertical: 5px !default; +$padding-sm-horizontal: 16px !default; + +$padding-sm-vertical: 2px !default; +$padding-sm-horizontal: 16px !default; + +$padding-xs-vertical: 2px !default; +$padding-xs-horizontal: 9px !default; diff --git a/resources/assets/sass/main.scss b/resources/assets/sass/main.scss new file mode 100644 index 00000000..6c8a8703 --- /dev/null +++ b/resources/assets/sass/main.scss @@ -0,0 +1,40 @@ +/*------------------------------------------------------------------ +[Table of contents] + +1. Layouts +2. Cards +3. Typography +4. Buttons +5. Alerts +6. Notifications +7. Progress Indicators +8. Modals +9. Tabs & Accordians +10. Form Elements +11. Tables & Datatables +12. Lists +13. Misc +14. Login +15. Products +16. Pricing Table +17. Chat +18. Email +19. Drag & Drop +20. Animation +-------------------------------------------------------------------*/ +// Color functions +@import "color"; +// Import Vars +@import "var"; +// Mixins tools +@import "mixins"; +// Includes of Modules +@import "modules"; +// Responsive Util +@import "responsive"; + + + + + + diff --git a/resources/assets/sass/modules/_alerts.scss b/resources/assets/sass/modules/_alerts.scss new file mode 100644 index 00000000..aecd1a83 --- /dev/null +++ b/resources/assets/sass/modules/_alerts.scss @@ -0,0 +1,93 @@ + +/*------------------------------------------------------------------ +[7. Alerts] +*/ +.alert { + background-image: none; + box-shadow: none; + text-shadow: none; + padding: 9px 19px 9px 15px; + border-radius: 3px; + font-size: 13px; + border-width:0; + @include transition(all 0.2s linear 0s); + &.bordered{ + border-width: 1px; + } + .link { + color: #ce8f22; + font-weight: bold; + } + .alert-heading { + color: #ce8f22 !important; + margin-bottom: 5px; + font-weight: 600; + } + .btn-small { + position: relative; + top: -3.5px; + } + .button-set { + .btn { + position: relative; + top: 8px; + } + } + .close { + background: url("#{$base-img-url}/icons/noti-cross.png") no-repeat scroll 0 0 transparent; + background-position: -9px -10px; + width: 10px; + height: 9px; + position: relative; + opacity: 0.8; + top: 4.5px; + margin-left: 20px; + font-size: 0; + &:hover { + opacity: 1; + } + } + +} + +/* Alert : Color Options +------------------------------------ +*/ +.alert-danger, +.alert-error{ + background-color: $color-danger-lighter; + color: $color-danger-darker; + border-color: $color-danger-darker; + .close { + background-position: -95px -10px !important; + } +} +.alert-warning{ + background-color: $color-warning-lighter; + color: $color-warning-darker; + border-color: $color-warning-darker; +} +.alert-info{ + background-color: $color-complete-lighter; + color: $color-complete-darker; + border-color: $color-complete-darker; + .close { + background-position: -67px -10px !important; + } +} +.alert-success{ + background-color: $color-success-lighter; + color: $color-success-darker; + border-color: $color-success-darker; + .close { + background-position: -38px -10px !important; + } +} +.alert-default{ + background-color: #fff; + color: $color-master; + border-color: $color-master-light; + .close { + background-position: -67px -10px !important; + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_animation.scss b/resources/assets/sass/modules/_animation.scss new file mode 100644 index 00000000..ebcb576a --- /dev/null +++ b/resources/assets/sass/modules/_animation.scss @@ -0,0 +1,112 @@ +@include keyframe(slide-out-up) { + 0% { + transform: translate(0,0); + } + + 100% { + transform: translate(0,-300%); + } +} + +@include keyframe(slide-out-down) { + 0% { + transform: translate(0,0); + } + + 100% { + transform: translate(0,300%); + } +} + +@include keyframe(slide-out-left) { + 0% { + transform: translate(0,0); + } + + 100% { + transform: translate(-300%,0); + } +} + +@include keyframe(slide-out-right) { + 0% { + transform: translate(0,0); + } + + 100% { + transform: translate(300%,0); + } +} + +@include keyframe(slide-in-up) { + 0% { + transform: translate(0,-100%); + } + + 100% { + transform: translate(0,0); + } +} + +@include keyframe(slide-in-down) { + 0% { + transform: translate(0,100%); + } + + 100% { + transform: translate(0,0); + } +} + +@include keyframe(slide-in-left) { + 0% { + transform: translate(-100%,0); + } + + 100% { + transform: translate(0,0); + } +} + +@include keyframe(slide-in-right) { + 0% { + transform: translate(100%,0); + } + + 100% { + transform: translate(0,0); + } +} + +@include keyframe(fade-in) { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@include keyframe(fade-out) { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +@each $type in ('in', 'out') { + @each $direction in ('up', 'down', 'left', 'right') { + + .slide-#{$type}-#{$direction}{ + @include animation(slide-#{$type}-#{$direction}); + } + } +} + +@each $type in ('in', 'out') { + .fade-#{$type} { + @include animation(fade-#{$type} ease-in); + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_buttons.scss b/resources/assets/sass/modules/_buttons.scss new file mode 100644 index 00000000..e4c1e5b4 --- /dev/null +++ b/resources/assets/sass/modules/_buttons.scss @@ -0,0 +1,679 @@ +/*------------------------------------------------------------------ +[6. Buttons] +*/ + +/* +[Buttons Base Styles] +*/ + +// Mixins +// -------------------------------------------------- + +// Creates contextual buttons +@mixin button($text-color, $background-color, $border-color) { + &, + &:focus{ + color: $text-color; + background-color: $background-color; + border-color: $border-color; + } + + &.active, + &:active, + &.active:focus, + &:active:focus, + &:active:hover, + .show .dropdown-toggle#{&} { + background-color: mix($background-color, $color-black, $mix-percentage-dark) !important; + border-color: mix($background-color, $color-black, $mix-percentage-dark) !important; + color:$text-color; + } + &.hover, + &:hover, + .show .dropdown-toggle#{&} + { + background-color: mix($background-color, $color-white, $mix-percentage-light); + border-color: mix($background-color, $color-white, $mix-percentage-light); + color: $text-color; + } + &.active:hover{ + background: mix($background-color, #000, 86%) ; + border-color: mix($background-color, #000, 86%) ; + } + + &.disabled, + &[disabled], + fieldset[disabled] & { + &, + &:hover, + &:focus, + &:active, + &.active { + background-color: $background-color; + border-color: $border-color; + } + } + + .badge { + color: $background-color; + background-color: $text-color; + } +} +.btn { + font-family: Arial, sans-serif; + font-size: 14px; + font-weight: normal; + letter-spacing: 0.01em; + -webkit-font-smoothing:antialiased; + -webkit-text-size-adjust:100%; + -ms-text-size-adjust:100%; + -webkit-font-feature-settings: "kern" 1; + -moz-font-feature-settings: "kern" 1; + margin-bottom: 0; + border: 1px solid $color-master-lighter; + text-align: center; + vertical-align: middle; + cursor: pointer; + @include border-radius(3px); + background-image: none !important; + color: $color-master; + background-color: $color-white ; + text-shadow: none; + box-shadow: none; + line-height: 21px; + position: relative; + transition: color 0.1s linear 0s,background-color 0.1s linear 0s,opacity 0.2s linear 0s !important; + padding: 6px $padding-base-horizontal; + &:hover{ + background-color: #fafafa; + border: 1px solid fade-out($color-master,.73); + color: #333; + } + &.active{ + border-color: $color-master-light; + background: #fff; + color: #333; + } + &:focus, + &:active:focus, + &.active:focus { + outline: none !important; + outline-style: none; + color: #333; + } + .caret { + margin-left: 3px; + &.single { + margin-left: 0px; + } + } + &:hover, + &:focus, + &:active, + &.active, + &.disabled, + &[disabled] { + box-shadow: none; + } +} +// Fix for chrome's button outline on focus +button:focus{ + outline: none !important; +} +/* +Alternate buttons +-------------------------------------------------- +*/ + +.btn-primary { + @include button($color-white, $color-primary, $color-primary); +} +.btn-success { + @include button($color-white, $color-success, $color-success); +} +.btn-complete{ + @include button($color-white, $color-complete, $color-complete); +} +.btn-info { + @include button($color-white, $color-info, $color-info); +} +.btn-warning { + @include button($color-white, $color-warning, $color-warning); +} +.btn-danger { + @include button($color-white, $color-danger, $color-danger); +} + +.btn-outline-primary { + @include button($color-primary, transparent, $color-primary); + &:hover{ + @include button($color-white, $color-primary, $color-primary); + } +} +.btn-outline-success { + @include button($color-success, transparent, $color-success); + &:hover{ + @include button($color-white, $color-success, $color-success); + } +} +.btn-outline-complete{ + @include button($color-complete, transparent, $color-complete); + &:hover{ + @include button($color-white, $color-complete, $color-complete); + } +} +.btn-outline-info { + @include button($color-info, transparent, $color-info); + &:hover{ + @include button($color-white, $color-info, $color-info); + } +} +.btn-outline-warning { + @include button($color-warning, transparent, $color-warning); + &:hover{ + @include button($color-white, $color-warning, $color-warning); + } +} +.btn-outline-danger { + @include button($color-danger, transparent, $color-danger); + &:hover{ + @include button($color-white, $color-danger, $color-danger); + } +} +.btn-default, .btn-default:focus{ + color: #5e5e5e; + background-color: $color-white; + border-color: $color-master-lighter; +} +.btn-default { + &.active, &:active, &.active:focus, &:active:focus, &:active:hover{ + background-color: $color-master-lighter; + border-color: $color-master-light; + color:$color-master-dark; + } + &.hover, &:hover{ + background-color: $color-master-lightest; + border-color: fade-out($color-master,.73); + color: $color-master-darker; + } + &.active:hover{ + background: mix($color-white, #000, 94%) ; + } +} + +// Link button +.btn-link{ + color: #5e5e5e; + background-color: transparent; + border: none; + &:hover, &:focus, &:active, &.active, &.disabled, &[disabled] { + background-color: transparent; + border: none; + text-decoration: none; + outline: none; + } +} +//File Input Btn +.btn-file { + position: relative; + overflow: hidden; +} +.btn-file input[type=file] { + position: absolute; + top: 0; + right: 0; + min-width: 100%; + min-height: 100%; + font-size: 100px; + text-align: right; + filter: alpha(opacity=0); + opacity: 0; + background: red; + cursor: inherit; + display: block; +} +/* +Button Sizes +-------------------------------------------------- +*/ + +.btn-lg, .btn-group-lg > .btn{ + padding-left: $padding-lg-horizontal; + padding-right: $padding-lg-horizontal; + line-height: 22px; + padding-top: 10px; + padding-bottom: 10px; +} +.btn-sm, .btn-group-sm > .btn{ + padding-left: $padding-sm-horizontal; + padding-right: $padding-sm-horizontal; + font-size: 11.9px; + line-height: 20px; +} +.btn-xs, .btn-group-xs > .btn{ + padding: $padding-xs-vertical $padding-xs-horizontal; + font-size: 10.5px; +} +.btn-cons { + margin-right: 5px; + min-width: 120px; +} + +/* +Rounded buttons +-------------------------------------------------- +*/ +.btn-rounded{ + border-radius: 100px !important; +} + +/* + Dropdown menus +-------------------------------------------------- +*/ +.show{ + .btn-group#{&} .dropdown-toggle, + & .dropdown-toggle, + &.dropdown-default .dropdown-toggle{ + box-shadow: none; + } + +} + +/* Pages default dropdown */ +.dropdown-default{ + display: inline-block; + &.toggle-only{ + padding-left: 9px; + padding-right: 9px; + &:after{ + position: initial; + } + } + &.show{ + & > .btn { + &.dropdown-toggle { + border-color: transparent !important; + background: transparent !important; + z-index: $zIndex-navbar - 9 !important; + } + } + .dropdown-menu { + opacity: 1; + transform: scale(1, 1); + z-index: $zIndex-dropdown; + .dropdown-item { + visibility: visible; + } + } + &.dropup { + & > .btn-primary + .dropdown-menu:after, + & > .btn-success + .dropdown-menu:after, + & > .btn-complete + .dropdown-menu:after, + & > .btn-warning + .dropdown-menu:after, + & > .btn-danger + .dropdown-menu:after, + & > .btn-info + .dropdown-menu:after{ + top: auto; + bottom: 0; + } + } + & > .btn-primary + .dropdown-menu:after, + & > .btn-success + .dropdown-menu:after, + & > .btn-complete + .dropdown-menu:after, + & > .btn-warning + .dropdown-menu:after, + & > .btn-danger + .dropdown-menu:after, + & > .btn-info + .dropdown-menu:after{ + top:0; + height: 42px; + } + & > .btn-primary + .dropdown-menu:after{ + background-color: $color-primary; + } + & > .btn-success + .dropdown-menu:after{ + background-color: $color-success; + } + & > .btn-complete + .dropdown-menu:after{ + background-color: $color-complete; + } + & > .btn-warning + .dropdown-menu:after{ + background-color: $color-warning; + } + & > .btn-danger + .dropdown-menu:after{ + background-color: $color-danger; + } + & > .btn-info + .dropdown-menu:after{ + background-color: $color-info; + } + } + + + &.dropup { + .btn.dropdown-toggle{ + &.btn-lg{ + & + .dropdown-menu{ + margin-bottom: -47px; + padding-bottom: 49px; + &:after{ + bottom: 49px; + } + } + } + &.btn-sm{ + & + .dropdown-menu{ + margin-bottom: -34px; + padding-bottom: 36px; + &:after{ + bottom: 36px; + } + } + } + &.btn-xs{ + & + .dropdown-menu{ + margin-bottom: -29px; + padding-bottom: 31px; + &:after{ + bottom: 31px; + } + } + } + } + .dropdown-menu{ + margin-bottom: -40px; + padding: 0 3px 44px 0 !important; + transform-origin: center bottom 0; + &:after{ + bottom: 43px; + top: auto !important; + } + } + } + .btn.dropdown-toggle{ + text-align: left; + padding-right: $padding-base-horizontal + 10px; + &.btn-lg{ + padding-right: $padding-lg-horizontal + 14px; + &:after{ + right: 26px; + } + & + .dropdown-menu{ + margin-top: -47px; + padding-top: 49px; + &:after{ + top: 49px; + } + } + } + &.btn-sm{ + padding-right: $padding-sm-horizontal + 10px; + &:after{ + right: 16px; + } + & + .dropdown-menu{ + margin-top: -34px; + padding-top: 36px; + &:after{ + top: 36px; + } + } + } + &.btn-xs{ + padding-right: $padding-xs-horizontal + 12px; + &:after{ + right: 8px; + } + & + .dropdown-menu{ + margin-top: -29px; + padding-top: 31px; + &:after{ + top: 31px; + } + } + } + &:after{ + position: absolute; + right: 15px; + top:50%; + margin-top: -2px; + } + } + .btn-rounded{ + padding-left: 17px; + padding-right: 17px; + } + .btn-rounded + .dropdown-menu{ + border-radius: 17px; + } + .dropdown-menu { + margin-top: -40px; + padding-top: 42px; + overflow: hidden; + backface-visibility: hidden; + display: block; + opacity: 0; + transform: scale(1, 0); + transform-origin: center top 0; + @include transition(all 170ms cubic-bezier(.05, .74, .27, .99) 0s); + z-index: -1; + &:after{ + content: ""; + position: absolute; + height: 1px; + left: 0; + top: 42px; + background: $color-master-light; + width: 100%; + } + .dropdown-item { + visibility: hidden; + } + } +} + +.dropdown-toggle{ + &:after{ + position: absolute; + right: 15px; + top: 50%; + margin-top: -2px; + } +} + +.dropdown-menu { + position: absolute; + display: none; + float: left; + list-style: none; + text-shadow: none; + @include box-shadow(0px 0px 5px fade-out($color-master, .8)); + border: none; + border-radius: 3px; + font-size: 13px; + margin: 0; + background:$color-master-lightest; + min-width: 50px; + z-index: $zIndex-dropdown !important; + .divider { + background-color: $color-master-light; + height: 1px; + margin: 3px 0; + border-bottom: 0px; + } + & > .dropdown-item { + padding-left: 0px; + line-height: 35px; + color: $color-master; + padding: 0 20px; + border-radius: 3px; + display: block; + clear: both; + white-space: nowrap; + text-align:left; + &:hover, &:focus{ + color: $color-master-darker; + text-decoration: none; + } + &:first-child{ + padding-top: 9px; + } + &:last-child{ + padding-bottom: 9px; + } + &.dropdown-header{ + padding: 3px 20px; + } + &.active { + &, + &:hover, + &:focus{ + color: $color-master-darker; + text-decoration: none; + background-color: $color-master-lighter; + } + } + &.disabled { + &, + &:hover, + &:focus{ + color: lighten($color-master, 20%); + } + &:hover, &:focus{ + text-decoration: none; + cursor: default; + } + } + } +} + +.dropdown-backdrop{ + z-index: $zIndex-dropdownMask; +} +/* +Animated buttons +-------------------------------------------------- +*/ + +.btn-animated{ + overflow: hidden; + @include backface-visibility(hidden); + @include transform-style(preserve-3d); + & > span { + display: inline-block; + width: 100%; + height: 100%; + @include backface-visibility(hidden); + @include transition(all 0.2s ease-in-out); + @include transform-style(preserve-3d); + } + &:before { + position: absolute; + height: 100%; + width: 100%; + font-size: 100%; + line-height: 2.5; + @include transition(all 0.2s ease-in-out); + } + &:after{ + content: ''; + position: absolute; + z-index: -1; + @include transition(all 0.2s ease-in-out); + } + &.from-top{ + &:before{ + left: 0; + top: -100%; + } + &:hover, &.show-icon{ + &:before{ + top: 0; + } + & > span{ + @include translateY(300%); + } + } + } + &.from-left{ + &:before{ + left: -100%; + top: 0; + } + &:hover, &.show-icon{ + &:before{ + left: 0; + } + & > span{ + @include translateX(200%); + } + } + } + &.fa{ + &:before { + font-family: FontAwesome; + } + } + &.pg{ + &:before { + font-family: "pages-icon"; + } + } +} + +/* +Tag buttons +-------------------------------------------------- +*/ + +.btn-tag{ + line-height: 17px; + border-radius: 17px 3px 3px 17px; + padding: 5px 19px; + &:hover, &.hover{ + border-color:transparent; + } + &.btn-tag-light{ + background: #fafdff; + color: #5b8ca5; + border:1px solid #cbe4f0; + &:hover{ + background: #fff; + } + } + &.btn-tag-dark{ + background: $color-master-light; + color:$color-master; + &:hover{ + background: lighten($color-master-light, 2%); + } + } + &.btn-tag-rounded{ + border-radius: 17px; + } +} + +/* +Misc buttons +-------------------------------------------------- +*/ +.btn-toolbar .btn{ + padding-left:14px; + padding-right: 14px; +} + +.pager .disabled{ + > button, + > button:hover, + > button:focus, + > span{ + cursor: not-allowed; + opacity: .5; + } +} + +.modal-content{ + a.btn-primary:not([href]):not([tabindex]){ + color: #fff; + &:hover, &:focus { + color: #fff; + } + } +} diff --git a/resources/assets/sass/modules/_calendar.scss b/resources/assets/sass/modules/_calendar.scss new file mode 100644 index 00000000..e2cf1da5 --- /dev/null +++ b/resources/assets/sass/modules/_calendar.scss @@ -0,0 +1,719 @@ +/*------------------------------------------------------------------ +[21. Calendar App] +*/ + +$cell-height : 80; +body.overflow-hidden{ + overflow: hidden; +} + +/* +Calendar +-------------------------------------------------- +Header / .calendar-header +Years / .years .year +Months / .months +Weeks / .weeks-wrapper .week +Grid / .calendar-container +Events / .event-container +*/ +.calendar{ + height: 100%; + .drager{ + overflow: hidden; + .scroll-element{ + display: none; + } + } + &.month{ + padding-left:5px; + .options .date{ + margin-bottom: 22px; + } + .week-dragger{ + display: none; + } + .calendar-container{ + border-top: 1px solid $color-master-light; + padding-top: 0; + height:calc(100% - 169px); + .view .tble{ + width: 100%; + .thead .tcell .weekday{ + margin-left: 10px; + } + } + } + } + .calendar-header{ + height: 43px; + background-color:$color-master-lightest; + line-height: 43px; + padding-left:60px; + & > .drager{ + width:calc(100% - 141px); + border-right:1px solid rgba(0, 0, 0, 0.33); + line-height: 35px; + } + .years{ + width: auto; + list-style: none; + white-space: nowrap; + margin-top: 5px; + .year{ + display: inline-block; + width: 69px; + text-align: center; + white-space: nowrap; + font-family: "Segoe UI","Helvetica Neue", Helvetica, Arial, sans-serif; + & > a{ + color: rgba(0, 0, 0, 0.5); + position: relative; + &.active{ + color: #000; + } + &.has-event{ + &:before{ + position: absolute; + content: '\25CF'; + width: 100%; + font-size: 8px; + line-height: 6px; + text-align: center; + color: rgba(0, 0, 0, 0.44); + } + } + } + } + } + } + .options{ + padding-left:60px; + margin-top: 15px; + .months{ + width: auto; + white-space: nowrap; + height: 43px; + line-height: 43px; + .month{ + min-width: 30px; + max-width: 100px; + padding: 0 10px; + display: inline-block; + & > a{ + position: relative; + color: rgba(0, 0, 0, 0.28); + &:hover{ + color: rgba(0, 0, 0, 0.33); + } + &.active{ + color: rgba(0, 0, 0, 1); + } + &.has-event{ + &:before{ + position: absolute; + content: '\25CF'; + top: -6px; + width: 100%; + font-size: 8px; + line-height: 6px; + text-align: center; + color: rgba(0, 0, 0, 0.33); + } + } + } + } + } + .date{ + margin-bottom: 20px; + } + } + .week-dragger{ + border-bottom: 1px solid #e6e6e6; + margin-left:-20px; + } + .weeks-wrapper{ + width: auto; + white-space: nowrap; + padding-left:10px; + padding-bottom: 12px; + margin-bottom: 5px; + margin-left: 20px; + .week{ + display: inline-block; + position: relative; + padding-left:30px; + padding-right:30px; + &:first-child{ + padding-left:4px; + } + &:last-child{ + padding-left:0px; + } + &:before{ + content: ''; + position: absolute; + right:-20px; + bottom: 6px; + height: 20px; + width: 20px; + border-left:1px dotted rgba(0, 0, 0, 0.3); + } + &.active{ + .day-wrapper .week-date{ + .day{ + & > a{ + color: rgba(0, 0, 0, 0.6); + } + } + + } + } + .day-wrapper{ + display: inline-block; + .week-date{ + text-align: center; + width: 21px; + height: 21px; + margin: 6px; + border-radius:99px; + &.current-date{ + background-color: $color-master-light; + } + &.active{ + background-color: $color-success; + .day > a{ + font-weight: bold; + opacity: 1; + color: #fff; + } + } + .day > a{ + letter-spacing: -0.01em; + } + } + .week-day{ + text-align: center; + } + .day{ + display: inline-block; + text-align: center; + position: relative; + z-index: 10; + padding: 1px 0; + font-size: 12px; + color: rgba(0, 0, 0, 0.3); + & > a{ + position: relative; + width: 100%; + display: block; + text-align: center; + color: rgba(0, 0, 0, 0.3); + opacity: 0.7; + font-weight: 600; + &.has-event{ + &:before{ + position: absolute; + content: '\25CF'; + top: -10px; + width: 100%; + font-size: 8px; + line-height: 6px; + text-align: center; + color:$color-success; + } + } + } + + &.week-header{ + text-transform: uppercase; + text-align: center; + font-size: 10px; + letter-spacing: 0.06em; + font-size: 10.5px; + } + } + } + } + } + .calendar-container{ + position: relative; + height: calc(100% - 200px); + padding-top: 10px; + .view{ + &.month-view{ + .tble .trow .tcell{ + position: relative; + height: 20%; + clear: both; + .cell-inner{ + .holder{ + position: absolute; + top: 37px; + left: 0; + right: 0; + bottom: 0; + } + } + &.active{ + background: #fff; + .cell-inner{ + background-color: #fef8e7; + } + } + &.not{ + background-color: $color-master-lightest; + } + &.drop-target{ + .cell-inner{ + background-color: $color-master-lightest; + } + } + .cell-inner:only-child, .cell-inner{ + height: 100%; + border-bottom: 1px solid $color-master-light; + position: relative; + } + .month-date{ + position: relative; + text-align: center; + margin-top: 10px; + margin-right: 6px; + width: 25px; + height: 25px; + padding-top: 2px; + margin: 6px; + float: right; + display: block; + z-index:1; + border-radius:99px; + &.current-date{ + background-color: $color-master-light; + } + &.active{ + background-color: $color-success; + font-weight: bold; + opacity: 1; + color: #fff; + } + } + .event-container{ + height: 30px; + position: relative !important; + min-height: 30px !important; + .event-inner{ + padding: 8px; + } + } + } + .ghost-element{ + height: 30px; + position: relative; + width: 100%; + } + .grid .tble{ + height: 100%; + width: 100%; + } + .event-container .event-title{ + font-size: 12px; + } + } + &.day-view .tble{ + white-space: nowrap; + .thead{ + white-space: nowrap; + overflow: hidden; + display: inline-block; + } + .tcell{ + display: none; + max-width: 100%; + width: 100%; + &.active{ + display: inline-block; + } + } + .trow{ + display: block; + height: 80px; + .tcell.active{ + background-color:#fff; + } + } + } + width: 100%; + height: 100%; + white-space: nowrap; + -moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none; + //DEFAULT WEEKVIEW WITH 30 min Slot + .tble{ + display: inline-table; + width: calc(100% - 50px); + vertical-align: top; + position: relative; + .thead{ + display: table-row; + width: 100%; + background: #fff; + .tcell{ + padding: 10px; + height: $cell-height/2 * 1px; + position: relative; + .weekday{ + font-size: 12px; + display: inline-block; + color: rgba(0, 0, 0, 0.51); + } + .weekdate{ + font-size: 14px; + display: inline-block; + margin-right:10px; + color: rgba(0, 0, 0, 0.77); + } + &.active{ + .weekdate, .weekday{ + color:rgba(0, 0, 0, 1); + } + } + &:before{ + content: ''; + border-bottom: 1px solid $color-master-light; + width: calc(100% - 18px); + position: absolute; + bottom: 0; + } + .event-bubble{ + display: inline-block; + width: 8px; + height: 8px; + margin-left:5px; + float:right; + border-radius:30px; + } + } + } + .tcell{ + display: table-cell; + height: $cell-height * 1px; + max-width: 14.2857%; + width: 14.2857%; + } + .trow{ + display:table-row; + .tcell{ + background: #fff; + padding: 0 10px; + .cell-inner{ + height: $cell-height/2 * 1px; + position: relative; + &:first-child{ + border-bottom: 1px dotted $color-master-light; + } + &:last-child{ + border-bottom: 1px solid $color-master-light; + } + &:only-child{ + height: 40px; + border-bottom: 0; + } + } + &.active{ + background-color: #fef8e7; + & > *{ + border-color: rgba(0, 0, 0, 0.1) !important; + } + } + &.disable{ + background-color: $color-master-lightest; + } + } + } + .loading{ + left: 10px; + } + } + } + .loading{ + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(255, 255, 255, 0.5); + z-index: 100; + } + .pgn-wrapper{ + position: absolute; + } + .even-holder{ + position: absolute; + display: table; + width: calc(100% - 50px); + height: calc(100% - 25px); + .event-placeholder{ + height: 100%; + width: 14.2857%; + display: table-cell; + } + } + .event-container{ + width: 100%; + height: 40px; + position: absolute !important; + z-index: 10; + overflow: hidden; + margin-bottom: 5px; + min-height: 40px !important; + transition:width .16s ease; + .event-inner{ + padding: 15px; + &:before{ + position: absolute; + width: 8px; + height: 8px; + content: ''; + background-color: rgba(255, 255, 255,0.8); + border-radius: 999px; + right:14px; + top: 11px; + } + } + .time-wrap{ + line-height: 12px; + text-align:left; + color: rgba(0, 0, 0, 0.77); + overflow: hidden; + text-overflow: ellipsis; + } + .event-start-time, .event-end-time{ + font-size: 12px; + color: rgba(0, 0, 0, 0.44); + } + .event-title{ + font-size: 14px; + line-height: 15px; + margin-bottom: 8px; + overflow: hidden; + text-overflow: ellipsis; + } + .resizable-handle{ + position: absolute; + opacity: 1; + z-index: 3; + left: 0; + right: 0; + bottom: 0; + height: 8px; + overflow: hidden; + line-height: 8px; + font-size: 11px; + font-family: monospace; + text-align: center; + cursor: s-resize; + &:after { + content: "="; + color: rgba(0, 0, 0, 0.44); + } + } + &.dragging{ + z-index: 100; + } + } + .grid{ + display: block; + overflow: scroll; + height: calc(100% - 40px); + -webkit-overflow-scrolling: touch; + //Time Slots + &.slot-60{ + .tble .trow .tcell .cell-inner{ + height: $cell-height * 1px; + border-bottom: 1px solid $color-master-light; + } + } + &.slot-15{ + .tble .trow .tcell { + height: 100/4 * 1px; + .cell-inner{ + height: 100/4 * 1px; + border-bottom: 1px dotted $color-master-light; + &:last-child{ + border-bottom: 1px solid $color-master-light; + } + } + } + .time-slot-wrapper .time-slot{ + height: 100px; + } + } + } + .allday-cell{ + height: $cell-height/2 * 1px; + display: inline-block; + width: 50px; + float:left; + } + } + .time-slot-wrapper{ + display: inline-block; + width: 50px; + float:left; + height: 100%; + .time-slot{ + display: block; + height: $cell-height*1px; + width: 100%; + background: #fff; + &:first-child{ + span{ + display: none; + } + } + & > span{ + float:right; + font-size: 12px; + position: relative; + top: -15%; + color: rgba(0, 0, 0, 0.46); + font-weight: bold; + font-size: 11px; + letter-spacing: 0.06em; + font-size: 10.5px; + font-family: 'Montserrat'; + right:5px; + } + } + } + +} +.calendar-event{ + width: 330px; + right:-330px; + .scrollable{ + height: 100%; + } +} +.date-selector{ + cursor: pointer; +} + +/* +Responsive Util +*/ +@media (max-width: 991px) { +.calendar{ + background-color: #fff; + .calendar-header{ + display: none; + } + .options{ + margin-top:0; + padding-left:10px; + .months{ + line-height: 21px; + padding-top: 14px; + } + .date{ + margin-bottom: 10px; + } + } + .calendar-container { + height:100%; + .view.week-view .tble{ + white-space: nowrap; + .thead{ + white-space: nowrap; + overflow: hidden; + display: inline-block; + } + .tcell{ + display: none; + max-width: 100%; + width: 100%; + &.active{ + display: inline-block; + background-color:#fff; + } + } + .trow{ + display: block; + height: 80px; + } + } + .view.month-view { + .allday-cell{ + display: none; + } + .grid .tble{ + padding-left: 0; + } + .tble { + .thead .tcell{ + padding: 3px; + padding-top: 10px; + } + .trow .tcell{ + padding: 0 6px; + } + } + .tble .trow .tcell .event-container{ + @include border-radius(99px); + position: absolute !important; + height: 16px !important; + width: 16px !important; + min-height: 16px !important; + margin: 0 auto; + left: 0; + right: 0; + .event-inner{ + display: none; + } + } + } + &.month{ + height: calc(100% - 101px); + } + } + .weeks-wrapper{ + margin-bottom: 0; + } + &.month{ + padding-left:0; + .calendar-container{ + height: calc(100% - 108px); + } + } +} +.calendar-event{ + width: 240px; + right:-240px; +} +.months-drager{ + margin-left:16px; + margin-right:36px; + border-right:1px solid $color-master-light; + padding-top: 0; +} +.horizontal-app-menu { + .months-drager{ + margin-left:0; + margin-right:0; + width: 100%; + } +} +} +@media (max-width: 640px) { + .calendar.month .calendar-container .view .tble .thead .tcell { + text-align: center; + &:before{ + width: 100%; + } + .weekday{ + width: 11px; + overflow: hidden; + letter-spacing: 4px; + font-weight: bold; + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_cards.scss b/resources/assets/sass/modules/_cards.scss new file mode 100644 index 00000000..7ff21749 --- /dev/null +++ b/resources/assets/sass/modules/_cards.scss @@ -0,0 +1,410 @@ +/*------------------------------------------------------------------ +[4. Cards] +*/ + +.card{ + @include box-shadow(none); + @include border-radius(1px); + @include transition(all .2s ease); + position: relative; + background-color: #fff; + margin-bottom: 20px; + width: 100%; + .card-header{ + background: transparent; + border-radius:0px; + border-bottom:0px; + padding: $panel-heading-padding; + position: relative; + z-index: 3; + min-height: 48px; + &.separator:after { + content:""; + height:1px; + background:rgba(0,0,0,0.08); + left:16px; + right:16px; + position:absolute; + bottom:0; + } + & + .card-block{ + padding-top: 0; + } + .card-title{ + text-transform: uppercase; + display: inline-block; + letter-spacing: 0.06em; + font-size: 12px; + font-weight: 500; + margin: 0; + padding: 0; + line-height: normal; + overflow: hidden; + text-overflow: ellipsis; + -webkit-text-stroke:0px; + filter: alpha(opacity=40); + @include transition(opacity .3s ease); + & + .card-block{ + + } + } + .card-controls{ + float: right; + margin-top: -3px; + ul{ + margin: 0; + padding: 0; + li{ + display: inline-block; + list-style: none; + line-height: 0; + } + } + &:after{ + content:""; + display:table; + clear:both; + } + } + &.card-header-hover{ + .card-title{ + opacity: .4; + } + &:hover{ + .card-title{ + opacity: 1; + } + } + } + } + &.card-default{ + border:1px solid $panel-border-color; + //Used for colored panels + & >.card-header{ + color: #333; + } + } + &.card-bordered{ + border:1px solid fade-out($color-master-light, .3); + } + &.card-borderless{ + border:none; + } + &.card-condensed{ + .card-header{ + padding: $panel-condensed-heading-padding; + min-height: 30px; + .card-title{ + opacity: .4; + } + } + .card-block{ + padding: $panel-condensed-body-padding; + } + } + &.card-hover{ + .card-header .card-title{ + opacity: .4; + } + &:hover{ + .card-header .card-title{ + opacity: 1; + } + } + } + &.card-transparent{ + background: transparent; + border:none; + @include box-shadow(none); + .card-block{ + background: transparent; + } + } + &.full-height{ + height: 100%; + .card-block{ + height: auto; + width: 100%; + height: 100%; + } + } + &.card-featured { + @include box-shadow(-1px 1px 3px 0px rgba(121, 129, 135, 0.14)); + width: calc(100% - 50px); + float: right; + .card-title { + h4 { + font-family: 'Montserrat'; + font-size: 16px; + text-transform: uppercase; + color: $color-master-lighter; + + } + } + .card-block { + h3 { + line-height: 34px; + font-size: 26px; + } + } + .footer { + .username { + line-height: 8px; + padding-top: 10px; + font-size: 16px; + } + .buttons { + li { + display: inline; + list-style: none; + font-weight: bold; + margin-left: 20px; + &:first-child { + margin-left: 0; + } + } + .heart { + color: $color-danger; + + } + .comment { + color: $color-master; + } + } + } + .ribbon { + width: 38px; + height: 38px; + margin-left: -39px; + float: left; + @include box-shadow( inset -3px 0px 3px 0px rgba(0,0,0,0.14) ); + &.green { + background: $color-complete; + + } + &.blue { + background: $color-success; + + } + } + } + &.hover-fill:hover{ + background:$color-master-lighter; + } + &.hover-stroke{ + &:hover{ + border:1px solid $color-master-light; + } + } + .card-block{ + padding: $panel-padding; + //overflow-y: auto; + &.no-padding{ + .row{ + margin-left: 0; + margin-right: 0; + } + } + &.no-bottom-padding{ + padding-bottom: 0; + } + &.no-top-padding{ + padding-top: 0; + } + .title{ + margin-top:0px; + } + &.scrollable{ + margin-bottom: $panel-padding; + } + } +} + + +/* Portlets +------------------------------------ +*/ +.card-progress{ + background: rgba(255,255,255,.8); + bottom: 0; + left: 0; + position: absolute !important; + right: 0; + top: 0; + display: none; + z-index: 2; +} +.card-progress > .progress, +.card-progress > .progress.progress-small{ + height: 3px; +} +.card-progress > .progress-circle-indeterminate, +.card-progress > .card-bar-indeterminate{ + display: block; + left: 50%; + margin-left: -17px; + margin-top: -17px; + position: absolute; + top: 50%; +} +.card-progress > .progress-circle-indeterminate{ + width: 35px; + height: 35px; +} +.card-maximized{ + position: fixed !important; + left: $layout-sidepanel-width-collapsed; + top: $layout-header-height - 1px; + bottom: 0; + right: 0; + z-index: $zIndex-portlet; + margin: 0; +} + +/* Pages notification holder */ +.card .pgn-wrapper{ + position: absolute; + z-index: $zIndex-portlet + 2; +} + +.card-header a:not(.btn){ + color: $color-master !important; + opacity: .4; + &.card-refresh{ + @include transition(opacity .3s ease); + &.refreshing{ + opacity: 1; + } + + } +} +.card-header { + .dropdown-menu { + margin-top: 5px; + .dropdown-item{ + padding: 0 20px !important; + &:hover{ + opacity: 1; + background-color: transparent; + } + } + } + a[data-toggle]:hover{ + opacity: 1; + } +} + + +.card-icon{ + -moz-osx-font-smoothing: grayscale; + font-family: "pages-icon"; + font-style: normal; + font-variant: normal; + font-weight: normal; + line-height: 1; + text-transform: none; +} +.card-icon-close:before{ + content: "\e60a"; +} +.card-icon-maximize:before{ + content: "\e634"; +} +.card-icon-refresh:before{ + content: "\e600"; +} +.card-icon-collapse:before{ + content: "\e62c"; +} + +.card-icon-settings:before{ + content: "\e655"; +} +.card-icon-refresh-lg-master, +.card-icon-refresh-lg-white{ + width: 15px; + height: 15px; + display: block; + background-size: cover; + @include transition(opacity .3s ease); + &.fade{ + opacity: 0.1; + } +} +.card-icon-refresh-lg-master{ + background-image:url('#{$base-img-url}/progress/progress-circle-lg-master-static.svg'); +} + +.card-icon-refresh-lg-white{ + background-image:url('#{$base-img-url}/progress/progress-circle-lg-white-static.svg'); +} + +.card-icon-refresh-lg-master-animated, +.card-icon-refresh-lg-white-animated{ + width: 15px; + height: 15px; + display: block; + background-size: cover; + opacity: 0; + @include transition(opacity .3s ease); + &.active{ + opacity: 1 + } +} +.card-icon-refresh-lg-master-animated{ + background-image:url('#{$base-img-url}/progress/progress-circle-lg-master.svg'); +} +.card-icon-refresh-lg-white-animated{ + background-image:url('#{$base-img-url}/progress/progress-circle-lg-white.svg'); +} + + +/* For demo purpose only */ +.card-scroll{ + height: 100px; +} +.sortable .card-header { + cursor: move; +} +/* To prevent lag while dragging */ +.ui-sortable-handle{ + transition: max-height 0.3s ease 0s; +} +.sortable .grid .grid-title { + cursor: move; +} +.ui-sortable { + min-height: 0px !important; +} +.ui-sortable-placeholder { + border: 1px dotted black; + visibility: visible !important; + height: 100% !important; + * { + visibility: hidden; + } +} +.sortable-box-placeholder { + background-color: $color-master-lighter; + border: 1px dashed $color-master-light; + display: block; + margin-top: 0px !important; + margin-bottom: 24px !important; + * { + visibility: hidden; + } +} +.sortable .card{ + transition: none; +} +.sortable-column{ + padding-bottom: 100px; +} +.demo-card-scrollable{ + height:158px +} + + +.card-block { + padding: 15px; +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_charts.scss b/resources/assets/sass/modules/_charts.scss new file mode 100644 index 00000000..efe7c803 --- /dev/null +++ b/resources/assets/sass/modules/_charts.scss @@ -0,0 +1,367 @@ +/*------------------------------------------------------------------ +[17. Charts] +*/ +.line-chart{ + .nvd3 line.nv-guideline{ + /* Vertical bar on hover in interactive chart */ + stroke-width:30px; + stroke-opacity:.04; + stroke : #000; + } + + .nvd3 .nv-groups path.nv-area{ + /* filled area */ + fill-opacity : .1; + } + .nvd3 .nv-groups path.nv-line{ + /* Line */ + stroke-opacity:.3; + } + .nvd3 .nv-axis line{ + /* grid lines */ + stroke-opacity: .5; + } + + &[data-x-grid="false"]{ + .nv-x .tick line { + display: none; + } + } + &[data-y-grid="false"]{ + .nv-y .tick line { + display: none; + } + } + .domain{ + /* domain */ + opacity: 0; + } + + &[data-points="true"]{ + .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { + /* Toggle points */ + fill-opacity: 1; + stroke-opacity: .5; + } + } + + .nvtooltip table td.legend-color-guide div{ + border-radius: 100px; + } + thead .nv-pointer-events-none strong{ + color: lighten($color-master,30%); + } + .nv-pointer-events-none{ + + font-size: 12px; + + .value.nv-pointer-events-none{ + font-weight: normal; + font-size: 11px; + color: lighten($color-master,30%); + } + } + .nvtooltip table{ + margin: 12px 10px 14px 15px; + } + .nvtooltip.xy-tooltip.nv-pointer-events-none{ + border-color : rgba(0, 0, 0, 0.12); + box-shadow: 0 0 6px rgba(0, 0, 0, 0.1); + } + + &[data-stroke-width="1"]{ + .nvd3 .nv-groups path.nv-line{ + /* Line widths */ + stroke-width:1px; + } + .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{ + /* Line widths */ + stroke-width:2px; + } + } + &[data-stroke-width="2"]{ + .nvd3 .nv-groups path.nv-line{ + stroke-width:2px; + } + .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{ + stroke-width:3px; + } + } + &[data-stroke-width="3"]{ + .nvd3 .nv-groups path.nv-line{ + stroke-width:3px; + } + .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{ + stroke-width:4px; + } + } + + .tick text, .nvd3 .nv-axis .nv-axisMaxMin text{ + fill: fade($color-master, 50%); + font-family: "Montserrat"; + font-size: 11px; + text-transform: uppercase; + font-weight: normal; + } + + + .nvd3.nv-scatter .nv-groups .nv-point.hover, + .nvd3 .nv-groups .nv-point.hover{ + fill: inherit !important; + stroke: inherit !important; + } +} + + +/* Line widths +------------------------------------ +*/ +.nvd3 line.nv-guideline, +.nvd3 .nv-groups path.nv-line, +.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { + .line-chart[data-line-color="master"] &{ + stroke: $color-master; + } + .line-chart[data-line-color="success"] &{ + stroke: $color-success; + } + .line-chart[data-line-color="primary"] &{ + stroke: $color-primary; + } + .line-chart[data-line-color="info"] &{ + stroke: $color-info; + } + .line-chart[data-line-color="complete"] &{ + stroke: $color-complete; + } + .line-chart[data-line-color="warning"] &{ + stroke: $color-warning; + } + .line-chart[data-line-color="danger"] &{ + stroke: $color-danger; + } + .line-chart[data-line-color="white"] &{ + stroke: #fff; + } + .line-chart[data-line-color="black"] &{ + stroke: #000; + } +} + + +/* Area Fill colors +------------------------------------ +*/ +.nvd3 .nv-groups path.nv-area{ + .line-chart[data-area-color="master"] &{ + fill: $color-master; + } + .line-chart[data-area-color="success"] &{ + fill: $color-success; + } + .line-chart[data-area-color="info"] &{ + fill: $color-info; + } + .line-chart[data-area-color="complete"] &{ + fill: $color-complete; + } + .line-chart[data-area-color="primary"] &{ + fill: $color-primary; + } + .line-chart[data-area-color="warning"] &{ + fill: $color-warning; + } + .line-chart[data-area-color="danger"] &{ + fill: $color-danger; + } + .line-chart[data-area-color="white"] &{ + fill: #fff; + } + .line-chart[data-area-color="black"] &{ + fill: #000; + } +} + +/* Point fill colors +------------------------------------ +*/ + .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{ + .line-chart[data-point-color="master"] &{ + fill : $color-master; + } + .line-chart[data-point-color="success"] &{ + fill : $color-success; + } + .line-chart[data-point-color="info"] &{ + fill : $color-info; + } + .line-chart[data-point-color="complete"] &{ + fill : $color-complete; + } + .line-chart[data-point-color="primary"] &{ + fill : $color-primary; + } + .line-chart[data-point-color="warning"] &{ + fill : $color-warning; + } + .line-chart[data-point-color="danger"] &{ + fill : $color-danger; + } + .line-chart[data-point-color="white"] &{ + fill : #fff; + } + } + +#nvd3-line, +#nvd3-line2, +#nvd3-area{ + svg{ + height: 500px; + } +} +/* Rickshaw Charts +------------------------------------ +*/ +.rickshaw-chart{ + &.rickshaw_graph .detail{ + padding-left: 15px; + transform: translateX(-15px); + width: 30px; + background: rgba(0,0,0,.04); + right: -15px; + + .item, .x_label{ + transform: translateX(15px); + } + &:after{ + content: ""; + width: 1px; + background: rgba(0,0,0,.2); + height: 100%; + display: block; + } + } + .y_grid .tick.major line{ + stroke-dasharray: 3px, 5px; + opacity: .7; + } + +} + +.rickshaw-chart { + &.rickshaw_graph { + + .detail .x_label { display: none } + .detail .item { line-height: 1.4; padding: 0.5em } + .detail_swatch { float: right; display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 0 } + .detail .date { font-size:11px; color: #a0a0a0; opacity: .5; } + + } +} + +#tab-rickshaw-realtime{ + #rickshaw-realtime{ + + } + #rickshaw-realtime_y_axis { + position: absolute; + top: 0; + background: rgba(255,255,255,.8); + bottom: 0; + width: 40px; + left: 0; + z-index: 1; + .rickshaw_graph .y_ticks path, .rickshaw_graph .x_ticks_d3 path{ + fill: none; + stroke: none; + } + .rickshaw_graph .y_ticks text, .rickshaw_graph .x_ticks_d3 text{ + opacity: 0.35; + font-family: 'Montserrat'; + font-size: 11px; + + } + } +} + +#tab-rickshaw-bars{ + #rickshaw-stacked-bars{ + + &.rickshaw_graph .detail .dot{ + border-radius: 50px; + } + &.rickshaw_graph .detail .x_label { display: none } + &.rickshaw_graph .detail .item { line-height: 1.4; padding: 0.5em } + .detail_swatch { float: right; display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 0 } + &.rickshaw_graph .detail .date { font-size:11px; color: #a0a0a0; opacity: .5; } + } +} + +#tab-rickshaw-slider{ + + #rickshaw-slider{ + height:500px + } + .rickshaw_graph .x_grid_d3 .tick{ + stroke-opacity: 0; + } + .rickshaw_graph .y_ticks path, .rickshaw_graph .x_ticks_d3 path{ + stroke: none; + } + .rickshaw_graph .y_ticks text, .rickshaw_graph .x_ticks_d3 text{ + font-size: 11px; + } + .rickshaw_range_slider_preview { + .frame{ + opacity: 0; + } + .left_handle, .right_handle{ + fill: #000; + fill-opacity: 0.1 !important; + } + } + .slider{ + position: absolute; + top:0; + height:93px; + overflow: hidden; + } + .chart{ + position: absolute; + bottom: 40px; + top: 150px; + left: 33px; + right: 0; + width: auto; + .x_tick.plain .title{ + font-family: 'Montserrat'; + font-size: 11px; + } + } + .y_axis{ + bottom: 0; + position: absolute; + top: 150px; + width: 40px; + left: -6px; + } + + .rickshaw_graph .x_tick{ + border-color: transparent; + .title{ + bottom: -24px; + left: -15px; + } + } +} + +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 0; + border-right: 4px solid transparent; + border-left: 4px solid transparent; +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_chat.scss b/resources/assets/sass/modules/_chat.scss new file mode 100644 index 00000000..cd656096 --- /dev/null +++ b/resources/assets/sass/modules/_chat.scss @@ -0,0 +1,81 @@ +/*------------------------------------------------------------------ +[3. Chat] +*/ + +/* Chat Components +-------------------------------------------------- +*/ + +$chat-list-height:60px; +$alert-list-height:45px; +.chat-view{ + .chat-inner{ + padding: 15px; + overflow-x: hidden; + height: calc(100% - 103px); + } + .message{ + margin-bottom: 10px; + line-height: 30px; + } + .profile-img-wrapper{ + height: 28px; + width: 28px; + } + .chat-bubble{ + position:relative; + border-radius:12px; + padding: 4px 12px; + font-size: 14px; + line-height: 16px; + margin: 5px 0px 0 5px; + max-width: 60%; + white-space: normal; + & > p{ + margin: 0; + } + &.from-me { + background:$color-complete-lighter; + color:$color-master-dark; + opacity: 0.8; + float: right; + border: 1px solid rgba(0, 0, 0, 0.07); + } + &.from-them { + color:$color-master-dark; + opacity: 0.8; + background:$color-master-lighter; + position:relative; + opacity: 0.8; + float: left; + border: 1px solid mix($color-complete-darker, #fff, 7%); + + } + } + .chat-input{ + border: 0; + height: 45px; + &:focus,&:active{ + background-color: #fff; + } + } + .user-controls{ + padding-top:12px; + } +} +/* Chat User List +-------------------------------------------------- +*/ +.chat-user-list{ + & > a { + height: $chat-list-height; + } +} +/* Alert List +-------------------------------------------------- +*/ +.alert-list{ + & > a { + height: $alert-list-height; + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_email.scss b/resources/assets/sass/modules/_email.scss new file mode 100644 index 00000000..0ffa7936 --- /dev/null +++ b/resources/assets/sass/modules/_email.scss @@ -0,0 +1,150 @@ +/*------------------------------------------------------------------ +[20. Email App] +*/ + + +/* Email Components +-------------------------------------------------- +*/ +.compose-wrapper{ + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 50px; + background: $color-white; + border-top: 1px solid $color-master-lighter; + z-index: 101; + .compose-email{ + font-size: 24px; + } +} + +.email-composer{ + margin-left: 250px; + position: relative; + overflow: auto; + height: 100%; + background: #fff; + .email-toolbar-wrapper .wysihtml5-toolbar{ + background: $color-master-lighter; + border-bottom:1px solid $color-master-light; + position: relative; + border-top: none; + } + .email-body-wrapper{ + border-bottom:1px solid $color-master-light; + margin-bottom: 20px; + } + .bootstrap-tagsinput{ + margin: 0; + padding: 0; + } + & > .row{ + margin-left: -30px; + margin-right: -30px; + } +} + +.split-view .split-details .email-content-wrapper{ + background: #fff; + height: 100%; + width: auto; + overflow: auto; + + .actions-wrapper{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 50px; + z-index: $zIndex-navbar - 1; + } + .email-content{ + margin:0 auto; + width: 600px; + display: block; + padding-top: 62px; + padding-bottom: 70px; + padding-left: 20px; + padding-right: 20px; + .email-content-header{ + .sender{ + .name{ + font-size: 15px; + color: $color-info; + } + .datetime{ + color: $color-master; + opacity: .45; + font-family: arial; + } + } + .subject{ + font-family: arial; + color: $color-info; + font-size:15.2px; + line-height: 17px; + } + .fromto{ + .btn-xs{ + border-radius: 13px; + } + } + } + .email-content-body p{ + line-height: 23px; + color: $body-color; + letter-spacing: 0.001em; + } + .email-reply{ + min-height:200px; + } + .editor-wrapper{ + border: 1px solid rgba(0,0,0,.05); + .wysihtml5-sandbox{ + max-height: 150px; + min-height: 130px !important; + width: 100% !important; + } + } + + } +} +/* Email App Top Header +-------------------------------------------------- +*/ +.header-wrapper-email{ + font-size: 14.92px; + .dropdown > .btn{ + color:$color-complete; + } + .btn:hover{ + text-decoration: none; + } +} + +/* Responsive Handler : Email App +-------------------------------------------------- +*/ + + + +@media (max-width: 1024px){ + .email-composer{ + margin-left: 0; + } +} + + +.email-composer{ + .email-toolbar-wrapper{ + .dropdown{ + .dropdown-toggle{ + &::after{ + display: none; + } + } + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_form_elements.scss b/resources/assets/sass/modules/_form_elements.scss new file mode 100644 index 00000000..e242894f --- /dev/null +++ b/resources/assets/sass/modules/_form_elements.scss @@ -0,0 +1,2142 @@ +/*------------------------------------------------------------------ +[15. Form Elements] +*/ + +// Mixins +// -------------------------------------------------- + +// Form validation states +@mixin form-control-validation($text-color, $border-color, $background-color) { + // Color the label and help text + .help-block, + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline { + color: $text-color; + } + // Set the border and box shadow on specific inputs to match + .form-control { + border-color: $border-color; + @include box-shadow(none); // Redeclare so transitions work + &:focus { + border-color: darken($border-color, 10%); + //$shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten($border-color, 20%); + @include box-shadow(none); + } + } + // Set validation states also for addons + .input-group-addon { + background: $color-master-lighter; + border: 1px solid $form-control-border-color; + color: rgba($color-master, .47); + } + // Optional feedback icon + .form-control-feedback { + color: $text-color; + } +} + +// Placeholder text +@mixin placeholder($color, $opacity) { + &::-moz-placeholder { + color: $color; // Firefox + opacity: $opacity; + } // See https://github.com/twbs/bootstrap/pull/11526 + &:-ms-input-placeholder { + color: $color; + opacity: $opacity; + } // Internet Explorer 10+ + &::-webkit-input-placeholder { + color: $color; + opacity: $opacity; + } // Safari and Chrome +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input[type="radio"], +input[type="checkbox"] { + margin-top: 1px 0 0; + line-height: normal; + cursor: pointer; + @include box-sizing(border-box); +} + +select[multiple], +select[size] { + height: auto !important; +} + +input:focus, +select:focus, +textarea:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: none; + @include box-shadow(none); +} + +form legend { + margin: 15px 0px 10px 0px; +} + +.form-control { + background-color: $color-white; + background-image: none; + border: 1px solid $form-control-border-color; + font-family:Arial, sans-serif; + -webkit-appearance: none; + color: $color-master-dark; + outline: 0; + height: 35px; + padding: 9px 12px; + line-height: normal; + font-size: 14px; + font-weight: normal; + vertical-align: middle; + min-height: 35px; + @include transition(all 0.12s ease); + @include box-shadow(none); + @include border-radius(2px); + @include transition(background 0.2s linear 0s); + &:focus{ + border-color: rgba($color-black, .10); + background-color:$color-master-lighter; + outline: 0 !important; + @include box-shadow(none); + @include placeholder(inherit, .7); + } + @include placeholder(inherit, .33); + &[disabled], + &[readonly], + fieldset[disabled] &{ + background: mix($color-master-lighter, #fff, 50%); + color: rgba($color-master, .23); + } +} + + +/* Input Sizes +-------------------------------------------------- +*/ + +.input-sm, +.form-horizontal .form-group-sm .form-control { + font-size: 13px; + min-height: 32px; + height: 32px; + padding: 8px 9px; +} + +.input-lg, +.form-horizontal .form-group-lg .form-control { + border-radius: 3px; + font-size: 18px; + height: 45px; + padding: 11px 13px; +} + +.input-xlg{ + height: 51px; + font-size: 18px; + line-height: 22px; +} + + +/* Checkboxes and Radio buttons +-------------------------------------------------- +*/ + +.radio, +.checkbox { + margin-bottom: 10px; + margin-top: 10px; + padding-left: 0px; + label{ + display: inline-block; + cursor: pointer; + position: relative; + padding-left: 25px; + min-width: 17px; + min-height: 17px; + margin-right: 15px; + font-size: 13px; + &:before{ + -webkit-box-sizing: inherit; + box-sizing: border-box; + content:""; + display: inline-block; + width: 17px; + height: 17px; + margin-right: 10px; + position: absolute; + left: 0px; + background-color: $color-white; + border: 1px solid mix($color-master, #fff, 30%); + } + } +} + +.radio { + label { + margin-bottom: 6px; + &:before { + bottom: 2.5px; + border-radius: 99px; + @include transition(border .3s 0s cubic-bezier(0.455, 0.030, 0.215, 1.330)); + } + } + input[type=radio]:checked { + & + label { + &:before { + border-width: 5px; + } + } + } + input[type="radio"]:focus{ + & + label{ + color:$color-master-dark; + &:before{ + background-color: $color-master-light; + } + } + } + input[type=radio] { + opacity: 0; + width: 0; + height: 0; + } + input[type=radio][disabled] { + & + label { + opacity: 0.65; + } + } + +} +input[type=radio]:checked + label:before{ + .radio.radio-success &{ + border-color: $color-success; + } + .radio.radio-primary &{ + border-color: $color-primary; + } + .radio.radio-info &{ + border-color: $color-info; + } + .radio.radio-warning &{ + border-color: $color-warning; + } + .radio.radio-danger &{ + border-color: $color-danger; + } + .radio.radio-complete &{ + border-color: $color-complete; + } +} + +.radio + .radio, +.checkbox + .checkbox { + margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing +} + +.checkbox { + input[type=radio][disabled] { + & + label { + &:after { + background-color: $color-master-light; + } + } + } + label { + transition: border 0.2s linear 0s, color 0.2s linear 0s; + white-space: nowrap; + &:before { + top: 1.4px; + border-radius: 3px; + transition: border 0.2s linear 0s, color 0.2s linear 0s; + } + &::after { + display: inline-block; + width: 16px; + height: 16px; + position: absolute; + left: 3.5px; + top: 0px; + font-size: 11px; + transition: border 0.2s linear 0s, color 0.2s linear 0s; + } + &:after { + border-radius: 3px; + } + } + input[type=checkbox] { + opacity: 0; + width: 0; + height: 0; + } + &.checkbox-circle { + label { + &:after { + border-radius: 99px; + } + &:before { + border-radius: 99px; + } + } + } + input[type=checkbox]:checked { + & + label { + //color: #4d5056; + &:before { + border-width: 8.5px; + } + &::after { + font-family:'FontAwesome'; + content:"\F00C"; + color: #fff; + } + } + } + input[type="checkbox"]:focus{ + & + label{ + color:$color-master-dark; + &:before{ + background-color: $color-master-light; + } + } + } + input[type=checkbox][disabled] { + & + label { + opacity: 0.65; + &:before { + background-color: #eceff3; + } + } + } + &.right { + label { + margin-right: 35px; + padding-left:0 !important; + &:before { + right:-35px; + left:auto; + + } + } + input[type=checkbox]:checked { + & + label { + position: relative; + // margin-right: 0; + &::after { + font-family:'FontAwesome'; + content:"\F00C"; + position: absolute; + right: -27px; + left: auto; + } + } + } + } +} + +input[type=checkbox]:checked + label{ + .checkbox.check-success &:before{ + border-color: $color-success; + } + .checkbox.check-primary &:before{ + border-color: $color-primary; + } + .checkbox.check-complete &:before{ + border-color: $color-complete; + } + .checkbox.check-warning &:before{ + border-color: $color-warning; + } + .checkbox.check-danger &:before{ + border-color: $color-danger; + } + .checkbox.check-info &:before{ + border-color: $color-info; + } + + .checkbox.check-success &::after, + .checkbox.check-primary &::after, + .checkbox.check-complete &::after, + .checkbox.check-warning &::after, + .checkbox.check-danger &::after, + .checkbox.check-info &::after { + color: $color-white; + } + +} + +.input-group{ + &.transparent{ + .input-group-addon{ + background-color: transparent; + border-color:$form-control-border-color; + } + } +} + +/* Form layouts +-------------------------------------------------- +*/ +@media only screen and (min-width: 768px) { + form{ + .row { + margin-left: 0; + margin-right: 0; + } + .row [class*='col-']{ + + &:not(:first-child), + &:not(:last-child) { + padding-right: 7px; + padding-left: 7px; + } + + &:first-child{ + padding-left: 0; + } + &:last-child{ + padding-right: 0; + } + } + } +} +@media (min-width: 768px) and (max-width: 991px){ + // form .row [class*="col-md-"]:not(:first-child), + // form .row [class*="col-md-"]:not(:last-child){ + // padding-right: 0; + // padding-left: 0; + // } +} +/* Form layouts : Horizontal +-------------------------------------------------- +*/ +.form-horizontal { + .form-group{ + border-bottom: 1px solid $color-master-light; + padding-top: 19px; + padding-bottom: 19px; + margin-bottom: 0; + &:last-child{ + border-bottom: none; + } + &:hover .control-label{ + opacity: .6; + } + &.focused .control-label{ + opacity: 1; + } + .control-label{ + text-align: left; + opacity: .42; + @include transition(opacity ease .3s); + } + } + .radio{ + padding-top: 7px; + margin-top: 0; + margin-bottom: 0; + } + .control-label { + padding-top: 7px; + margin-bottom: 0; + } +} +/* Form layouts : Attached +-------------------------------------------------- +*/ +.form-group-attached{ + .form-group.form-group-default{ + border-radius: 0; + margin-bottom: 0; + } + & > div{ + margin: 0; + &:first-child{ + &.row > [class*='col-']{ + &:first-child .form-group-default{ + border-top-left-radius: 2px; + } + &:last-child .form-group-default{ + border-top-right-radius: 2px; + } + } + &.form-group-default{ + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } + } + + &:last-child{ + &.row > [class*='col-']{ + &:first-child .form-group-default{ + border-bottom-left-radius: 2px; + } + &:last-child .form-group-default{ + border-bottom-right-radius: 2px; + } + } + &.form-group-default{ + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + } + &.row > [class*='col-']{ + padding-right: 0 !important; + padding-left: 0 !important; + } + &.row > [class*='col-']:not(:only-child):not(:last-child) > .form-group-default{ + border-right-color: transparent; + } + &:not(:last-child) .form-group-default, + &:not(:last-child).form-group-default{ + border-bottom-color: transparent; + } + + } +} + +/* Form layouts : Responsive Handlers +-------------------------------------------------- +*/ +@media (max-width: 767px) { + .form-group-attached .form-group-default{ + border-right-color: $form-control-border-color !important; + } +} + +@media only screen and (min-width: 768px) { + .form-group-attached > div.row{ + & > [class*='col-']{ + .form-group{ + height: 100%; + width: 100%; + } + } + } +} +/* Form Groups +-------------------------------------------------- +*/ +.form-group { + margin-bottom: 10px; + label:not(.error){ + font-size: 10.5px; + letter-spacing: 0.06em; + text-transform: uppercase; + font-weight: 500; + } + label .help{ + margin-left: 8px; + + } + .help { + font-size: 12px; + color: rgba($color-master, .55); + } +} + +.form-group-default { + background-color: #fff; + position: relative; + border: 1px solid $form-control-border-color; + border-radius: 2px; + padding-top: 7px; + padding-left: 12px; + padding-right: 12px; + padding-bottom: 4px; + overflow: hidden; + width: 100%; + @include transition(background-color .2s ease); + &.required:after { + color: $color-danger; + content:"*"; + font-family: arial; + font-size: 20px; + position: absolute; + right: 15px; + top: 9px; + } + &.disabled { + input { + opacity: .6; + } + background:mix($color-master-lighter,#fff,50%); + color: rgba($color-master, .23); + &.focused { + background:mix($color-master-lighter,#fff,50%); + label { + opacity: 1; + } + } + } + &.focused { + border-color:rgba(0, 0, 0, 0.1) !important; + background-color:$color-master-lighter; + label { + opacity: .4; + @include backface-visibility(hidden); + } + } + &.has-error{ + background-color: rgba($color-danger,.10); + } + &.has-success, &.has-error{ + .form-control-feedback{ + display: none !important; + } + } + &.has-success .form-control, + &.has-success .form-control:focus, + &.has-error .form-control, + &.has-error .form-control:focus{ + border: none; + box-shadow: none; + } + &.input-group{ + padding: 0; + & > label{ + margin-top: 6px; + padding-left: 12px; + &.inline{ + margin-top: 6px; + float: left; + } + } + & > .form-control{ + margin-top: -2px; + margin-bottom: 3px; + padding-left: 12px; + } + .input-group-addon{ + height: calc(#{$form-group-height} - 4px); + min-width:calc(#{$form-group-height} - 4px); + border-radius: 0; + border:none; + } + &.focused { + .input-group-addon{ + border-color: rgba(0, 0, 0, 0.1); + } + } + } + & .form-control{ + border:none; + height: 25px; + min-height: 25px; + padding: 0; + margin-top: -4px; + background: none; + &.error{ + color: $color-master-dark; + } + &:focus{ + background: none; + } + } + & textarea.form-control{ + padding-top: 5px; + } + label { + margin: 0; + display: block; + opacity: 1; + @include transition(opacity .2s ease); + &.label-lg { + font-size: 13px; + left: 13px; + top: 9px; + } + &.label-sm { + font-size: 11px; + left: 11px; + top: 6px; + } + &.highlight{ + opacity: 1; + } + &.fade{ + opacity: .5; + @include backface-visibility(hidden); + } + } + & > .input-lg { + height: 29px; + min-height: 29px; + padding-left: 1px; + } + & > .input-sm { + min-height: 18px; + height: 18px; + } + &.form-group-default-select{ + overflow: visible; + .ui-select-container.ui-select-bootstrap.dropdown { + .ui-select-match{ + padding-top: 6px; + height: 23px; + } + } + } + &.form-group-default-select2{ + padding: 0; + & > label{ + position: absolute; + z-index: 10; + padding:7px 12px 0 12px; + &.label-lg{ + left:0; + top: 0; + } + &.label-sm{ + left:0; + top: 0; + } + } + .select2-container{ + .select2-selection--single{ + padding-top: 20px; + height: 52px; + .select2-arrow b:before{ + top: 20px; + } + .select2-chosen{ + padding-left:3px; + padding-top: 1px; + } + } + .select2-selection--multiple{ + padding-top: 20px; + height: 52px; + border:0px; + .select2-selection__rendered .select2-selection__choice{ + margin-top:4px; + } + } + } + & > .input-lg{ + height: auto; + padding: 0; + .select2-choice{ + padding-top: 20px; + height: 56px; + } + } + & > .input-sm{ + height: auto; + padding: 0; + .select2-choice{ + padding-top: 20px; + height: 46px; + } + } + } + &.form-group-default-selectFx{ + padding: 0; + & > label{ + position: absolute; + z-index: 10; + padding: 7px 12px 0 12px; + &.label-lg{ + left: 0; + top: 0; + } + &.label-sm{ + left: 0; + top: 0; + } + } + .cs-wrapper{ + .cs-placeholder{ + padding-top: 28px; + height: 52px; + padding-left: 12px; + } + .cs-select{ + height: auto; + > span:after, + .cs-selected span:after { + top: 39px; + } + &.input-lg .cs-placeholder{ + height: 60px; + } + &.input-sm .cs-placeholder{ + height: 50px; + } + } + .dropdown-placeholder{ + vertical-align: top; + } + } + } +} + +/* Form validation +-------------------------------------------------- +*/ +.has-success { + @include form-control-validation($color-success-dark, $color-success-dark, $color-success); +} +.has-warning { + @include form-control-validation($color-warning-dark, $color-warning-dark, $color-warning); +} +.has-error { + @include form-control-validation($color-danger, $color-danger, $color-danger); +} +.error { + font-size: 12px; + color: $color-danger; + display: block; +} + +/* Addon inputs +-------------------------------------------------- +*/ +.input-group-addon { + background: $color-master-lighter; + border: 1px solid $form-control-border-color; + color: rgba($color-master, .47); + font-size: 14px; + padding: 6px 9px; + display: table-cell; + border-radius: 3px; + transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s, color 0.2s linear 0s, box-shadow 0.2s linear 0s, background 0.2s linear 0s; + i { + position: relative; + top: 1px; + } + &.primary { + background-color: $color-primary; + border: 1px solid $color-primary; + color: $color-white; + background-color: $color-primary; + border: 1px solid $color-primary; + color: $color-white; + .arrow { + color: $color-primary; + } + } + &.success { + background-color: #0090d9; + color: $color-white; + .arrow { + color: #0090d9; + } + } + &.info { + background-color: #1f3853; + color: $color-white; + .arrow { + color: #1f3853; + } + } + &.warning { + background-color: #fbb05e; + color: $color-white; + background-color: #fbb05e; + color: $color-white; + .arrow { + color: #fbb05e; + } + } + &.danger { + background-color: #f35958; + color: $color-white; + .arrow { + color: #f35958; + } + } + .arrow { + position: relative; + right: -6px; + color: #D1DADE; + z-index: 100; + &:before { + font-family:'FontAwesome'; + content:"\f0da"; + font-size: 23px; + position: absolute; + left: 17px; + top: -2px; + } + } + &:last-child { + .arrow { + &:before { + font-family:'FontAwesome'; + content:"\f0d9"; + font-size: 23px; + position: absolute; + left: -23px; + top: -2px; + } + } + input { + border-left: 0px; + } + } +} + + + + + +/* Plugins +-------------------------------------------------- +Datepicker +https://github.com/eternicode/bootstrap-datepicker +*/ +.datepicker { + padding: 16px 25px; + border-radius: 2px; + font-size: 12px; + &:after{ + border-bottom-color: $color-master-lightest; + } + thead { + tr { + .datepicker-switch { + color: #6f7b8a; + font-size: 13px; + } + .next, + .prev{ + color: $color-primary; + content:''; + font-size: 0px; + &:before { + color: $color-primary; + font-family:'FontAwesome'; + font-size: 10px; + } + } + .prev:before { + content:"\f053"; + } + .next:before { + content:"\f054"; + } + .dow { + color: $color-primary; + text-transform: uppercase; + font-size: 11px; + } + th{ + width: 31px; + height: 29px; + } + } + } + tbody { + tr { + .odd { + color: #d0d3d8; + } + } + } + table { + tr { + td { + width: 31px; + height: 29px; + &.old, + &.new{ + color: $color-master-light; + } + &.day { + &:hover { + background: $color-master-lighter; + } + } + &.active{ + background-color:$color-primary !important; + &, + &:hover, + &.disabled, + &.disabled:hover { + background-image: none; + text-shadow: none; + font-weight: 600; + } + } + &.today{ + &, + &:hover, + &.disabled, + &.disabled:hover { + background-color: $color-master-lighter; + background-image: none; + color: $color-white; + } + } + span { + border-radius: 4px; + width: 42px; + height: 42px; + line-height: 42px; + &.active{ + background-color: $color-primary !important; + } + &.active, + &.active:hover, + &.active.disabled, + &.active.disabled:hover { + background-image: none; + border: none; + text-shadow: none; + } + } + } + } + } + &.dropdown-menu{ + border-color: $color-master-light; + color:$color-master; + } + &.datepicker-dropdown.datepicker-orient-bottom:before{ + border-color: $color-master-light; + } +} + +.datepicker-inline { + width: auto; +} +.input-daterange .input-group-addon{ + text-shadow: none; + border:0; + margin: 0; +} + +/* Timepicker +https://github.com/m3wolf/bootstrap3-timepicker +*/ + +.bootstrap-timepicker-widget{ + table td a i{ + font-size: 12px; + } + a.btn, .bootstrap-timepicker-widget input{ + @include border-radius(2px); + } + &.dropdown-menu{ + background: #fff; + } +} + + +/* Daterangepicker +http://www.dangrossman.info/ +*/ + +.daterangepicker{ + background: #fff; + .calendar{ + .calendar-date{ + border: 1px solid $form-control-border-color; + } + .prev, .next, th{ + color: $color-primary; + text-transform: uppercase; + font-size: 11px; + } + .month{ + color: #6f7b8a; + font-size: 13px; + } + } + td.active, td.active:hover{ + background-color: $color-primary; + border-color: $color-primary; + } + td.in-range{ + background:$color-primary-lighter; + } +} +/* Select2 +http://ivaynberg.github.io/select2/ +*/ + +.form-group-default .select2-container .select2-selection, +.select2-container-multi .select2-choices{ + border-color: transparent !important; +} +select.full-width + .select2-container { + width: 100% !important; +} +.select2-container { + //Chrome outline fix + *:focus { + outline: none; + } + .select2-selection { + background-image: none; + border-radius: 2px; + border: 1px solid $form-control-border-color !important; + padding: 2px 9px; + transition: border 0.2s linear 0s; + .select2-selection__rendered { + padding: 0; + padding-left: 2px; + margin-top: 20px; + } + .select2-selection__arrow { + top: auto; + bottom: 5px; + right: 10px !important; + left:auto; + background: transparent; + border-left: 0px; + @include transition(all 0.3s ease); + } + &.select2-selection--single { + height: 35px; + } + & > .select2-chosen{ + margin-right:26px; + margin-left:0; + } + } + &.select2-drop-above { + .select2-choice { + border-bottom-right-radius: 2px; + border-bottom-left-radius: 2px; + } + } +} +.select2-container--default { + .select2-results__option[aria-selected="true"] { + background-color: transparent; + } + .select2-results__group{ + color: $color-master-dark; + } +} +.select2-search input, +.select2-search-choice-close, +.select2-container .select2-choice abbr, +.select2-container .select2-choice .select2-arrow b{ + background-image: none !important; +} +.select2-dropdown-open.select2-drop-above .select2-choice, +.select2-dropdown-open.select2-drop-above .select2-choices { + background-image: none !important; + border: 1px solid $form-control-border-color; + background: $color-master-lighter; +} +.select2-dropdown-open { + .select2-choice { + .select2-arrow { + @include scale(scale(1, -1)); + + } + } +} +.select2-dropdown { + border: 1px solid $form-control-border-color; + border-bottom: none; + border-radius: 2px; + padding-top: 0px; + &.select2-drop-above { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + box-shadow: none; + // &.select2-drop-active { + // } + } +} +.select2-container--open .select2-selection { + box-shadow: none; + border: 1px solid $form-control-border-color; + background: transparent; + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} +.select2-container--default .select2-selection--single { + background: transparent !important; +} +.select2-search--dropdown { + padding-left: 8px; + padding-right: 8px; + padding-top: 4px; + input { + background: $color-white !important; + vertical-align: baseline; + line-height: 28px; + border-radius: 2px; + border: none; + font-size: 12px; + border: 1px solid $form-control-border-color !important; + } +} +.select2-results { + margin: 3px 8px 10px 8px; + li { + color: $color-master; + &.select2-result-with-children { + & > .select2-result-label { + color: $color-master-dark; + &:first-child{ + padding-top: 8px; + } + } + } + } + .select2-results__option--highlighted { + background-color: $color-master-lighter !important; + border-radius: 3px; + color: $color-master !important; + } + .select2-no-results, + .select2-searching, + .select2-selection-limit { + background: none; + color: $color-master; + font-size: 12px; + padding-left:8px; + padding-top: 0px; + position: relative; + top: -5px; + } +} + +.select2-dropdown { + border: 1px solid $form-control-border-color; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 2px; + padding-top: 5px; + z-index: $zIndex-navbar - 10; + box-shadow: 0 4px 5px rgba(0, 0, 0, .15); +} +.select2-container--open .select2-selection--multiple .select2-selection__choice { + background-color: $color-white !important; +} +.select2-selection--multiple { + .select2-selection__rendered { + background-image: none; + .select2-selection__choice { + background-color: $color-master-light; + background-image: none; + border: none; + box-shadow: none; + color: inherit; + border-radius: 8px; + margin: 6px -5px 0px 10px; + padding: 0 8px 0 7px; + line-height: 21px; + &:first-child { + margin-left: 0; + } + .select2-selection__choice__remove { + color: #626262; + font-weight: 900; + margin-right: 4px; + } + } + .select2-search--inline { + margin-left: 8px; + } + } + &.select2-container-active { + .select2-choices { + border: 1px solid $form-control-border-color; + box-shadow: none; + } + } + .select2-search-choice-close { + left:6px; + } +} +.select2-search-choice-close { + background: none; + top: 4px; + right:0; + &:hover { + text-decoration: none; + } +} +.select2-drop-multi .select2-results { + .select2-no-results, + .select2-searching, + .select2-selection-limit { + top: 0px; + } +} +.select2 { + &.form-control { + padding: 0; + box-shadow: none; + border: 0; + } +} + +.select2-drop-mask{ + z-index: 700; +} + +.ui-select-bootstrap .ui-select-choices-row.active > a{ + background: $color-master-lighter; + border-radius: 3px; + color: $color-master; +} +.ui-select-bootstrap > .ui-select-choices{ + background-color: #fff; + // box-shadow: 0px 4px 5px rgba(0,​ 0,​ 0,​ 0.15); +} +.ui-select-choices-group-label{ + color: $color-master-dark; + font-weight: bold; +} +.modal-open{ + .select2-drop-active{ + z-index: 1051; + } + .datepicker.dropdown-menu{ + z-index: 1051 !important; + } + .select2-drop-mask{ + z-index: 1050; + } + .cs-skin-slide.cs-active{ + z-index: 1050; + } +} + +.dropdown-placeholder{ + display: inline-block; + vertical-align: middle; +} +.dropdown-mask{ + bottom: 0; + display: none; + left: 0; + outline: 0 none; + overflow: hidden; + position: fixed; + right: 0; + top: 0; + z-index: $zIndex-dropdownMask; +} +/* Bootstrap Tags input +https://github.com/timschlechter/bootstrap-tagsinput +*/ + +.form-group-default { + .bootstrap-tagsinput{ + border:0px; + padding-left:0; + margin-bottom: 5px; + padding-top: 0; + vertical-align: top; + padding-bottom: 0px; + padding-left:0; + margin-top: 5px; + .tag{ + padding: 2px 9px; + line-height: 18px; + margin-bottom: 2px; + [data-role="remove"] { + display: inline-block; + vertical-align: top; + } + margin-left: 0; + margin-right: 2px; + } + input{ + min-height: 20px; + &:first-child{ + margin-left: 0; + } + } + } +} +.bootstrap-tagsinput { + @include flexbox(); + @include flex-row(); + -webkit-flex-wrap:wrap; + -ms-flex-wrap: wrap; + -ms-flex-flow: wrap; + flex-flow: wrap; + background-color: transparent; + border: 1px solid $form-control-border-color; + border-radius: 4px; + padding: 0; + padding-top: 5px; + padding-right:5px; + @include box-shadow(none); + width: 100%; + @include transition(background 0.2s linear 0s); + &.active-element { + background-color: $color-master-light; + } + input { + border: none; + margin: 5px; + margin-top: 0; + margin-right:0; + min-height: 25px; + min-width: 10em !important; + -webkit-box-flex: 1; + -ms-flex: 1 0 auto; + flex: 1 0 auto; + //Older browsers + -webkit-flex-shrink:0; + -webkit-flex-grow: 1; + -webkit-flex-basis: auto; + } + .tag { + padding: 3px 9px; + padding-right:6px; + border-radius: 3px; + line-height: 18px; + -webkit-box-flex: 1; + -ms-flex: 1 0 auto; + flex: 1 0 auto; + margin: 5px; + margin-top: 0; + margin-right:0; + //Older browsers + -webkit-flex-shrink:0; + -webkit-flex-grow: 1; + -webkit-flex-basis: auto; + } + .tag [data-role="remove"]{ + margin-left: 4px; + float: right; + vertical-align: middle; + } + .tag[data-role="remove"]:hover:active, + .tag [data-role="remove"]:hover { + box-shadow: none; + } + .tag [data-role="remove"]:after{ + font-family: 'FontAwesome'; + content: "\f00d"; + padding: 0; + } +} + +/* Bootstrap3 wysihtml5 +https://github.com/Waxolunist/bootstrap3-wysihtml5-bower +*/ +.wysiwyg5-wrapper { + position: relative; + .wysihtml5-toolbar { + position: absolute; + bottom: 0; + left: 0; + right: 0; + /*height: 50px;*/ + background: $color-master-lighter; + border-top:1px solid $color-master-light; + .btn { + background: none repeat scroll 0 0 rgba(0, 0, 0, 0); + border-color:transparent; + border-right-color: $color-master-light; + color: #A5A5A5; + font-size: 16px; + font-weight: 600; + height: 50px; + line-height: 50px; + padding: 0 5px; + border-width: 1px; + border-radius: 0 !important; + box-shadow: none !important; + &:hover .editor-icon { + opacity: .8; + } + &.active .editor-icon { + opacity: 1; + } + &.dropdown-toggle { + padding-left: 10px; + padding-right: 20px; + .current-font { + opacity: .5; + font-size: 14px; + } + } + } + & > li { + margin:0; + padding: 0; + } + } + .wysiwyg { + width: 100%; + min-height: 200px; + font-size: 14px; + line-height: 18px; + padding-bottom:50px !important; + border: 0; + &:focus{ + background-color:$color-master-lightest; + outline: 0 !important; + @include box-shadow(none); + } + } + .expand-wysiwyg { + bottom: 0; + color: #A5A5A5; + font-size: 20px; + font-weight: 600; + height: 50px; + line-height: 50px; + padding: 0 15px; + position: absolute; + right: 0; + } + .wysihtml5-sandbox{ + border: none !important; + padding: 16px 16px 50px !important; + width: 100% !important; + &.expanded{ + height: 100% !important; + } + } +} +.toggle-wysiwyg { + position: absolute; + right: 15px; + top: 0; + li { + display: inline-block; + font-weight: 600; + } +} +.editor-icon { + background-image: url("#{$base-img-url}/editor_tray.png"); + display: inline-block; + height: 40px; + margin-top: 5px; + opacity: 0.4; + vertical-align: top; + width: 40px; + &-headline { + background-position: 0 0; + width:31px; + } + &-bold { + background-position: -40px 0; + } + &-italic { + background-position: -80px 0; + } + &-underline { + background-position: -120px 0; + } + &-link { + background-position: -160px 0; + } + &-quote { + background-position: -200px 0; + } + &-ul { + background-position: -240px 0; + } + &-ol { + background-position: -280px 0; + } + &-outdent { + background-position: -320px 0; + } + &-indent { + background-position: -360px 0; + } + &-image { + background-position: -400px 0; + } + &-html { + background-position: -440px 0; + } +} + +/* Summernote +https://github.com/HackerWins/summernote +*/ +.summernote-wrapper{ + .note-editor{ + border-color:$color-master-light; + .note-toolbar{ + padding: 0; + background-color: $color-master-lighter; + border-bottom: none; + .btn-group{ + margin: 0 -1px 0 0; + .btn{ + font-size: 12px; + font-weight: 600; + height: 50px; + min-width: 47px; + line-height: 50px; + padding: 0 5px; + border-radius: 0; + background-color: $color-master-lighter; + border-color: transparent; + border-right-color: $color-master-light; + border-bottom-color: $color-master-light; + color: $color-master; + &.active, &:active{ + background-color: $color-master-light; + } + &.dropdown-toggle{ + min-width: 61px; + } + &:not(:last-child), &:not(:only-child){ + margin-right: 1px; + } + } + } + } + .note-statusbar { + background-color: transparent; + .note-resizebar{ + border-top-color: transparent; + .note-icon-bar{ + border-top: 1px solid $color-master-light; + } + } + } + } + .note-popover .popover .popover-content .dropdown-menu li a i, .note-toolbar .dropdown-menu li a i{ + color: $color-primary; + } +} + + + +// Webkit fixes +input, input:focus{ + -webkit-transition: none !important; +} +input:-webkit-autofill { + -webkit-box-shadow: 0 0 0 1000px #fff inset !important; +} +input:-webkit-autofill:focus { + -webkit-box-shadow: 0 0 0 1000px $color-master-lighter inset !important; +} +input.error:-webkit-autofill, +input.error:-webkit-autofill:focus, +.has-error input:-webkit-autofill { + -webkit-box-shadow: 0 0 0 1000px #F9E9E9 inset !important; +} + + +/* Pages SelectFx */ + +/* Default custom select styles */ +div.cs-select { + display: inline-block; + vertical-align: middle; + position: relative; + text-align: left; + background: #fff; + width: 100%; + max-width: 500px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.cs-select:focus { + outline: none; /* For better accessibility add a style for this in your skin */ +} + +.cs-select select { + display: none; +} + +.cs-select span { + display: block; + position: relative; + cursor: pointer; + padding: 1em; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/* Placeholder and selected option */ +.cs-select > span { + padding-right: 3em; +} + +.cs-select > span::after, +.cs-select .cs-selected span::after { + speak: none; + position: absolute; + top: 50%; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.cs-select > span::after { + content: '\25BE'; + right: 1em; +} + +.cs-select .cs-selected span::after { + content: '\2713'; + margin-left: 1em; +} + +.cs-select.cs-active > span::after { + -webkit-transform: translateY(-50%) rotate(180deg); + transform: translateY(-50%) rotate(180deg); +} + +/* Options */ +.cs-select .cs-options { + position: absolute; + overflow: hidden; + width: 100%; + background: #fff; + visibility: hidden; +} + +.cs-select.cs-active .cs-options { + visibility: visible; +} + +.cs-select ul { + list-style: none; + margin: 0; + padding: 0; + width: 100%; +} + +.cs-select ul span { + padding: 1em; +} + +.cs-select ul li.cs-focus span { + background-color: #ddd; +} + +/* Optgroup and optgroup label */ +.cs-select li.cs-optgroup ul { + padding-left: 1em; +} + +.cs-select li.cs-optgroup > span { + cursor: default; +} + + + + +div.cs-skin-slide { + color: #fff; + /*font-size: 1.5em;*/ + width: 300px; +} + +@media screen and (max-width: 30em) { + div.cs-skin-slide { font-size: 1em; width: 250px; } +} + +div.cs-skin-slide::before { + content: ''; + background: #282b30; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition: -webkit-transform 0.3s; + transition: transform 0.3s; +} + +.cs-skin-slide.cs-active::before { + -webkit-transform: scale3d(1.1,3.5,1); + transform: scale3d(1.1,3.5,1); +} + +.cs-skin-slide > span { + height: 80px; + line-height: 32px; + -webkit-transition: text-indent 0.3s, opacity 0.3s; + transition: text-indent 0.3s, opacity 0.3s; +} + +@media screen and (max-width: 30em) { + .cs-skin-slide > span { height: 60px; line-height: 28px; } +} + +.cs-skin-slide.cs-active > span { + text-indent: -290px; + opacity: 0; +} + +.cs-skin-slide.cs-active > span::after { + -webkit-transform: translate3d(0,-50%,0); + transform: translate3d(0,-50%,0); +} + +.cs-skin-slide .cs-options { + background: transparent; + width: 70%; + height: 400%; + padding: 1.9em 0; + top: 50%; + left: 50%; + -webkit-transform: translate3d(-50%,-50%,0); + transform: translate3d(-50%,-50%,0); +} + +@media screen and (max-width: 30em) { + .cs-skin-slide .cs-options { padding-top: 3em; } +} + +.cs-skin-slide .cs-options li { + opacity: 0; + -webkit-transform: translate3d(30%,0,0); + transform: translate3d(30%,0,0); + -webkit-transition: -webkit-transform 0.3s, opacity 0.3s; + transition: transform 0.3s, opacity 0.3s; +} + +.cs-skin-slide.cs-active .cs-options li { + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + opacity: 1; +} + +.cs-skin-slide.cs-active .cs-options li:first-child { + -webkit-transition-delay: 0.05s; + transition-delay: 0.05s; +} + +.cs-skin-slide.cs-active .cs-options li:nth-child(2) { + -webkit-transition-delay: 0.1s; + transition-delay: 0.1s; +} + +.cs-skin-slide.cs-active .cs-options li:nth-child(3) { + -webkit-transition-delay: 0.15s; + transition-delay: 0.15s; +} + +.cs-skin-slide.cs-active .cs-options li:nth-child(4) { + -webkit-transition-delay: 0.2s; + transition-delay: 0.2s; +} + +.cs-skin-slide.cs-active .cs-options li:nth-child(5) { + -webkit-transition-delay: 0.25s; + transition-delay: 0.25s; +} /* more options need more delay declaration */ + +.cs-skin-slide .cs-options li span { + text-transform: uppercase; + font-weight: 500; + letter-spacing: 2px; + font-size: 65%; + padding: 0.8em 1em 0.8em 2.5em; +} + +.cs-skin-slide .cs-options li span:hover, +.cs-skin-slide .cs-options li.cs-focus span, +.cs-skin-slide .cs-options li.cs-selected span { + color: #eb7e7f; + background: transparent; +} + +.cs-skin-slide .cs-selected span::after { + content: ''; +} + + +/* Pages Select overriding */ + +.form-group-default .cs-skin-slide > span{ + padding: 0 30px 0 0; + height: 22px; + line-height: 21px; +} +.form-group-default .cs-wrapper{ + width: 100%; + height: 100%; + @include flexbox(); + @include align-items(center); +} +.cs-wrapper{ + display: inline-block; + // width: 100%; +} +.form-control.cs-select:not(.cs-active){ + width: 100% !important; +} +.cs-select:not(.cs-active):not(.form-control){ + // width: 100% !important; +} +.cs-select{ + background-color: transparent; + span{ + text-overflow:initial; + } + .cs-placeholder{ + width: 100%; + } +} +div.cs-skin-slide{ + width: auto; + font-family: Arial,sans-serif; + //font-size: 14px; + color: #5e5e5e; + &:before{ + background-color: transparent; + } + &.cs-transparent{ + background: none; + .cs-backdrop{ + border-color: transparent; + background: none; + } + &.cs-active .cs-backdrop{ + background: $color-master-lightest; + } + } + & > span{ + height: 35px; + padding: 6px 33px 6px 17px; + line-height: 23px; + z-index: 1; + } + &.cs-active{ + z-index: $zIndex-navbar - 10; + &:before{ + -webkit-transform: scale3d(1,1,1); + transform: scale3d(1,1,1); + } + .cs-backdrop{ + border: transparent; + background: $color-master-lightest; + box-shadow: -1px 0 1px #ccc, 1px 0 1px #ccc; + } + } + & > span:after, + &.cs-active > span:after{ + content:"\f0d7"; + font-family: FontAwesome; + color: #5e5e5e; + } + .cs-options{ + height: auto; + padding: 9px 0; + width: auto; + padding: 10px; + max-height: 350px; + transform: translate3d(1,1,1); + overflow: hidden; + z-index: 1; + ul{ + width: 100%; + display: table; + li{ + display: table-row; + span{ + display: table-cell; + font-size: 14px; + font-weight: normal; + letter-spacing: normal; + padding: 5px 0; + text-transform: none; + max-height: 350px; + overflow-y: auto; + } + span:hover, + &.cs-focus span, + &.cs-selected span{ + color: $color-master-dark; + } + } + } + } +} +.cs-backdrop{ + background: none repeat scroll 0 0 #fff; + border: 1px solid $form-control-border-color; + bottom: 0; + left: 0; + position: absolute; + right: 0; + top: 0; + @include transition(all .3s ease); + +} +.cs-skin-slide.cs-active .cs-options li:nth-child(6) { + transition-delay: 0.3s; +} +.cs-skin-slide.cs-active .cs-options li:nth-child(7) { + transition-delay: 0.35s; +} +.cs-skin-slide.cs-active .cs-options li:nth-child(8) { + transition-delay: 0.4s; +} +.cs-skin-slide.cs-active .cs-options li:nth-child(9) { + transition-delay: 0.45s; +} +.cs-skin-slide.cs-active .cs-options li:nth-child(10) { + transition-delay: 0.5s; +} +.cs-skin-slide.cs-active .cs-options li:nth-child(11) { + transition-delay: 0.55s; +} + +.dropzone { + overflow: hidden; + .dz-default.dz-message{ + width: 100%; + } +} + +/* Dropzone for Angular */ +.dropzone[dropzone="dropzone"] input[type="file"]{ + visibility: hidden; +} +/* end overrides */ + +// Twitter Typehead +// -------------------------------------------------- +.twitter-typeahead{ + width: 100%; +} +.tt-menu { + width: 100%; + padding: 3px 10px 3px 3px; + background-color: $color-white; + border: 1px solid rgba(0, 0, 0, 0.07); + border-top:0; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 2px; + -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15); + box-shadow: 0 4px 5px rgba(0, 0, 0, .15); +} + +.tt-suggestion { + color: $color-master; + padding: 3px 7px 4px; + padding-left: 26px; + line-height: 24px; + &:hover { + cursor: pointer; + background: $color-master-lighter; + } + &.tt-cursor { + background: $color-master-lighter; + } + p { + margin: 0; + } +} +.form-group-default{ + &.typehead{ + overflow: inherit; + } + .tt-menu { + width: calc(100% + 24px); + margin: 4px -12px; + } +} +/* Demo specifc classes */ +.demo-form-wysiwyg{ + height: 250px; +} + +// error form +.error-form{ + .form-group-default { + padding: 0; + justify-content: space-between; + .input-group-addon { + height: calc(50px); + min-width: calc(50px); + border-radius: 0; + border: none; + } + label { + margin-top: 6px; + padding-left: 12px; + } + .form-control { + margin-top: -2px; + margin-bottom: 3px; + padding-left: 12px; + } + } + .transparent { + .input-group-addon { + background-color: transparent; + border-color: rgba(0,0,0,0.07); + } + } +} +.error-container{ + &.bottom-container{ + margin-top: 0; + } +} + +.form-group-default { + &.input-group { + padding: 0; + label { + margin-top: 6px; + padding-left: 12px; + } + .form-input-group{ + width: 100%; + } + .form-control { + margin-top: -2px; + margin-bottom: 3px; + padding-left: 12px; + } + .input-group-addon { + min-width: calc(50px); + height: 52px; + border-radius: 0 !important; + border: none !important; + } + } +} +.h-c-50{ + height: calc(50px); +} +.card-toolbar{ + .note-editor{ + .btn-toolbar{ + display: block; + } + } +} +.pretty .state label { + line-height: 1; +} + +.inlineForm { + display: none; +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_gallery.scss b/resources/assets/sass/modules/_gallery.scss new file mode 100644 index 00000000..b6f6af8e --- /dev/null +++ b/resources/assets/sass/modules/_gallery.scss @@ -0,0 +1,255 @@ +/*------------------------------------------------------------------ +[25. Gallery] +*/ + +.gallery { + margin: 70px auto 0 auto; +} +.gallery-item { + overflow: hidden; + cursor: default; + background-color: #000; + margin-bottom: 10px; + position: relative; + width: 280px; + height: 240px; + &:hover { + cursor: pointer; + } + &[data-width="1"] { + width: 280px; + } + &[data-width="2"] { + width: 570px; + } + &[data-height="1"] { + height: 240px; + } + &[data-height="2"] { + height: 490px; + } + & >img { + opacity: 1; + -webkit-transition: opacity 0.35s; + transition: opacity 0.35s; + } + & > .live-tile { + & img { + opacity: 1; + -webkit-transition: opacity 0.35s; + transition: opacity 0.35s; + } + } + .rating { + margin-top: -5px; + color: rgba(255, 255, 255, 0.3); + & > .rated { + color: rgba(255, 255, 255, 1); + } + } + .item-info { + -webkit-transform: translate3d(0, 40%, 0); + transform: translate3d(0, 40%, 0); + -webkit-transition: -webkit-transform 0.35s, color 0.35s; + transition: transform 0.35s, color 0.35s; + &.more-content { + -webkit-transform: translate3d(0, 32%, 0); + transform: translate3d(0, 32%, 0); + } + } + &:hover { + .item-info { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + & >img { + opacity: 0.6; + } + & > .live-tile { + & img { + opacity: 0.6; + } + } + } + &:active { + .item-info { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + & >img { + opacity: 0.6; + } + } +} +.item-details { + z-index: 1050; + .dialog__content { + width: 845px; + max-width: 845px; + padding: 0; + text-align: left; + border: 1px solid rgba(0, 0, 0, 0.8); + .dialog__overview { + height: 516px; + position: relative; + .buy-now { + position: absolute; + bottom: 20px; + right: 35px; + } + .item-slideshow .slide { + width: 516px; + height: 516px; + display: block; + overflow: hidden; + } + } + .dialog__footer { + height: 75px; + .price { + margin: 0; + padding: 0; + line-height: 75px; + } + .separator { + position: relative; + } + .separator:after { + content: ""; + width: 1px; + background: rgba(255, 255, 255, .1); + position: absolute; + height: 27px; + right: 0; + top: 24px; + } + .recommended { + li { + a { + width: 56px; + height: 56px; + display: block; + } + overflow: hidden; + img { + width: 100%; + } + } + } + } + .close { + top: 15px; + right: 15px; + z-index: 100; + } + } + .owl-nav { + left: 0; + position: absolute; + top: 50%; + width: 100%; + color: #fff; + opacity: .7; + font-size: 18px; + padding: 0 20px; + .owl-prev { + float: left; + } + .owl-next { + float: right; + } + } + .owl-dots { + bottom: 23px; + position: absolute; + right: 23px; + .owl-dot { + width: 10px; + height: 10px; + border-radius: 10px; + display: inline-block; + background: rgba(0, 0, 0, .3); + margin-left: 6px; + &.active { + background: #fff; + } + } + } +} + +.gallery-filters{ + position: absolute; + left: 0; + right: 0; + height: 70px; + top:-70px; +} +@media (max-width: 920px) { + .gallery-item.first{ + display: none; + } +} +@media (max-width: 767px) { + .item-details { + .dialog__content { + height: 90%; + overflow-y: auto; + width: 400px; + max-width: 400px; + .container-fluid { + height: 100%; + padding-left: 30px; + padding-right: 30px; + } + .dialog__overview { + height: 100%; + margin-right: -30px; + margin-left: -30px; + } + } + .item-slideshow-wrapper { + height: 515px !important; + } + .item-description { + height: auto !important; + .buy-now { + position: static !important; + float: right; + margin-bottom: 20px; + } + } + .item-slideshow { + .owl-stage-outer, .owl-stage { + height: 100%; + } + .slide { + width: 100% !important; + } + } + } +} + +@media (max-width: 420px) { + .gallery{ + margin-top: 80px; + } + .gallery-filters{ + top: -90px; + } + .item-details .dialog__content { + width: 100%; + max-width: 100%; + } +} + +@media (max-width: 610px) { + .gallery-item, .gallery { + width: 100% !important; + } +} +@media (min-width: 768px) { + .item-details .dialog__content .container-fluid > .row { + margin-left: -30px; + margin-right: -30px; + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_layout.scss b/resources/assets/sass/modules/_layout.scss new file mode 100644 index 00000000..a7be3a0a --- /dev/null +++ b/resources/assets/sass/modules/_layout.scss @@ -0,0 +1,2176 @@ +/*------------------------------------------------------------------ +[1. Layouts] +*/ +html { + height: 100%; +} +/* Body Triggers for layout options +------------------------------------------------------------------ +*/ +body { + height: 100%; + margin: 0; + padding: 0; + background-color: $color-master-lightest; + -moz-osx-font-smoothing: grayscale; + &.fixed-header { + .header { + position: fixed; + left: 0; + top: 0; + } + } + &.mobile{ + .sidebar-menu { + overflow: scroll; + -webkit-overflow-scrolling: touch; + } + .sidebar-menu > ul { + height: auto !important; + overflow: visible !important; + -webkit-overflow-scrolling: touch !important; + } + .page-sidebar .sidebar-menu .menu-items { + li{ + &:hover{ + a{ + color:$color-menu-light; + } + .icon-thumbnail{ + color:$color-menu-light !important; + } + } + &.active, &.open{ + & > a{ + color:#fff; + } + & > .icon-thumbnail{ + color:#fff; + } + } + } + } + .drager{ + overflow: auto; + -webkit-overflow-scrolling: touch; + } + } + &.sidebar-visible{ + .page-sidebar{ + .scroll-element{ + visibility: visible; + } + .menu-items { + .icon-thumbnail{ + @include translate3d(-14px,0,0); + } + } + .sidebar-header .sidebar-header-controls{ + @include translate3d(48px,0,0); + } + } + + } + &.no-header{ + .page-container .page-content-wrapper .content{ + padding-top: 0px; + } + .header{ + border-bottom-color: transparent; + } + } + &.dashboard{ + background: $dashboard-background; + .page-container{ + background: $dashboard-background; + } + } + &.menu-pin{ + .overlay{ + padding-left:0; + .overlay-brand{ + margin-left: 0; + } + } + } +} + +.zig-zag-top:before{ + background: linear-gradient(-45deg, #ffffff 16px, #ffffff 16px, #ffffff 16px, transparent 0), linear-gradient(45deg, #ffffff 16px, transparent 0); + background-position: left top; + background-repeat: repeat-x; + background-size: 22px 32px; + content: " "; + display: block; + height: 32px; + width: 100%; + position: relative; + bottom: 0px; + left:0; +} + +.zig-zag-bottom{ + margin: 32px 0; + margin-top: 0; + background: #1ba1e2; +} + +/* Page Loader +------------------------------------ +*/ +.pace{ + .pace-progress{ + background: $color-success; + height: 3px; + } + .pace-progress-inner{ + box-shadow: none; + } + .pace-activity{ + -webkit-animation: none; + animation: none; + top: 73px; + background: url('#{$base-img-url}/progress/progress-circle-success.svg') no-repeat top left; + background-size: 100% auto; + margin: 0 auto; + border-width: 0; + border-radius: 0; + width: 28px; + height: 40px; + right: 19px; + } +} +/* Header +------------------------------------ +*/ +.header{ + position: relative; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + height: $layout-header-height; + width: 100%; + padding: 0 20px 0 0; + z-index: $zIndex-navbar; + background-color: #fff; + border-bottom: 1px solid fade($color-master-light, 70%); + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + a{ + color: $color-master; + &:hover,&:active,&:focus{ + color: $color-master; + } + } + //Used only in Boxed layout + .header-inner{ + height: inherit; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + } + &.transparent { + background-color: transparent !important; + } + .brand { + vertical-align: middle; + width: $layout-sidepanel-width; + text-align: center; + } + + + .bubble{ + border-radius:100%; + height:12px; + width:12px; + background-color:$color-danger; + color:$color-white; + position:absolute; + top:-6px; + float:right; + right:-5px; + } + .notification-list{ + display:inline-block; + line-height: 23px; + } + .search-link{ + display:inline-block; + margin-left:15px; + color : $color-master; + opacity: .7; + font-size:14px; + vertical-align: middle; + line-height: 12px; + font-family:$base-font-family; + i{ + margin-right:15px; + font-size:16px; + } + &:hover{ + opacity: 1; + } + } + .pg{ + font-size: 16px; + } + ul{ + li{ + line-height: 12px; + vertical-align: middle; + } + } + .dropdown{ + line-height: 12px; + } +} +/* Bootstrap navbar +------------------------------------ +*/ +.navbar{ + min-height: 50px; + position: relative; + margin-bottom: 20px; + border: 1px solid transparent; + top: -1px; +} +.navbar-nav > li { + & > a{ + position: relative; + display: block; + padding: 10px 15px; + padding-top: 20px; + padding-bottom: 20px; + } +} +.navbar-default{ + background-color: $color-white; + .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus{ + background-color:transparent; + } + .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus{ + background-color:transparent; + } + +} + +.navbar-toggle{ + border-radius: 0; + background-color: transparent !important; +} + +.navbar-default .navbar-nav>li>a { + color: $color-master; +} +/* Main Menu Sidebar +------------------------------------ +*/ +.page-sidebar{ + width: $layout-sidepanel-width; + background-color:$color-menu; + z-index: $zIndex-sidebar; + left:$layout-sidepanel-width-collapsed - $layout-sidepanel-width; + position: fixed; + bottom: 0; + top: 0; + right: auto; + overflow: hidden; +-webkit-transition: -webkit-transform 400ms cubic-bezier($menu-bezier); + -moz-transition: -moz-transform 400ms cubic-bezier($menu-bezier); + -o-transition: -o-transform 400ms cubic-bezier($menu-bezier); + transition: transform 400ms cubic-bezier($menu-bezier); +-webkit-backface-visibility: hidden; + a,button { + color:$color-menu-light; + &:hover,&:active{ + color:$color-menu-link-hover; + } + &:visited,&:focus{ + color:$color-menu-light; + } + } + .scroll-element{ + visibility: hidden; + } + .sidebar-header{ + /* Side-bar header */ + display: block; + height: $layout-header-height; + line-height:$layout-header-height; + background-color:$color-menu-darker; + border-bottom: 1px solid mix($color-menu-darker, #000, 90%); + color: $color-white; + width: 100%; + padding: 0 20px; + padding-left: 30px; + clear: both; + z-index: 10; + position: relative; + .sidebar-header-controls{ + display: inline-block; + -webkit-transition: -webkit-transform 0.4s cubic-bezier($menu-bezier); + transition: transform 0.4s cubic-bezier($menu-bezier); + -webkit-backface-visibility: hidden; + } + .sidebar-slide-toggle i{ + @include transition(all 0.12s ease); + } + .sidebar-slide-toggle.active i{ + @include rotate(-180deg); + } + } + .close-sidebar{ + position: absolute; + right: 19px; + top: 14px; + padding: 9px; + z-index: 1; + & > i{ + color: rgba(255,255,255,0.57); + } + } + .sidebar-overlay-slide{ + /* Side-bar Top Slider */ + width: 100%; + height: 100%; + background-color:$color-menu-darker; + display:block; + z-index: 9; + padding: $layout-header-height+20 20px 20px 20px; + &.from-top{ + top:-100%; + position: absolute; + @include transition(all .2s ease); + &.show{ + @include translate(0,100%); + } + } + } + .sidebar-menu{ + /* Side-bar Menu */ + height: calc(100% - 50px); + position: relative; + width: 100%; + .outer-tab-nav-section { + display: inline-block; + width: 45px; + position: absolute; + height: 100%; + background-color: #0aa699 !important; + } + .menu-items { + /* Side-bar Menut Items */ + list-style: none; + margin: 0; + padding: 0; + margin: 0; + padding: 0; + position: relative; + overflow: auto; + -webkit-overflow-scrolling: touch; + height: calc(100% - 10px); + width: 100%; + li{ + &:hover, &.open, &.active{ + & > .icon-thumbnail{ + color: $color-menu-link-hover; + } + & > a{ + color: $color-menu-link-hover; + } + } + & > a{ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + width: 65%; + } + } + & > li { + display: block; + padding:0; + clear: right; + + &:after, &:before{ + display: table; + content: " "; + clear: both; + } + + & > a { + font-family: Arial, sans-serif; + display: inline-block; + padding-left: 32px; + min-height: $menu-icon-size; + line-height: $menu-icon-size; + font-size: 14px; + clear: both; + &.open { + background: #313131; + } + & > .arrow { + float: right; + padding-right: 30px; + &:before { + float: right; + display: inline; + font-size: 16px; + font-family: FontAwesome; + height: auto; + content: "\f104"; + font-weight: 300; + text-shadow: none; + @include transition(all 0.12s ease); + } + &.open { + &:before { + @include rotate(-90deg); + } + } + } + & > .badge { + margin-top: 12px; + } + & > .title{ + float: left; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + width: 65%; + } + & > .details{ + font-size: 12px; + opacity: 0.4; + display: block; + clear: both; + } + &.detailed{ + & > .title{ + line-height: 28px; + } + & > .details{ + line-height: 16px; + } + } + } + &.active { + & > ul { + &.sub-menu { + display: block; + } + } + } + & > .icon-thumbnail{ + &:first-letter { + text-transform: uppercase; + } + } + & > ul { + &.sub-menu { + & > li { + ul { + &.sub-menu { + li { + padding-left: 10px; + padding-right: 3px + } + .icon-thumbnail { + width: 25px; + height: 25px; + line-height: 25px; + font-size: 10px; + } + } + } + } + li { + & > a { + & > .arrow { + &:before { + float: right; + margin-top: 1px; + margin-right: 20px; + display: inline; + font-size: 16px; + font-family: FontAwesome; + height: auto; + content: "\f104"; + font-weight: 300; + text-shadow: none; + @include transition(all 0.12s ease); + } + &.open { + &:before { + float: right; + margin-top: 1px; + margin-right: 18px; + display: inline; + font-family: FontAwesome; + height: auto; + font-size: 16px; + @include rotate(-90deg); + font-weight: 300; + text-shadow: none; + } + } + } + } + + } + } + } + ul { + &.sub-menu { + display: none; + list-style: none; + clear: both; + margin: 0 0 10px 0; + background-color: $color-menu-dark; + padding: 18px 0 10px 0; + & > li { + background: none; + padding: 0px 20px 0 40px; + margin-top: 1px; + &:hover{ + & > .icon-thumbnail{ + color: $color-menu-link-hover; + } + } + & > a { + display: inline-block; + padding: 5px 0px; + font-size: 13px; + font-family: Arial, sans-serif; + white-space: normal; + } + .icon-thumbnail { + width: 30px; + height: 30px; + line-height: 30px; + margin: 0; + background-color: $color-menu; + font-size: 14px; + } + } + } + } + } + } + .muted { + color: #afafaf; + opacity:.45; + } + } + .icon-thumbnail [class^="bg-"], [class*="bg-"]{ + color: #fff; + } +} +[data-toggle-pin="sidebar"]{ + & > i:before{ + content: "\f10c"; + } +} +/* Sidebar icon holder +------------------------------------ +*/ +.icon-thumbnail { + display: inline-block; + background: $color-menu-dark; + height: $menu-icon-size; + width: $menu-icon-size; + line-height: $menu-icon-size; + text-align: center; + vertical-align: middle; + position: relative; + left: 0; + float: right; + margin-right: 14px; + color:$color-menu-light; + font-size: 16px; + -webkit-transition: -webkit-transform 0.4s cubic-bezier($menu-bezier); + transition: transform 0.4s cubic-bezier($menu-bezier); + -webkit-backface-visibility: hidden; + font-family: "Segoe UI","Helvetica Neue", Helvetica, Arial, sans-serif; + -webkit-font-smoothing:antialiased; + -webkit-text-size-adjust:100%; + -ms-text-size-adjust:100%; + font-weight: bold; + &.icon-12 { + height: 12px; + width: 12px; + line-height: 12px; + } + &.icon-25 { + height: 25px; + width: 25px; + line-height: 25px; + } + &.icon-35 { + height: 35px; + width: 35px; + line-height: 35px; + } + &.icon-50 { + height: 50px; + width: 50px; + line-height: 50px; + } + &.icon-75 { + height: 75px; + width: 75px; + line-height: 75px; + } + &.icon-100 { + height: 100px; + width: 100px; + line-height: 100px; + } + & > i{ + font-size: 14px; + } + & > svg{ + width: auto; + height: auto; + display: inline; + } +} + +.nav-collapse { + &.collapse { + height: 100% !important; + } +} + +/* Secondary App Menu */ +.toggle-secondary-sidebar{ + display: none; +} + +.secondary-sidebar { + background: $sidebar-background-color; + width: $secondary-sidebar-width; + float: left; + padding-left: 47px; + height: 100%; + position: fixed; + &.not-fixed{ + position: inherit; + } + &.open{ + position: fixed; + visibility: hidden; + display: block; + } + .btn-compose { + font-size: 13px; + font-weight: normal; + letter-spacing: 0.02em; + text-transform: uppercase; + } + .menu-title { + color: rgba($color-menu-light, .70); + font-size: 10.8px; + font-family: 'Montserrat'; + font-weight: normal; + letter-spacing: 0.03em; + } + .main-menu { + padding-left: 0; + & > li{ + list-style: none; + + &.active{ + & > a{ + color: $color-complete; + &:hover{ + color: $color-complete; + } + & > .title{ + position: relative; + &:after{ + background: $color-complete; + border-radius: 50%; + content: ""; + height: 7px; + position: absolute; + right: -14px; + top: 6.5px; + width: 7px; + } + + } + } + } + a{ + font-size: 14px; + color: $color-menu-light; + line-height: 37px; + &:hover{ + color: #fff; + } + & > .title{ + i{ + margin-right: 6px; + opacity: .9; + } + } + } + } + } + .sub-menu{ + margin-left: 23px; + li{ + list-style: none; + padding: 0; + &.active{ + a{ + color: #fff !important; + } + } + a{ + color: rgba($color-menu-light,.89); + line-height: 25px; + &:hover{ + color: #fff; + } + } + } + } + .sub-menu li a, .main-menu li a { + + .badge { + background: transparent; + font-size: 13px; + color: $color-menu-light; + line-height: 25px; + } + } + &.light{ + background-color: #fff; + border-right: 1px solid $form-control-border-color; + .menu-title { + color: fade($color-menu-light, 60%); + opacity: 1; + } + .icon-thumbnail{ + background-color: transparent; + } + .main-menu { + li{ + a{ + &:hover{ + color: $color-master-dark; + } + + } + &.active{ + & > a{ + color: $color-master-dark; + } + } + } + } + .sub-menu{ + margin-top: 5px; + li{ + &.active{ + a{ + color: $color-master-dark !important; + } + } + a{ + color: fade($color-menu-light,60%); + &:hover{ + color: $color-master-dark; + } + } + } + } + } +} + +.split-view{ + position: relative; + height: 100%; + .split-list { + float: left; + width: 360px; + background: #fff; + height: 100%; + overflow-y: auto; + position: relative; + -webkit-overflow-scrolling: touch; + border-right: 1px solid $color-master-light; + @include transition(all .5s ease); + .list-view-fake-header{ + font-size: 10.8px !important; + line-height:normal !important; + } + &.slideLeft{ + @include translate(-100%, 0); + } + .list-refresh{ + position: absolute; + right : 18px; + top: 4px; + color: $color-master; + opacity: .34; + z-index: 101; + i{ + font-size: 11px; + } + } + .list-view-fake-header, .list-view-group-header{ + background: $color-master-lighter; + height: 28px; + color: rgba($color-master, .70); + text-transform: uppercase; + font-size: 10.8px; + padding-left: 12px; + padding-top: 6px; + letter-spacing: 0.07em; + width: 100%; + } + + .item { + height: 111px; + list-style: none; + position: relative; + border-bottom: 1px solid rgba($color-master-light, .70); + cursor: pointer; + .inline { + width: 230px; + + & > * { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + font-family: arial; + } + } + .recipients { + letter-spacing: 0.01em; + padding-bottom: 2px; + } + .checkbox{ + float: left; + clear: left; + display: none; + max-width: 32px; + } + .subject { + font-family: 'Helvetica'; + font-size: 14.33px; + color: $color-info; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + height: 38px; + display: -webkit-box; + white-space: normal; + line-height: 18px; + } + .body { + // color: #75828e; + font-size: 12.6px; + opacity: .52; + height: 22px; + } + .datetime { + color: $color-master-darkest; + font-family: arial; + font-size: 11.1px; + position: absolute; + right: 20px; + top: 15px; + opacity: 0.46; + } + } + } + + .split-details { + position: relative; + overflow: auto; + height: 100%; + .no-result{ + bottom: 0; + left: 0; + margin-top: -34px; + opacity: 0.5; + position: absolute; + right: 0; + text-align:center; + top: 50%; + } + .actions{ + height: 50px; + float: left; + li{ + list-style: none; + position: relative; + &:last-child:after{ + display: none; + } + &:after{ + content: ""; + height: 14px; + position: absolute; + right: -4px; + top: 18px; + width: 1px; + background: rgba(0,0,0,.07); + } + a{ + font-size: 13.1px; + color: $color-master; + font-weight: 600; + padding: 0 13px; + line-height: 50px; + white-space: nowrap; + } + } + } + + } +} +.inner-content{ + margin-top: 0px; + padding: 0px; + overflow: auto; + min-height: 100%; + margin-left: $secondary-sidebar-width; +} + +/* Quick View +------------------------------------ +*/ +.quickview-wrapper{ + position:fixed; + right:-$layout-right-quickview-width; + top:0; + width:$layout-right-quickview-width; + background:#fff; + bottom:0; + z-index:1000; + box-shadow:0 0 9px rgba(191,191,191,.36); + border-left: 1px solid rgba(222,227,231,.56); + -webkit-transition: -webkit-transform 400ms cubic-bezier($menu-bezier); + transition: transform 400ms cubic-bezier($menu-bezier); + -webkit-backface-visibility: hidden; + -ms-backface-visibility:hidden; + &.open{ + @include translate3d(-100%,0,0); + } + .quickview-toggle{ + position: absolute; + right: 12px; + top: 2px; + color: $color-menu-light; + padding: 6px; + opacity: 0.4; + &:hover{ + opacity: 1; + } + } + .nav-tabs{ + /* Quickview Tabs */ + background-color: $color-menu; + position: relative; + padding: 0 43px; + & > li{ + & > a{ + padding:11px; + color: $color-menu-light; + border: 0; + text-align: center; + font-size: 11px; + font-weight: bold; + min-width: 62px; + line-height: 1.4; + & > span{ + opacity: 0.6; + } + &:hover{ + & > span{ + color: $color-menu-light; + opacity: 1; + } + } + } + &.active{ + & > a, & > a:hover, & > a:focus{ + background-color: transparent; + border: 0; + color: mix($color-menu-light, #fff, 37%); + opacity: 1; + } + } + } + ~ .tab-content{ + position:absolute; + padding: 0; + left: 0; + right: 0; + top: 38px; + bottom: 0; + height: auto; + & > div{ + height:100%; + } + ul{ + margin:0; + padding:0; + li{ + list-style:none; + } + } + .quickview-notes{ + /* Quickview Notes */ + background:#fbf9e3; + a, button{ + color:#968974; + } + .list{ + position:relative; + .toolbar{ + height:50px; + padding:0 25px; + ul { + margin-top:10px; + & > li{ + display:inline-block; + height:auto; + a{ + height:22px; + line-height:22px; + display:block; + padding:0 5px; + &:hover, &.selected{ + background:#968974; + color:#FBF9E3; + } + } + } + } + .btn-remove-notes{ + background:transparent; + bottom: 8px; + display: block; + left: 50%; + margin-left: -40%; + position: absolute; + width: 83%; + border:1px solid #968974; + } + } + & > ul { + padding:0; + li{ + cursor:pointer; + height:42px; + padding:0 25px; + display:block; + clear:both; + .left{ + float:left; + width:65%; + height:100%; + padding-top:9px; + .checkbox{ + display:none; + float:left; + label{ + margin-right:0; + vertical-align:text-top; + } + } + p{ + margin:0; + font-size:13px; + font-weight:bold; + width: 100px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align:middle; + display:inline-block; + } + } + .right{ + font-size:10.5px; + text-align:right; + width:35%; + line-height: 41px; + .date{ + margin-right:10px; + } + } + &:hover{ + background:#f4ecd1; + } + + } + } + } + .note{ + /* Quickview Note */ + background-image:url('#{$base-img-url}/notes_lines.png'); + background-repeat:repeat-y; + background-position:27px top; + & > div{ + display:table; height:100%; width:100%; + } + .toolbar { + background:#fcfcfa; + height:35px; + width:100%; + display:table-row; + box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.33); + & > li{ + display:inline-block; + border-right: 1px solid #EDECEC; + float: left; + line-height: 37px; + padding: 0; + text-align: center; + width: 40px; + height:auto; + & > a{ + color:#a5a5a5; + display:block; + &:hover{ + background:#fffaf6; + } + &.active{ + color:#333; + background:#f9f1ea; + } + } + } + &:after{ + position:absolute; + content:""; + width:100%; + } + } + .body { + display:table-row; + height:100%; + & > div{ + display:table; + height:100%; + width: 100%; + padding:0 20px 0 45px; + white-space: normal; + } + .top{ + height:50px; + display:table-row; + clear:both; + line-height:50px; + text-align:center; + & > a{ + float:left; + color:#b0b0a8; + margin-left:10px; + } + & > span{ + font-style:italic; + color:#b0b0a8; + font-size:11px; + } + } + .content{ + display:table-row; + height:100%; + form{ + height:100%; + + } + .quick-note-editor{ + font-size:12px; + &:focus{ + outline: none; + } + &::-moz-selection{ + background:#fef8ae; + } + &::selection{ + background:#fef8ae; + } + } + + } + } + } + } + } + } +} + +/* Page Container +------------------------------------ +*/ +.page-container { + width:100%; + height:100%; + padding-left: $layout-sidepanel-width-collapsed; + .page-content-wrapper{ + min-height: 100%; + position: relative; + .content { + /* Content holder */ + z-index: 10; + padding-top: 102px; + padding-bottom: 30px; + min-height: 100%; + @include transition(all 0.3s ease); + &.full-width{ + width: 100%; + } + .content-inner{ + display: inline-block; + vertical-align: top; + height: 100%; + padding-left: 30px; + position: relative; + } + &:only-child{ + padding-bottom:0px; + } + &.overlay-footer{ + padding-bottom:0px; + } + } + .footer{ + /* Footer */ + position: absolute; + left: 0; + right: 0; + bottom: 0px; + @include transition(left 0.3s ease); + &.fixed{ + position: fixed; + } + } + } +} +.page-title{ + margin-top: 0px; +} +/* Breadcrumbs +------------------------------------ +*/ +.breadcrumb { + font-family: 'Montserrat'; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; + box-shadow: none; + background-color: transparent; + padding: 15px 0; + margin: 0; + border: none; + text-transform:uppercase; + display: block; + &.breadcrumb-alt{ + padding: 8px 0; + text-transform: none; + font-family:"Segoe UI", Arial, sans-serif; + a{ + letter-spacing: normal; + color: #000; + font-size: 12px !important; + } + & > .breadcrumb-item, + & > .breadcrumb-item.active { + letter-spacing: normal; + opacity: .46; + color: #000; + font-size: 12px !important; + } + } + a { + margin-left: 5px; + margin-right: 5px; + font-size: 10.5px !important; + letter-spacing: 0.06em; + font-weight: 400; + color: #7b7d82; + } + .breadcrumb-item { + padding-left:0px; + } + & > .breadcrumb-item{ + & + .breadcrumb-item{ + &:before { + padding: 0 5px; + color: #515050; + font-family: FontAwesome; + content: "\f105"; + font-size: 12px; + font-weight:bold; + } + } + &.active{ + font-weight: 500; + color: #0090d9; + margin-left: 5px; + margin-right: 5px; + font-size: 10.5px !important; + letter-spacing: 0.06em; + &:before { + padding-right: 10px; + } + } + } +} +/* Overlay Search +------------------------------------ +*/ +.overlay{ + position:fixed; + left:0; + right:0; + top:0; + bottom:0; + background:rgba(255,255,255,.95); + z-index:1010; + padding-left: 64px; + overflow:auto; + .inline-block{ + display:inline-block; + } + .overlay-brand{ + margin-left: 7px; + } + & > div{ + width:100%; + height:260px; + display:block; + overflow:hidden; + } + .has-results{ + overflow: visible; + } + .overlay-search{ + font-weight:700; + font-size: 77px; + height: 100px; + letter-spacing: -1.925px; + line-height: 100px; + width:100%; + padding-left:0 !important; + } + .overlay-close{ + position:absolute; + right:20px; + top:5px; + } + +} + +.group-container { + white-space: nowrap !important; + .single-group { + vertical-align: top; + display: inline-block; + white-space: normal; + } +} + +.jumbotron{ + position: relative; + overflow: hidden; + display: block; + padding: 0; + .inner{ + position: relative; + z-index: 2; + } + &.lg{ + height: 600px; + } + + background-color: $color-master-lighter; + .cover-photo{ + width: 100%; + height: inherit; + overflow: hidden; + @include transition(opacity .3s ease); + background-size: cover; + background-color: $color-success; + img{ + display:none; + } + } + h1 { + font-size: 44px; + } +} + +/* Pages Scroll bar +------------------------------------ +*/ + +.scroll{ + position: relative; + overflow: auto; +} + +.scroll-wrapper { + & > .scroll-element, > .scroll-element div{ + background: none; + border: none; + margin: 0; + padding: 0; + position: absolute; + z-index: 10; + } + & > .scroll-element div { + display: block; + height: 100%; + left: 0; + top: 0; + width: 100%; + } + & > .scroll-element.scroll-x { + bottom: 2px; + height: 7px; + left: 0; + min-width: 100%; + width: 100%; + } + + & > .scroll-element.scroll-y { + height: 100%; + min-height: 100%; + right: 2px; + top: 0; + width: 4px; + } + & > .scroll-element{ + .scroll-element_outer { + opacity: 0.3; + } + .scroll-element_size { + background-color: rgba(0,0,0,0.07); + opacity: 0; + } + .scroll-bar { + background-color:#697686; + } + + &.scroll-x{ + .scroll-bar { + bottom: 0; + height: 4px; + min-width: 24px; + top: auto; + } + .scroll-element_outer { + bottom: 0; + top: auto; + left: 2px; + -webkit-transition: height 0.2s; + transition: height 0.2s; + } + .scroll-element_size { left: -4px; } + } + &.scroll-y{ + .scroll-bar { + left: auto; + min-height: 24px; + right: 0; + width: 4px; + } + .scroll-element_outer { + left: auto; + right: 0; + top: 2px; + -webkit-transition: all 0.2s; + transition: all 0.2s; + } + .scroll-element_size { top: -4px; } + } + } + & > .scroll-content{ + box-sizing: inherit !important; + } + &.auto-hide{ + & > .scroll-element{ + .scroll-element_track { + display: none; + } + } + } +} + +.scroll-wrapper > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size { left: -11px; } +.scroll-wrapper > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size { top: -11px; } + +/* hover & drag */ + +.scroll-wrapper > .scroll-element:hover .scroll-element_outer, +.scroll-wrapper > .scroll-element.scroll-draggable .scroll-element_outer { + overflow: hidden; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; + filter: alpha(opacity=70); + opacity: 0.7; +} +.scroll-wrapper > .scroll-element:hover .scroll-element_outer .scroll-element_size, +.scroll-wrapper > .scroll-element.scroll-draggable .scroll-element_outer .scroll-element_size { + opacity: 1; +} +.scroll-wrapper > .scroll-element:hover .scroll-element_outer .scroll-bar, +.scroll-wrapper > .scroll-element.scroll-draggable .scroll-element_outer .scroll-bar { + height: 100%; + width: 100%; +} + +.scroll-wrapper > .scroll-element.scroll-x:hover .scroll-element_outer, +.scroll-wrapper > .scroll-element.scroll-x.scroll-draggable .scroll-element_outer { + height: 10px; + min-height: 7px; +} +.scroll-wrapper > .scroll-element.scroll-y:hover .scroll-element_outer, +.scroll-wrapper > .scroll-element.scroll-y.scroll-draggable .scroll-element_outer { + min-width: 7px; + width: 7px; +} + +/* Other overides */ + +.container-fluid { +padding-left: 30px; +padding-right: 30px; + +} + +.copyright{ + padding: 25px 0; + border-top: 1px solid fade($color-master-light,70%); +} + +.navbar-center, .navbar-center > li{ + float:none; + display:inline-block; + *display:inline; /* ie7 fix */ + *zoom:1; /* hasLayout ie7 trigger */ + vertical-align: top; +} + +.navbar-nav{ + li a{ + min-width: 50px; + } +} + +.pager{ + margin: 0; +} + + +.horizontal-app-menu { + @include flexbox(); + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + &.fixed-header { + //overflow: hidden; + .header { + position: fixed; + } + .page-container { + overflow-x: hidden; + -webkit-overflow-scrolling: touch; + } + } + .header { + height: auto; + border-bottom: none; + background-color: $color-menu; + color: $color-menu-light; + display: block; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; + .header-inner { + height: 60px; + background-color: $color-menu; + position: relative; + color: $color-menu-light; + } + .header-lg-height { + height: $header-lg-height; + } + .header-md-height { + height: $header-md-height; + } + .header-sm-height { + height: $header-sm-height; + } + .search-link { + color: $color-menu-light; + } + .header-inner { + .brand.inline { + position: relative; + border-right: 1px solid #40444d; + padding-right: 15px; + margin-right: 0px; + width: auto; + & > img { + width: auto; + } + } + } + .notification-list { + border: none; + } + .title-bar { + padding-bottom: 18px; + } + .page-title { + color: $color-menu-light; + font-size: 21px; + line-height: 21px; + font-weight: normal; + margin-bottom: 0; + margin-left: 15px; + } + .bubble { + top: 1px; + right: 3px; + } + .pg { + color: $color-menu-light; + display: block; + } + } + .menu-bar { + @include flexbox(); + position: relative; + color: $color-menu-light; + //Globals Nav Items + ul { + margin: 0; + padding: 0; + list-style: none; + @include border-radius(3px); + li a { + .arrow { + position: relative; + @include flex-inline(); + @include align-items(center); + padding-left: 15px; + width: 23px; + &:before { + font-size: 16px; + font-family: FontAwesome; + height: auto; + content: "\f104"; + font-weight: 300; + text-shadow: none; + position: relative; + top: 2px; + @include rotate(-90deg); + @include transition(all 0.12s ease); + } + } + } + li { + line-height: 24px; + .sub-menu { + padding: 0; + left: 50%; + top: 0; + position: absolute; + visibility: hidden; + opacity: 0; + min-width: calc(100% + 4px); + padding: 18px $menu-padding; + background: #fff; + z-index: 1; + position: absolute; + @include box-shadow(0px 0px 16px 0px rgba(0, 0, 0, 0.08)); + @include translate3d(15px, 0, 0); + @include transition(all 0.15s ease-in); + li a { + min-width: 50px; + width: 100%; + padding: 4px 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display: block; + } + } + &:hover { + & > .sub-menu { + visibility: visible; + opacity: 1; + @include translate3d(34%, 0, 0); + } + } + } + } + //Level One + & > ul { + @include flexbox(); + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-flow: row nowrap; + flex-flow: row nowrap; + & > li { + -webkit-box-flex: 1; + -ms-flex: 1 0 auto; + flex: 1 0 auto; + @include flex-inline(); + @include align-items(center); + padding: 0; + position: relative; + &:first-child { + & > a { + padding-left: 0; + } + } + &:last-child { + & > a { + padding-right: 0; + } + } + & > a { + padding: 0 20px; + } + & > ul { + display: none; + opacity: 0; + list-style: none; + border: 0; + top: -7px; + left: -4px; + min-width: calc(100% + 4px); + padding: 0 $menu-padding; + padding-top: 60px; + padding-bottom: 18px; + background: #fff; + z-index: 1; + position: absolute; + @include box-shadow(0px 0px 16px 0px rgba(0, 0, 0, 0.08)); + } + &.open { + //Level two and below + & > ul { + display: block; + &:before { + content: ''; + position: absolute; + height: 1px; + top: $navbar-width + 7px; + //width: calc(100% - $menu-padding * 2); + background-color: $form-control-border-color; + } + & > li { + padding-left: 0; + @include translate3d(0, -10px, 0); + opacity: 1; + transition: all 0.18s ease; + & > a { + min-width: 50px; + width: 100%; + padding: 4px 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + @include flexbox(); + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + & > .arrow:before { + @include rotate(180deg); + } + } + } + + } + & > a { + @include translate3d(0, -10px, 0); + opacity: 0; + transition: all 0.18s ease !important; + } + } + &.opening { + & > ul { + opacity: 1; + & > li { + @include translate3d(0, 0, 0); + opacity: 1; + } + } + & > a { + position: relative; + z-index: 10; + @include translate3d(0, 0, 0); + opacity: 1; + } + } + &.closing { + & > ul { + opacity: 0; + & > li { + @include translate3d(0, -10px, 0); + opacity: 0; + } + } + & > a { + @include translate3d(0, -10px, 0); + opacity: 0; + } + } + } + li > a { + color: $color-menu-light; + } + } + } + .page-container{ + padding-left:0; + .page-content-wrapper .content{ + padding-top: 105px; + } + } + .ghost-nav-dropdown{ + top: -7px; + left: -4px; + background: #fff; + z-index: 1000; + position: absolute; + @include box-shadow(0px 0px 16px 0px rgba(0, 0, 0, 0.08)); + @include border-radius(3px); + transition: all 0.18s ease-in; + } + //calendar overwrites + .calendar { + .calendar-header{ + background-color: transparent; + padding-left: 0; + position: relative; + left: -20px; + } + .months .month:first-child{ + padding-left: 0; + } + .weeks-wrapper{ + margin-left:0; + padding-left: 0; + } + .week-dragger{ + margin-left:0; + } + .calendar-container .grid{ + overflow: hidden; + } + } +} + +@media (max-width:991px){ + body.horizontal-menu-open{ + .header{ + z-index: $zIndex-quickview; + } + } + .horizontal-menu-backdrop{ + background: rgba(0, 0, 0, .5); + position: absolute; + left:0; + right:0; + bottom: 0; + top: 0; + z-index: $zIndex-quickview - 1; + opacity: 0; + transition:opacity .3s ease; + pointer-events: none; + &.open{ + opacity: 1; + } + } + .horizontal-app-menu{ + .menu-bar{ + position: fixed; + top: 0; + bottom: 0; + background-color: $color-menu; + width: 270px; + right: -270px; + overflow-y: auto; + -webkit-transition: -webkit-transform 400ms cubic-bezier($menu-bezier); + transition: transform 400ms cubic-bezier($menu-bezier); + -webkit-backface-visibility: hidden; + -ms-backface-visibility:hidden; + + &.open{ + @include translate3d(-100%,0,0); + } + & > ul{ + flex-flow: column nowrap; + & > li{ + a{ + &:first-child{ + padding-left: 30px; + } + &:last-child{ + padding-left: 35px; + } + } + } + } + ul { + width: 100%; + li{ + min-height: 45px; + @include flexbox(); + flex-direction: column; + + & > ul{ + padding: 0; + overflow: hidden; + margin-top: 6px; + position: static; + background: $color-menu-dark; + opacity: 1; + } + width: 100%; + a{ + padding-left: 35px !important; + text-transform: uppercase; + width: 100%; + line-height: 40px; + & > .arrow{ + float: right; + } + } + &.active{ + border: 2px solid $color-primary; + } + } + } + } + &[data-pages-direction="slideRight"] { + right: 0; + } + .header .header-sm-height{ + height: 100%; + } + .ghost-nav-dropdown{ + display: none; + } + } + +} + +@media (min-width: 980px){ +.horizontal-menu{ + .page-content { + margin-left: 0; + .content { + padding-top: 123px; + } + } +} +} + +.hover-parent { + .hover-item { + visibility: hidden; + } + &:hover { + .hover-item { + visibility: visible; + } + } +} + +.inline-file-selector { + .image-container { + width: 50px; + height: 50px; + background-size: cover; + background-position: center; + .overlay-preview { + background-color: rgba(0,0,0,0.2); + display: none; + } + &:hover { + .overlay-preview { + display: block; + + } + } + } +} + +.mfp-close { + display: none !important; +} + +.mfp-figure:after { + box-shadow: none !important; + background: none !important; +} + +.profile-picture { + height: 150px; + background-size: 75%; + background-position: center; + background-repeat: no-repeat; +} + +.select2-container { + width: 100% !important; +} + +.select2-container--open { + z-index: 1050 !important; +} + +.select2-container--open .select2-dropdown { + border-radius: 0px !important; + border: solid 1px rgba(0, 0, 0, 0.07); + border-top: none; + left: -1px; + margin-top: -25px; + box-sizing: content-box; +} + +.select2-dropdown { + box-shadow: none !important; + &.select2-dark { + background-color: $color-master !important; + .select2-search--dropdown .select2-search__field { + background-color: $color-master-dark !important; + color: $color-master-lightest; + } + .select2-results { + li { + color: $color-master-lighter !important; + &.select2-results__option--highlighted { + color: $color-white !important; + background-color: $color-master-darkest !important; + } + } + } + } +} + +select2-dropdown, +.select2-container--bootstrap .select2-selection.form-control { + padding-top: 0.8rem !important; + height: calc(2em + 1.5rem) !important; +} + +.select2-container { + width: 100% !important; +} + +.select2-results__option[aria-disabled="true"] { + display: none; +} + +.select2-dark { + .select2-container--default { + .select2-selection__arrow b { + border-color: #fff transparent transparent transparent !important; + } + } + .select2-container--open { + .select2-selection__arrow b { + border-color: transparent transparent #fff transparent !important; + } + } +} + +.side-tab { + .tab-container { + border-left: solid 3px transparent !important; + } + .active .tab-container { + border-left: solid 3px $color-primary !important; + } +} + +.ellipsis-line-2 { + height: 3em; + line-height: 1.5em; + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.slider { + height: auto; + animation-name: slideDown; + -webkit-animation-name: slideDown; + + animation-duration: 1s; + -webkit-animation-duration: 1s; + + animation-timing-function: ease; + -webkit-animation-timing-function: ease; + + visibility: visible !important; + + &.close { + height: 0px !important; + overflow: hidden; + } +} + +.order-history-border { + height: .1875rem; + width: 100%; + background-position-x: -1.875rem; + background-size: 7.25rem .1875rem; + background-image: repeating-linear-gradient(45deg,$color-complete,$color-complete 33px,transparent 0,transparent 41px,$color-primary 0,$color-primary 74px,transparent 0,transparent 82px); +} + +.bullet-connector { + width: 2px; + height: 100%; + background: $color-master-light; + top: 0px; + left: 18px; + &.thin{ + width: 1px; + } +} +.noty_bar { + .noty_body { + padding: 15px; + padding-bottom: 10px; + } + .noty_buttons { + padding: 15px; + padding-top: 0; + padding-bottom: 0; + } +} diff --git a/resources/assets/sass/modules/_list.scss b/resources/assets/sass/modules/_list.scss new file mode 100644 index 00000000..ceaf9ec9 --- /dev/null +++ b/resources/assets/sass/modules/_list.scss @@ -0,0 +1,210 @@ +/*------------------------------------------------------------------ +[18. List] +*/ +.list-view-wrapper{ + height: 100%; + overflow-x: hidden; + overflow-y: auto; + position: absolute; + width: 100%; + -webkit-overflow-scrolling: touch; +} + +.list-view-container{ + position: relative; + .list-quickscroll{ + ul { + list-style: none; + margin: 0; + padding: 0; + position: absolute; + top:0; + right: 10px; + z-index: 120; + padding-top: 10px; + padding-bottom: 10px; + li a{ + font-size: 0.7em; + vertical-align: baseline; + } + } + + } +} + +.list-view-group-container { + margin: 0; + min-height: 1px; + overflow: hidden; + padding: 26px 0 0 0; + position: relative; + &:last-child{ + ul{ + border: 0; + } + } +} +.list-view-group-header, .list-view-fake-header { + background: $color-master-lightest; + color: #232830; + font: normal 11px/14px 'Montserrat',Arial; + text-transform: uppercase; + margin: 0; + padding: 6px 0 5px 15px; + position: absolute; + z-index: 10; +} +.list-view-group-header { + bottom: auto; + min-height: 1px; + top: 0; + width: 100%; + border-top: 0; +} +.list-view-fake-header { + width: 100%; + z-index: 100; + font-size: 11px !important; + line-height: 14px !important; +} + +.list-view-fake-header.list-view-hidden { + visibility: hidden; +} +.list-view-group-container.list-view-animated .list-view-group-header { + bottom: 0; + top: auto; +} + + +input.list-view-search{ + font-size: 15px; + color: #232830; +} + +.no-top-border{ + .list-view-fake-header { + border-top: 0; + } +} + +.list-view { + ul { + list-style: none; + margin: 0; + padding: 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.07); + } + li{ + padding-left:15px; + white-space: nowrap; + cursor: pointer; + width: 100%; + display: table; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + &:hover { + background-color: $color-complete-lighter; + } + &.active{ + background-color: $color-warning-lighter; + } + p{ + margin: 0; + line-height: 19px; + } + & > a{ + margin-right: 15px; + width: 100%; + } + & > *{ + @include flexbox(); + -webkit-box-orient: horizontal!important; + -webkit-box-direction: normal!important; + -webkit-flex-direction: row!important; + -ms-flex-direction: row!important; + flex-direction: row!important; + @include align-items(center); + } + } + &.boreded{ + li{ + & > a { + border-bottom: 1px solid rgba(0, 0, 0, 0.07); + } + &:last-child > a{ + border-bottom: 0; + } + } + } + +} + + +.list-view.boreded li + li { + border-top: 0; +} + +[data-ios="true"] .list-view-group-header, +[data-ios="true"] .list-view-fake-header { + width: 288px; /*scrollbars aren't visible in iOS devices, so make the headers wider */ +} + +//Bootstrap-List +.list-group-item{ + border: 1px solid $color-master-lighter; + &.active, &.active:hover, &.active:focus{ + background-color:$color-success-light; + border-color:$color-success-light; + } +} + +.list-group-item:first-child{ + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} +.list-group-item:last-child{ + border-bottom-right-radius: 2px; + border-bottom-left-radius: 2px; +} + + +.list-inline { + >li{ + display: inline-block; + padding-right: 5px; + padding-left: 5px; + } +} + + +.breadcrumb{ + a, i, span, li{ + color: #7b7d82; + font-weight: 300; + text-shadow: none; + } +} +.breadcrumb { + li { + padding-left: 0px; + display: inline-block; + a{ + &.active { + font-weight: 600; + color: #0090d9; + } + } + +li{ + &::before{ + padding: 0 5px; + color: #515050; + font-family: FontAwesome; + content: "\f105"; + font-weight: bold; + } + } + } +} diff --git a/resources/assets/sass/modules/_lock_screen.scss b/resources/assets/sass/modules/_lock_screen.scss new file mode 100644 index 00000000..94463735 --- /dev/null +++ b/resources/assets/sass/modules/_lock_screen.scss @@ -0,0 +1,92 @@ +/*------------------------------------------------------------------ +[23. Lock Screen] +*/ + +.lock-container{ + margin-left: auto; + margin-right: auto; + width: 600px; +} + +.lock-screen-wrapper { + .credentials { + margin-top: -84px; + position: absolute; + top: 50%; + .thumbnail-wrapper { + width: 53px; + height: 53px; + } + .logged { + opacity: .21; + margin-top: -5px !important; + } + .name { + opacity: .69; + margin-top: -5px !important; + font-size: 36px; + height: 45px; + overflow: hidden; + } + } + .terms-wrapper { + & > div { + display: table; + } + .terms { + display: table-cell; + vertical-align: middle; + } + .logo-terms { + width: 60px; + height: 60px; + border-radius: 15px; + text-align: center; + position: relative; + .brand { + left: 50%; + margin-left: -21px; + margin-top: -5px; + position: absolute; + top: 50%; + } + } + } +} + +/* Responsive Handlers : Lockscreen +------------------------------------ +*/ +@media (max-width: 767px) { + .lock-container{ + width: 80%; + } + .lock-screen-wrapper { + .credentials { + form { + margin-top: 15px; + } + } + } +} + +@media (max-width: 480px) { + + .lock-screen-wrapper { + .credentials { + margin: 0; + position: static; + margin-top: 100px; + width: 100%; + float: left; + clear: both; + & > div { + text-align: center; + } + .thumbnail-wrapper { + float: none; + margin: 0 auto; + } + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_login.scss b/resources/assets/sass/modules/_login.scss new file mode 100644 index 00000000..9b5361fe --- /dev/null +++ b/resources/assets/sass/modules/_login.scss @@ -0,0 +1,70 @@ +/*------------------------------------------------------------------ +[22. Login] +*/ + +.login-triangle { + display: inline-block; + position: absolute; + right: 0; top: 0; + width: 0; + height: 0; + border-style: solid; + border-width: 0 0 100vh 14rem; + border-color: transparent transparent #fff; + z-index: 10; +} + +.login-wrapper { + background: linear-gradient(rgba(0, 0, 0, 0.6), $color-primary), url('../images/iStock-976354264_Malaysia.jpg'); + background-size: cover; + padding: 80px 0 20px 0; + min-height: 100%; + .bg-pic{ + position: absolute; + width: 100%; + overflow: hidden; + & > img{ + height: 100%; + opacity: 0.6; + } + } + .login-container{ + width: 496px; + display: block; + position: relative; + float:right; + } + .bg-caption{ + width: 500px; + } +} +.register-container{ + width: 550px; + margin: auto; + height: 100%; +} + + +/* Responsive handlers : Login +------------------------------------ +*/ + +@media (max-width: 768px) { + .login-wrapper{ + .login-container{ + width: 100%; + } + } + .register-container{ + width: 100%; + padding: 15px; + } +} + +@media only screen and (max-width : 321px) { + .login-wrapper{ + .login-container{ + width: 100%; + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_misc.scss b/resources/assets/sass/modules/_misc.scss new file mode 100644 index 00000000..714c02d7 --- /dev/null +++ b/resources/assets/sass/modules/_misc.scss @@ -0,0 +1,718 @@ +/*------------------------------------------------------------------ +[28. Misc : Helper Classes] +*/ +.custom{ + height:150px; +} + +.icon-list{ + .fa-item{ + display: block; + color: $color-master-darkest; + line-height: 32px; + height: 32px; + padding-left: 10px; + & > i{ + width: 32px; + font-size: 14px; + display: inline-block; + text-align: right; + margin-right: 10px; + } + } +} +/* Thumbnail for icons and profile pics +------------------------------------ +*/ +.thumbnail-wrapper{ + display: inline-block; + overflow: hidden; + float:left; + &.circular{ + @include border-radius(50%); + } + &.bordered{ + border-width: 4px; + border-style:solid; + &.d16{ + @include square(16+4*1px); + & > *{ + line-height: 12px + } + } + &.d24{ + @include square(24+4*1px); + & > *{ + line-height: 24px + } + } + &.d32{ + @include square(32+4*1px); + & > *{ + line-height: 28px + } + } + &.d48{ + @include square(48+4*1px); + & > *{ + line-height: 44px + } + } + } + &.d16{ + @include square(16px); + & > *{ + line-height: 16px + } + } + &.d24{ + @include square(24px); + & > *{ + line-height: 24px + } + } + &.d32{ + @include square(32px); + & > *{ + line-height: 32px + } + } + &.d39{ + @include square(39px); + & > *{ + line-height: 39px + } + } + &.d48{ + @include square(48px); + & > *{ + line-height: 50px + } + } + & > *{ + vertical-align: middle; + width: 100%; + height: 100%; + text-align: center; + } +} + +/* Profile dropdown +------------------------------------ +*/ +.profile-dropdown{ + background: #fff; + padding: 0; + &:before { + position: absolute; + top: -7px; + right: 15px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; + } + + &:after { + position: absolute; + top: -6px; + right: 16px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; + } + & > a{ + opacity: .5; + @include transition(opacity ease .3s); + padding-left:17px; + padding-right:37px; + min-width: 138px; + & > i { + margin-right:5px; + } + &:hover{ + opacity: 1; + } + &:last-child{ + margin-top: 11px; + padding-bottom: 3px !important; + padding-top: 3px; + } + } +} +.profile-dropdown-toggle{ + background: transparent; + border: none; +} +/* Scroll +------------------------------------ +*/ +.scrollable { + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/* Overides +------------------------------------ +*/ +.no-padding { + padding: 0px !important; +} + +.no-margin { + margin: 0px !important; +} + +.no-overflow{ + overflow: hidden !important; +} + +.auto-overflow{ + overflow: auto; +} + +.center-margin{ + margin-left: auto; + margin-right: auto; +} + +.inherit-size{ + width:inherit; + height:inherit +} +.inherit-height{ + height:inherit; +} + +.image-responsive-height{ + width: 100%; +} +.image-responsive-width{ + height: 100%; +} +.overlayer { + position: absolute; + display: block; + z-index: 21; + &.fullwidth { + width: 100%; + } +} +.overlayer-wrapper { + position: relative; + display: block; + z-index: 10; +} +.overlay-fixed { + position: fixed !important; + top: auto !important; +} +.top-left { + position: absolute !important; + top: 0; + left: 0; +} +.top-right { + position: absolute !important; + top: 1px; + right: 0; +} +.bottom-left { + position: absolute !important; + bottom: 1px; + left: 0; +} +.bottom-right { + position: absolute !important; + bottom: 0; + right: 0; +} +.pull-bottom{ + position: absolute !important; + bottom: 0; +} + +.pull-up{ + position:absolute !important; + top: 0; +} + +.pull-center { + position: absolute; + left: 0; + right: 0; + width: 100%; + display: table; + z-index: 1; +} + +.cursor{ + cursor: pointer; +} +.scroll-x-hidden{ + overflow-x: hidden !important; +} + +/* Generic Padding Helpers +------------------------------------ +*/ + +@mixin generate-padding-options($n, $j:0){ + @if $j <= $n { + @for $i from $j through $n { + $step : $i*5; + + .p-t-#{$step} { + padding-top: ($step*1px) !important; + } + .p-r-#{$step} { + padding-right: ($step*1px) !important; + } + .p-l-#{$step} { + padding-left: ($step*1px) !important; + } + .p-b-#{$step} { + padding-bottom: ($step*1px) !important; + } + .padding-#{$step} { + padding: ($step*1px) !important; + } + } + } +} + +@include generate-padding-options(10); + +/* Generic Margin Helpers +------------------------------------ + */ +@mixin generate-margin-options($n, $j: 0) { + @if $j <= $n { + @for $i from $j through $n { + $step : $i*5; + .m-t-#{$step} { + margin-top: ($step*1px); + } + .m-r-#{$step} { + margin-right: ($step*1px); + } + .m-l-#{$step} { + margin-left: ($step*1px); + } + .m-b-#{$step} { + margin-bottom: ($step*1px); + } + } + } +} + +@include generate-margin-options(10); + +@mixin generate-font-size($n, $j: 0) { + @if $j <= $n { + @for $i from $j through $n { + $step : $i*1; + .fs-#{$step} { + font-size: ($step*1px) !important; + } + } + } +} + +@include generate-font-size(100); + +@mixin generate-line-height($n, $j: 0) { + @if $j <= $n { + @for $i from $j through $n { + $step : $i*1; + .lh-#{$step} { + line-height: ($step*1px) !important; + } + } + } +} + +@include generate-line-height(50); + +.full-height{ + height: 100% !important; +} +.full-width{ + width: 100%; +} +.hide { + display: none !important; +} +.inline{ + display:inline-block !important; +} +.block{ + display: block !important; +} +.b-blank{ + border-color:#000; +} + +/* Border Helpers +------------------------------------ +*/ +.b-a, +.b-r, +.b-l, +.b-t, +.b-b{ + border-style: solid; + border-width: 0; +} + +.b-r{ + border-right-width:1px; +} +.b-l{ + border-left-width:1px; +} +.b-t{ + border-top-width:1px; +} +.b-b{ + border-bottom-width:1px; +} +.b-a{ + border-width:1px; +} + +.b-dashed{ + border-style: dashed; +} + +.b-thick{ + border-width : 2px !important; +} + +.b-transparent{ + border-color:rgba(0, 0, 0, 0.4); +} +.b-transparent-white{ + border-color:rgba(255, 255, 255, 0.3); +} +.b-grey{ + border-color:$color-master-lighter !important; +} +.b-white{ + border-color:#fff !important; +} +.b-primary{ + border-color:$color-primary !important; +} +.b-complete{ + border-color:$color-complete !important; +} +.b-success{ + border-color:$color-success !important; +} +.b-info{ + border-color:$color-info !important; +} +.b-danger{ + border-color:$color-danger !important; +} +.b-warning{ + border-color:$color-warning !important; +} +/* Border Radius +------------------------------------ +*/ +.b-rad-none{ + @include border-radius(0px); +} +.b-rad-sm{ + @include border-radius(3px); +} +.b-rad-md{ + @include border-radius(5px); +} +.b-rad-lg{ + @include border-radius(7px); +} +.no-border{ + border: none !important; +} + +.no-shadow{ + box-shadow: none !important; +} +/** Profile Wrappers **/ +.profile-img-wrapper{ + display:inline-block; + float:left; + border-radius: 100px 100px 100px 100px; + display: inline-block; + height: 35px; + overflow: hidden; + width: 35px; + -webkit-flex: 1; + -moz-flex: 1; + flex: 1; +} +.profile-img-wrapper.big{ + height: 68px; + width: 68px; +} +.profile-img-wrapper.with-left-space-custom{ + margin-left:7px; +} + +.absolute{ + position: absolute; +} + +.relative{ + position: relative; +} + +.flex-1{ + -webkit-box-flex: 1; + -moz-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} + +[data-pages-bg-image]{ + background-size: cover; +} + +/* Demo Purposes */ +.icon-set-preview{ + transition: opacity 0.1s linear; +} +#icon-list{ + transition: all 0.1s ease-in-out; +} +.error-number{ + font-size: 90px; + line-height: 90px; +} +.error-container-innner{ + margin-left: auto; + margin-right: auto; + width: 360px; +} +.error-container{ + margin-top: -100px; + margin-left: auto; + margin-right: auto; + width: 38%; +} + +.visible-xlg { + display: none; +} +.hidden-xlg { + display: block; +} + +// Dashboard widget heights + +.sm-gutter .row > [class^="col-"], .sm-gutter .row > [class*="col-"] { + padding-left: $layout-gutter-sm; + padding-right: $layout-gutter-sm; +} +.sm-gutter .row { + margin-left: -$layout-gutter-sm; + margin-right: -$layout-gutter-sm; +} + +/* Aspect ratio */ +.ar-1-1, +.ar-2-1, +.ar-1-2, +.ar-3-2, +.ar-2-3{ + .card{ + margin: 0; + } +} +.ar-1-1{ + position: relative; + width: 100%; /* desired width */ + overflow: hidden; + &:before{ + content: ""; + display: block; + padding-top: 100%; /* initial ratio of 1:1*/ + } + & > div{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +} + +.ar-2-1{ + position: relative; + width: 100%; /* desired width */ + overflow: hidden; + &:before{ + content: ""; + display: block; + padding-top: calc(50% - #{$layout-gutter-sm}); /* initial ratio of 1:1*/ + } + & > div{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +} + +.ar-1-2{ + position: relative; + width: 100%; /* desired width */ + overflow: hidden; + &:before{ + content: ""; + display: block; + padding-top: calc(150% - #{$layout-gutter-sm}); /* initial ratio of 1:1*/ + } + & > div{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +} + +.ar-3-2{ + position: relative; + width: 100%; /* desired width */ + overflow: hidden; + &:before{ + content: ""; + display: block; + padding-top: calc(75% - #{$layout-gutter-sm}); /* initial ratio of 1:1*/ + } + & > div{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +} + +.ar-2-3{ + position: relative; + width: 100%; /* desired width */ + overflow: hidden; + &:before{ + content: ""; + display: block; + padding-top: calc(125% - #{$layout-gutter-sm}); /* initial ratio of 1:1*/ + } + & > div{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +} + +.v-align-bottom{ + vertical-align: bottom !important; +} +.v-align-top{ + vertical-align: top !important; +} +.v-align-middle{ + vertical-align: middle !important; +} +/* vertical alignment styles */ +.col-top { + vertical-align:top !important; +} +.col-middle { + vertical-align:middle !important; +} +.col-bottom { + vertical-align:bottom !important; +} + +/* columns of same height styles +------------------------------------ +*/ +.container-xs-height { + display:table; + padding-left:0px; + padding-right:0px; + width: 100%; + border-collapse: collapse; + table-layout: fixed; +} +.row-xs-height { + display:table-row; +} +.col-xs-height { + display:table-cell; + float:none; +} +@media (min-width: 768px) { + .container-sm-height { + display:table; + padding-left:0px; + padding-right:0px; + width: 100%; + border-collapse: collapse; + table-layout: fixed; + } + .row-sm-height { + // display:table-row; + } + .col-sm-height { + // display:table-cell !important; + // float:none !important; + } +} +@media (min-width: 992px) { + .container-md-height { + display:table; + padding-left:0px; + padding-right:0px; + width: 100%; + border-collapse: collapse; + table-layout: fixed; + } + .row-md-height { + display:table-row; + } + .col-md-height { + display:table-cell !important; + float:none !important; + } +} +@media (min-width: 1200px) { + .container-lg-height { + display:table; + padding-left:0px; + padding-right:0px; + width: 100%; + border-collapse: collapse; + table-layout: fixed; + } + .row-lg-height { + display:table-row; + } + .col-lg-height { + display:table-cell !important; + float:none !important; + } +} diff --git a/resources/assets/sass/modules/_modals.scss b/resources/assets/sass/modules/_modals.scss new file mode 100644 index 00000000..73272c57 --- /dev/null +++ b/resources/assets/sass/modules/_modals.scss @@ -0,0 +1,285 @@ +/*------------------------------------------------------------------ +[10. Modals] +*/ +.modal{ + .close { + position: absolute; + right: 25px; + top: 15px; + } + .close:focus { + outline:0; + } + .modal-dialog{ + transition: all .2s !important; + } + .modal-content{ + border: 1px solid #f2f6f7; + border-radius:3px; + box-shadow:none; + } + .modal-header { + text-align: center; + border-bottom: 0; + padding: 25px 25px 0 25px; + position: relative; + flex-direction: column; + align-items: flex-start; + p { + color: #8b91a0; + } + } + .modal-body { + box-shadow: none; + padding: 25px; + white-space: normal; + } + .modal-footer { + border-top: none; + box-shadow: none; + margin-top: 0; + padding: 25px; + padding-top: 0; + } + .drop-shadow{ + box-shadow:0 0 9px rgba(191,191,191,.36) !important; + } + &.fade{ + opacity: 1 !important; + &.stick-up{ + .modal-dialog{ + @include translate3d(0,-100%,0); + margin-top: -5px; + } + // &.in{ + // .modal-dialog{ + // @include translate3d(0,0,0); + // } + // } + &.show{ + .modal-dialog{ + @include translate3d(0,0,0); + } + } + } + + &.slide-up{ + height: 100%; + top: auto; + + // &.in{ + // .modal-dialog{ + // @include translate3d(0,0,0); + // } + // } + &.show{ + .modal-dialog{ + @include translate3d(0,0,0); + } + } + &.disable-scroll{ + overflow: hidden; + } + .modal-dialog{ + display: table; + height: 100%; + @include translate3d(0,75%,0); + } + .modal-content-wrapper{ + display: table-cell; + vertical-align: middle; + } + } + &.center-scale{ + .modal-dialog { + display: table; + height: 100%; + } + .modal-content{ + display: table-cell; + vertical-align: middle; + border: 0; + background: transparent; + .modal-header{ + border-bottom: 0px; + } + } + // &.in{ + // .modal-dialog{ + // opacity: 1; + // @include scale(1); + // } + // } + &.show{ + .modal-dialog{ + opacity: 1; + @include scale(1); + } + } + .modal-dialog{ + opacity: 0; + @include scale(0.6); + } + } + &.fill-in{ + background-color: rgba(255, 255, 255, 0); + @include transition(background-color .3s); + & > .close{ + opacity: 0.6; + z-index: 9999; + & > i{ + font-size: 16px; + } + } + .modal-dialog { + display: table; + height: 100%; + } + .modal-content{ + display: table-cell; + vertical-align: middle; + border: 0; + background: transparent; + .modal-header{ + border-bottom: 0px; + } + } + // &.in{ + // background-color: rgba(255, 255, 255, 0.85); + // .modal-dialog{ + // opacity: 1; + // @include scale(1); + // } + // } + &.show{ + background-color: rgba(255, 255, 255, 0.85); + .modal-dialog{ + opacity: 1; + @include scale(1); + } + } + .modal-dialog{ + opacity: 0; + @include scale(0.6); + } + } + &.slide-right{ + .close{ + position: absolute; + top:0; + right: 0; + margin-right: 10px; + z-index: 10; + } + // &.in{ + // .modal-dialog{ + // @include translate3d(0,0,0); + // } + // } + &.show{ + .modal-dialog{ + @include translate3d(0,0,0); + } + } + .modal-dialog{ + position: absolute; + right: 0; + margin:0; + height: 100%; + @include translate3d(100%,0,0); + .modal-content-wrapper{ + height: 100%; + } + .modal-content{ + min-height: 100%; + } + } + .modal-content{ + border-radius: 0px; + } + } + } +} +.fill-in-modal{ + .modal-backdrop{ + background-color: transparent; + } +} +.modal-backdrop{ + opacity: 0; + @include transition(opacity 0.2s linear); + // &.in{ + // opacity: 0.30; + // } + &.show{ + opacity: 0.30; + } +} + +body.modal-open { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +/* Responsive Handlers: Modals +------------------------------------ +*/ + +@media (min-width: 992px){ + .modal-lg { + width: 900px; + } +} + +@media (max-width: 768px){ + .modal{ + &.fill-in{ + .modal-dialog { + width: calc(100% - 20px); + } + } + &.slide-up{ + .modal-dialog { + width: calc(100% - 20px); + } + } + } +} +@media (min-width: 768px){ + .modal{ + &.stick-up{ + .modal-dialog{ + margin: -5px auto; + } + } + &.slide-up{ + .modal-dialog { + margin: 0 auto; + } + } + &.fill-in{ + .modal-dialog { + margin: 0 auto; + } + } + .modal-content{ + box-shadow: none; + } + .modal-dialog { + width: 600px; + } + .modal-sm { + width: 300px; + } + .modal-sm { + min-width: auto; + } + } +} + +@media (min-width: 576px){ + +} diff --git a/resources/assets/sass/modules/_nestables.scss b/resources/assets/sass/modules/_nestables.scss new file mode 100644 index 00000000..936f7e24 --- /dev/null +++ b/resources/assets/sass/modules/_nestables.scss @@ -0,0 +1,84 @@ +/*------------------------------------------------------------------ +[14. Nesstables] +*/ + +.dd-handle{ + border-color: fade-out($color-master-light, .3); + color:$color-master; + &:hover{ + background-color: $color-master-lightest + } +} + +.dark { + .dd-handle{ + color:$color-master; + background: $color-master-lighter; + &:hover{ + background-color: $color-master-lightest + } + } + .dd-placeholder{ + background-color:$color-master-light; + } + +} + +.dd3-content{ + background:#fff; + border-color: fade-out($color-master-light, .3); + color:$color-master; + &:hover{ + background-color: $color-master-lightest + } +} + +.dd3-handle{ + background:transparent; + text-indent: 9999px; + &:before{ + font-family: 'pages-icon'; + color:$color-master; + content:"\e660"; + font-size: 11px; + top: 5px; + } +} + +.dd-placeholder{ + background:$color-master-lighter; + border-color: fade-out($color-master, .65); +} + +.dd-empty{ + background-image:none; + background:$color-master-lighter; + border-color: fade-out($color-master, .5); +} +.dd-item > button{ + font-size: 11px; + &:before{ + font-family: 'pages-icon'; + content: "\e63b"; + } +} +.dd-item > button[data-action="collapse"]:before{ + font-family: 'pages-icon'; + content: "\e635"; +} + + + +/* Responsive Handlers : Nestables +------------------------------------ +*/ +@media only screen and (min-width: 700px) { + .dd { + width: 100%; + } + .nestable-lists{ + .dd{ + float: left; + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_notifications.scss b/resources/assets/sass/modules/_notifications.scss new file mode 100644 index 00000000..364a1f6b --- /dev/null +++ b/resources/assets/sass/modules/_notifications.scss @@ -0,0 +1,675 @@ +/*------------------------------------------------------------------ +[8. Notifications] +*/ + +/* Badges +-------------------------------------------------- +*/ +.badge { + text-shadow: none; + font-family: $base-font-family; + font-weight: 600; + background-color: $color-master-light; + font-size: 11px; + padding-left: 6px; + padding-right: 6px; + padding-bottom: 4px; + color: $color-master; + border-radius: 10px; +} +.badge-success { + background-color: $color-success; + color: $color-white ; +} +.badge-warning { + background-color: $color-warning; + color: $color-white ; +} +.badge-important { + background-color: $color-danger; + color: $color-white ; +} +.badge-danger { + background-color: $color-danger; + color: $color-white ; +} +.badge-info { + background-color: $color-info; + color: $color-white ; +} +.badge-inverse { + background-color: $color-complete-darker; + color: $color-white ; +} +.badge-white { + background-color: $color-white ; + color: $color-master; +} +.badge-disable { + background-color: $color-master-dark; + color: $color-master; +} + +/* Tool Tip +-------------------------------------------------- +*/ +.tooltip-inner{ + font-size: 12px; +} + +/* Notification popup +-------------------------------------------------- +*/ +.popover{ + border: 1px solid rgba(0,0,0,.1); + box-shadow: 0 0 9px rgba(191, 191, 191, 0.36); + z-index: $zIndex-navbar - 10; +} +.notification-toggle{ + top: 35px; + left: -26px; + padding: 0; + &:before{ + border-bottom:0px !important; + } + &:after{ + border-bottom:0px !important; + } +} +.notification-panel{ + background-color: #fff; + border:1px solid $color-master-light; + .notification-body{ + height: auto; + max-height: 350px; + position: relative; + overflow: hidden; + .notification-item{ + position: relative; + margin-left: 25px; + background-color: #fff; + padding-right: 26px; + &.unread{ + .heading{ + opacity: 1; + } + .option{ + background-color: $color-complete-lighter; + } + .option .mark{ + color:$color-complete-light; + } + } + .heading{ + line-height: 43px; + margin-right: 5px; + background: #fff; + border-bottom: 1px solid $color-master-light; + position: relative; + float: left; + width: 100%; + font-size: 14px; + opacity: 0.7; + &:after{ + content:''; + position: absolute; + width: 5px; + height: 100%; + background-color: #fff; + right: 0; + top: 1px; + + } + .thumbnail-wrapper { + cursor: pointer; + i{ + @include transition(all 0.12s linear); + + } + } + .time{ + font-size: 11px; + margin-right: 8px; + } + &.open{ + display: block; + .more-details{ + display: block; + } + .thumbnail-wrapper i{ + @include rotate(-90deg); + } + } + .thumbnail-wrapper.d24{ + line-height: 20px; + } + } + .more-details{ + display: none; + background-color: #fff; + width: 100%; + height: 100%; + clear: both; + position: relative; + .more-details-inner{ + margin-left: 10px; + padding-left: 28px; + padding-top: 15px; + margin-bottom: 20px; + position: relative; + border-left: 1px solid fade($color-master-light, 70%); + &:after{ + width: 14px; + height: 14px; + position: absolute; + content: ''; + background-color: #fff; + left: -7px; + top: 25px; + border: 1px solid fade($color-master-light, 90%); + @include border-radius(99px); + } + &:before{ + color: mix($color-master, #fff, 40%); + position: absolute; + bottom: 0; + left: -5px; + content: ' \25CF'; + font-size: 13px; + line-height: 5px; + background-color: #fff; + height: 9px; + } + .hint-text { + opacity: .44; + } + } + + } + .option{ + font-size: 10px; + position: absolute; + height: 44px; + width: 26px; + right: 0; + text-align: center; + vertical-align: middle; + line-height: 44px; + background-color: $color-master-lightest; + height: 100%; + .mark{ + background-color: transparent; + color: mix($color-master, #fff, 40%); + &:before{ + content: ' \25CF'; + font-size: 12px; + } + } + } + &:last-child{ + .heading{ + border-bottom: 0px; + } + } + } + } + .notification-footer{ + padding: 10px; + display: block; + border-top:1px solid $color-master-light; + a{ + color: $color-master; + opacity: .54; + &:hover{ + opacity: .74; + } + } + } +} + + +/* Simple alerts +-------------------------------------------------- +*/ +.alerts-container{ + position: fixed; + width: 350px; + right: 20px; + z-index: 999; + top: $layout-header-height + 20px; + &[data-placement$='-left']{ + left: $layout-sidepanel-width-collapsed + 30px; + right: auto; + } + &[data-placement$='-right']{ + right: 20px; + left: auto; + } + &[data-placement^='top-']{ + top: $layout-header-height + 20px; + bottom: auto; + } + &[data-placement^='bottom-']{ + top: auto; + bottom: 20px; + } + + &[data-placement='bottom-right'], &[data-placement='bottom-left']{ + .alert:last-child{ + margin-bottom: 0; + } + } + .alert{ + position: relative; + .close{ + position: absolute; + right: 9px; + top: 15px; + } + } + +} + +/* Pages Notifications plugin +-------------------------------------------------- +*/ +body.menu-pin > .pgn-wrapper[data-position$='-left'], +body.menu-pin > .pgn-wrapper[data-position="top"], +body.menu-pin > .pgn-wrapper[data-position="bottom"]{ + left: $layout-sidepanel-pin-width; +} +.pgn-wrapper { + position: fixed; + z-index: 1000; +} +.pgn-wrapper[data-position$='-left'] { + left: 30px; +} +.pgn-wrapper[data-position$='-right'] { + right: 20px; +} +.pgn-wrapper[data-position^='top-'] { + top: 20px; +} +.pgn-wrapper[data-position^='bottom-'] { + bottom: 20px; +} +.pgn-wrapper[data-position='top'] { + top: 0; + left: 0; + right: 0; +} +.pgn-wrapper[data-position='bottom'] { + bottom: 0; + left: 0; + right: 0; +} +.pgn { + position: relative; + margin: 10px; +} +.pgn .alert { + margin: 0; +} + +/* Simple +------------------------------------ +*/ + +.pgn-simple .alert { + padding-top: 13px; + padding-bottom: 13px; + max-width: 500px; + animation: fadeIn .3s cubic-bezier(.05, .74, .27, .99) forwards; + -webkit-animation: fadeIn .3s cubic-bezier(.05, .74, .27, .99) forwards; + max-height: 250px; + overflow: hidden; +} +/* Bar +------------------------------------ +*/ + +.pgn-bar { + overflow: hidden; + margin: 0; +} +.pgn-bar .alert { + border-radius: 0; + padding-top: 13px; + padding-bottom: 13px; + max-height: 91px; +} +.pgn-wrapper[data-position='top'] .pgn-bar .alert { + animation: slideInFromTop .5s cubic-bezier(.05, .74, .27, .99) forwards; + -webkit-animation: slideInFromTop .5s cubic-bezier(.05, .74, .27, .99) forwards; + transform-origin: top left; + -webkit-transform-origin: top left; +} +.pgn-wrapper[data-position='bottom'] .pgn-bar .alert { + animation: slideInFromBottom .5s cubic-bezier(.05, .74, .27, .99) forwards; + -webkit-animation: slideInFromBottom .5s cubic-bezier(.05, .74, .27, .99) forwards; + transform-origin: bottom left; + -webkit-transform-origin: bottom left; +} +.pgn-bar .alert span { + opacity: 0; + animation: fadeIn .3s cubic-bezier(.05, .74, .27, .99) forwards; + -webkit-animation: fadeIn .3s cubic-bezier(.05, .74, .27, .99) forwards; +} +@keyframes slideInFromTop { + 0% { + transform: translateY(-100%); + } + 100% { + transform: translateY(0); + } +} +@-webkit-keyframes slideInFromTop { + 0% { + -webkit-transform: translateY(-100%); + } + 100% { + -webkit-transform: translateY(0); + } +} +@keyframes slideInFromBottom { + 0% { + transform: translateY(100%); + } + 100% { + transform: translateY(0); + } +} +@-webkit-keyframes slideInFromBottom { + 0% { + -webkit-transform: translateY(100%); + } + 100% { + -webkit-transform: translateY(0); + } +} +/* Circle +------------------------------------ +*/ + +.pgn-circle .alert { + border-radius: 300px; + animation: fadeInCircle .3s ease forwards, resizeCircle .3s .4s cubic-bezier(0.25, 0.25, 0.4, 1.6) forwards; + -webkit-animation: fadeInCircle .3s ease forwards, resizeCircle .3s .4s cubic-bezier(0.25, 0.25, 0.4, 1.6) forwards; + height: 60px; + overflow: hidden; + padding: 6px 55px 6px 6px; + -webkit-transform: translateZ(0); + position: relative; +} +.pgn-wrapper[data-position$='-right'] .pgn-circle .alert { + float: right; +} +.pgn-wrapper[data-position$='-left'] .pgn-circle .alert { + float: left; +} +.pgn-circle .alert > div > div.pgn-thumbnail > div { + border-radius: 50%; + overflow: hidden; + width: 48px; + height: 48px; +} +.pgn-circle .alert > div > div.pgn-thumbnail > div > img { + width: 100%; + height: 100%; +} +.pgn-circle .alert > div > div.pgn-message > div { + opacity: 0; + height: 47px; + padding-left: 9px; + animation: fadeIn .3s .5s ease forwards; + -webkit-animation: fadeIn .3s .5s ease forwards; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + word-break: break-all; + word-wrap: break-word; + // -webkit-transform: translateZ(0); + // @include backface-visibility(hidden); + +} +.pgn-circle .alert > div > div.pgn-message > div p:only-child{ +padding:12px 0; +} +.pgn-circle .alert .close { + margin-top: -12px; + position: absolute; + right: 18px; + top: 50%; + opacity: 0; + animation: fadeIn .3s .5s ease forwards; + -webkit-animation: fadeIn .3s .5s ease forwards; +} +.pgn-circle .alert p { + margin-bottom: 0; +} +.pgn-circle .alert > div { + display: table; + height: 100%; +} +.pgn-circle .alert > div > div { + display: table-cell; + vertical-align: middle; +} +@keyframes fadeInCircle { + 0% { + opacity: 0; + width: 60px; + } + 100% { + opacity: 1; + width: 60px; + } +} +@-webkit-keyframes fadeInCircle { + 0% { + opacity: 0; + width: 60px; + } + 100% { + opacity: 1; + width: 60px; + } +} +@keyframes resizeCircle { + 0% { + width: 60px; + } + 100% { + width: 300px; + } +} +@-webkit-keyframes resizeCircle { + 0% { + width: 60px; + } + 100% { + width: 300px; + } +} + +/* Flip +------------------------------------ +*/ + +.pgn-wrapper[data-position^='top-'] .pgn-flip { + top: -30px; +} +.pgn-wrapper[data-position^='bottom-'] .pgn-flip { + bottom: -30px; +} +.pgn-wrapper[data-position^='bottom-'] .pgn-flip .alert { + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +.pgn-flip .alert { + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; + box-shadow: 0 6px 4px -3px rgba(0, 0, 0, 0.2); + -webkit-animation-name: flipInX; + animation-name: flipInX; + -webkit-animation-duration: 0.8s; + animation-duration: 0.8s; + border-radius: 0; + padding: 25px 35px; + max-width: 500px; + max-height: 250px; + overflow: hidden; +} +@-webkit-keyframes flipInX { + 0% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg); + -webkit-transition-timing-function: ease-in; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg); + -webkit-transition-timing-function: ease-out; + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg); + -webkit-transition-timing-function: ease-in; + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg); + -webkit-transition-timing-function: ease-out; + } + 100% { + -webkit-transform: perspective(400px); + } +} +@keyframes flipInX { + 0% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg); + transform: perspective(400px) rotate3d(1, 0, 0, -90deg); + -webkit-transition-timing-function: ease-in; + transition-timing-function: ease-in; + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 20deg); + transform: perspective(400px) rotate3d(1, 0, 0, 20deg); + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -10deg); + transform: perspective(400px) rotate3d(1, 0, 0, -10deg); + -webkit-transition-timing-function: ease-in; + transition-timing-function: ease-in; + opacity: 1; + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 5deg); + transform: perspective(400px) rotate3d(1, 0, 0, 5deg); + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} +@keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +/* Pages Notification customizations */ +body > .pgn-wrapper[data-position="top"] { + top: $layout-header-height; + left: $layout-sidepanel-width-collapsed; +} +body > .pgn-wrapper[data-position="bottom"] { + left: $layout-sidepanel-width-collapsed; +} + +body > .pgn-wrapper[data-position$='-left'] { + left: $layout-sidepanel-width-collapsed + 20px; + right: auto; +} + +body > .pgn-wrapper[data-position^='top-'] { + top: $layout-header-height + 20px; + bottom: auto; +} + + +.pgn-circle .alert .close { + margin-top: -4px; + } +body > .pgn-wrapper{ + z-index: $zIndex-notifications; +} + +@media (max-width: 979px) { + body > .pgn-wrapper[data-position="top"]{ + left: 0; + } + body > .pgn-wrapper[data-position="bottom"] { + left: 0; + } +} +@media (max-width: 767px) { + body > .pgn-wrapper[data-position$='-left'], + body > .pgn-wrapper[data-position$='-right'] { + left: 10px !important; + right: 10px !important; + } + body > .pgn-wrapper[data-position$='-right'] .alert, + body > .pgn-wrapper[data-position$='-left'] .alert{ + max-width: 100%; + width: 100%; + } +} + + +/* Notifications demo +-------------------------------------------------- +*/ +.notification-positions{ + border-radius: 4px; + border:3px dashed $color-master-light; + height: 370px; + position: relative; + + & > div > .position:not(:only-child){ + max-width: 50%; + } + .position{ + padding: 15px; + img{ + border:3px solid transparent; + } + &:hover{ + cursor: pointer; + } + &.active img{ + border-color:#0090d9; + } + &.pull-top, &.pull-bottom{ + left: 0; + right: 0; + + } + img{ + width: 100%; + } + } +} diff --git a/resources/assets/sass/modules/_print.scss b/resources/assets/sass/modules/_print.scss new file mode 100644 index 00000000..e6dc5c72 --- /dev/null +++ b/resources/assets/sass/modules/_print.scss @@ -0,0 +1,32 @@ +/*------------------------------------------------------------------ +[29. Print] +*/ + +@media print{ + .header, + .page-sidebar, + .quickview-wrapper, + .overlay { + display: none; + } + .page-container{ + padding-left: 0; + } + .page-content-wrapper { + .content{ + border-top:0; + .card { + border: none; + .card-body{ + padding: 0; + } + } + } + } + [class^='padding-'], + [class*='padding-'], + .table tbody tr td{ + padding: 10px; + } + +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_progress_indicators.scss b/resources/assets/sass/modules/_progress_indicators.scss new file mode 100644 index 00000000..2ac14b4c --- /dev/null +++ b/resources/assets/sass/modules/_progress_indicators.scss @@ -0,0 +1,225 @@ +/*------------------------------------------------------------------ +[9. Progress Indicators] +*/ +.progress { + height: 4px; + background-color: fade-out($color-master, .8); + background-image: none; + box-shadow: none; + border-radius: 0; + + margin-bottom: 20px; + &.transparent { + background-color: rgba(0, 0, 0, 0.28); + } + &.progress-small { + height: 3px; + } +} +/* Circular Progress : indeterminate color +------------------------------------ +*/ +.progress-bar-indeterminate{ + background: url('#{$base-img-url}/progress/progress-bar-master.svg') no-repeat top left; + width: 100%; + height: 100%; + background-size: cover; + &.progress-bar-primary{ + background-image: url('#{$base-img-url}/progress/progress-bar-primary.svg'); + background-color: transparent; + } + &.progress-bar-complete{ + background-image: url('#{$base-img-url}/progress/progress-bar-complete.svg'); + background-color: transparent; + } + &.progress-bar-success{ + background-image: url('#{$base-img-url}/progress/progress-bar-success.svg'); + background-color: transparent; + } + &.progress-bar-info{ + background-image: url('#{$base-img-url}/progress/progress-bar-info.svg'); + background-color: transparent; + } + &.progress-bar-warning{ + background-image: url('#{$base-img-url}/progress/progress-bar-warning.svg'); + background-color: transparent; + } + &.progress-bar-danger{ + background-image: url('#{$base-img-url}/progress/progress-bar-danger.svg'); + background-color: transparent; + } + &.progress-bar-master{ + background-image: url('#{$base-img-url}/progress/progress-bar-master.svg'); + background-color: transparent; + } +} +/* Progress Bar +------------------------------------ +*/ +.progress-bar { + box-shadow: none; + border-radius: 0; + background-color: $color-master; + background-image: none; + @include transition(all 1000ms cubic-bezier(0.785, 0.135, 0.150, 0.860)); + -webkit-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860); + -moz-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860); + -ms-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860); + -o-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860); + transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860); +} +/* Progress Bar : Color Options +------------------------------------ +*/ +.progress-bar-primary { + background-color: $color-primary; + background-image: none; +} +.progress-bar-complete { + background-color: $color-complete; + background-image: none; +} +.progress-bar-success { + background-color: $color-success; + background-image: none; +} +.progress-bar-info { + background-color: $color-info; + background-image: none; +} +.progress-bar-warning { + background-color: $color-warning; + background-image: none; +} +.progress-bar-danger { + background-color: $color-danger; + background-image: none; +} +.progress-bar-white { + background-color: $color-white ; + background-image: none; +} +.progress-bar-black { + background-color: $color-black; + background-image: none; +} +.progress-info .bar, .progress .bar-info { + background-color: $color-info-darker; + background-image: none; +} +.progress-warning .bar, .progress .bar-warning { + background-color: $color-warning-darker; + background-image: none; +} +.progress-danger .bar, .progress .bar-danger { + background-color: $color-danger-darker; + background-image: none; +} +.progress-white .bar, .progress .bar-white { + background-color: $color-white; + background-image: none; +} +.progress-success.progress-striped .bar, .progress-striped .bar-success { + background-color: $color-success; +} +.progress-info.progress-striped .bar, .progress-striped .bar-info { + background-color: $color-info; +} +/* Circular Progress : indeterminate +------------------------------------ +*/ +.progress-circle-indeterminate{ + background: url('#{$base-img-url}/progress/progress-circle-master.svg') no-repeat top left; + width: 50px; + height: 50px; + background-size: 100% auto; + margin: 0 auto; + &.progress-circle-warning{ + background-image: url('#{$base-img-url}/progress/progress-circle-warning.svg'); + } + &.progress-circle-danger{ + background-image: url('#{$base-img-url}/progress/progress-circle-danger.svg'); + } + &.progress-circle-info{ + background-image: url('#{$base-img-url}/progress/progress-circle-info.svg'); + } + &.progress-circle-primary{ + background-image: url('#{$base-img-url}/progress/progress-circle-primary.svg'); + } + &.progress-circle-success{ + background-image: url('#{$base-img-url}/progress/progress-circle-success.svg'); + } + &.progress-circle-complete{ + background-image: url('#{$base-img-url}/progress/progress-circle-complete.svg'); + } +} +/* Circular Progress +------------------------------------ +*/ +.progress-circle { + $size: 45px; + $border : 3px; + display: block; + height: $size; + margin: 0 auto; + position: relative; + width: $size; + -webkit-backface-visibility: hidden; + &.progress-circle-warning{ + .pie .half-circle{ + border-color: $color-warning; + } + } + &.progress-circle-danger{ + .pie .half-circle{ + border-color: $color-danger; + } + } + &.progress-circle-info{ + .pie .half-circle{ + border-color: $color-info; + } + } + &.progress-circle-primary{ + .pie .half-circle{ + border-color: $color-primary; + } + } + &.progress-circle-success{ + .pie .half-circle{ + border-color: $color-success; + } + } + &.progress-circle-complete{ + .pie .half-circle{ + border-color: $color-complete; + } + } + &.progress-circle-thick{ + .pie .half-circle, .shadow{ + border-width: 5px; + } + } + .pie { + clip: rect(0, $size, $size, $size / 2); + height: $size; + position: absolute; + width: $size; + .half-circle { + border: $border solid $color-master; + border-radius: 50%; + clip: rect(0, $size / 2, $size, 0); + height: $size; + position: absolute; + width: $size; + + } + } + .shadow { + border: $border solid fade-out(#000, .9); + border-radius: 50%; + height: 100%; + width: 100%; + } + +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_sliders.scss b/resources/assets/sass/modules/_sliders.scss new file mode 100644 index 00000000..4efa0f56 --- /dev/null +++ b/resources/assets/sass/modules/_sliders.scss @@ -0,0 +1,313 @@ +/*------------------------------------------------------------------ +[12. Sliders] +*/ + +$slider-background-color : mix($color-master, #fff, 12%); + +/* Ion Range Slider +https://github.com/IonDen/ion.rangeSlider +-------------------------------------------------- +*/ +.irs-line-mid, .irs-line-left, .irs-line-right, .irs-bar, .irs-bar-edge, .irs-slider{ + background-image: none; +} +.irs-bar{ + background: $color-danger; +} +.irs-wrapper{ + .irs-line{ + background-color: $color-master-light; + } + .irs-line-mid, .irs-line-left, .irs-line-right, .irs-diapason, .irs-slider{ + background: none; + } + .irs-diapason{ + background-color:$color-danger; + @include transition(all 0.3s ease); + + } + .irs-from, .irs-to, .irs-single{ + background: $color-danger; + } + .irs-slider{ + + &.from:before{ + top: -2%; + left: 37%; + width: 16%; + height: 100%; + background: rgba(0,0,0,0.0); + background-color: $color-danger; + } + &.to:before{ + top: -2%; + left: 37%; + width: 16%; + height: 100%; + background: rgba(0,0,0,0.0); + background-color: $color-danger; + } + &.single:before{ + top: -2%; + left: 37%; + width: 16%; + height: 100%; + background: rgba(0,0,0,0.0); + background-color: $color-danger; + } + } + .irs-from:after, .irs-to:after, .irs-single:after{ + border-top-color: $color-danger; + } + &.success{ + .irs-diapason{ + background-color:$color-success; + } + .irs-from, .irs-to, .irs-single{ + background: $color-success; + } + .irs-slider{ + &.from:before{ + background-color: $color-success; + } + &.to:before{ + background-color: $color-success; + } + &.single:before{ + background-color: $color-success; + } + } + .irs-from:after, .irs-to:after, .irs-single:after{ + border-top-color: $color-success; + } + // v.2.0.1 + .irs-bar{ + background-color: $color-success; + } + } + &.primary{ + .irs-diapason{ + background-color:$color-primary; + } + .irs-from, .irs-to, .irs-single{ + background: $color-primary; + } + .irs-slider{ + &.from:before{ + background-color: $color-primary; + } + &.to:before{ + background-color: $color-primary; + } + &.single:before{ + background-color: $color-primary; + } + } + .irs-from:after, .irs-to:after, .irs-single:after{ + border-top-color: $color-primary; + } + // v.2.0.1 + .irs-bar{ + background-color: $color-primary; + } + } + &.warning{ + .irs-diapason{ + background-color:$color-warning; + } + .irs-from, .irs-to, .irs-single{ + background: $color-warning; + } + .irs-slider{ + &.from:before{ + background-color: $color-warning; + } + &.to:before{ + background-color: $color-warning; + } + &.single:before{ + background-color: $color-warning; + } + } + .irs-from:after, .irs-to:after, .irs-single:after{ + border-top-color: $color-warning; + } + // v.2.0.1 + .irs-bar{ + background-color: $color-warning; + } + } + &.complete{ + .irs-diapason{ + background-color:$color-complete; + } + .irs-from, .irs-to, .irs-single{ + background: $color-complete; + } + .irs-slider{ + &.from:before{ + background-color: $color-complete; + } + &.to:before{ + background-color: $color-complete; + } + &.single:before{ + background-color: $color-complete; + } + } + .irs-from:after, .irs-to:after, .irs-single:after{ + border-top-color: $color-complete; + } + // v.2.0.1 + .irs-bar{ + background-color: $color-complete; + } + } + &.danger{ + .irs-diapason{ + background-color:$color-danger; + } + .irs-from, .irs-to, .irs-single{ + background: $color-danger; + } + .irs-slider{ + &.from:before{ + background-color: $color-danger; + } + &.to:before{ + background-color: $color-danger; + } + &.single:before{ + background-color: $color-danger; + } + } + .irs-from:after, .irs-to:after, .irs-single:after{ + border-top-color: $color-danger; + } + // v.2.0.1 + .irs-bar{ + background-color: $color-danger; + } + } +} + +/* noUiSlider +http://refreshless.com/nouislider/ +-------------------------------------------------- +*/ +.noUi-target{ + border-radius:0px; + border: 0; + box-shadow: none; + &.bg-complete{ + .noUi-connect{ + background-color: $color-complete + } + } + &.bg-success{ + .noUi-connect{ + background-color: $color-success + } + } + &.bg-warning{ + .noUi-connect{ + background-color: $color-warning + } + } + &.bg-danger{ + .noUi-connect{ + background-color: $color-danger + } + } + &.bg-info{ + .noUi-connect{ + background-color: $color-info + } + + } + &.bg-primary{ + .noUi-connect{ + background-color: $color-primary + } + + } + &.noUi-connect{ + box-shadow: none; + } +} +.noUi-handle{ + border-radius:999px; + box-shadow:none; + &:before, &:after{ + display:none; + } +} +.noUi-horizontal { + height: 4px; + .noUi-handle{ + width: 18px; + height: 18px; + left: -15px; + border: 1px solid mix($color-master, #fff, 23%); + top: -7px; + @include transition(all 0.2s ease); + &:hover{ + border: 1px solid mix($color-master, #fff, 40%); + } + &:active{ + @include scale(1.3); + border: 1px solid mix($color-master, #fff, 23%); + } + &:focus{ + @include scale(1.3); + border: 1px solid mix($color-master, #fff, 23%); + } + } +} +.disable-hover-scale{ + .noUi-handle{ + &:active{ + @include scale(1); + } + &:focus{ + @include scale(1); + } + } +} +.vertical-slider{ + height: 150px; +} +.noUi-vertical { + width: 4px; + .noUi-handle{ + width: 18px; + height: 18px; + border: 1px solid mix($color-master, #fff, 23%); + @include transition(all 0.2s ease); + &:hover{ + border: 1px solid mix($color-master, #fff, 40%); + } + &:active{ + @include scale(1.3); + border: 1px solid mix($color-master, #fff, 23%); + } + &:focus{ + @include scale(1.3); + border: 1px solid mix($color-master, #fff, 23%); + } + } +} +.noUi-base{ + padding: 5px 0; +} +.noUi-origin{ + border-radius: 0px; + bottom: 5px; +} +.noUi-connect{ + box-shadow:none; +} +.noUi-background{ + background:$slider-background-color !important; + box-shadow: none; +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_social.scss b/resources/assets/sass/modules/_social.scss new file mode 100644 index 00000000..592081be --- /dev/null +++ b/resources/assets/sass/modules/_social.scss @@ -0,0 +1,450 @@ +/*------------------------------------------------------------------ +[19. Social App] +*/ + +.social-wrapper, +.social{ + height: 100%; + width: 100%; +} + +/* Cover +------------------------------------ +*/ + +.social-wrapper .social .jumbotron{ + height: 60vh; +} +.social-wrapper .social .cover-photo { + position: relative; + margin: 0 auto; + overflow-x: hidden; + &:before{ + background-image: url("#{$base-img-url}/linear_gradient.png"); + background-repeat: repeat-x; + bottom: 0; + content: " "; + height: 270px; + left: 0; + position: absolute; + right: 0; + z-index: 1; + } + .pull-bottom{ + z-index: 2; + } +} + .cover-img-container { + position: absolute; + overflow: hidden; + top: 0; + left: 0; + right: 0; + bottom: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.cover-img-container .cover-img { + position: absolute; + top: 0; + left: 0; + display: block; + min-width: 100%; + min-height: 100%; +} + +/* Feed +------------------------------------ +*/ + +.social-user-profile{ + width: 52px; + & > .thumbnail-wrapper{ + float: none; + } +} + +.social-wrapper .social .feed { + overflow-y: hidden; + width: 100%; + + & > .day { + white-space: normal; + display: block; + width: 100%; + margin: 0 auto; + + &:after { + feed:''; + display: block; + clear: both; + } + &:hover { + & > .timeline:after { + background: $color-complete; + } + } + } +} + +/* Social Cards +------------------------------------ +*/ + +.social-card { + padding-bottom: 0; + margin-bottom: 0; + background: #FFF; + float: left; + position: relative; + border-radius: 4px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 2px; + margin-bottom: 20px; + width: 300px; + border:1px solid $color-master-light; + .circle { + position: absolute; + right: 20px; + top: 20px; + display: block; + border-radius: 50%; + border:2px solid $color-master-lighter; + width: 9px; + height: 9px; + background: $color-info-light; + z-index: 1; + &:hover { + cursor: pointer; + } + } + &.full-width{ + width: 100% !important + } + &.status { + background: $color-complete-lighter; + border-radius: 4px; + padding: 15px 25px; + @include box-sizing(border-box); + border:1px solid transparent; + &:hover,&.hover { + border-color: $color-info-lighter !important; + } + h5 { + font-size: 12px; + margin: 0; + .time { + color: #fff; + } + } + h2 { + color: $color-master-dark; + font-size: 25px; + line-height: 32px; + margin: 0; + font-weight: normal; + } + .reactions { + color: $color-master-lighter; + opacity: .45; + font-size: 12px; + padding: 0; + margin: 5px 0 0; + padding: 0; + li { + display: inline-block; + list-style: none; + padding: 0; + } + } + .circle { + width: 9px; + height: 9px; + border: none; + background: $color-complete; + } + } + .card-header, .card-footer { + background-color: $color-white; + @include transition(background .2s ease); + } + &.share { + .card-header { + padding: 15px 15px 12px; + border-bottom:1px solid $color-master-light; + border-top-right-radius: 2px; + border-top-left-radius: 2px; + &:hover { + background: $color-complete-lighter; + border-color:$color-complete-lighter; + cursor: pointer; + h6 { + opacity: .6; + } + } + &.last{ + border-bottom: none; + } + .user-pic { + float:left; + border-radius: 50%; + overflow: hidden; + margin-right: 10px; + & > img { + width: 30px; + height: 30px; + } + } + h5 { + font-weight: bold; + font-size: 14px; + margin: 0; + line-height: 22.7px; + font-family: arial; + letter-spacing: -0.006em; + margin-top: -3px; + } + h6 { + font-size: 12px; + margin: 0; + opacity: .45; + font-family: arial; + opacity: .45; + } + } + .card-description { + padding:12px 16px 11px; + font-size: 14px; + line-height: 21px; + margin: 0; + p { + margin-bottom: 4px; + } + &:hover { + } + .via { + opacity: .45; + display: block; + font-size: 12px; + font-family: arial; + } + } + .card-content{ + position: relative; + .buttons{ + left: 17px; + padding: 0; + position: absolute; + top: 10px; + li { + display: inline-block; + list-style: none; + margin-right: 10px; + a{ + color: #fff; + } + } + } + } + .card-feed { + overflow: hidden; + position: relative; + max-height: 400px; + &:hover { + .buttons { + opacity: 1; + } + } + .buttons { + position: absolute; + top: 5px; + right: 0; + opacity: 0; + li { + display: inline-block; + list-style: none; + a { + color: #fff; + opacity: 0.8; + padding: 5px; + } + } + } + & > * { + max-width: 100%; + } + } + .card-footer { + padding: 14px 16px 11px; + font-size: 12px !important; + &:hover { + background: $color-complete-lighter; + cursor: pointer; + .reactions, .time { + opacity: .8; + } + } + .time { + float: left; + opacity: .45; + font-family: arial; + margin-top: 1px; + } + .reactions { + float: right; + margin:0; + padding: 0; + opacity: .45; + li { + display: inline-block; + list-style: none; + a { + color: inherit; + } + } + } + } + .card-description, .card-feed, .card-footer { + border-color: transparent; + border-style: solid; + } + .card-description { + border-width: 1px; + } + .card-feed { + border-width: 0 1px; + margin-top: -2px; + } + .card-footer { + border-width: 0 1px 1px 1px; + } + &.share-other { + .card-description { + padding-bottom: 0; + } + .card-footer { + padding-top: 0; + border-radius: 0; + &:hover { + background: #fff; + } + } + .card-header { + border-top:1px solid $color-complete-lighter; + } + .circle { + background: $color-warning; + } + } + } + &.col1 { + width: 300px; + } + &.col2 { + width: 620px; + } + &.col3 { + width: 920px; + } + img { + width: 100%; + } +} +/* Step Form : Status */ +.simform{ + margin-left: 0; + padding:0; + position: static; + margin-bottom: 20px; + .error-message{ + padding-top: 29px !important; + padding-left: 22px; + } + .final-message, .error-message{ + font-size: 15px; + opacity: 0.5; + display: none; + margin-top: 19px; + position: static; + text-align: left; + @include translate(0,0); + } + ol:before { + background: transparent; + } + .questions li{ + overflow: hidden; + &.current{ + position: relative; + input{ + font-size:14px; + padding: 0 !important; + margin: 0 !important; + } + } + & > span{ + width: 100%; + label{ + font-size: 12px; + opacity: .55; + font-weight: 300; + @include transition(opacity .2s ease); + } + } + } + .questions input{ + background: transparent !important; + height: 30px; + } + .questions .current input, + .no-js .questions input { + background: transparent; + border: none; + } + .controls { + position: absolute; + top:0; + left: 0; + width: 100%; + .next, .number{ + display: none !important; + } + } + .progress{ + &:before{ + background:none; + } + } + .show{ + display: block; + } +} + + +/* Responsive Handlers: Social App +------------------------------------ +*/ + +@media (min-width: 991px) and (max-width: 1070px) { + .day .card:first-child{ + .col-md-4:first-child{ + width: 100%; + margin-bottom: 20px; + } + .col-md-4:nth-child(2), .col-md-4:nth-child(3){ + width: 50%; + } + + } +} +@media (max-width: 667px) { + .social-wrapper .social .feed { + + & > .day { + + & > .card{ + width: 100% !important; + } + } +} +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_tables.scss b/resources/assets/sass/modules/_tables.scss new file mode 100644 index 00000000..76e1c950 --- /dev/null +++ b/resources/assets/sass/modules/_tables.scss @@ -0,0 +1,416 @@ +/*------------------------------------------------------------------ +[16. Tables and Datatables] +*/ + +/* Generic Tables +------------------------------------ +*/ +.table { + margin-bottom: 0; + margin-top: 5px; + thead { + tr { + th { + text-transform: uppercase; + font-weight: 500; + font-family:'Montserrat'; + font-size: 10.5px; + letter-spacing: 0.06em; + padding-top: 14px; + padding-bottom: 14px; + vertical-align: middle; + border-bottom: 1px solid fade-out($color-master-light, .3); + color:fade-out($color-master-dark, .65); + border-top: none; + &[class*='sorting_'] { + color:$color-master-dark; + } + &:first-child { + padding-left: 18px !important; + } + .btn { + margin-top: -20px; + margin-bottom: -20px; + } + } + } + } + tbody { + tr { + td { + background: #fff; + border-bottom: 1px solid fade-out($color-master-light, .3); + border-top: 0px; + padding:20px; + font-size: 13.5px; + .btn-tag { + background:fade-out($color-master-dark, .93); + display: inline-block; + margin: 5px; + border-radius: 4px; + padding: 5px; + color: #62605a !important; + &:hover { + background:fade-out($color-master-dark, .85); + } + } + &[class*='sorting_'] { + color:#000; + } + .checkbox label::after{ + left: 0.5px; + } + } + &.selected td { + background: $color-warning-lighter; + } + } + } + &.table-hover { + tbody { + tr { + &:hover td { + background: $color-complete-lighter !important; + } + &.selected:hover td{ + background: $color-warning-lighter !important; + } + } + } + } + &.table-striped { + tbody { + tr { + td { + background: $body-background !important; + } + &:nth-child(2n+1) td { + background: #fff !important; + } + } + } + } + &.table-borderless{ + tbody { + tr { + td { + border-top: 0; + } + } + } + } + &.table-condensed { + table-layout: fixed; + thead { + tr { + th { + padding-left: 20px; + padding-right: 20px; + } + } + } + tbody { + tr { + td { + padding-top: 12px; + padding-bottom: 12px; + } + } + } + thead tr th, tbody tr td, tbody tr td * { + white-space: nowrap; + vertical-align: middle; + overflow: hidden; + text-overflow: ellipsis; + } + &.table-detailed { + & > tbody > tr { + &.shown { + & > td { + background: $color-warning-lighter; + &:first-child:before { + @include rotate(90deg); + } + } + & + tr { + & > td { + background: fade-out($body-background, .6); + padding: 0px 40px; + .table-inline{ + margin-top: 13px; + margin-bottom: 13px; + background: transparent; + tr,td{ + background: transparent; + font-weight: 600; + } + } + } + } + } + &.row-details{ + & > td { + &:first-child:before { + content: ''; + display: none; + } + } + } + & > td { + &:hover { + cursor: pointer; + } + &:first-child:before { + content:"\f054"; + display: inline-block; + margin-right: 8px; + font-size: 8px; + top: -1px; + position: relative; + font-family: 'FontAwesome'; + @include transition(all 0.12s linear); + } + } + } + .table-inline { + td { + border: none; + text-align: left; + } + } + } + } + &.table-borderless{ + & > tbody{ + & > tr{ + & > td{ + border-bottom: 0px; + } + } + } + } +} +.fht-table { + margin-bottom: 0 !important; +} + +/* Data-tables +------------------------------------ +*/ +.table.dataTable.no-footer{ + border: none; +} +.dataTables_scroll{ + &:hover{ + .dataTables_scrollBody:before{ + content: ""; + top: 0; + height: 0; + } + } +} +.dataTables_scrollBody { + overflow-y: auto; + border:none !important; + &:before { + content: ""; + position: absolute; + left: 0; + right: 0; + top: 60px; + bottom: 0; + background: transparent; + } + +} +.dataTables_wrapper .dataTables_paginate{ + float:right; +} +.dataTables_wrapper .dataTables_paginate ul > li.disabled a{ + opacity: .5; +} +.dataTables_wrapper .dataTables_paginate ul > li > a { + padding: 5px 10px; + color: $color-master; + opacity: .35; + @include transition(opacity .3s ease); + &:hover{ + opacity: .65; + } +} + +.dataTables_wrapper .dataTables_paginate ul > li.next > a, +.dataTables_wrapper .dataTables_paginate ul > li.prev > a{ + opacity: 1; +} +.dataTables_wrapper .dataTables_paginate ul > li.disabled a{ + opacity: .35; + &:hover{ + opacity: .35; + } +} +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_paginate{ + margin-top: 25px !important; +} +.dataTables_paginate.paging_bootstrap.pagination{ + padding-top: 0; + padding-right:20px; +} +.dataTables_wrapper .dataTables_info{ + clear: none; + font-size: 12px; + + padding: 0 33px; + color: $color-master; +} +.dataTables_wrapper .dataTables_paginate ul > li { + display: inline-block; + padding-left:0; + font-size: 11px; +} +.dataTables_scrollHeadInner{ + padding-right:0 !important; +} +.export-options-container{ + position: relative; +} +.dataTables_wrapper .dataTables_paginate ul > li.active > a{ + font-weight: bold; + color: $color-master; + opacity: 1; +} +.export-options-container a{ + color: inherit; + opacity: 1; +} +.exportOptions .DTTT.btn-group a{ + display: block !important; +} + +table.dataTable thead { + .sorting_asc:after{ + background-image: url("#{$base-img-url}/icons/sort_asc.png"); + } + .sorting_desc:after{ + background-image: url("#{$base-img-url}/icons/sort_desc.png"); + } + .sorting:after{ + background-image: url("#{$base-img-url}/icons/sort_both.png"); + } + .sorting_asc_disabled:after{ + background-image: url("#{$base-img-url}/icons/sort_asc_disabled.png"); + } + .sorting_desc_disabled:after{ + background-image: url("#{$base-img-url}/icons/sort_desc_disabled.png"); + } + +} + +table.dataTable thead .sorting:after, +table.dataTable thead .sorting_asc:after, +table.dataTable thead .sorting_desc:after, +table.dataTable thead .sorting_asc_disabled:after, +table.dataTable thead .sorting_desc_disabled:after{ + bottom: 12px; + content: ""; + width: 19px; + height: 19px; + background-position: center center; + opacity: 1; +} + +table.dataTable.table-condensed .sorting:after, +table.dataTable.table-condensed .sorting_asc:after, +table.dataTable.table-condensed .sorting_desc:after{ + top: 12px; +} + +/* Responsive Handlers : Tables */ +@media (max-width: 991px) { + .dataTables_wrapper .dataTables_info{ + float: left; + } + .dataTables_paginate.paging_bootstrap.pagination{ + float: right; + } + +} + +@media (max-width: 767px) { + .table-responsive{ + border: 1px solid #ddd; + } +} + + +@media (max-width: 480px) { + .dataTables_wrapper .dataTables_info, + .dataTables_wrapper .dataTables_paginate{ + float: none; + text-align: left; + clear: both; + display: block; + } +} + +/* Demo classes */ +.demo-table-search{ + thead th{ + &:nth-child(1){ + width: 20%; + } + &:nth-child(2){ + width: 22%; + } + &:nth-child(3){ + width: 24%; + } + &:nth-child(4){ + width: 15%; + } + &:nth-child(5){ + width: 19%; + } + } +} + +.demo-table-dynamic { + thead th{ + &:nth-child(1){ + width: 25%; + } + &:nth-child(2){ + width: 30%; + } + &:nth-child(3){ + width: 20%; + } + &:nth-child(4){ + width: 25%; + } + } +} + +.table-invoice{ + th{ + border-top: 0; + } +} + +.dataTables_wrapper{ + .row{ + width: 100%; + & > div { + display: flex; + justify-content: space-between; + width: 100%; + flex-direction: row-reverse; + } + } + &#tableWithDynamicRows_wrapper{ + & > div { + width: 100%; + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_tabs_accordian.scss b/resources/assets/sass/modules/_tabs_accordian.scss new file mode 100644 index 00000000..d4a1ae1f --- /dev/null +++ b/resources/assets/sass/modules/_tabs_accordian.scss @@ -0,0 +1,764 @@ +/*------------------------------------------------------------------ +[11. Tabs & Accordians] +*/ + +/* Tabs +------------------------------------ +*/ +.nav-tabs { + position: relative; + & > li { + padding-left: 0; + padding-right: 0; + & > a.active { + &:hover, + &:focus { + border-color: $color-master-light; + color: $color-master; + background-color: $color-master-light; + } + } + & > a { + display: block; + border-radius: 0; + padding: 13px 20px; + margin-right:0; + font-weight: 500; + letter-spacing: 0.06em; + color: fade($color-master, + 70%); + font-size: 10.5px; + min-width: 70px; + text-transform: uppercase; + border-color: transparent; + position: relative; + line-height: 1.7em; + &:hover, + &:focus { + background: transparent; + border-color: transparent; + color: $color-master; + } + .tab-icon { + margin-right:6px; + } + } + } + & ~ .tab-content { + overflow: hidden; + padding: 15px; + & > .tab-pane { + &.slide-left, + &.slide-right { + @include transition(all .3s ease); + &.sliding { + opacity: 0 !important; + } + &.active { + @include translate3d(0, 0, 0); + opacity: 1; + } + } + &.slide-left.sliding { + @include translate3d(10%, 0, 0); + } + &.slide-right.sliding { + @include translate3d(-10%, 0, 0); + } + } + } + // POSITIONG OPTIONS + &.nav-tabs-left, + &.nav-tabs-right { + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + //Old Browsers + -webkit-flex-shrink: 0; + flex-shrink: 0; + &:after { + border-bottom: 0px; + } + & > li { + float: none; + } + } + &.nav-tabs-left { + float: left; + padding-right:0; + & ~ .tab-content { + border-left: 1px solid rgba(0, 0, 0, 0.1); + //IE10 Fix + -ms-flex: 1; + } + } + &.nav-tabs-right { + float: right; + padding-right: 0; + & ~ .tab-content { + border-right: 1px solid rgba(0, 0, 0, 0.1); + //IE10 Fix + -ms-flex: 1; + } + } +} + +/* Tabs : Simple +------------------------------------ +*/ +.nav-tabs-plain { + & > li { + & > a{ + opacity: 0.4; + &:after { + display: none !important; + } + &.active { + opacity: 1; + font-weight: bold; + background-color: white !important; + color: $color-primary; + &:hover, + &:focus { + color: $color-primary; + background-color: white !important; + border-color: white !important; + } + &:after { + display: block !important; + left: 100% !important; + top: 50% !important; + border: solid transparent; + content: " "; + height: 0 !important; + pointer-events: none; + border-left-color: #ffffff; + border-width: 8px !important; + margin-top: -8px !important; + background-color: transparent !important; + } + } + } + } +} +.nav-tabs-simple { + border-bottom: 0px; + &:after { + content:''; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + width: 100%; + position: absolute; + bottom: -1px; + z-index: 120; + left: 0; + } + & > li { + margin-bottom: 0; + & > a{ + &:after { + position: absolute; + @include transition(all 0.1s linear 0s); + -webkit-backface-visibility: hidden; + width: 100%; + display: block; + background-color: $color-primary; + height: 0px; + content: ''; + left: 0; + z-index: 125; + top: calc(100% - 1px); + &.nav-tabs-primary{ + background-color: $color-primary; + } + &.nav-tabs-success{ + background-color: $color-success; + } + &.nav-tabs-complete{ + background-color: $color-complete; + } + &.nav-tabs-danger{ + background-color: $color-danger; + } + &.nav-tabs-warning{ + background-color: $color-warning; + } + &.nav-tabs-info{ + background-color: $color-info; + } + } + &.active { + &:hover, + &:focus { + background-color: transparent; + border-color: transparent; + } + } + &.active, + &:hover { + &:after { + height: 3px; + } + } + } + } + // POSITIONG OPTIONS + &.nav-tabs-left, + &.nav-tabs-right { + &:after { + border-bottom: 0px; + } + & > li { + & > a:after { + width: 0px; + height: 100%; + top: 0; + bottom: 0; + position: absolute; + } + & > a{ + &.active, + &:hover{ + &:after { + width: 3px; + } + } + } + } + & ~ .tab-content { + } + } + &.nav-tabs-left { + & > li > a:after { + right: 0; + left: auto; + } + } + &.nav-tabs-right { + & > li > a:after { + left: 0; + } + } +} + +/* Tabs : Line Triangles +------------------------------------ +*/ + +.nav-tabs-linetriangle { + border-bottom: 0; + &:after { + content:''; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + width: 100%; + position: absolute; + bottom: -1px; + z-index: 100; + left: 0; + } + & > li { + & > a{ + &.active { + background: transparent; + box-shadow: none; + border-color: transparent; + &:hover, + &:focus, + &:active { + border-color: transparent; + background-color: transparent; + } + &:after, + &:before { + border: medium solid transparent; + content: ""; + height: 0; + left: 50%; + pointer-events: none; + position: absolute; + width: 0; + z-index: 120; + top: 98%; + } + &:after { + border-top-color: $body-background; + border-width: 10px; + margin-left:-10px; + } + &:before { + border-top-color: rgba(0, 0, 0, 0.2); + border-width: 11px; + margin-left:-11px; + } + } + span { + font-size: 1em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + &:hover, + &:focus { + overflow: visible; + @include transition( color 0.2s ease 0s); + } + } + } + & ~ .tab-content { + background: #fff; + } + // POSITIONG OPTIONS + &.nav-tabs-left { + &.nav-tabs { + &:after { + border-bottom: none; + } + & > li > a{ + &.active { + &:before { + border-top: 11px solid transparent; + border-bottom: 11px solid transparent; + border-left: 11px solid rgba(0, 0, 0, 0.2); + } + &:after { + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + border-left: 10px solid $body-background; + margin-top: 1px; + margin-right:2px; + } + &:after, + &:before { + top: auto; + right: -22px; + left: auto; + } + } + } + } + } + &.nav-tabs-right { + &.nav-tabs { + &:after { + border-bottom: none; + } + & > li > a{ + &.active { + &:before { + border-top: 11px solid transparent; + border-bottom: 11px solid transparent; + border-right: 11px solid rgba(0, 0, 0, 0.2); + } + &:after { + border-top: 10px solid transparent; + border-bottom: 10px solid transparent; + border-right: 10px solid $body-background; + margin-top: 1px; + margin-left:-9px; + } + &:after, + &:before { + top: auto; + left: -11px; + right: auto; + } + } + } + } + } +} +@media screen and (max-width:58em) { + .nav-tabs-linetriangle { + font-size: 0.6em; + } +} + +/* Tabs : Fill-up +------------------------------------ +*/ + +.nav-tabs-fillup { + &.nav-tabs-master { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-master; + border: 1px solid $color-master; + } + } + } + } + &.nav-tabs-primary { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-primary; + border: 1px solid $color-primary; + } + } + } + } + &.nav-tabs-success { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-success; + border: 1px solid $color-success; + } + } + } + } + &.nav-tabs-complete { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-complete; + border: 1px solid $color-complete; + } + } + } + } + &.nav-tabs-warning { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-warning; + border: 1px solid $color-warning; + } + } + } + } + &.nav-tabs-danger { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-danger; + border: 1px solid $color-danger; + } + } + } + } + &.nav-tabs-info { + & > li { + & > a { + &:after { + background: none repeat scroll 0 0 $color-info; + border: 1px solid $color-info; + } + } + } + } +} + +.nav-tabs-fillup { + @include backface-visibility(hidden); + @include perspective(1000); + & > li { + overflow: hidden; + & > a { + @include backface-visibility(hidden); + @include transition(color 0.3s ease 0s); + background: transparent; + &:after { + @include backface-visibility(hidden); + background: none repeat scroll 0 0 $color-success; + border: 1px solid $color-success; + content: ""; + height: calc(100% + 1px); + left: 0; + position: absolute; + top: 0; + -webkit-transform: translate3d(0, + 100%, + 0px); + transform: translate3d(0, + 100%, + 0px); + -webkit-transition: -webkit-transform 0.3s ease 0s; + transition: transform 0.3s ease 0s; + width: 100%; + z-index: -1; + } + span { + @include backface-visibility(hidden); + -webkit-transform: translate3d(0px, 5px, 0px); + transform: translate3d(0px, 5px, 0px); + -webkit-transition: -webkit-transform 0.5s ease 0s; + transition: transform 0.5s ease 0s; + display: block; + font-weight: 700; + line-height: 1.5; + } + &.active { + z-index: 100; + color: #fff; + &:hover, + &:focus { + border-color: transparent; + background: transparent; + color: #fff; + } + &:after { + @include translate3d(0px, 0px, 0px); + } + span { + @include translate3d(0px, -5px, 0px); + } + } + } + } + .icon:before { + @include translate3d(0px, 5px, 0px); + @include transition(transform 0.5s ease 0s); + display: block; + margin: 0; + } + & ~ .tab-content { + background: #fff; + } + // POSITIONG OPTIONS + &.nav-tabs-left, + &.nav-tabs-right { + border-bottom: none; + &:after { + border-bottom: none; + } + & > li { + & > a { + &:after { + width: calc(100% + 1px); + height: 100%; + } + } + &.active { + a{&:after { + @include translate3d(0px, 0px, 0px); + } + } + } + } + } + &.nav-tabs-left { + & > li { + & > a { + &:after { + @include translate3d(100%, 0, 0); + } + span { + @include translate3d(5px, 0, 0px); + } + } + &.active { + a{span { + @include translate3d(-5px, 0, 0px); + } + } + .icon:before { + @include translate3d(-5px, 0, 0px); + } + } + } + } + &.nav-tabs-right { + & > li { + & > a { + &:after { + @include translate3d(-100%, 0, 0); + left: -1px; + } + span { + @include translate3d(-5px, 0, 0px); + } + } + &.active { + a{span { + @include translate3d(5px, 0, 0px); + } + } + .icon:before { + @include translate3d(5px, 0, 0px); + } + } + } + } +} + +.nav-tabs-header{ + overflow: scroll; + width: 100%; + .nav-tabs{ + width:auto; + white-space: nowrap; + & > li{ + display:inline-block; + float: inherit; + } + } + &.nav-tabs-linetriangle{ + height:54px; + overflow-y: hidden; + &:after{ + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + width: 100%; + position: relative; + bottom: 3px; + z-index: 120; + content: ""; + clear: both; + } + & ~ .tab-content{ + position: relative; + top:-12px; + } + } +} +.nav-tabs-header ~ .tab-content{ + overflow: hidden; + padding: 15px; +} +.nav-tab-dropdown .cs-select{ + width: 100% !important; + max-width: 100%; + .cs-placeholder{ + height: 48px; + padding: 12px 34px 15px 15px; + font-family: 'Montserrat'; + font-weight: 500; + letter-spacing: 0.06em; + font-size: 10.5px; + text-transform: uppercase; + } + .cs-backdrop{ + border:1px solid transparent; + border-bottom: 1px solid $form-control-border-color; + } +} + +.nav-item { + .arrow_tab { + overflow: hidden; + background-color: $color-master-lighter; + opacity: 0.5; + border-color: $color-master-light; + } + .active { + .arrow_tab { + opacity: 1; + background-color: $color-white !important; + border-color: $color-white; + } + } +} + +/* Panel Groups +------------------------------------ +*/ + +.card-group { + margin-bottom: 18px; + &.horizontal{ + display: block; + .card+.card{ + border-left:1px solid $panel-border-color; + } + } + .card-heading { + padding: 13px 18px 10px 22px; + &.collapsed { + background-color: #fff; + } + & + .card-collapse { + .card-body { + border: 0; + } + } + .card-title { + width: 100%; + & > a { + color: $color-master; + font-size: 13px; + font-weight: normal; + display: block; + opacity: 1; + &:hover { + color: $color-master !important; + &:after { + color: $color-master !important; + } + } + &:after { + font-family: 'FontAwesome'; + content: "\f056"; + position: absolute; + right:13px; + top: 36%; + color: $color-master; + } + &.collapsed { + color: fade($color-master, + 70%); + opacity: 1; + &:after { + content: "\f055"; + color: fade($color-master, 70%); + } + } + } + } + } + .card { + -webkit-box-flex: 1; + -webkit-flex: 1 0 0; + -ms-flex: 1 0 0; + flex: 1 0 0; + & + .card { + margin-top: 2px; + } + .card-body { + height: auto; + } + } +} +.nav-pills { + > li { + &:first-child{ + padding-left: 0; + } + // Links rendered as pills + padding-left: 0; + > a { + color: $color-master; + } + // Active state + &.active > a { + &, + &:hover, + &:focus { + color: $color-master; + background-color: $color-master-light; + } + } + } + +} +@media (max-width:767px) { + + .nav.nav-tabs.nav-stack-sm { + li { + float: none; + } + &.nav-tabs-linetriangle > li.active > a:after, + &.nav-tabs-linetriangle > li.active > a:before { + display: none; + } + } +} + +.tabButton { + cursor: pointer; + &.active { + background-color: #ffffff !important; + cursor: default; + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_timeline.scss b/resources/assets/sass/modules/_timeline.scss new file mode 100644 index 00000000..ca94a9c2 --- /dev/null +++ b/resources/assets/sass/modules/_timeline.scss @@ -0,0 +1,521 @@ +/*------------------------------------------------------------------ +[24. Timeline] +*/ + +/* + Adapted from Vertical Timeline by Sebastiano Guerriero + http://codyhouse.co/gem/vertical-timeline/ +*/ + +/* -------------------------------- + +Modules - reusable parts of our design + +-------------------------------- */ + +.timeline-container { + /* this class is used to give a max-width to the element it is applied to, and center it horizontally when it reaches that max-width */ + + width: 90%; + max-width: 1170px; + margin: 0 auto; + &::after { + /* clearfix */ + + content: ''; + display: table; + clear: both; + } + &.top-circle{ + &:before{ + position: absolute; + width: 20px; + height: 20px; + @include border-radius(99px); + background-color: #fff; + z-index: 10; + } + } +} +/* -------------------------------- + +Main components + +-------------------------------- */ + +.timeline { + position: relative; + padding: 3em 0 10em 0; + margin-top: 0; + margin-bottom: 0; + &::before { + /* this is the vertical line */ + + content: ''; + position: absolute; + top: 0; + left: 18px; + height: 100%; + width: 2px; + background: #fff; + } +} +@media only screen and (min-width: 1170px) { + .timeline-container:not(.left) { + .timeline { + margin-bottom: 0; + &::before { + left: 50%; + margin-left: -2px; + } + } + } +} +.timeline-block { + position: relative; + margin: 2em 0; + &:after { + content: ""; + display: table; + clear: both; + } + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } +} +@media only screen and (min-width: 1170px) { + .timeline-container:not(.left) { + .timeline { + .timeline-block { + margin: 4em 0; + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } + } + } + } +} +.timeline-point { + position: absolute; + top: 12px; + left: 0; + width: 40px; + height: 40px; + border-radius: 50%; + text-align: center; + background: darken($color-master-light, 20%); + border: 2px solid #fff; + &.small { + height: 12px; + margin-left: 13px; + margin-top: 14px; + width: 12px; + } + i { + color: #fff; + font-size: 14px; + left: 50%; + margin-left: -7px; + margin-top: -7px; + position: absolute; + top: 50%; + } + &.primary { + background-color: $color-primary; + } + &.complete { + background-color: $color-complete; + } + &.success { + background-color: $color-success; + } + &.info { + background-color: $color-info; + } + &.danger { + background-color: $color-danger; + } + &.warning { + background-color: $color-warning; + } +} +@media only screen and (min-width: 1170px) { + .timeline-container:not(.left) { + .timeline { + .timeline-point { + left: 50%; + margin-left: -21px; + /* Force Hardware Acceleration in WebKit */ + + -webkit-transform: translateZ(0); + -webkit-backface-visibility: hidden; + &.is-hidden { + visibility: hidden; + } + &.small { + margin-left: -7px; + } + &.bounce-in { + visibility: visible; + -webkit-animation: cd-bounce-1 0.6s; + -moz-animation: cd-bounce-1 0.6s; + animation: cd-bounce-1 0.6s; + } + } + } + } +} +@-webkit-keyframes cd-bounce-1 { + 0% { + opacity: 0; + -webkit-transform: scale(0.5); + } + 60% { + opacity: 1; + -webkit-transform: scale(1.2); + } + 100% { + -webkit-transform: scale(1); + } +} +@-moz-keyframes cd-bounce-1 { + 0% { + opacity: 0; + -moz-transform: scale(0.5); + } + 60% { + opacity: 1; + -moz-transform: scale(1.2); + } + 100% { + -moz-transform: scale(1); + } +} +@keyframes cd-bounce-1 { + 0% { + opacity: 0; + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -ms-transform: scale(0.5); + -o-transform: scale(0.5); + transform: scale(0.5); + } + 60% { + opacity: 1; + -webkit-transform: scale(1.2); + -moz-transform: scale(1.2); + -ms-transform: scale(1.2); + -o-transform: scale(1.2); + transform: scale(1.2); + } + 100% { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + } +} +.timeline-content { + position: relative; + margin-left: 60px; + &:after { + content: ""; + display: table; + clear: both; + } + .card { + margin-bottom: 0; + } + .event-date { + display: inline-block; + float: left; + padding: .8em 0; + opacity: .7; + clear: both; + } +} +@media (max-width: 480px) { + .timeline-container{ + width: 94%; + } +} +@media only screen and (min-width: 768px) {} @media only screen and (min-width: 1170px) { + .timeline-container:not(.left) { + .timeline { + .timeline-content { + margin-left: 0; + width: 46%; + &::before { + top: 24px; + left: 100%; + border-color: transparent; + border-left-color: white; + } + &.is-hidden { + visibility: hidden; + } + &.bounce-in { + visibility: visible; + -webkit-animation: cd-bounce-2 0.6s; + -moz-animation: cd-bounce-2 0.6s; + animation: cd-bounce-2 0.6s; + } + .event-date { + position: absolute; + width: 100%; + left: 118%; + top: -2px; + font-size: 16px; + font-size: 1rem; + small { + margin-top: 13px; + display: block; + } + h6 + small { + margin-top: 0; + } + } + } + .timeline-block { + &:nth-child(odd) .timeline-content .card { + float: right; + } + &:nth-child(even) { + .timeline-content { + float: right; + &::before { + top: 24px; + left: auto; + right: 100%; + border-color: transparent; + border-right-color: white; + } + .event-date { + left: auto; + right: 118%; + text-align: right; + } + } + } + } + } + } +} +@media only screen and (min-width: 1170px) { + /* inverse bounce effect on even content blocks */ + + .timeline-container:not(.left) { + .timeline { + .timeline-block:nth-child(even) .timeline-content.bounce-in { + -webkit-animation: cd-bounce-2-inverse 0.6s; + -moz-animation: cd-bounce-2-inverse 0.6s; + animation: cd-bounce-2-inverse 0.6s; + } + } + } +} +@-webkit-keyframes cd-bounce-2 { + 0% { + opacity: 0; + -webkit-transform: translateX(-100px); + } + 60% { + opacity: 1; + -webkit-transform: translateX(20px); + } + 100% { + -webkit-transform: translateX(0); + } +} +@-moz-keyframes cd-bounce-2 { + 0% { + opacity: 0; + -moz-transform: translateX(-100px); + } + 60% { + opacity: 1; + -moz-transform: translateX(20px); + } + 100% { + -moz-transform: translateX(0); + } +} +@keyframes cd-bounce-2 { + 0% { + opacity: 0; + -webkit-transform: translateX(-100px); + -moz-transform: translateX(-100px); + -ms-transform: translateX(-100px); + -o-transform: translateX(-100px); + transform: translateX(-100px); + } + 60% { + opacity: 1; + -webkit-transform: translateX(20px); + -moz-transform: translateX(20px); + -ms-transform: translateX(20px); + -o-transform: translateX(20px); + transform: translateX(20px); + } + 100% { + -webkit-transform: translateX(0); + -moz-transform: translateX(0); + -ms-transform: translateX(0); + -o-transform: translateX(0); + transform: translateX(0); + } +} +@-webkit-keyframes cd-bounce-2-inverse { + 0% { + opacity: 0; + -webkit-transform: translateX(100px); + } + 60% { + opacity: 1; + -webkit-transform: translateX(-20px); + } + 100% { + -webkit-transform: translateX(0); + } +} +@-moz-keyframes cd-bounce-2-inverse { + 0% { + opacity: 0; + -moz-transform: translateX(100px); + } + 60% { + opacity: 1; + -moz-transform: translateX(-20px); + } + 100% { + -moz-transform: translateX(0); + } +} +@keyframes cd-bounce-2-inverse { + 0% { + opacity: 0; + -webkit-transform: translateX(100px); + -moz-transform: translateX(100px); + -ms-transform: translateX(100px); + -o-transform: translateX(100px); + transform: translateX(100px); + } + 60% { + opacity: 1; + -webkit-transform: translateX(-20px); + -moz-transform: translateX(-20px); + -ms-transform: translateX(-20px); + -o-transform: translateX(-20px); + transform: translateX(-20px); + } + 100% { + -webkit-transform: translateX(0); + -moz-transform: translateX(0); + -ms-transform: translateX(0); + -o-transform: translateX(0); + transform: translateX(0); + } +} +.timeline-container { + &.center { + .timeline { + // Split view + margin-top: 3em; + margin-bottom: 3em; + &::before { + left: 50%; + margin-left: -2px; + } + .timeline-point { + left: 50%; + margin-left: -21px; + /* Force Hardware Acceleration in WebKit */ + + -webkit-transform: translateZ(0); + -webkit-backface-visibility: hidden; + &.is-hidden { + visibility: hidden; + } + &.small { + margin-left: -7px; + } + &.bounce-in { + visibility: visible; + -webkit-animation: cd-bounce-1 0.6s; + -moz-animation: cd-bounce-1 0.6s; + animation: cd-bounce-1 0.6s; + } + } + .timeline-content { + margin-left: 0; + width: 46%; + &::before { + top: 24px; + left: 100%; + border-color: transparent; + border-left-color: white; + } + &.is-hidden { + visibility: hidden; + } + &.bounce-in { + visibility: visible; + -webkit-animation: cd-bounce-2 0.6s; + -moz-animation: cd-bounce-2 0.6s; + animation: cd-bounce-2 0.6s; + } + .event-date { + position: absolute; + width: 100%; + left: 118%; + top: -2px; + font-size: 16px; + font-size: 1rem; + small { + margin-top: 13px; + display: block; + } + h6 + small { + margin-top: 0; + } + } + } + .timeline-block { + &:nth-child(odd) .timeline-content .card { + float: right; + } + &:nth-child(even) { + .timeline-content { + float: right; + &::before { + top: 24px; + left: auto; + right: 100%; + border-color: transparent; + border-right-color: white; + } + .event-date { + left: auto; + right: 118%; + text-align: right; + } + } + } + } + } + } +} + +@media only screen and (min-width: 1170px) { + .timeline-container.left{ + width: 60%; + margin-left: 100px; + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_treeview.scss b/resources/assets/sass/modules/_treeview.scss new file mode 100644 index 00000000..527a316a --- /dev/null +++ b/resources/assets/sass/modules/_treeview.scss @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------ +[13. Treeview] +*/ + +span.dynatree-active a{ + color:$color-master-dark !important; + background-color: transparent !important; +} + +span.dynatree-selected a{ + color:$color-master-dark !important; + font-style: normal; + +} +ul.dynatree-container a:focus, span.dynatree-focused a:link{ + background-color: transparent; +} +ul.dynatree-container{ + background-color: transparent; + a:hover{ + color: $color-master; + opacity: 0.7; + background-color: transparent; + } +} + +ul.dynatree-container a{ + color: $color-master; +} + +span.dynatree-empty, span.dynatree-vline, span.dynatree-connector, span.dynatree-expander, span.dynatree-icon, span.dynatree-checkbox, span.dynatree-radio, span.dynatree-drag-helper-img, #dynatree-drop-marker{ + height: 17px; + position: relative; + top: 3px; +} + diff --git a/resources/assets/sass/modules/_typography.scss b/resources/assets/sass/modules/_typography.scss new file mode 100644 index 00000000..6e9934dc --- /dev/null +++ b/resources/assets/sass/modules/_typography.scss @@ -0,0 +1,885 @@ +/*------------------------------------------------------------------ +[5. Typography] +*/ + +/* Standard elements +-------------------------------------------------- +*/ + +/* To Load Hinted Fonts for Windows */ +@import url('https://fonts.googleapis.com/css?family=Montserrat:400,500,600'); + +@import url('https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900'); + +@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,500,600'); + +@import url('https://fonts.googleapis.com/css?family=Orbitron:400,500,600'); + +html{ + font-size: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +body{ + color: $color-master; + font-family: 'Open Sans', sans-serif !important; + font-size: 14px; + font-weight: normal; + letter-spacing: 0.01em; + -webkit-font-smoothing:antialiased; + -webkit-text-size-adjust:100%; + -ms-text-size-adjust:100%; + -webkit-font-feature-settings: "kern" 1; + -moz-font-feature-settings: "kern" 1; +} +/* Headings +------------------------------------ +*/ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: "Segoe UI","Helvetica Neue", Helvetica, Arial, sans-serif; + -webkit-font-smoothing:antialiased; + -webkit-text-size-adjust:100%; + -ms-text-size-adjust:100%; + font-weight: 300; + color: $color-master-dark; +} +h1 { + font-size: 44px; + line-height: 55px; + letter-spacing: -0.08px; +} +h2 { + font-size: 31px; + line-height: 40px; +} +h3 { + font-size: 27px; + line-height: 35px; +} +h4 { + font-size: 22px; + line-height: 31.88px; +} +h5{ + font-size: 18px; + line-height: 25.88px; +} +h3 small, +h4 small, +h5 small { + font-weight: 300; +} +h1.block, +h2.block, +h3.block, +h4.block, +h5.block, +h6.block { + padding-bottom: 10px; +} +/* Lins and Others +------------------------------------ +*/ +a { + text-shadow: none !important; + color: $color-primary-dark; + transition: color 0.1s linear 0s,background-color 0.1s linear 0s,opacity 0.2s linear 0s !important; +} +a:focus, a:hover, a:active { + color: $color-primary; +} +a,a:focus, a:hover, a:active { + outline: 0 !important; + text-decoration: none; +} +a[ng-click] { + cursor: pointer; +} +br { + line-height: normal; + clear: both; +} +code{ + color:$color-danger-dark; + background-color: $color-master-lighter; + &:hover { + background-color: $color-danger-lighter; + } +} +p { + display: block; + font-size: 14px; + font-weight: normal; + letter-spacing: 0.01em; + line-height: 22px; + margin: 0px 0px 10px 0px; + font-style: normal; + white-space: normal; +} +small, +.small{ + line-height: 18px; + font-size: 85%; +} +label { + &.inline { + display: inline-block; + position: relative; + top: 0px; + font-size: 13px; + } +} +ul,ol { + margin-bottom: 10px; + & > li { + padding-left: 3px; + line-height: 24px; + } + &.lg-icon{ + & > li { + font-size: 21px; + & span { + font-size: 14px; + } + } + } + &.no-style{ + list-style: none; + padding-left: 5px; + } +} +address { + margin-bottom: 0px; + a{ + color:$color-master; + } +} +blockquote { + padding: 0 0 0 18px; + border-left:0; + &:before{ + content: ''; + font-family: FontAwesome; + content: "\f10d"; + margin-right: 13px; + float: left; + } + p { + font-size: 16px; + } + small { + line-height: 29px; + color: #8b91a0; + padding-left: 30px; + &:before { + content: ""; + } + } + &.pull-right { + border-right:0; + &:before{ + float: right; + content: ''; + font-family: FontAwesome; + content: "\f10d"; + margin-left: 13px; + margin-right: 0; + } + small { + padding-right: 30px; + &:after { + content: ""; + } + } + } +} +hr{ + border-color:$color-master-light; + &.double{ + border-width:2px; + } + &.dotted{ + border-style:dotted none none; + } +} + +/* Font Sizes +------------------------------------ +*/ + +.small-text { + font-size: 12px !important; +} +.normal-text { + font-size: 13px !important; +} +.large-text { + font-size: 15px !important; +} + +/* Font Weights +------------------------------------ + */ + +.normal { + font-weight: normal; +} +.semi-bold { + font-weight: 400 !important; +} +.bold { + font-weight: bold !important; +} +.light { + font-weight: 300 !important; +} + +.lightest { + font-weight: 100 !important; +} + + +/* Misc +------------------------------------ +*/ + +.logo { + margin: 18px 14px; +} +.all-caps { + text-transform: uppercase; +} +.muted { + color: lighten($color-master,50%); +} +.hint-text{ + opacity: .7; +} +.no-decoration{ + text-decoration:none !important; +} +/* Monochrome Colors +------------------------------------ + */ + +.bg-master{ + background-color: $color-master !important; +} +.bg-master-light{ + background-color: $color-master-light !important; +} +.bg-master-lighter{ + background-color: $color-master-lighter !important; +} +.bg-master-lightest{ + background-color: $color-master-lightest !important; +} +.bg-master-dark{ + background-color: $color-master-dark !important; +} +.bg-master-darker{ + background-color: $color-master-darker !important; +} +.bg-master-darkest{ + background-color: $color-master-darkest !important; +} + +/* Contextual Colors +------------------------------------ +*/ + +.bg-primary-complete-gradient { + background: linear-gradient(to right, $color-complete, $color-primary); +} +/* Primary +------------------------------------ +*/ +.bg-primary { + background-color: $color-primary !important; +} +.bg-primary-dark { + background-color: $color-primary-dark !important; +} +.bg-primary-darker { + background-color: $color-primary-darker !important; +} +.bg-primary-light { + background-color: $color-primary-light !important; +} +.bg-primary-lighter { + background-color: $color-primary-lighter !important; +} + +/* Complete +------------------------------------ +*/ +.bg-complete { + background-color: $color-complete !important; +} +.bg-complete-dark { + background-color: $color-complete-dark !important; +} +.bg-complete-darker { + background-color: $color-complete-darker !important; +} +.bg-complete-light { + background-color: $color-complete-light !important; +} +.bg-complete-lighter { + background-color: $color-complete-lighter !important; +} + +/* Success +------------------------------------ +*/ +.bg-success { + background-color: $color-success !important; +} +.bg-success-dark { + background-color: $color-success-dark !important; +} +.bg-success-darker { + background-color: $color-success-darker !important; +} +.bg-success-light { + background-color: $color-success-light !important; +} +.bg-success-lighter { + background-color: $color-success-lighter !important; +} + +/* Info +------------------------------------ +*/ +.bg-info{ + background-color: $color-info !important; +} +.bg-info-dark{ + background-color: $color-info-dark !important; +} +.bg-info-darker{ + background-color: $color-info-darker !important; +} +.bg-info-light{ + background-color: $color-info-light !important; +} +.bg-info-lighter{ + background-color: $color-info-lighter !important; +} + +/* Danger +------------------------------------ +*/ +.bg-danger { + background-color: $color-danger !important;; +} +.bg-danger-dark { + background-color: $color-danger-dark !important; +} +.bg-danger-darker { + background-color: $color-danger-darker !important; +} +.bg-danger-light { + background-color: $color-danger-light !important; +} +.bg-danger-lighter { + background-color: $color-danger-lighter !important; +} + +/* Warning +------------------------------------ + */ +.bg-warning { + background-color: $color-warning !important; +} +.bg-warning-dark { + background-color: $color-warning-dark !important; +} +.bg-warning-darker { + background-color: $color-warning-darker !important; +} +.bg-warning-light { + background-color: $color-warning-light !important; +} +.bg-warning-lighter { + background-color: $color-warning-lighter !important; +} + +/* More Color Options +------------------------------------ +*/ + +/* Menu +------------------------------------ +*/ +.bg-menu-dark{ + background-color: $color-menu-dark; +} +.bg-menu{ + background-color: $color-menu; +} +.bg-menu-light{ + background-color: $color-menu-light; +} + +/* Gradients +------------------------------------ +*/ +.gradient-grey { + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 75%); + background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 75%); +} +.gradient-black { + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 75%); + background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 75%); +} + +/* Other Colors +------------------------------------ +*/ +.bg-white{ + background-color: #fff; +} +.bg-transparent{ + background-color: transparent !important; +} + +/* Text Colors */ +.link{ + opacity: .7; + &:hover{ + opacity: 1; + } +} +.text-black { + color: $color-master-dark !important; +} +.hover-black { + color: $color-master-dark !important; +} +.text-white { + color: #fff !important; +} +.hover-white { + &:hover { + color: $color-white !important; + } +} + +.text-master { + color: $color-master !important; +} +.text-master-dark { + color: $color-master-dark !important; +} +.text-master-darker { + color: $color-master-darker !important; +} +.text-master-light { + color: $color-master-light !important; +} +.text-master-lighter { + color: $color-master-lighter !important; +} +.hover-master { + &:hover { + color: $color-master !important; + } +} + +.text-complete { + color: $color-complete !important; +} +.text-complete-dark { + color: $color-complete-dark !important; +} +.text-complete-darker { + color: $color-complete-darker !important; +} +.text-complete-light { + color: $color-complete-light !important; +} +.text-complete-lighter { + color: $color-complete-lighter !important; +} +.hover-complete { + &:hover { + color: $color-complete !important; + } +} + +.text-success { + color: $color-success !important; +} +.text-success-dark { + color: $color-success-dark !important; +} +.text-success-darker { + color: $color-success-darker !important; +} +.text-success-light { + color: $color-success-light !important; +} +.text-success-lighter { + color: $color-success-lighter !important; +} +.hover-success { + &:hover { + color: $color-success !important; + } +} + +.text-info { + color: $color-info !important; +} +.text-info-dark { + color: $color-info-dark !important; +} +.text-info-darker { + color: $color-info-darker !important; +} +.text-info-light { + color: $color-info-light !important; +} +.text-info-lighter { + color: $color-info-lighter !important; +} +.hover-warning { + color: $color-warning !important; +} +.hover-info { + &:hover { + color: $color-info !important; + } +} + +.text-warning-dark { + color: $color-warning-dark !important; +} +.text-warning-darker { + color: $color-warning-darker !important; +} +.text-warning-light { + color: $color-warning-light !important; +} +.text-warning-lighter { + color: $color-warning-lighter !important; +} +.hover-warning { + &:hover { + color: $color-warning !important; + } +} + +.text-danger { + color: $color-danger !important; +} +.text-danger-dark { + color: $color-danger-dark !important; +} +.text-danger-darker { + color: $color-danger-darker !important; +} +.text-danger-light { + color: $color-danger-light !important; +} +.text-danger-lighter { + color: $color-danger-lighter !important; +} +.hover-danger { + &:hover{ + color: $color-danger !important; + } +} + +.text-primary { + color: $color-primary !important; +} +.text-primary-dark { + color: $color-primary-dark !important; +} +.text-primary-darker { + color: $color-primary-darker !important; +} +.text-primary-light { + color: $color-primary-light !important; +} +.text-primary-lighter { + color: $color-primary-lighter !important; +} +.hover-primary { + &:hover { + color: $color-primary !important; + } +} + +/* Text Aligngments +------------------------------------ +*/ + +.text-right { + text-align: right !important; +} +.text-left { + text-align: left !important; +} +.text-center { + text-align: center !important; +} + + +.text-underline { + text-decoration: underline !important; +} + +.pointer { + cursor: pointer !important; +} + +/* Labels +------------------------------------ +*/ + +.label { + padding: 3px 9px; + font-size: 11px; + line-height: 1; + text-shadow: none; + background-color: $color-master-light; + font-weight: 600; + color: $color-master; + border-radius: .25em; +} +.label-success { + background-color: $color-success; + color: #fff; +} +.label-warning{ + background-color: $color-warning; + color: #fff; +} +.label-important, .label-danger { + background-color: $color-danger; + color: #fff; +} +.label-info{ + background-color: $color-success; + color: #fff; +} +.label-inverse { + background-color: $color-complete-dark; + color: #fff; +} +.label-white { + background-color: #fff; + color: $color-master; +} + +/* Line-heights +------------------------------------ +*/ +.lh-normal{ + line-height: normal; +} + +/* Font Faces +------------------------------------ +*/ + +.font-arial{ + font-family: Arial, sans-serif !important; +} +.font-opensans{ + font-family: 'Open Sans', sans-serif !important; +} +.font-montserrat{ + font-family: 'Montserrat', sans-serif !important; +} + +.font-lato{ + font-family: 'Lato', sans-serif !important; +} + +.font-orbitron{ + font-family: 'Orbitron', sans-serif !important; +} + +.font-georgia{ + font-family: 'Georgia', sans-serif !important; +} +.font-heading{ + font-family: "Segoe UI","Helvetica Neue", Helvetica, Arial, sans-serif; +} + +/* Wells +------------------------------------ +*/ +.well { + background-color: $color-master-light; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: none !important; + -moz-box-shadow: none !important; + box-shadow: none !important; + border: none; + background-image: none; + &.well-large { + padding: 24px; + width: auto; + } + &.well-small { + padding: 13px; + width: auto; + } + &.green { + background-color: $color-complete; + color: $color-white ; + border: none; + } +} +.overflow-ellipsis{ + text-overflow:ellipsis; + overflow: hidden; + white-space: nowrap; +} + +.jumbotron { + @include border-radius(0); + p{ + font-size: 14px; + font-weight: normal; + margin-bottom: inherit; + &.small{ + font-size: 85%; + } + } +} + + +/* Responsive Handlers : Typo +------------------------------------ +*/ + +@media (max-width: 1400px) { + + body, p{ + font-size: 13px; + line-height: 20px; + } + + + h1 { + font-size: 33px; + line-height: 44px; + letter-spacing: -0.08px; + } + h2 { + font-size: 28px; + line-height: 40px; + } + h3 { + font-size: 24px; + line-height: 35.88px; + } + h4 { + font-size: 18px; + line-height: 33.88px; + } + h5{ + font-size: 16px; + line-height: 25.88px; + } + small, .small{ + font-size: 89%; + line-height: 17px; + } + +} + + +/* For Windows : Fixes +------------------------------------ +*/ +.windows { + body, + p{ + font-size: 13px; + letter-spacing: normal; + } + h3{ + font-size: 29px; + line-height: 33px; + } + h4{ + font-size: 23px; + line-height: 32px; + } + h5{ + font-size: 19px; + line-height: 28px; + font-weight: normal; + } + h1, + h2, + h3, + h4, + h5{ + font-weight: 300; + letter-spacing: normal; + + } + + .jumbotron p{ + font-size: 13px; + &.small{ + font-size: 85%; + } + } + small, + .small{ + // font-size: 85%; + font-size: 89%; + } + + +} + +.alert { + & > p, & > ul { + margin-bottom: 0; + } +} +.table{ + & > tbody{ + & > tr{ + & > td, & > th{ + line-height: 1.42857143; + } + } + } + & > tfoot{ + & > tr{ + & > td, & > th{ + line-height: 1.42857143; + } + } + } + & > thead{ + & > tr{ + & > td, & > th{ + line-height: 1.42857143; + } + } + } +} + +.fa { + line-height: 18px !important; +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_vector_map.scss b/resources/assets/sass/modules/_vector_map.scss new file mode 100644 index 00000000..17240989 --- /dev/null +++ b/resources/assets/sass/modules/_vector_map.scss @@ -0,0 +1,144 @@ +/*------------------------------------------------------------------ +[26. Vector Map : Mapplic Plugin] +*/ + +.horizontal-app-menu{ + .map-controls{ + left: 0; + } +} +.mapplic-container { + width: 100%; + background-color: transparent; + .mapplic-fullscreen-button { + left: auto; + right: 154px; + bottom: 0; + top: auto; + } + .mapplic-clear-button { + visibility: hidden; + } +} +.mapplic-tooltip:before { + content: "Location"; + font-size: 12px; + margin: 0; + line-height: normal; + opacity: .7; + color: $color-master; +} +.mapplic-tooltip-close { + opacity: .5; + background: none; + &:after { + content: "\e60a"; + font-family: 'pages-icon'; + font-size: 12px; + position: relative; + top: -2px; + color: $color-master; + opacity: .7; + } +} +.mapplic-tooltip-title { + display: none; +} +.mapplic-tooltip-content { + margin-top: 5px; +} +.mapplic-tooltip { + max-width: 150px; + padding: 10px 12px; + border-radius: 4px; +} +.mapplic-tooltip-description { + font-weight: bold; + color: $color-master; +} +.mapplic-tooltip-description strong { + color: $color-danger; + margin-right: 2px; +} +.map-controls { + position: absolute; + left: 50px; + top: 80px; + z-index: 1; +} +.mapplic-pin { + background-image: url('#{$assets-url}/img/maps/marker-master.svg'); + background-size: contain; + &.pulse { + background-image: url('#{$assets-url}/img/maps/pulse-master.svg'); + &.green { + background-image: url('#{$assets-url}/img/maps/pulse-success.svg'); + } + &.blue { + background-image: url('#{$assets-url}/img/maps/pulse-complete.svg'); + } + &.purple { + background-image: url('#{$assets-url}/img/maps/pulse-primary.svg'); + } + &.yellow { + background-image: url('#{$assets-url}/img/maps/pulse-warning.svg'); + } + &.red { + background-image: url('#{$assets-url}/img/maps/pulse-danger.svg'); + } + } + &.pulse-alt { + background-image: url('#{$assets-url}/img/maps/pulse-alt-master.svg'); + &.green { + background-image: url('#{$assets-url}/img/maps/pulse-alt-success.svg'); + } + &.blue { + background-image: url('#{$assets-url}/img/maps/pulse-alt-complete.svg'); + } + &.purple { + background-image: url('#{$assets-url}/img/maps/pulse-alt-primary.svg'); + } + &.yellow { + background-image: url('#{$assets-url}/img/maps/pulse-alt-warning.svg'); + } + &.red { + background-image: url('#{$assets-url}/img/maps/pulse-alt-danger.svg'); + } + } + &.marker { + background-image: url('#{$assets-url}/img/maps/marker-master.svg'); + &.green { + background-image: url('#{$assets-url}/img/maps/marker-success.svg'); + } + &.blue { + background-image: url('#{$assets-url}/img/maps/marker-complete.svg'); + } + &.purple { + background-image: url('#{$assets-url}/img/maps/marker-primary.svg'); + } + &.yellow { + background-image: url('#{$assets-url}/img/maps/marker-warning.svg'); + } + &.red { + background-image: url('#{$assets-url}/img/maps/marker-danger.svg'); + } + } + &.marker-alt { + background-image: url('#{$assets-url}/img/maps/marker-alt-master.svg'); + &.green { + background-image: url('#{$assets-url}/img/maps/marker-alt-success.svg'); + } + &.blue { + background-image: url('#{$assets-url}/img/maps/marker-alt-complete.svg'); + } + &.purple { + background-image: url('#{$assets-url}/img/maps/marker-alt-primary.svg'); + } + &.yellow { + background-image: url('#{$assets-url}/img/maps/marker-alt-warning.svg'); + } + &.red { + background-image: url('#{$assets-url}/img/maps/marker-alt-danger.svg'); + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_view.scss b/resources/assets/sass/modules/_view.scss new file mode 100644 index 00000000..6e9529a5 --- /dev/null +++ b/resources/assets/sass/modules/_view.scss @@ -0,0 +1,116 @@ +/*------------------------------------------------------------------ +[2. View Ports] +*/ +.view-port{ + position: relative; + width: 100%; + height: 100%; + display: block; + white-space: nowrap; + overflow: hidden; + .navbar{ + border-radius: 0; + padding-left: 0; + margin-bottom:0; + border-left: 0; + display: table; + width: 100%; + top: 0; + border-top: 0; + padding: 0; + border-bottom: 1px solid #e7e7e7; + .navbar-inner{ + display: table-cell; + height: 50px; + vertical-align: middle; + } + .action{ + position: absolute; + top:0; + line-height: 50px; + z-index: 1; + &.pull-right{ + right: 0; + } + } + .view-heading{ + font-size: 15px; + text-align: center; + } + & > p{ + line-height: 12px; + font-size: 12px; + margin: 0; + } + &.navbar-sm{ + min-height: 35px; + .navbar-inner{ + height: 35px; + } + .action{ + line-height: 35px; + } + } + } + .view{ + display: inline-block; + width: 100%; + height: 100%; + vertical-align: top; + @include backface-visibility(hidden); + -webkit-perspective: 1000; + @include transition(all 0.4s ease); + &:first-child{ + &:before{ + position: absolute; + content: ''; + width: 100%; + height: 100%; + background-color: #000; + opacity:0; + @include transition(opacity 0.2s linear); + z-index: -1 + } + } + &:last-child{ + margin-left: -4px + } + &:only-child{ + margin: 0; + } + } + &.from-top{ + & > .view{ + &:last-child{ + @include translate3d(-100%,0,0); + } + } + } + &.push{ + & > .view{ + &:first-child{ + @include translate3d(-100%,0,0); + } + &:last-child{ + @include translate3d(-100%,0,0); + } + } + } + &.push-parrallax{ + & > .view{ + &:first-child{ + @include transition(all 400ms cubic-bezier(0.1,.7,.1,1)); + @include translate3d(-25%,0,0); + &:before{ + opacity:0; + z-index: 100; + } + } + &:last-child{ + @include transition(all 400ms cubic-bezier(0.1,.7,.1,1)); + @include translate3d(-100%,0,0); + box-shadow:0 0 9px rgba(191,191,191,.36); + } + } + } +} \ No newline at end of file diff --git a/resources/assets/sass/modules/_widgets.scss b/resources/assets/sass/modules/_widgets.scss new file mode 100644 index 00000000..8034776f --- /dev/null +++ b/resources/assets/sass/modules/_widgets.scss @@ -0,0 +1,472 @@ +/*------------------------------------------------------------------ +[27. Widgets] +*/ +.widget { + position: relative; + & > div { + position: relative; + z-index: 1; + } + &:after { + background-size: cover; + content: " "; + left: 0; + right: 0; + top: 0; + bottom: 0; + position: absolute; + z-index: 0; + opacity: .69; + } +} +.widget-1 { + &:after { + background-image: url("#{$assets-url}/img/dashboard/pages_hero.jpg"); + background-size: cover; + content: " "; + left: 0; + right: 0; + top: 0; + bottom: 0; + position: absolute; + z-index: 0; + opacity: .69; + } + &:before { + background-image: url('#{$base-img-url}/linear_gradient.png'); + background-repeat: repeat-x; + content: " "; + left: 0; + right: 0; + height: 325px; + bottom: 0; + position: absolute; + z-index: 1; + } + & > .card-block { + // padding: 54px 37px 37px 37px; + .company:nth-child(2) > div { + display: table; + margin: 0 auto; + width: 127px; + } + } + & > .card-block > * { + z-index: 1; + } + & > .card-block > *:not(.pull-bottom) { + position: relative; + } + & > .card-block .pull-bottom { + padding: 0 49px 56px 42px; + } + span.label { + color: #fff; + background: rgba(255, 255, 255, .3); + } +} +.widget-2 { + &:after { + background-image: url("#{$assets-url}/img/social/person-cropped.jpg"); + } +} +.widget-3 { + a{text-decoration: none; + } + .pg-map { + font-size: 30px; + } + .widget-3-fav { + background: rgba(0, 0, 0, 0.07); + vertical-align: middle; + padding: 6px 11px; + display: block; + } +} + +.widget-4{ + .row-sm-height:nth-child(1){ + height:30px; + } + .row-sm-height:nth-child(2){ + height:30px; + } +} +.widget-4-chart { + height: 100%; + width: 100%; + bottom: 0; + position: absolute; + right: 0; + &.line-chart .tick text, + .line-chart .nvd3 .nv-axis .nv-axisMaxMin text { + transform: translate(-10px, -32px); + } + .nvtooltip .nv-pointer-events-none { + thead { + display: none; + } + tbody { + .nv-pointer-events-none .key { + display: none; + } + } + } +} +.widget-5-chart-container { + overflow: hidden +} +.widget-5-chart { + height: auto; + width: auto; + bottom: 20px; + position: absolute; + right: 20px; + left: 20px; + top: 40px; +} +.widget-6 { + background: mix($color-master, + #fff, + 69%); + .label { + background: rgba(0, 0, 0, .3); + color: rgba(255, 255, 255, .67); + } +} +.widget-7 { + .slide-back{ + .row-sm-height:nth-child(1){ + height: 60%; + } + .row-sm-height:nth-child(2){ + height: 40%; + } + } +} +.widget-7-chart { + top: 0; + left: 0; + right: 0; + bottom: 0; + position: absolute; + &.line-chart[data-points="true"] .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { + stroke-opacity: 1; + } + .nvd3 circle.nv-point:nth-child(4) { + fill: $color-danger !important; + stroke: $color-danger !important; + } +} +.widget-8{ + height:145px; + .row-xs-height:first-child{ + height:41px + } +} +.widget-8-chart { + height: 100px; + width: 50%; + bottom: 0; + position: absolute; + right: 0; + .line-chart[data-points="true"] .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { + stroke-opacity: 0.3; + } + .line-chart .nvd3 .nv-groups path.nv-line { + stroke-opacity: 0.15; + } + .nvtooltip{ + display: none; + } +} + +.widget-9{ + height:145px; + .row-xs-height:first-child{ + height:26px; + } + .progress{ + background:rgba(0,0,0,.1); + } +} +.widget-10{ + height:145px; +} +.widget-11 { + sup { + margin-right: -4px; + } + .widget-11-table{ + height:380px; + tr td:first-child{ + width: 40%; + } + } +} +.widget-11-2 { + sup { + margin-right: -4px; + } + .widget-11-2-table{ + height:273px; + } +} + +.widget-12 { + .list-inline { + a{padding: 3px 4px; + border-radius: 3px; + opacity: .7; + } + .active a { + opacity: 1; + } + } + .nvd3-line svg{ + height:316px; + } + .company-stat-boxes .close{ + line-height:0; + } + .widget-12-search{ + margin-top: -3px; + } +} +.widget-14 { + .row-xs-height:nth-child(1){ + height: 30px + } + .row-xs-height:nth-child(2){ + height: 120px + } + .row-xs-height:nth-child(3){ + height: 297px + } +} +.widget-14-chart_y_axis { + position: absolute; + top: 0; + background: rgba(255, 255, 255, .8); + bottom: 0; + width: 35px; + left: 0; + z-index: 2; + .rickshaw_graph .y_ticks path, + .rickshaw_graph .x_ticks_d3 path { + fill: none; + stroke: none; + } + .rickshaw_graph .y_ticks text, + .rickshaw_graph .x_ticks_d3 text { + opacity: 0.35; + font-size: 11px; + } + .y_ticks.plain g:first-child { + opacity: 0 !important; + } +} +.widget-14-chart-legend .ui-sortable li { + padding-right: 0; + .action { + display: none; + } + &:last-child { + margin-top: 7px; + } +} + +.widget-15{ + #widget-15-tab-1 > div{ + height:170px; + } +} +.widget-15-2{ + height:469px; + #widget-15-2-tab-1 .full-width{ + height:180px; + } +} +.widget-16-header .pull-left:last-child{ + width:69%; +} +.widget-16-chart { + height:100px; + &.line-chart[data-stroke-width="2"] .nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point { + stroke-width: 2px; + } +} + +.widget-17{ + height:467px; + .widget-17-weather{ + width:90% + } +} +.widget-18-post { + height:342px; + background: url('#{$assets-url}/img/social/quote.jpg'); + background-position: center center; + background-size: cover +} +.widget-19-post { + height:237px; + background: #00A79A; + img { + top: 50%; + margin-top: -70px + } +} +.btn-circle-arrow { + border: 1px solid #fff; + border-radius: 100px; + position: relative; + width: 18px; + height: 18px; + display: inline-block; + vertical-align: middle; + margin-right: 4px; + i { + font-size: 11px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -5px; + margin-top: -4px; + } +} + +/*** Large screens ***/ +@media only screen and (min-width:1824px) { + // Dashboard + .ar-3-2:before { + padding-top: calc(55% - 5px) !important; + } + .ar-2-3:before { + padding-top: calc(135% - 5px) !important; + } +} +@media (max-width:991px) { + .card { + height: auto !important; + } + .widget-8, + .widget-9, + .widget-10 { + height: 180px !important; + } +} +@media (max-width:480px) { + .widget-1-wrapper { + height: 340px; + } +} + + +/* WIDGET MANAGER */ +#widget-filter{ + font-size: 18px; + &:focus{ + background: none; + border: none; + } +} +#widgetDetails { + .progress-circle-indeterminate{ + position: absolute; + left: 50%; + margin-left: -19px; + top: 50%; + margin-top: -19px; + } +} +.widgets-container { + margin: 0 auto; +} +#widget-preview{ + display: block; + margin: 0 auto; +} +.widget-item { + overflow: hidden; + cursor: default; + background-color: #fff; + margin-bottom: 10px; + position: relative; + width: 280px; + height: 240px; + &:hover { + cursor: pointer; + &:before{ + opacity: 0; + } + &:after{ + opacity: .8; + } + .item-footer{ + color: $color-primary !important; + } + } + &:before{ + position: absolute; + content: ""; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-image: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.8) 70%); + transition: opacity .3s ease; + -webkit-transition: opacity .3s ease; + opacity: 1; + } + &:after{ + position: absolute; + content: ""; + left: 0; + right: 0; + top: 0; + bottom: 0; + background: #fff; + opacity: 0; + transition: opacity .3s ease; + -webkit-transition: opacity .3s ease; + } + &[data-width="1"] { + width: 280px; + } + &[data-width="2"] { + width: 570px; + } + &[data-height="1"] { + height: 240px; + } + &[data-height="2"] { + height: 490px; + } + .item-footer{ + color: $color-master; + p.pull-left{ + text-overflow: ellipsis; + width: 84%; + white-space: nowrap; + overflow: hidden; + } + .pull-right{ + .fa-stack{ + font-size:69%; + } + } + } +} + +@media (max-width: 420px) { + .widgets-container{ + margin-top: 80px; + } +} + +@media (max-width: 610px) { + .widget-item, .widgets-container { + width: 100% !important; + } +} diff --git a/resources/assets/sass/modules/_z_index.scss b/resources/assets/sass/modules/_z_index.scss new file mode 100644 index 00000000..e8dd7f97 --- /dev/null +++ b/resources/assets/sass/modules/_z_index.scss @@ -0,0 +1,24 @@ +// z-index scale +$zIndex-1: 100; +$zIndex-2: 200; +$zIndex-3: 300; +$zIndex-4: 400; +$zIndex-5: 500; +$zIndex-6: 600; +$zIndex-7: 700; +$zIndex-8: 800; +$zIndex-9: 900; +$zIndex-10: 1000; + +//TODO: add all components +// z-index applications + + +$zIndex-sidebar : $zIndex-10; +$zIndex-tooltips : $zIndex-10; +$zIndex-quickview: $zIndex-10; +$zIndex-notifications : $zIndex-9; +$zIndex-navbar : $zIndex-8; +$zIndex-dropdown : $zIndex-7; +$zIndex-dropdownMask : $zIndex-6; +$zIndex-portlet : $zIndex-6; diff --git a/resources/assets/vue/app.js b/resources/assets/vue/app.js new file mode 100644 index 00000000..192f9fb6 --- /dev/null +++ b/resources/assets/vue/app.js @@ -0,0 +1,54 @@ + +/** Dependencies */ +import Vue from 'vue' +import store from './vuex/store'; + +window.route = require('./general/functions/router'); + +/** Guards */ +import guards from './general/mixins/guards'; + +/** Validation **/ +import vuelidate from 'vuelidate'; + +/** Input Mask **/ +import VueTheMask from 'vue-the-mask'; + + +/** Mixins */ +import request from './general/mixins/request'; +import crudHandler from './general/mixins/crudHandler'; + +/** Directives */ +import closable from './general/directives/closable'; + +import Avatar from 'vue-avatar'; + +/** Application Injections */ +Vue.use(vuelidate); +Vue.use(VueTheMask); +Vue.directive('closable', closable); +Vue.mixin({ + methods: { + route: route + }, + mixins: [request, crudHandler] + }); + +/** Components Registrations */ +Vue.component(Avatar); + +const files = require.context('./', true, /\.vue$/i); +files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)); + +const app = new Vue({ + el: '#app', + store, + created(){ + this.routesGuard(); + }, + methods: { + route: route + }, + mixins: [guards] +}); diff --git a/resources/assets/vue/general/directives/closable.js b/resources/assets/vue/general/directives/closable.js new file mode 100644 index 00000000..a4d31d89 --- /dev/null +++ b/resources/assets/vue/general/directives/closable.js @@ -0,0 +1,39 @@ + +let handleOutsideClick; + +export const closable = { + bind (el, binding, vnode) { + handleOutsideClick = (e) => { + + e.stopPropagation(); + + const { handler, exclude } = binding.value; + + let clickedOnExcludedEl = false; + + exclude.forEach(refName => { + if (!clickedOnExcludedEl) { + const excludedEl = vnode.context.$refs[refName]; + + + if (excludedEl) { + clickedOnExcludedEl = excludedEl.contains(e.target) + } + + } + }); + + if (!el.contains(e.target) && !clickedOnExcludedEl) { + vnode.context[handler]() + } + }; + document.addEventListener('click', handleOutsideClick); + document.addEventListener('touchstart', handleOutsideClick) + }, + unbind () { + document.removeEventListener('click', handleOutsideClick); + document.removeEventListener('touchstart', handleOutsideClick) + } +}; + +export default { closable } \ No newline at end of file diff --git a/resources/assets/vue/general/functions/router.js b/resources/assets/vue/general/functions/router.js new file mode 100644 index 00000000..4bd9b637 --- /dev/null +++ b/resources/assets/vue/general/functions/router.js @@ -0,0 +1,16 @@ +let routes = window.Laravel.routes +module.exports = function () { + let args = Array.prototype.slice.call(arguments), + name = args.shift(), + prefixSlash = routes[name] !== '/' ? '/':''; + + if (routes[name] === undefined) { + console.error('Route not found ', name); + return; + } + + return window.Laravel.baseUrl + prefixSlash + routes[name] + .split('/') + .map(s => s[0] === '{' ? args.shift() : s) + .join('/'); +}; \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/authenticationHandler.js b/resources/assets/vue/general/mixins/accounts/authenticationHandler.js new file mode 100644 index 00000000..29f33f7e --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/authenticationHandler.js @@ -0,0 +1,16 @@ +import errorMessageHandler from "../errorMessageHandler"; +import formHandler from "../formHandler"; + +export default { + methods: { + successHandler(response){ + this.formHandler(''); + this.$store.dispatch('userAuthentication', {access_token: response.payload.access_token, redirect_url: response.payload.redirect_url}); + }, + errorHandler(error){ + this.formHandler(error.message); + } + }, + mixins: [errorMessageHandler, formHandler] + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/resetPasswordHandler.js b/resources/assets/vue/general/mixins/accounts/resetPasswordHandler.js new file mode 100644 index 00000000..f0e0789c --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/resetPasswordHandler.js @@ -0,0 +1,17 @@ +import errorMessageHandler from "../errorMessageHandler"; +import formHandler from "../formHandler"; + +export default { + methods: { + successHandler(response){ + this.closeModal(); + this.formHandler(''); + }, + errorHandler(error){ + console.log("error" ,error); + this.formHandler(error.message); + } + }, + mixins: [errorMessageHandler, formHandler] + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/updateProfileHandler.js b/resources/assets/vue/general/mixins/accounts/updateProfileHandler.js new file mode 100644 index 00000000..4979dfd4 --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/updateProfileHandler.js @@ -0,0 +1,18 @@ +import errorMessageHandler from "../errorMessageHandler"; +import formHandler from "../formHandler"; + +export default { + methods: { + successHandler(response){ + this.closeModal(); + this.formHandler(''); + this.$store.dispatch('updateProfile', {fullname:response.payload.data.name}); + }, + errorHandler(error){ + console.log("error" ,error); + this.formHandler(error.message); + } + }, + mixins: [errorMessageHandler, formHandler] + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/validation/loginFormValidation.js b/resources/assets/vue/general/mixins/accounts/validation/loginFormValidation.js new file mode 100644 index 00000000..1cbc6fff --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/validation/loginFormValidation.js @@ -0,0 +1,11 @@ +import { required, email } from "vuelidate/lib/validators"; +import authenticationHandler from '../authenticationHandler' +export default { + validations: { + parameters: { + email: { required, email }, + password: { required } + } + }, + mixins: [authenticationHandler] +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js b/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js new file mode 100644 index 00000000..a280739d --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/validation/registrationFormValidation.js @@ -0,0 +1,30 @@ +import { required, email, numeric, sameAs, requiredUnless, requiredIf } from "vuelidate/lib/validators"; +import authenticationHandler from '../authenticationHandler' +export default { + validations: { + parameters: { + name: { + required + }, + email: { + required: requiredIf(function () { return this.step === 2 }), + email + }, + company_name: { + required: requiredIf(function () { return this.parameters.type === 1 }) + }, + phone: { + required, + numeric + }, + password: { + required: requiredIf(function () { return this.step === 2 }), + }, + password_confirmation: { + required: requiredIf(function () { return this.step === 2 }), + sameAs: sameAs('password') + } + } + }, + mixins: [authenticationHandler] +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/accounts/validation/resetPasswordFormValidation.js b/resources/assets/vue/general/mixins/accounts/validation/resetPasswordFormValidation.js new file mode 100644 index 00000000..a4f17906 --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/validation/resetPasswordFormValidation.js @@ -0,0 +1,10 @@ +import { required } from "vuelidate/lib/validators"; +import resetPasswordHandler from "../resetPasswordHandler"; +export default { + validations: { + parameters: { + email: { required } + } + }, + mixins: [resetPasswordHandler] +}; diff --git a/resources/assets/vue/general/mixins/accounts/validation/updateProfileFormValidation.js b/resources/assets/vue/general/mixins/accounts/validation/updateProfileFormValidation.js new file mode 100644 index 00000000..8be6ce0b --- /dev/null +++ b/resources/assets/vue/general/mixins/accounts/validation/updateProfileFormValidation.js @@ -0,0 +1,10 @@ +import { required } from "vuelidate/lib/validators"; +import updateProfileHandler from "../updateProfileHandler"; +export default { + validations: { + parameters: { + name: { required } + } + }, + mixins: [updateProfileHandler] +}; diff --git a/resources/assets/vue/general/mixins/companies/validation/identificationVerificationFormValidation.js b/resources/assets/vue/general/mixins/companies/validation/identificationVerificationFormValidation.js new file mode 100644 index 00000000..3804ca18 --- /dev/null +++ b/resources/assets/vue/general/mixins/companies/validation/identificationVerificationFormValidation.js @@ -0,0 +1,16 @@ +import ModalFromHandler from '../../modalFormHandler' +import { required } from "vuelidate/lib/validators"; + +export default { + validations: { + parameters: { + identification_no: { + required + }, + files: { + required + } + } + }, + mixins: [ModalFromHandler] +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/componentHandler.js b/resources/assets/vue/general/mixins/componentHandler.js new file mode 100644 index 00000000..05980215 --- /dev/null +++ b/resources/assets/vue/general/mixins/componentHandler.js @@ -0,0 +1,18 @@ +export default { + props: { + 'data': { + type: Object, + } + }, + data() { + return { + item: this.data + } + }, + watch: { + 'data': function() { + this.item = this.data; + } + } + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/crudHandler.js b/resources/assets/vue/general/mixins/crudHandler.js new file mode 100644 index 00000000..583629c9 --- /dev/null +++ b/resources/assets/vue/general/mixins/crudHandler.js @@ -0,0 +1,45 @@ +export default { + methods: { + crudSuccess(){ + this.closeModal(); + this.updateList(); + this.resetForm(); + + }, + resetForm(){ + if(this.$v){ this.$v.$reset() } + if(!this.data) { Object.assign(this.$data, this.$options.data.call(this)) } + }, + updateFilters(){ + if(this.$store.getters.isInQueue(this.section)){ + this.filters = this.$store.getters.getListDetails(this.section).filters; + } else { + this.setDecoratorDefault(); + } + + let vm = this; + $.each(this.parameters, function(key, value) { + value ? (vm.filters[key] = value) : (key in vm.filters && delete vm.filters[key]); + }); + + this.$store.dispatch('updateListQueue', {'name': this.section, 'page': 1, 'filters': this.filters}); + }, + updateList(){ + this.$store.dispatch('reloadList', {'name': this.section}); + }, + closeModal(){ + $(this.$el).closest('.modal').modal('hide'); + }, + openModal(){ + $(this.$el).closest('.modal').modal('show'); + }, + setDecoratorDefault(){ + this.filters.per_page = this.filters.per_page !== undefined ? this.filters.per_page : 10; + this.filters.order_by = this.filters.order_by !== undefined ? this.filters.order_by : { + column: 'id', + DESC: true + }; + } + } + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/errorMessageHandler.js b/resources/assets/vue/general/mixins/errorMessageHandler.js new file mode 100644 index 00000000..b95bcbb7 --- /dev/null +++ b/resources/assets/vue/general/mixins/errorMessageHandler.js @@ -0,0 +1,13 @@ +export default { + data(){ + return { + error: '', + } + }, + methods: { + errorMessageHandler(errorMessage){ + this.error = errorMessage; + } + } + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/formHandler.js b/resources/assets/vue/general/mixins/formHandler.js new file mode 100644 index 00000000..41713c17 --- /dev/null +++ b/resources/assets/vue/general/mixins/formHandler.js @@ -0,0 +1,48 @@ +import errorMessageHandler from "./errorMessageHandler"; +import {VMoney} from 'v-money' + +export default { + props: { + section:{ + type: String, + required: true + }, + data: { + type: Object, + default: null + } + }, + created() { + if(this.data){ + this.parameters = this.data; + } + + }, + watch: { + 'data': function() { + this.parameters = this.data; + } + }, + data() { + return { + isLoading: false, + error: '', + money: {decimal: '.',thousands: ',', precision: 2}, + productPrice: {decimal: '.',thousands: ',', precision: 3}, + exchangeRate: {decimal: '.', thousands: '', precision: 5}, + percentage: {decimal: '.', thousands: '', precision: 2, suffix: '%'}, + integer: {decimal: '', thousands: '', precision: 0}, + + } + }, + methods: { + formHandler(errorMessage){ + this.isLoading = false; + this.updateList(); + this.errorMessageHandler(errorMessage); + } + }, + mixins: [errorMessageHandler], + directives: {money: VMoney} + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/guards.js b/resources/assets/vue/general/mixins/guards.js new file mode 100644 index 00000000..18681e5d --- /dev/null +++ b/resources/assets/vue/general/mixins/guards.js @@ -0,0 +1,17 @@ +export default { + methods: { + routesGuard(){ + (!this.$store.getters.isAuthenticated && this.isProtectedRoute()&& this.isWithTokenRoute()) ? window.location.href = this.route('login') : ''; + (this.$store.getters.isAuthenticated && !this.isProtectedRoute()&& this.isWithTokenRoute()) ? window.location.href = this.route('dashboard') : ''; + }, + isProtectedRoute(){ + const unprotectedRoutes = [this.route('login'), this.route('account.email.verification')]; + return !unprotectedRoutes.includes(window.location.href); + }, + isWithTokenRoute(){ + const unprotectedRoutesWithToken = [this.route('account.password.reset')]; + return !window.location.href.includes(unprotectedRoutesWithToken); + } + } + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/modalFormHandler.js b/resources/assets/vue/general/mixins/modalFormHandler.js new file mode 100644 index 00000000..50a9e4a2 --- /dev/null +++ b/resources/assets/vue/general/mixins/modalFormHandler.js @@ -0,0 +1,15 @@ +import formHandler from "./formHandler"; + +export default { + methods: { + successHandler(){ + this.closeModal(); + this.formHandler(); + }, + errorHandler(error){ + this.formHandler(error.message); + } + }, + mixins: [formHandler] + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/request.js b/resources/assets/vue/general/mixins/request.js new file mode 100644 index 00000000..84b9ccb4 --- /dev/null +++ b/resources/assets/vue/general/mixins/request.js @@ -0,0 +1,50 @@ +export default { + methods: { + submit(url, method, section, successNotification = true, errorNotification = true){ + if(!this.validate()){ return; } + if (section) { + this.$store.dispatch('toggleLoading', {name: section, status: true}) + } + this.$store.dispatch('crudRequest', { + endpoint: url, + method: method, + parameters: this.parameters + }).then(response => { + let statusCode = response.status, + success = response.ok; + + response.json().then(response => { + + if(!success){ + this.openModal(); + errorNotification ? this.$store.dispatch('createNotification', {title: response.title, message: response.message, type: 'error'}): null; + this.errorHandler(response, statusCode); return; + } + + successNotification ? this.$store.dispatch('createNotification', {title: response.title, message: response.message, type: 'success'}): null; + this.successHandler(response) + + + }); + }).catch((error) => { + console.log(error); + this.$store.dispatch('createNotification', {title: 'Unexpected Error', message: 'An unexpected error has occurred. Try again!', type: 'error'}); + }).then(() => { + if (section) { + this.$store.dispatch('toggleLoading', {name: section, status: false}) + } + }) + + }, + validate() { + if(this.$v){ + this.$v.$touch(); + return !this.$v.$invalid; + } + return true; + }, + successHandler(response){}, + errorHandler(response){} + } + +} \ No newline at end of file diff --git a/resources/assets/vue/general/mixins/staticFormHandler.js b/resources/assets/vue/general/mixins/staticFormHandler.js new file mode 100644 index 00000000..c65307cb --- /dev/null +++ b/resources/assets/vue/general/mixins/staticFormHandler.js @@ -0,0 +1,14 @@ +import formHandler from "./formHandler"; + +export default { + methods: { + successHandler(){ + this.formHandler(); + }, + errorHandler(error){ + this.formHandler(error.message); + } + }, + mixins: [formHandler] + +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/modules/authentication.js b/resources/assets/vue/vuex/modules/authentication.js new file mode 100644 index 00000000..f349afa2 --- /dev/null +++ b/resources/assets/vue/vuex/modules/authentication.js @@ -0,0 +1,90 @@ +import jwt_decode from "jwt-decode"; +export default { + state: { + resetPasswordEmail: '', + updatedFullname:localStorage.getItem('updated-fullname') || '', + authentication: { + access_token: localStorage.getItem('user-token') || '' + } + }, + getters: { + isAuthenticated: state => !!state.authentication.access_token, + getAccessToken: state => state.authentication.access_token, + + isSuperAdmin: (state, getters) => getters.getDecodedAccessToken.user.type === 0 || getters.getDecodedAccessToken.user.type === 1, + isAdmin: (state, getters) => getters.getDecodedAccessToken.user.type === 0 || getters.getDecodedAccessToken.user.type === 1 || getters.getDecodedAccessToken.user.type === 2, + getUserName: (state, getters) => getters.getUpdatedFullname || getters.getDecodedAccessToken.user.name, + getUserId: (state, getters) => getters.getDecodedAccessToken.user.id, + getUserEmail: (state, getters) => getters.getDecodedAccessToken.user.email, + getCompanyId: (state, getters) => getters.getDecodedAccessToken.user.company_id, + + getDecodedAccessToken(state) { + try{ + return jwt_decode(state.authentication.access_token); + } + catch(Error){ + return { + user: { + id: '', + name: '', + role: '', + status: 0, + } + + }; + } + }, + + getResetPasswordEmail: state => state.resetPasswordEmail, + getUpdatedFullname: state => state.updatedFullname + }, + mutations: { + SET_AUTHENTICATION(state, {access_token}){ + state.authentication.access_token = access_token; + }, + SET_PASSWORD_RESET_EMAIL(state, {email}){ + state.resetPasswordEmail = email; + }, + UPDATE_FULL_NAME(state, {fullname}){ + state.updatedFullname = fullname; + } + }, + actions: { + userAuthentication(store, {access_token, redirect_url}){ + localStorage.setItem('user-token', access_token); + + store.commit('SET_AUTHENTICATION', {access_token}); + + store.dispatch('toggleLoading', {name: 'loginSection', status: true}); + + setTimeout(function(){ + window.location.href = redirect_url; + }, 2000); + }, + updateToken(store, {access_token}){ + + localStorage.setItem('user-token', access_token); + + store.commit('SET_AUTHENTICATION', {access_token}); + + }, + passwordResetEmail(store, {email}){ + store.commit('SET_PASSWORD_RESET_EMAIL', {email}); + store.dispatch('toggleLoading', {name: 'forgetPasswordSection', status: true}); + setTimeout(function(){ + store.dispatch('toggleLoading', {name: 'forgetPasswordSection', status: false}); + }, 2000); + }, + passwordReset(store){ + store.dispatch('toggleLoading', {name: 'resetPasswordSection', status: true}); + }, + returnToLoginAfterSendResetPasswordLink(store){ + store.dispatch('toggleSection', {name: 'forgetPassword', status: false}) + store.dispatch('toggleSection', {name: 'forgetPasswordSuccess', status: false}); + }, + updateProfile(store, {fullname}){ + localStorage.setItem('updated-fullname', fullname); + store.commit('UPDATE_FULL_NAME', {fullname}); + } + } +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/modules/createNotification.js b/resources/assets/vue/vuex/modules/createNotification.js new file mode 100644 index 00000000..ed7e3284 --- /dev/null +++ b/resources/assets/vue/vuex/modules/createNotification.js @@ -0,0 +1,15 @@ +export default { + actions: { + createNotification(store, payload){ + let content = '
      '+payload.title+'
      '+payload.message+'
      '; + new Noty({ + type: payload.type, + text: content, + timeout: 5000, + closeWith: ['button'], + layout: "bottomRight", + theme: "metroui" + }).show(); + } + } +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/modules/crudRequest.js b/resources/assets/vue/vuex/modules/crudRequest.js new file mode 100644 index 00000000..f4f6c37f --- /dev/null +++ b/resources/assets/vue/vuex/modules/crudRequest.js @@ -0,0 +1,23 @@ +export default { + actions: { + crudRequest({getters, dispatch}, {endpoint, method, parameters}){ + return fetch(endpoint, { + method: method, + responseType: 'json', + body: parameters ? JSON.stringify(parameters):null, + headers: { + 'content-type': 'application/json', + 'Authorization': 'Bearer '+getters.getAccessToken + } + }).then(response => { + + if(response.status === 401 && window.location.href !== route('login')){ + dispatch('userAuthentication', {access_token: '', redirect_url: '/'}); + } + + return response; + + }) + } + } +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/modules/loadRequestQueue.js b/resources/assets/vue/vuex/modules/loadRequestQueue.js new file mode 100644 index 00000000..3bb574c5 --- /dev/null +++ b/resources/assets/vue/vuex/modules/loadRequestQueue.js @@ -0,0 +1,71 @@ +export default { + state: { + queue: [] + }, + getters: { + isInQueue: (state) => (name) => { + let list = state.queue.find(list => list.name === name); + return !!list + }, + isInCompleteQueue: (state) => (name) => { + let list = state.queue.find(list => list.name === name); + return list ? !list.complete : false; + }, + getListDetails: (state) => (name) => { + return state.queue.find(list => list.name === name); + }, + getListData: (state, getters) => (name) => { + return (!getters.isInCompleteQueue()) ? state.queue.find(list => list.name === name).data : []; + }, + getSelectableList: (state, getters) => (name) => { + let list = state.queue.find(list => list.name === name); + return list ? list.data : []; + } + + }, + mutations: { + SET_QUEUE_LIST(state, payload){ + let list = state.queue.find(list => list.name === payload.name); + + list ? Object.assign(list, {page: payload.page, filters: payload.filters, complete: false}) : + state.queue.push({'name': payload.name, 'page': payload.page, 'filters': payload.filters, 'complete': false, 'data': []}); + + }, + SET_LIST_INCOMPLETE(state, payload) { + state.queue.find(list => list.name === payload.name).complete = false + }, + SET_LIST_COMPLETE(state, payload) { + let list = state.queue.find(list => list.name === payload.name); + + list.complete = true; + list.data = payload.data; + } + }, + actions: { + updateListQueue(store, payload){ + store.commit('SET_QUEUE_LIST', {name: payload.name, page: payload.page, filters: payload.filters}); + }, + fetchSelectable({ commit, getters, dispatch }, payload){ + if(!getters.isInQueue(payload.section)){ + dispatch('updateListQueue', {name: payload.section}); + dispatch('crudRequest', {endpoint: payload.endpoint, method: 'get'}).then(response => { + let success = response.ok; + response.json().then(response => { + + if(!success){return;} + + dispatch('completeList', {name: this.section, data: response.payload.data}) + + }); + }) + } + + }, + reloadList({ commit, getters }, payload){ + getters.isInQueue(payload.name) ? commit('SET_LIST_INCOMPLETE', {name: payload.name}) : commit('SET_QUEUE_LIST', {name: payload.name, page: 1, filters: {}}); + }, + completeList(store, payload){ + store.commit('SET_LIST_COMPLETE', {name: payload.name, data: payload.data}); + } + } +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/modules/toggleLoading.js b/resources/assets/vue/vuex/modules/toggleLoading.js new file mode 100644 index 00000000..635f9b5c --- /dev/null +++ b/resources/assets/vue/vuex/modules/toggleLoading.js @@ -0,0 +1,26 @@ +export default { + state: { + loading: [] + }, + getters: { + isLoading: (state) => (name) => { + let loader = state.loading.find(loader => loader.name === name); + return loader ? loader.active > 0 : false + } + }, + mutations: { + SET_LOADING_STATUS(state, payload){ + let loader = state.loading.find(loader => loader.name === payload.name); + if(payload.status){ + loader ? loader.active++ : state.loading.push({'name': payload.name, 'active': 1}) + } else { + loader ? loader.active-- : null + } + } + }, + actions: { + toggleLoading(store, payload){ + store.commit('SET_LOADING_STATUS', {name: payload.name, status: payload.status}); + } + } +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/modules/toggleSection.js b/resources/assets/vue/vuex/modules/toggleSection.js new file mode 100644 index 00000000..f4a523c4 --- /dev/null +++ b/resources/assets/vue/vuex/modules/toggleSection.js @@ -0,0 +1,29 @@ +export default { + state: { + toggleSections: [] + }, + getters: { + isShowing: (state) => (name) => { + return state.toggleSections.indexOf(name) !== -1 + } + }, + mutations: { + SET_TOGGLE_SECTION(state, payload){ + let index = state.toggleSections.indexOf(payload.name); + if(payload.status){ + if(index === -1){ + state.toggleSections.push(payload.name) + } + } else { + if(index !== -1){ + state.toggleSections.splice(state.toggleSections.indexOf(payload.name), 1) + } + } + } + }, + actions: { + toggleSection(store, payload){ + store.commit('SET_TOGGLE_SECTION', {name: payload.name, status: payload.status}); + } + } +} \ No newline at end of file diff --git a/resources/assets/vue/vuex/store.js b/resources/assets/vue/vuex/store.js new file mode 100644 index 00000000..2c3d911b --- /dev/null +++ b/resources/assets/vue/vuex/store.js @@ -0,0 +1,21 @@ +import Vue from 'vue' +import Vuex from 'vuex' +import toggleSection from './modules/toggleSection' +import toggleLoading from './modules/toggleLoading' +import createNotification from './modules/createNotification' +import crudRequest from './modules/crudRequest' +import authentication from './modules/authentication' +import loadRequestQueue from './modules/loadRequestQueue' + +Vue.use(Vuex); + +export default new Vuex.Store({ + modules: { + toggleSection, + toggleLoading, + loadRequestQueue, + createNotification, + crudRequest, + authentication + } +}) \ No newline at end of file diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php new file mode 100644 index 00000000..6598e2c0 --- /dev/null +++ b/resources/lang/en/auth.php @@ -0,0 +1,20 @@ + 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php new file mode 100644 index 00000000..d4814118 --- /dev/null +++ b/resources/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php new file mode 100644 index 00000000..2345a56b --- /dev/null +++ b/resources/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Your password has been reset!', + 'sent' => 'We have emailed your password reset link!', + 'throttled' => 'Please wait before retrying.', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that email address.", + +]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php new file mode 100644 index 00000000..7a15f437 --- /dev/null +++ b/resources/lang/en/validation.php @@ -0,0 +1,156 @@ + 'The :attribute must be accepted.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute must only contain letters.', + 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'The :attribute must only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'numeric' => 'The :attribute must be between :min and :max.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute must have between :min and :max items.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'numeric' => 'The :attribute must be greater than :value.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'string' => 'The :attribute must be greater than :value characters.', + 'array' => 'The :attribute must have more than :value items.', + ], + 'gte' => [ + 'numeric' => 'The :attribute must be greater than or equal :value.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'string' => 'The :attribute must be greater than or equal :value characters.', + 'array' => 'The :attribute must have :value items or more.', + ], + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lt' => [ + 'numeric' => 'The :attribute must be less than :value.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'string' => 'The :attribute must be less than :value characters.', + 'array' => 'The :attribute must have less than :value items.', + ], + 'lte' => [ + 'numeric' => 'The :attribute must be less than or equal :value.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'string' => 'The :attribute must be less than or equal :value characters.', + 'array' => 'The :attribute must not have more than :value items.', + ], + 'max' => [ + 'numeric' => 'The :attribute must not be greater than :max.', + 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'string' => 'The :attribute must not be greater than :max characters.', + 'array' => 'The :attribute must not have more than :max items.', + ], + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'numeric' => 'The :attribute must be at least :min.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute must have at least :min items.', + ], + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'password' => 'The password is incorrect.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values are present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'numeric' => 'The :attribute must be :size.', + 'file' => 'The :attribute must be :size kilobytes.', + 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute must contain :size items.', + ], + 'starts_with' => 'The :attribute must start with one of the following: :values.', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute format is invalid.', + 'uuid' => 'The :attribute must be a valid UUID.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap our attribute placeholder + | with something more reader friendly such as "E-Mail Address" instead + | of "email". This simply helps us make our message more expressive. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php new file mode 100644 index 00000000..e293e78a --- /dev/null +++ b/resources/views/layouts/base.blade.php @@ -0,0 +1,13 @@ + + + + @include('vendor/head') + + +
      + @yield('content') +
      + @include('vendor/js') + @stack('scripts') + + \ No newline at end of file diff --git a/resources/views/layouts/base_login.blade.php b/resources/views/layouts/base_login.blade.php new file mode 100644 index 00000000..dcd78ed9 --- /dev/null +++ b/resources/views/layouts/base_login.blade.php @@ -0,0 +1,7 @@ +@extends('layouts.base') + +@section('content') + + @yield('inner_content') + +@endsection \ No newline at end of file diff --git a/resources/views/layouts/base_pdf.blade.php b/resources/views/layouts/base_pdf.blade.php new file mode 100644 index 00000000..99eb376a --- /dev/null +++ b/resources/views/layouts/base_pdf.blade.php @@ -0,0 +1,152 @@ + + + + + + Invoice + + + + +@yield('inner_content') + + + \ No newline at end of file diff --git a/resources/views/layouts/base_portal.blade.php b/resources/views/layouts/base_portal.blade.php new file mode 100644 index 00000000..583dcc37 --- /dev/null +++ b/resources/views/layouts/base_portal.blade.php @@ -0,0 +1,19 @@ +@extends('layouts.base') + +@section('content') + @include('partials.header') +
      +
      +
      +
      +
      +
      + @yield('inner_content') +
      +
      +
      +
      + @include('partials.footer') +
      +
      +@endsection \ No newline at end of file diff --git a/resources/views/vendor/head.blade.php b/resources/views/vendor/head.blade.php new file mode 100644 index 00000000..994929c5 --- /dev/null +++ b/resources/views/vendor/head.blade.php @@ -0,0 +1,13 @@ + + +Exchange - Overseas Money Transfers + + + + + + + + + + \ No newline at end of file diff --git a/resources/views/vendor/js.blade.php b/resources/views/vendor/js.blade.php new file mode 100644 index 00000000..a761d204 --- /dev/null +++ b/resources/views/vendor/js.blade.php @@ -0,0 +1,12 @@ +{{--BEGIN VENDOR JS--}} + + + + +{{--END VENDOR JS--}} \ No newline at end of file diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php new file mode 100644 index 00000000..8cae33c8 --- /dev/null +++ b/resources/views/welcome.blade.php @@ -0,0 +1,7 @@ +@extends('layouts.base_login') + +@section('inner_content') + +

      welcome~

      + +@endsection \ No newline at end of file diff --git a/routes/api.php b/routes/api.php new file mode 100644 index 00000000..bcb8b189 --- /dev/null +++ b/routes/api.php @@ -0,0 +1,19 @@ +get('/user', function (Request $request) { + return $request->user(); +}); diff --git a/routes/channels.php b/routes/channels.php new file mode 100644 index 00000000..5d451e1f --- /dev/null +++ b/routes/channels.php @@ -0,0 +1,18 @@ +id === (int) $id; +}); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 00000000..e05f4c9a --- /dev/null +++ b/routes/console.php @@ -0,0 +1,19 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); diff --git a/routes/web.php b/routes/web.php new file mode 100644 index 00000000..b1303973 --- /dev/null +++ b/routes/web.php @@ -0,0 +1,18 @@ + + */ + +$uri = urldecode( + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) +); + +// This file allows us to emulate Apache's "mod_rewrite" functionality from the +// built-in PHP web server. This provides a convenient way to test a Laravel +// application without having installed a "real" web server software here. +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { + return false; +} + +require_once __DIR__.'/public/index.php'; diff --git a/storage/app/.gitignore b/storage/app/.gitignore new file mode 100644 index 00000000..8f4803c0 --- /dev/null +++ b/storage/app/.gitignore @@ -0,0 +1,3 @@ +* +!public/ +!.gitignore diff --git a/storage/app/public/.gitignore b/storage/app/public/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/app/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/.gitignore b/storage/framework/.gitignore new file mode 100644 index 00000000..05c4471f --- /dev/null +++ b/storage/framework/.gitignore @@ -0,0 +1,9 @@ +compiled.php +config.php +down +events.scanned.php +maintenance.php +routes.php +routes.scanned.php +schedule-* +services.json diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore new file mode 100644 index 00000000..01e4a6cd --- /dev/null +++ b/storage/framework/cache/.gitignore @@ -0,0 +1,3 @@ +* +!data/ +!.gitignore diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/framework/cache/data/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/sessions/.gitignore b/storage/framework/sessions/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/framework/sessions/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/testing/.gitignore b/storage/framework/testing/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/framework/testing/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/framework/views/.gitignore b/storage/framework/views/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/framework/views/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/logs/.gitignore b/storage/logs/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/webpack.mix.js b/webpack.mix.js new file mode 100644 index 00000000..71ad8ef5 --- /dev/null +++ b/webpack.mix.js @@ -0,0 +1,14 @@ +const mix = require('laravel-mix'); + +/* + |-------------------------------------------------------------------------- + | Mix Asset Management + |-------------------------------------------------------------------------- + | + | Mix provides a clean, fluent API for defining some Webpack build steps + | for your Laravel applications. By default, we are compiling the CSS + | file for the application as well as bundling up all the JS files. + | + */ + +mix.js('./resources/assets/vue/app.js', 'public/vue');